public void RenderShadows(ScriptableRenderContext renderContext, CommandBuffer cmd, CullingResults cullResults) { // Avoid to do any commands if there is no shadow to draw if (m_ShadowRequestCount == 0) { return; } // TODO remove DrawShadowSettings, lightIndex and splitData when scriptable culling is available ShadowDrawingSettings dss = new ShadowDrawingSettings(cullResults, 0); // Clear atlas render targets and draw shadows m_Atlas.RenderShadows(renderContext, cmd, dss); m_CascadeAtlas.RenderShadows(renderContext, cmd, dss); }
public void RenderShadows(ScriptableRenderContext renderContext, CommandBuffer cmd, CullingResults cullResults, HDCamera hdCamera) { // Avoid to do any commands if there is no shadow to draw if (m_ShadowRequestCount == 0) { return; } // TODO remove DrawShadowSettings, lightIndex and splitData when scriptable culling is available ShadowDrawingSettings dss = new ShadowDrawingSettings(cullResults, 0); // Clear atlas render targets and draw shadows m_Atlas.RenderShadows(renderContext, cmd, dss); m_CascadeAtlas.RenderShadows(renderContext, cmd, dss); // If the shadow algorithm is the improved moment shadow if (GetDirectionaShadowAlgorithm() == DirectionalShadowAlgorithm.IMS) { m_CascadeAtlas.ComputeMomentShadows(cmd, hdCamera); } }
public void RenderShadows(ScriptableRenderContext renderContext, CommandBuffer cmd, CullingResults cullResults, HDCamera hdCamera) { // Avoid to do any commands if there is no shadow to draw if (m_ShadowRequestCount == 0) { return; } // TODO remove DrawShadowSettings, lightIndex and splitData when scriptable culling is available ShadowDrawingSettings dss = new ShadowDrawingSettings(cullResults, 0); dss.useRenderingLayerMaskTest = hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers); // Clear atlas render targets and draw shadows using (new ProfilingSample(cmd, "Punctual Lights Shadows rendering", CustomSamplerId.RenderShadows.GetSampler())) { m_Atlas.RenderShadows(renderContext, cmd, dss); } using (new ProfilingSample(cmd, "Directional Light Shadows rendering", CustomSamplerId.RenderShadows.GetSampler())) { m_CascadeAtlas.RenderShadows(renderContext, cmd, dss); } using (new ProfilingSample(cmd, "Area Light Shadows rendering", CustomSamplerId.RenderShadows.GetSampler())) { m_AreaLightShadowAtlas.RenderShadows(renderContext, cmd, dss); if (m_AreaLightShadowAtlas.HasBlurredEVSM()) { m_AreaLightShadowAtlas.AreaShadowBlurMoments(cmd, hdCamera); } } // If the shadow algorithm is the improved moment shadow if (GetDirectionalShadowAlgorithm() == DirectionalShadowAlgorithm.IMS) { m_CascadeAtlas.ComputeMomentShadows(cmd, hdCamera); } }
public void RenderShadows(ScriptableRenderContext renderContext, CommandBuffer cmd, CullingResults cullResults, HDCamera hdCamera) { // Avoid to do any commands if there is no shadow to draw if (m_ShadowRequestCount == 0) { return; } // Clear atlas render targets and draw shadows using (new ProfilingSample(cmd, "Punctual Lights Shadows rendering", CustomSamplerId.RenderShadowMaps.GetSampler())) { m_Atlas.RenderShadows(cullResults, hdCamera.frameSettings, renderContext, cmd); } using (new ProfilingSample(cmd, "Directional Light Shadows rendering", CustomSamplerId.RenderShadowMaps.GetSampler())) { m_CascadeAtlas.RenderShadows(cullResults, hdCamera.frameSettings, renderContext, cmd); } using (new ProfilingSample(cmd, "Area Light Shadows rendering", CustomSamplerId.RenderShadowMaps.GetSampler())) { m_AreaLightShadowAtlas.RenderShadows(cullResults, hdCamera.frameSettings, renderContext, cmd); } }