浏览代码
Remove Pass Dependency on Renderer (#1794)
Remove Pass Dependency on Renderer (#1794)
* Remove pass dependency on renderer. This causes issues with the custom passes as cleanup is not handeld properly./main
GitHub
6 年前
当前提交
43aa9fb2
共有 25 个文件被更改,包括 218 次插入 和 171 次删除
-
11TestProjects/LWGraphicsTest/Assets/TestScripts/CustomLWPipe.cs
-
45com.unity.render-pipelines.lightweight/LWRP/DefaultRendererSetup.cs
-
2com.unity.render-pipelines.lightweight/LWRP/IRendererSetup.cs
-
25com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs
-
4com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs
-
6com.unity.render-pipelines.lightweight/LWRP/Passes/BeginXRRenderingPass.cs
-
19com.unity.render-pipelines.lightweight/LWRP/Passes/CopyColorPass.cs
-
21com.unity.render-pipelines.lightweight/LWRP/Passes/CopyDepthPass.cs
-
9com.unity.render-pipelines.lightweight/LWRP/Passes/CreateLightweightRenderTexturesPass.cs
-
17com.unity.render-pipelines.lightweight/LWRP/Passes/DepthOnlyPass.cs
-
8com.unity.render-pipelines.lightweight/LWRP/Passes/DirectionalShadowsPass.cs
-
6com.unity.render-pipelines.lightweight/LWRP/Passes/DrawSkyboxPass.cs
-
7com.unity.render-pipelines.lightweight/LWRP/Passes/EndXRRenderingPass.cs
-
13com.unity.render-pipelines.lightweight/LWRP/Passes/FinalBlitPass.cs
-
13com.unity.render-pipelines.lightweight/LWRP/Passes/LightweightForwardPass.cs
-
24com.unity.render-pipelines.lightweight/LWRP/Passes/LocalShadowsPass.cs
-
13com.unity.render-pipelines.lightweight/LWRP/Passes/OpaquePostProcessPass.cs
-
19com.unity.render-pipelines.lightweight/LWRP/Passes/RenderOpaqueForwardPass.cs
-
20com.unity.render-pipelines.lightweight/LWRP/Passes/RenderTransparentForwardPass.cs
-
15com.unity.render-pipelines.lightweight/LWRP/Passes/SceneViewDepthCopy.cs
-
14com.unity.render-pipelines.lightweight/LWRP/Passes/ScreenSpaceShadowResolvePass.cs
-
16com.unity.render-pipelines.lightweight/LWRP/Passes/ScriptableRenderPass.cs
-
6com.unity.render-pipelines.lightweight/LWRP/Passes/SetupForwardRenderingPass.cs
-
42com.unity.render-pipelines.lightweight/LWRP/Passes/SetupLightweightConstanstPass.cs
-
14com.unity.render-pipelines.lightweight/LWRP/Passes/TransparentPostProcessPass.cs
|
|||
using UnityEngine.Rendering; |
|||
using UnityEngine.Rendering.PostProcessing; |
|||
|
|||
public OpaquePostProcessPass(LightweightForwardRenderer renderer) : base(renderer) |
|||
{} |
|||
|
|||
private PostProcessRenderContext postContext { get; set; } |
|||
PostProcessRenderContext postProcessRenderContext, |
|||
this.postContext = postProcessRenderContext; |
|||
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults, ref RenderingData renderingData) |
|||
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults, |
|||
ref RenderingData renderingData) |
|||
LightweightPipeline.RenderPostProcess(cmd, renderer.postProcessRenderContext, ref renderingData.cameraData, descriptor.colorFormat, source, colorAttachmentHandle.Identifier(), true); |
|||
LightweightPipeline.RenderPostProcess(cmd, postContext, ref renderingData.cameraData, descriptor.colorFormat, source, colorAttachmentHandle.Identifier(), true); |
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
} |
|
|||
using UnityEngine.Rendering; |
|||
using UnityEngine.Rendering.PostProcessing; |
|||
|
|||
public TransparentPostProcessPass(LightweightForwardRenderer renderer) : base(renderer) |
|||
{} |
|||
|
|||
private PostProcessRenderContext postContext { get; set; } |
|||
PostProcessRenderContext postProcessRenderContext, |
|||
this.postContext = postProcessRenderContext; |
|||
public override void Execute(ref ScriptableRenderContext context, ref CullResults cullResults, ref RenderingData renderingData) |
|||
public override void Execute(ref ScriptableRenderContext context, |
|||
ref CullResults cullResults, |
|||
ref RenderingData renderingData) |
|||
LightweightPipeline.RenderPostProcess(cmd, renderer.postProcessRenderContext, ref renderingData.cameraData, descriptor.colorFormat, colorAttachmentHandle.Identifier(), BuiltinRenderTextureType.CameraTarget, false); |
|||
LightweightPipeline.RenderPostProcess(cmd, postContext, ref renderingData.cameraData, descriptor.colorFormat, colorAttachmentHandle.Identifier(), BuiltinRenderTextureType.CameraTarget, false); |
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue