diff --git a/src/bgfx_shader.sh b/src/bgfx_shader.sh index c165f2d2..5dd05240 100644 --- a/src/bgfx_shader.sh +++ b/src/bgfx_shader.sh @@ -59,13 +59,13 @@ struct BgfxSampler2DShadow float bgfxShadow2D(BgfxSampler2DShadow _sampler, vec3 _coord) { - return _sampler.m_texture.SampleCmp(_sampler.m_sampler, _coord.xy, _coord.z * 2.0 - 1.0); + return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xy, _coord.z * 2.0 - 1.0); } float bgfxShadow2DProj(BgfxSampler2DShadow _sampler, vec4 _coord) { vec3 coord = _coord.xyz * rcp(_coord.w); - return _sampler.m_texture.SampleCmp(_sampler.m_sampler, coord.xy, coord.z * 2.0 - 1.0); + return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, coord.xy, coord.z * 2.0 - 1.0); } struct BgfxSampler3D