mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 02:38:37 +12:00
vk/gl: Fix sampling of shadow2D textures
This commit is contained in:
parent
69d3d47901
commit
110974af0b
4 changed files with 37 additions and 6 deletions
|
@ -107,8 +107,18 @@ void GLFragmentDecompilerThread::insertConstants(std::stringstream & OS)
|
|||
std::string samplerType = PT.type;
|
||||
int index = atoi(&PI.name.data()[3]);
|
||||
|
||||
if ((m_prog.shadow_textures & (1 << index)) > 0)
|
||||
samplerType = "sampler2DShadow";
|
||||
const auto mask = (1 << index);
|
||||
|
||||
if (m_prog.shadow_textures & mask)
|
||||
{
|
||||
if (m_shadow_sampled_textures & mask)
|
||||
{
|
||||
if (m_2d_sampled_textures & mask)
|
||||
LOG_ERROR(RSX, "Texture unit %d is sampled as both a shadow texture and a depth texture", index);
|
||||
else
|
||||
samplerType = "sampler2DShadow";
|
||||
}
|
||||
}
|
||||
|
||||
OS << "uniform " << samplerType << " " << PI.name << ";" << std::endl;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue