浏览代码

ShadowStrength only performed if NICE_QUALITY is set.

/2018.1
Felipe Lira 7 年前
当前提交
d8e1886a
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 8
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Shadows.hlsl

8
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Shadows.hlsl


half attenuation = SAMPLE_TEXTURE2D(_ScreenSpaceShadowMap, sampler_ScreenSpaceShadowMap, shadowCoord.xy).x;
#endif
// Apply shadow strength
return LerpWhiteTo(attenuation, GetShadowStrength());
return attenuation;
}
inline real SampleShadowmap(float4 shadowCoord)

#else
// 1-tap hardware comparison
attenuation = SAMPLE_TEXTURE2D_SHADOW(_ShadowMap, sampler_ShadowMap, shadowCoord.xyz);
#endif
#if SHADER_HINT_NICE_QUALITY
// Apply shadow strength
attenuation = LerpWhiteTo(attenuation, GetShadowStrength());
#endif
// Shadow coords that fall out of the light frustum volume must always return attenuation 1.0

正在加载...
取消
保存