Skip to content

Commit d0c17be

Browse files
committed
Fixed the clear issue that was causing the RT to be clear before setting the camera.
1 parent 3e03541 commit d0c17be

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Assets/LowEndMobilePipeline/LowEndMobilePipeline.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ public override void Render(ScriptableRenderContext context, Camera[] cameras)
5050
cullingParameters.shadowDistance = m_ShadowSettings.maxShadowDistance;
5151
CullResults cull = CullResults.Cull(ref cullingParameters, context);
5252

53-
var cmd = new CommandBuffer() {name = "Clear"};
54-
cmd.ClearRenderTarget(true, true, Color.black);
55-
context.ExecuteCommandBuffer(cmd);
56-
cmd.Dispose();
57-
5853
// Render Shadow Map
5954
bool shadowsRendered = RenderShadows(cull, context);
6055

6156
// Draw Opaques with support to one directional shadow cascade
6257
// Setup camera matrices
6358
context.SetupCameraProperties(camera);
6459

60+
var cmd = new CommandBuffer() { name = "Clear" };
61+
cmd.ClearRenderTarget(true, true, Color.black);
62+
context.ExecuteCommandBuffer(cmd);
63+
cmd.Dispose();
64+
6565
// Setup light and shadow shader constants
6666
SetupLightShaderVariables(cull.visibleLights, context);
6767
if (shadowsRendered)

0 commit comments

Comments
 (0)