|
|
|
|
|
|
|
|
|
|
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; |
|
|
|