void OnRenderImage(RenderTexture src, RenderTexture dest) { #if USE_SCAN_DEPTH screenShadowBlit.SetInt("needFlip", 1); #else screenShadowBlit.SetInt("needFlip", 0); #endif screenShadowBlit.SetTexture("_ScreenShadowMap", ScreenShadowMap); if (VRDepthColor == null) { VRDepthColor = GetComponent <CopyCameraDepthColor>(); } screenShadowBlit.SetTexture("_VRDepthColor", VRDepthColor.GetRT(renderCamera.stereoActiveEye)); screenShadowBlit.SetFloat("_shadowBlitBais", shadowBlitBais); Graphics.Blit(src, dest, screenShadowBlit); }
private void OnRenderImage(RenderTexture source, RenderTexture destination) { Camera.MonoOrStereoscopicEye eyeSide = currentCamera.stereoActiveEye; RenderWithARDepthMaterial.SetFloat("_CullingBaise", CullingBaise); RenderWithARDepthMaterial.SetTexture("_MRDepthNormal", MRDepthNormal); RenderWithARDepthMaterial.SetTexture("_SeeThroughColor", (eyeSide == Camera.MonoOrStereoscopicEye.Left) ? seeThroughL.GetRT() : seeThroughR.GetRT()); RenderWithARDepthMaterial.SetTexture("_VRDepthColor", VRCamera.GetRT(eyeSide)); //RenderWithMRDepthMaterial.SetTexture("_VRDepth", VRCamera.DepthRT); RenderWithARDepthMaterial.SetFloat("_softCullLength", softCullLength); // RenderWithMRDepthMaterial.SetFloat("_softCullFactor", softCullFactor); RenderWithARDepthMaterial.SetFloat("_GlowAmount", glowAmount); RenderWithARDepthMaterial.SetFloat("_CoefAmount", coefAmount); RenderWithARDepthMaterial.SetTexture("_SoftCullingMap", softEdgeWeight.SoftEdgeWeightRT); Graphics.Blit(source, destination, RenderWithARDepthMaterial); }
private void OnRenderImage(RenderTexture source, RenderTexture destination) { mergeDepthMat.SetTexture("_CameraRenderDepth", cameraRenderRT); mergeDepthMat.SetTexture("_VRDepthColor", copyCameraColorDepth.GetRT(currentCamera.stereoActiveEye)); #if USE_2RT if (currentCamera.stereoActiveEye == Camera.MonoOrStereoscopicEye.Left) { Graphics.Blit(null, RTL, mergeDepthMat); } else { Graphics.Blit(null, RTR, mergeDepthMat); } #else Graphics.Blit(null, RT, mergeDepthMat); #endif if (debugRender != null) { debugRender.material.mainTexture = RTL; } }