浏览代码

ShadowStrength only performed if NICE_QUALITY is set.

/main
Felipe Lira 7 年前
当前提交
e70fb89f
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 10
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Shadows.hlsl

10
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)

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
return (OUTSIDE_SHADOW_BOUNDS(shadowCoord)) ? 1.0 : attenuation;
}

half RealtimeShadowAttenuation(float4 shadowCoord)
{
#if NO_SHADOWS
return 1.0h;
return 1.0h;
#elif SHADOWS_SCREEN
return SampleScreenSpaceShadowMap(shadowCoord);
#else

正在加载...
取消
保存