浏览代码

Fixed a shadow issue that was causing the shadowmap to be applied to the wrong light.

/RenderPassXR_Sandbox
Felipe Lira 7 年前
当前提交
88ac7b57
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader
  2. 2
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightStandardShader.shader

2
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader


INITIALIZE_LIGHT(lightData, lightIndex);
half lightAtten = ComputeLightAttenuation(lightData, normal, worldPos, lightDirection);
#ifdef _SHADOWS
lightAtten *= max(shadowAttenuation, half(lightIter != _ShadowData.x));
lightAtten *= max(shadowAttenuation, half(lightIndex != _ShadowData.x));
#endif
#ifdef LIGHTWEIGHT_SPECULAR_HIGHLIGHTS

2
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightStandardShader.shader


INITIALIZE_LIGHT(light, lightIndex);
half lightAtten = ComputeLightAttenuation(light, normal, i.posWS.xyz, lightDirection);
#ifdef _SHADOWS
lightAtten *= max(shadowAttenuation, half(lightIter != _ShadowData.x));
lightAtten *= max(shadowAttenuation, half(lightIndex != _ShadowData.x));
#endif
half NdotL = saturate(dot(normal, lightDirection));
half RdotL = saturate(dot(reflectVec, lightDirection));

正在加载...
取消
保存