Skip to content

Commit

Permalink
basic example: whoops it was not clearing the depth buffer :)
Browse files Browse the repository at this point in the history
  • Loading branch information
aras-p committed Nov 23, 2016
1 parent 673f88f commit acc230b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Assets/BasicRenderLoopTutorial/BasicRenderLoop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ bool Render (Camera[] cameras, RenderLoop loop)
// per-camera built-in shader variables).
loop.SetupCameraProperties (camera);

// clear depth buffer
var cmd = new CommandBuffer();
cmd.ClearRenderTarget(true, false, Color.black);
loop.ExecuteCommandBuffer(cmd);
cmd.Release();

// Setup global lighting shader variables
SetupLightShaderVariables (cull.visibleLights, loop);

Expand Down

0 comments on commit acc230b

Please sign in to comment.