浏览代码

Merge pull request #1184 from Unity-Technologies/backport/shadow-backports

Backport/shadow backports
/tag-1.1.4-preview
GitHub 7 年前
当前提交
31303452
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs
  2. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Shadows.hlsl

2
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


// stereo functionality, we use the screen-space shadow map as the source (until we have
// a better solution).
// An alternative would be DrawProcedural, but that would require further changes in the shader.
cmd.SetRenderTarget(m_ScreenSpaceShadowMapRT);
cmd.ClearRenderTarget(true, true, Color.white);
cmd.Blit(m_ScreenSpaceShadowMapRT, m_ScreenSpaceShadowMapRT, m_ScreenSpaceShadowsMaterial);
StartStereoRendering(ref context, frameRenderingConfiguration);

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


attenuation = SAMPLE_TEXTURE2D_SHADOW(_ShadowMap, sampler_ShadowMap, shadowCoord.xyz);
#endif
#if SHADER_HINT_NICE_QUALITY
#endif
// Shadow coords that fall out of the light frustum volume must always return attenuation 1.0
return BEYOND_SHADOW_FAR(shadowCoord) ? 1.0 : attenuation;

正在加载...
取消
保存