Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed wrong ordering in FrameSettings (Normalize Reflection Probes)
- Fixed ThreadMapDetail to saturate AO & smoothness strength inputs to prevent out-of-bounds values set by users (1357740)
- Allow negative wind speed parameter.
- Fixed custom pass custom buffer not bound after being created inside a custom pass.

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ PrepassOutput RenderPrepass(RenderGraph renderGraph,

using (new XRSinglePassScope(renderGraph, hdCamera))
{
// Bind the custom color/depth before the first custom pass
BindCustomPassBuffers(renderGraph, hdCamera);

RenderCustomPass(renderGraph, hdCamera, colorBuffer, result, customPassCullingResults, cullingResults, CustomPassInjectionPoint.BeforeRendering, aovRequest, aovBuffers);

RenderRayTracingDepthPrepass(renderGraph, cullingResults, hdCamera, result.depthBuffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1850,33 +1850,6 @@ void ResetCameraSizeForAfterPostProcess(RenderGraph renderGraph, HDCamera hdCame
}
}

class BindCustomPassBuffersPassData
{
public Lazy<RTHandle> customColorTexture;
public Lazy<RTHandle> customDepthTexture;
}

void BindCustomPassBuffers(RenderGraph renderGraph, HDCamera hdCamera)
{
if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass))
{
using (var builder = renderGraph.AddRenderPass<BindCustomPassBuffersPassData>("Bind Custom Pass Buffers", out var passData))
{
passData.customColorTexture = m_CustomPassColorBuffer;
passData.customDepthTexture = m_CustomPassDepthBuffer;

builder.SetRenderFunc(
(BindCustomPassBuffersPassData data, RenderGraphContext ctx) =>
{
if (data.customColorTexture.IsValueCreated)
ctx.cmd.SetGlobalTexture(HDShaderIDs._CustomColorTexture, data.customColorTexture.Value);
if (data.customDepthTexture.IsValueCreated)
ctx.cmd.SetGlobalTexture(HDShaderIDs._CustomDepthTexture, data.customDepthTexture.Value);
});
}
}
}

#if UNITY_EDITOR
class RenderWireOverlayPassData
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ internal void ExecuteInternal(RenderGraph renderGraph, HDCamera hdCamera, Cullin
if (customPass.currentRenderTarget.normalBufferRG.IsValid() && customPass.injectionPoint != CustomPassInjectionPoint.AfterPostProcess)
ctx.cmd.SetGlobalTexture(HDShaderIDs._NormalBufferTexture, customPass.currentRenderTarget.normalBufferRG);

if (customPass.currentRenderTarget.customColorBuffer.IsValueCreated)
ctx.cmd.SetGlobalTexture(HDShaderIDs._CustomColorTexture, customPass.currentRenderTarget.customColorBuffer.Value);
if (customPass.currentRenderTarget.customDepthBuffer.IsValueCreated)
ctx.cmd.SetGlobalTexture(HDShaderIDs._CustomDepthTexture, customPass.currentRenderTarget.customDepthBuffer.Value);

if (!customPass.isSetup)
{
customPass.Setup(ctx.renderContext, ctx.cmd);
Expand Down