浏览代码

Small change to make shadow settings consistent when screenspace shadows are not supported/want to be disabled.

/main
Felipe Lira 7 年前
当前提交
4ecab1bc
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightShadowPass.cs

8
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightShadowPass.cs


private void BuildShadowSettings(LightweightPipelineAsset pipelineAsset)
{
bool isOpenGLES2 = SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES2;
// Until we can have keyword stripping forcing single cascade hard shadows on gles2
bool supportsScreenSpaceShadows = SystemInfo.graphicsDeviceType != GraphicsDeviceType.OpenGLES2;
// Until we can have keyword stripping forcing single cascade hard shadows on gles2
m_ShadowSettings.screenSpace = !isOpenGLES2;
m_ShadowSettings.directionalLightCascadeCount = (isOpenGLES2) ? 1 : pipelineAsset.CascadeCount;
m_ShadowSettings.screenSpace = supportsScreenSpaceShadows;
m_ShadowSettings.directionalLightCascadeCount = (m_ShadowSettings.screenSpace) ? pipelineAsset.CascadeCount : 1;
m_ShadowSettings.directionalShadowAtlasWidth = pipelineAsset.ShadowAtlasResolution;
m_ShadowSettings.directionalShadowAtlasHeight = pipelineAsset.ShadowAtlasResolution;

正在加载...
取消
保存