mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
D3D11: Changed shadow sampler to SampleCmpLevelZero.
This commit is contained in:
parent
837b1f5461
commit
d354494c1f
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue