internal ShadowResult RenderShadows(RenderGraph renderGraph, HDCamera hdCamera, CullingResults cullResults) { var result = new ShadowResult(); // Avoid to do any commands if there is no shadow to draw if (m_ShadowRequestCount == 0) { return(result); } result.punctualShadowResult = m_Atlas.RenderShadows(renderGraph, cullResults, hdCamera.frameSettings, "Punctual Lights Shadows rendering"); result.directionalShadowResult = m_CascadeAtlas.RenderShadows(renderGraph, cullResults, hdCamera.frameSettings, "Directional Light Shadows rendering"); result.areaShadowResult = m_AreaLightShadowAtlas.RenderShadows(renderGraph, cullResults, hdCamera.frameSettings, "Area Light Shadows rendering"); return(result); }
internal static ShadowResult ReadShadowResult(ShadowResult shadowResult, RenderGraphBuilder builder) { var result = new ShadowResult(); if (shadowResult.punctualShadowResult.IsValid()) { result.punctualShadowResult = builder.ReadTexture(shadowResult.punctualShadowResult); } if (shadowResult.directionalShadowResult.IsValid()) { result.directionalShadowResult = builder.ReadTexture(shadowResult.directionalShadowResult); } if (shadowResult.areaShadowResult.IsValid()) { result.areaShadowResult = builder.ReadTexture(shadowResult.areaShadowResult); } return(result); }