D3D11: Changed shadow sampler to SampleCmpLevelZero.

This commit is contained in:
Branimir Karadžić 2015-08-10 17:44:33 -07:00
parent 837b1f5461
commit d354494c1f

View file

@ -59,13 +59,13 @@ struct BgfxSampler2DShadow
float bgfxShadow2D(BgfxSampler2DShadow _sampler, vec3 _coord) 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) float bgfxShadow2DProj(BgfxSampler2DShadow _sampler, vec4 _coord)
{ {
vec3 coord = _coord.xyz * rcp(_coord.w); 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 struct BgfxSampler3D