Fixed shadow map sampling for 130 and above glsl profiles. (#2496)
* Fixed shadowmap sampling for 130 and above glsl profiles. * Fixed shadowmap sampling on OpenGL ES 3 and onwards.
This commit is contained in:
parent
fc461ce8b1
commit
b8d2f01b98
@ -2304,7 +2304,7 @@ namespace bgfx
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (need130)
|
if (need130 || (glsl_profile >= 130))
|
||||||
{
|
{
|
||||||
bx::stringPrintf(code
|
bx::stringPrintf(code
|
||||||
, "#define bgfxShadow2D(_sampler, _coord) vec4_splat(texture(_sampler, _coord))\n"
|
, "#define bgfxShadow2D(_sampler, _coord) vec4_splat(texture(_sampler, _coord))\n"
|
||||||
@ -2370,6 +2370,13 @@ namespace bgfx
|
|||||||
"#define shadow2DProj shadow2DProjEXT\n"
|
"#define shadow2DProj shadow2DProjEXT\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bx::stringPrintf(code
|
||||||
|
, "#define shadow2D(_sampler, _coord) texture(_sampler, _coord)\n"
|
||||||
|
"#define shadow2DProj(_sampler, _coord) textureProj(_sampler, _coord)\n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (usesGpuShader5)
|
if (usesGpuShader5)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user