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
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ PrefabInstance:
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: renderGraphCompatible
value: 0
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3}
Expand Down Expand Up @@ -930,6 +930,7 @@ MonoBehaviour:
m_EnableSpotReflector: 0
m_LuxAtDistance: 1
m_InnerSpotPercent: 0
m_SpotIESCutoffPercent: 100
m_LightDimmer: 1
m_VolumetricDimmer: 1
m_LightUnit: 2
Expand All @@ -948,6 +949,8 @@ MonoBehaviour:
m_ApplyRangeAttenuation: 1
m_DisplayAreaLightEmissiveMesh: 0
m_AreaLightCookie: {fileID: 0}
m_IESPoint: {fileID: 0}
m_IESSpot: {fileID: 0}
m_AreaLightShadowCone: 120
m_UseScreenSpaceShadows: 0
m_InteractsWithSky: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ PrefabInstance:
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: renderGraphCompatible
value: 0
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3}
Original file line number Diff line number Diff line change
Expand Up @@ -3643,6 +3643,7 @@ MonoBehaviour:
m_EnableSpotReflector: 0
m_LuxAtDistance: 1
m_InnerSpotPercent: 0
m_SpotIESCutoffPercent: 100
m_LightDimmer: 1
m_VolumetricDimmer: 1
m_LightUnit: 2
Expand All @@ -3661,6 +3662,8 @@ MonoBehaviour:
m_ApplyRangeAttenuation: 1
m_DisplayAreaLightEmissiveMesh: 0
m_AreaLightCookie: {fileID: 0}
m_IESPoint: {fileID: 0}
m_IESSpot: {fileID: 0}
m_AreaLightShadowCone: 120
m_UseScreenSpaceShadows: 0
m_InteractsWithSky: 1
Expand Down Expand Up @@ -4111,7 +4114,7 @@ PrefabInstance:
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: renderGraphCompatible
value: 0
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ internal ResourceHandle(int value, RenderGraphResourceType type)
[DebuggerDisplay("Texture ({handle})")]
public struct TextureHandle
{
private static TextureHandle s_NullHandle = new TextureHandle();

/// <summary>
/// Returns a null texture handle
/// </summary>
/// <returns>A null texture handle.</returns>
public static TextureHandle nullHandle { get { return s_NullHandle; } }

internal ResourceHandle handle;

internal TextureHandle(int handle) { this.handle = new ResourceHandle(handle, RenderGraphResourceType.Texture); }
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ internal enum HDProfileId
UpsampleLowResTransparent,

// Post-processing
GuardBandClear,
AlphaCopy,
StopNaNs,
FixedExposure,
DynamicExposure,
ApplyExposure,
TemporalAntialiasing,
DepthOfField,
DepthOfFieldKernel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class AfterPostProcessPassData
}

TextureHandle RenderPostProcess( RenderGraph renderGraph,
PrepassOutput prepassOutput,
TextureHandle inputColor,
TextureHandle depthBuffer,
TextureHandle backBuffer,
CullingResults cullResults,
HDCamera hdCamera)
Expand All @@ -36,7 +36,7 @@ TextureHandle RenderPostProcess( RenderGraph renderGraph,
passData.afterPostProcessBuffer = builder.UseColorBuffer(renderGraph.CreateTexture(
new TextureDesc(Vector2.one, true, true) { colorFormat = GraphicsFormat.R8G8B8A8_SRGB, clearBuffer = true, clearColor = Color.black, name = "OffScreen AfterPostProcess" }), 0);
if (passData.parameters.useDepthBuffer)
passData.depthStencilBuffer = builder.UseDepthBuffer(depthBuffer, DepthAccess.ReadWrite);
passData.depthStencilBuffer = builder.UseDepthBuffer(prepassOutput.depthBuffer, DepthAccess.ReadWrite);
passData.opaqueAfterPostprocessRL = builder.UseRendererList(renderGraph.CreateRendererList(passData.parameters.opaqueAfterPPDesc));
passData.transparentAfterPostprocessRL = builder.UseRendererList(renderGraph.CreateRendererList(passData.parameters.transparentAfterPPDesc));

Expand All @@ -60,7 +60,9 @@ TextureHandle RenderPostProcess( RenderGraph renderGraph,
parameters.blueNoise,
inputColor,
afterPostProcessBuffer,
depthBuffer,
prepassOutput.resolvedDepthBuffer,
prepassOutput.depthPyramidTexture,
prepassOutput.resolvedMotionVectorsBuffer,
dest,
parameters.flipYInPostProcess
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void ExecuteWithRenderGraph( RenderRequest renderRequest,

aovRequest.PushCameraTexture(m_RenderGraph, AOVBuffers.Color, hdCamera, colorBuffer, aovBuffers);

TextureHandle postProcessDest = RenderPostProcess(m_RenderGraph, colorBuffer, prepassOutput.resolvedDepthBuffer, backBuffer, cullingResults, hdCamera);
TextureHandle postProcessDest = RenderPostProcess(m_RenderGraph, prepassOutput, colorBuffer, backBuffer, cullingResults, hdCamera);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above, this will cause a regression.


// TODO RENDERGRAPH
//// If requested, compute histogram of the very final image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5342,6 +5342,7 @@ void RenderPostProcess(CullingResults cullResults, HDCamera hdCamera, RenderTarg
finalRT: destination,
depthBuffer: m_SharedRTManager.GetDepthStencilBuffer(),
depthMipChain: m_SharedRTManager.GetDepthTexture(),
motionVecTexture: m_SharedRTManager.GetMotionVectorsBuffer(),
flipY: parameters.flipYInPostProcess
);
}
Expand Down