public override void Create() { renderTargets = new FluidRenderingUtils.FluidRenderTargets(); renderTargets.foam = Shader.PropertyToID("_Foam"); renderTargets.depth = Shader.PropertyToID("_FluidDepthTexture"); renderTargets.thickness1 = Shader.PropertyToID("_FluidThickness1"); renderTargets.thickness2 = Shader.PropertyToID("_FluidThickness2"); renderTargets.smoothDepth = Shader.PropertyToID("_FluidSurface"); //smoothed depth renderTargets.normals = Shader.PropertyToID("_FluidNormals"); m_ThicknessPass = new ThicknessBufferPass(); m_ThicknessPass.renderPassEvent = RenderPassEvent.BeforeRenderingTransparents + 1; m_SurfacePass = new SurfaceReconstruction(); m_SurfacePass.renderPassEvent = RenderPassEvent.BeforeRenderingTransparents + 1; m_FoamPass = new FoamPass(); m_FoamPass.renderPassEvent = RenderPassEvent.BeforeRenderingTransparents + 1; m_RenderFluidPass = new RenderFluidPass(RenderTargetHandle.CameraTarget); m_RenderFluidPass.renderPassEvent = RenderPassEvent.BeforeRenderingTransparents + 1; }
public override void Create() { m_RenderFluidPass = new RenderFluidPass(RenderTargetHandle.CameraTarget); m_RenderFluidPass.renderPassEvent = RenderPassEvent.AfterRenderingSkybox; }