Skip to content

Commit

Permalink
Compatible with Unity5
Browse files Browse the repository at this point in the history
Using camera.SetTargetBuffers instead of  Graphics.SetRenderTarget.
Set MainCamera 's clear-flag solid-color  as solid-color.
  • Loading branch information
chengkehan committed Dec 9, 2016
1 parent 6f34d8a commit a55f887
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/DeferredShading/Scripts/DSRenderer.cs
Expand Up @@ -186,7 +186,7 @@ void UpdateRenderTargets()

public void SetRenderTargetsGBuffer()
{
Graphics.SetRenderTarget(rbGBuffer, rtNormalBuffer.depthBuffer);
cam.SetTargetBuffers(rbGBuffer, rtNormalBuffer.depthBuffer);
}

public void SetRenderTargetsComposite()
Expand Down Expand Up @@ -233,7 +233,7 @@ void OnPreRender()
rbGBuffer[i] = rtGBuffer[i].colorBuffer;
}

Graphics.SetRenderTarget(rbGBuffer, rtNormalBuffer.depthBuffer);
cam.SetTargetBuffers(rbGBuffer, rtNormalBuffer.depthBuffer);
matGBufferClear.SetPass(0);
DrawFullscreenQuad();

Expand Down
Binary file modified Assets/TestAnd.unity
Binary file not shown.
Binary file modified Assets/TestBeam.unity
Binary file not shown.
Binary file modified Assets/TestBoxCell.unity
Binary file not shown.
Binary file modified Assets/TestCSParticleGBufferCollision.unity
Binary file not shown.
Binary file modified Assets/TestCrawlingLight.unity
Binary file not shown.
Binary file modified Assets/TestException.unity
Binary file not shown.
Binary file modified Assets/TestExplosion.unity
Binary file not shown.
Binary file modified Assets/TestGPUParticle.unity
Binary file not shown.
Binary file modified Assets/TestHexagon.unity
Binary file not shown.
Binary file modified Assets/TestMotionTrail.unity
Binary file not shown.
Binary file modified Assets/TestQuixelMaterials.unity
Binary file not shown.
Binary file modified Assets/TestRaymarching.unity
Binary file not shown.
Binary file modified Assets/TestShadow.unity
Binary file not shown.
Binary file modified Assets/TestShooter.unity
Binary file not shown.
Binary file modified Assets/TestSubtraction2.unity
Binary file not shown.
Binary file modified Assets/TestSurfaceLight.unity
Binary file not shown.
Binary file modified Assets/TestVectorField.unity
Binary file not shown.
Binary file modified Assets/TestWater.unity
Binary file not shown.

0 comments on commit a55f887

Please sign in to comment.