Skip to content

Merge Hd/bugfix #5100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
5945333
[HDRP] Fix AxF debug output in certain configurations (#4641)
pmavridis May 26, 2021
64a6c13
Fix SSR accumulation white flash (#4648)
FrancescoC-unity May 26, 2021
f49b710
Display Info Box when MSAA + ray tracing is onr (#4627)
FrancescoC-unity May 26, 2021
05cc16a
Fix distortion when resizing the window in player builds with the Gra…
pmavridis May 28, 2021
2325e3f
Add support for the camera bridge in the graphics compositor (#4599)
pmavridis May 28, 2021
c09379f
Merge branch 'master' into hd/bugfix
sebastienlagarde May 28, 2021
b5962c9
Fix Jittered Project Matrix Infinite Far Clip Plane (#4638)
johnpars May 29, 2021
77b6b7f
Fixed a memory leak related to not disposing of the RTAS at the end H…
anisunity May 29, 2021
bf941a9
Fix custom pass utils Blur + Copy overdraw. (#4623)
alelievr May 29, 2021
806dfbe
Fix draw procedural invalid pass idx 1 on first template load (#4632)
FrancescoC-unity May 29, 2021
88779ea
Changed light reset to preserve type (#4624)
adrien-de-tocqueville May 29, 2021
30fffd5
Revert "Add support for the camera bridge in the graphics compositor …
sebastienlagarde May 29, 2021
aabbb4b
AxF carpaint: Fix a compilation issue on Vulkan until the cpp HLSLcc …
slunity May 29, 2021
dfdb311
Revert "Revert "Add support for the camera bridge in the graphics com…
sebastienlagarde May 29, 2021
891fda0
revert: Fix distortion when resizing the window in player builds with…
sebastienlagarde May 29, 2021
7b17e06
Merge branch 'master' into hd/bugfix
sebastienlagarde May 29, 2021
32df1bf
Merge branch 'master' into hd/bugfix
sebastienlagarde May 29, 2021
8fd1108
Fixed the ray traced sub subsurface scattering debug mode not display…
anisunity May 29, 2021
0032b9c
Fix for discrepancies in saturation and intensity between screen spac…
FrancescoC-unity May 29, 2021
41716f0
Fix a Divide-by-Zero Warning for some Anisotropic Models (Fabric, Lit…
johnpars May 29, 2021
333c800
[HDRP] Fix VfX lit particle AOV output color space (#4646)
pmavridis May 29, 2021
809316c
[HDRP][Path Tracing] Fixed transparent unlit (#4605)
eturquin May 31, 2021
7b1ad29
Merge branch 'master' into hd/bugfix
sebastienlagarde May 31, 2021
08a578d
Fix distortion with MSAA (#4711)
sebastienlagarde May 31, 2021
3c418c0
Fix contact shadow debug views (#4720)
FrancescoC-unity May 31, 2021
352f65d
Update Decal-Projector.md (#4695)
adrien-de-tocqueville May 31, 2021
acc5073
[HDRP] Fixed nullref when deleting the texture asset assigned in a lo…
alelievr May 31, 2021
fd54a00
Merge branch 'master' into hd/bugfix
sebastienlagarde May 31, 2021
1672dc6
Fix decal layer enum (#4753)
sebastienlagarde Jun 2, 2021
c40c5c5
Fix typo
sebastienlagarde Jun 3, 2021
b443d6e
Fixed reflection probes being injected into the ray tracing light clu…
anisunity Jun 7, 2021
bc1d498
Ignore hybrid duplicated reflection probes during light baking (#4663)
adrien-de-tocqueville Jun 7, 2021
99bc6fd
Fix double sided option moving when toggling it in the material UI (#…
alelievr Jun 7, 2021
4a184af
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 7, 2021
d2368ba
Fix formatting
sebastienlagarde Jun 7, 2021
e5521be
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 7, 2021
97a953e
Fix volumetric fog in planar reflections (#4736)
FrancescoC-unity Jun 7, 2021
419850b
Fix motion blur compute dispatch size (#4737)
adrien-de-tocqueville Jun 7, 2021
fc7efde
- Updated the recursive rendering documentation (case 1338639). (#4759)
anisunity Jun 7, 2021
ca93d88
Fix issue with OnDemand directional shadow map being corrupted when r…
FrancescoC-unity Jun 7, 2021
c674c41
Fix cropping issue with the compositor camera bridge (#4802)
pmavridis Jun 7, 2021
e47a172
Fix for unused resources in depth of field (#4796)
Adrian1066 Jun 8, 2021
131d1cd
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 8, 2021
666d37f
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 9, 2021
61518ea
Removing the word Radii from exposure settings (#4854)
FrancescoC-unity Jun 9, 2021
85ebbc2
[HDRP][Path Tracing] Support for shadow mattes (#4745)
eturquin Jun 10, 2021
ad127f5
Revert "[HDRP][Path Tracing] Support for shadow mattes (#4745)"
sebastienlagarde Jun 10, 2021
2c08712
Fixed the transparent cutoff not working properly in semi-transparent…
anisunity Jun 10, 2021
83ddbed
Use non jittered projection in outline pass (#4836)
adrien-de-tocqueville Jun 10, 2021
2d9d391
[HDRP][Path Tracing] Sky settings now properly taken into account whe…
eturquin Jun 10, 2021
30cbb05
Fix Resolution Issues for Physically Based Depth of Field (#4848)
johnpars Jun 14, 2021
5c6b711
Fixed bug introduced by sky-for-recorder support. (#4906)
eturquin Jun 14, 2021
3cb7354
[Fogbugz 1341576] Memory leaks when the player is paused, and the use…
kecho Jun 15, 2021
1ee6c2d
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 16, 2021
7615d7b
[HDRP] Fixed shadergraph double save (#4916)
alelievr Jun 16, 2021
be0e48e
Merge master
sebastienlagarde Jun 16, 2021
30135ea
Write 0 instead of micro sized motion vectors + fix extremely fast ve…
FrancescoC-unity Jun 16, 2021
df51161
[HDRP] Fix material upgrader (#4821)
alelievr Jun 16, 2021
2bc152b
[HDRP] Fix custom pass volume not executed in scene view (#4860)
alelievr Jun 16, 2021
bac78c1
Merge branch 'master' of https://github.com/Unity-Technologies/Graphi…
JulienIgnace-Unity Jun 17, 2021
b0442c6
Fix reflection probe tootltip (#4890)
adrien-de-tocqueville Jun 17, 2021
51af23d
Updated the Physically Based Sky documentation for baked lights (#4891)
adrien-de-tocqueville Jun 17, 2021
7f5b564
Fixed remapping of depth pyramid debug (#4893)
JulienIgnace-Unity Jun 17, 2021
24b3ea9
Fix wobble-like (or tearing-like) SSAO issues when temporal reproject…
FrancescoC-unity Jun 17, 2021
3f2772b
Fix Asymmetric Projection Matrices and Fog / Pathtracing (#4926)
johnpars Jun 17, 2021
4d1c13c
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 17, 2021
0bc3a8b
Merge master
sebastienlagarde Jun 18, 2021
0833363
Revert: Fix wobble-like (or tearing-like) SSAO issues when temporal r…
sebastienlagarde Jun 18, 2021
b307e87
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 18, 2021
2f4a545
Fix GBuffer depth debug mode (#5054)
adrien-de-tocqueville Jul 6, 2021
1772558
Fixed Volume Gizmo size when rescaling parent GameObject (#4915)
adrien-de-tocqueville Jul 8, 2021
d88d1eb
Fix Vertex Color Mode documentation (#4976)
adrien-de-tocqueville Jul 8, 2021
6692daf
Merge master
sebastienlagarde Jul 8, 2021
8ef3637
Fix wobble-like (or tearing-like) SSAO issues when temporal reproject…
FrancescoC-unity Jul 8, 2021
5dd669e
Fix formatting in NestedOverrideCameraRendering
sebastienlagarde Jul 8, 2021
a299cb8
[HDRP] Fix white flash with SSR when resetting camera history (#5089)
pmavridis Jul 9, 2021
8c39e99
[Fobguz # 1348357] VFX Particle templates missing stencil flags (#5080)
kecho Jul 9, 2021
c5dd9c6
Merge branch 'master' into hd/bugfix
sebastienlagarde Jul 12, 2021
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Virtual Texturing fallback texture sampling code correctly honors the enableGlobalMipBias when virtual texturing is disabled.
- Fixed LightAnchor too much error message, became a HelpBox on the Inspector.
- Fixed library function SurfaceGradientFromTriplanarProjection to match the mapping convention used in SampleUVMappingNormalInternal.hlsl and fix its description.
- Fixed Volume Gizmo size when rescaling parent GameObject

### Changed
- Changed Window/Render Pipeline/Render Pipeline Debug to Window/Analysis/Rendering Debugger
Expand Down
2 changes: 1 addition & 1 deletion com.unity.render-pipelines.core/Runtime/Volume/Volume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void OnDrawGizmos()
if (isGlobal || colliders == null)
return;

var scale = transform.localScale;
var scale = transform.lossyScale;
var invScale = new Vector3(1f / scale.x, 1f / scale.y, 1f / scale.z);
Gizmos.matrix = Matrix4x4.TRS(transform.position, transform.rotation, scale);
Gizmos.color = CoreRenderPipelinePreferences.volumeGizmoColor;
Expand Down
5 changes: 5 additions & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed an issue with surface gradient based normal blending for decals (volume gradients weren't converted to SG before resolving in some cases).
- Fixed distortion when resizing the graphics compositor window in builds (case 1328968).
- Fixed custom pass workflow for single camera effects.
- Fixed gbuffer depth debug mode for materials not rendered during the prepass.
- Fixed Vertex Color Mode documentation for layered lit shader.
- Fixed wobbling/tearing-like artifacts with SSAO.
- Fixed white flash with SSR when resetting camera history (case 1335263).
- Fixed VFX flag "Exclude From TAA" not working for some particle types.

### 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 @@ -6,7 +6,7 @@
| **World Scale** | Set the world-space size of the Texture in meters. If you set this to **1**, then HDRP maps the Texture to 1 meter in world space.If you set this to **2**, then HDRP maps the Texture to 0.5 meters in world space.This property only appears when you select **Planar** or **Triplanar** from the **BlendMask UV Mapping** drop-down. |
| **Tiling** | Set an **X** and **Y** tile rate for the **Layer Mask** UV. HDRP uses the **X** and **Y** values to tile the Texture assigned to the **Layer Mask** across the Material’s surface, in object space. |
| **Offset** | Set an **X** and **Y** offset for the **Layer Mask** UV. HDRP uses the **X** and **Y** values to offset the Texture assigned to the **Layer Mask** from the Material’s surface, in object space. |
| **Vertex Color Mode** | Use the drop-down to select the method HDRP uses to combine the **Layer Mask** to manager layer visibility.<br/>&#8226; **None**: Only the **Layer Mask** affects visibility. HDRP does not combine it with vertex colors.<br/>&#8226; **Multiply**: Multiplies the vertex colors from a layer with the corresponding values from the channel in the **Layer Mask** that represents that layer. The default value for a pixel in the mask is 1. Multiplying the vertex colors of a layer by the **Layer Mask** reduces the intensity of that layer, unless the value in the **Layer Mask** is 1.<br/>&#8226; **Add**: Remaps vertex color values to between 0 and 1, and then adds them to the corresponding values from the channel in the **Layer Mask** that represents that layer. **Layer Mask** values between 0 and 0.5 reduce the effect of that layer, values between 0.5 and 1 increase the effect of that layer. |
| **Vertex Color Mode** | Use the drop-down to select the method HDRP uses to combine the **Layer Mask** to manager layer visibility.<br/>&#8226; **None**: Only the **Layer Mask** affects visibility. HDRP does not combine it with vertex colors.<br/>&#8226; **Multiply**: Multiplies the vertex colors from a layer with the corresponding values from the channel in the **Layer Mask** that represents that layer. The default value for a pixel in the mask is 1. Multiplying the vertex colors of a layer by the **Layer Mask** reduces the intensity of that layer, unless the value in the **Layer Mask** is 1.<br/>&#8226; **Add**: Remaps vertex color values to between -1 and 1, and then adds them to the corresponding values from the channel in the **Layer Mask** that represents that layer. Vertex color values between 0 and 0.5 reduce the effect of that layer, values between 0.5 and 1 increase the effect of that layer. |
| **Main Layer Influence** | Enable the checkbox to allow the **Main Layer** to influence the albedo, normal, and height of **Layer 1**, **Layer 2**, and **Layer 3**. You can change the strength of the influence for each layer. |
| **Use Height Based Blend** | Enable the checkbox to blend the layers with a heightmap. HDRP then evaluates the height of each layer to check whether to display that layer or the layer above. |
| **Height Transition** | Use the slider to set the transition blend size between the Materials in each layer. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Pass
{
Tags { "LightMode"="${VFXHDRPForwardPassName}"}

${VFXStencilForward}

HLSLPROGRAM
#pragma target 4.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Pass
{
Tags { "LightMode"="${VFXHDRPForwardPassName}"}

${VFXStencilForward}

HLSLPROGRAM
#pragma target 4.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl"

#pragma kernel TemporalDenoise

#pragma multi_compile HALF_RES FULL_RES

uint PackHistoryData(float AO, float depth, float mvLen)

float4 PackHistoryData(float AO, float depth, float mvLen)
{
uint packedVal = 0;
packedVal = BitFieldInsert(0x000000ff, UnpackInt(AO, 8), packedVal);
packedVal = BitFieldInsert(0x0000ff00, UnpackInt(mvLen, 8) << 8, packedVal);
packedVal = BitFieldInsert(0xffff0000, UnpackInt(depth, 16) << 16, packedVal);
return packedVal;
float4 finalHistory;
finalHistory.xy = PackFloatToR8G8(depth);
finalHistory.z = saturate(AO);
finalHistory.w = saturate(mvLen);
return finalHistory;
}

void UnpackHistoryData(uint historyData, out float AO, out float depth, out float mvLen)
void UnpackHistoryData(float4 historyData, out float AO, out float depth, out float mvLen)
{
AO = UnpackUIntToFloat(historyData, 0, 8);
mvLen = UnpackUIntToFloat(historyData, 8, 8);
depth = UnpackUIntToFloat(historyData, 16, 16);
AO = historyData.z;
mvLen = saturate(historyData.w);
depth = UnpackFloatFromR8G8(historyData.xy);
}

RW_TEXTURE2D_X(uint, _AOOutputHistory);
RW_TEXTURE2D_X(float4, _AOOutputHistory);

TEXTURE2D_X(_AOPackedBlurred);
TEXTURE2D_X_UINT(_AOPackedHistory);
TEXTURE2D_X(_AOPackedHistory);
RW_TEXTURE2D_X(float, _OcclusionTexture);

float3 FindMinMaxAvgAO(float2 centralPos)
Expand Down Expand Up @@ -67,11 +67,12 @@ void TemporalDenoise(uint3 dispatchThreadId : SV_DispatchThreadID)
float2 motionVector;
DecodeMotionVector(LOAD_TEXTURE2D_X(_CameraMotionVectorsTexture, closest), motionVector);
float motionVecLength = length(motionVector);
float4 prevData = 0;

float2 uv = (dispatchThreadId.xy + 0.5) * _AOBufferSize.zw;
float2 uv = ((dispatchThreadId.xy + 0.5) * _AOBufferSize.zw);
float2 prevFrameNDC = uv - motionVector;

uint prevData = asuint(_AOPackedHistory[COORD_TEXTURE2D_X((prevFrameNDC) * _AOHistorySize.xy)].x);
prevData = (SAMPLE_TEXTURE2D_X_LOD(_AOPackedHistory, s_linear_clamp_sampler, (prevFrameNDC) * _RTHandleScaleHistory.zw, 0));
float prevMotionVecLen, prevAO, prevDepth;
UnpackHistoryData(prevData, prevAO, prevDepth, prevMotionVecLen);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ RenderAOParameters PrepareRenderAOParameters(HDCamera camera, Vector2 historySiz
}
else
{
parameters.runningRes = new Vector2(camera.actualWidth, camera.actualHeight) * 0.5f;
cb._AOBufferSize = new Vector4(camera.actualWidth * 0.5f, camera.actualHeight * 0.5f, 2.0f / camera.actualWidth, 2.0f / camera.actualHeight);
parameters.runningRes = new Vector2(Mathf.RoundToInt(camera.actualWidth * 0.5f), Mathf.RoundToInt(camera.actualHeight * 0.5f));
cb._AOBufferSize = new Vector4(parameters.runningRes.x, parameters.runningRes.y, 1.0f / parameters.runningRes.x, 1.0f / parameters.runningRes.y);
}

parameters.temporalAccumulation = settings.temporalAccumulation.value && camera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,10 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod
// Settings this specific Main layer blend mask in alpha allow to be transparent in case we don't use it and 1 is provide by default.
float4 blendMasks = useLodSampling ? SAMPLE_UVMAPPING_TEXTURE2D_LOD(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask, lod) : SAMPLE_UVMAPPING_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, layerTexCoord.blendMask);

// Wind uses vertex alpha as an intensity parameter.
// So in case Layered shader uses wind, we need to hardcode the alpha here so that the main layer can be visible without affecting wind intensity.
// It also means that when using wind, users can't use vertex color to modulate the effect of influence from the main layer.
float4 maskVertexColor = vertexColor;
#if defined(_LAYER_MASK_VERTEX_COLOR_MUL)
blendMasks *= saturate(maskVertexColor);
blendMasks *= saturate(vertexColor);
#elif defined(_LAYER_MASK_VERTEX_COLOR_ADD)
blendMasks = saturate(blendMasks + maskVertexColor * 2.0 - 1.0);
blendMasks = saturate(blendMasks + vertexColor * 2.0 - 1.0);
#endif

return blendMasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem)
internal HDAdditionalCameraData.TAAQualityLevel TAAQuality { get; private set; } = HDAdditionalCameraData.TAAQualityLevel.Medium;

internal bool resetPostProcessingHistory = true;
internal bool didResetPostProcessingHistoryInLastFrame = false;

internal bool dithering => m_AdditionalCameraData != null && m_AdditionalCameraData.dithering;

Expand Down Expand Up @@ -1296,7 +1297,7 @@ struct AmbientOcclusionAllocator

public RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem)
{
return rtHandleSystem.Alloc(Vector2.one * scaleFactor, TextureXR.slices, filterMode: FilterMode.Point, colorFormat: GraphicsFormat.R32_UInt, dimension: TextureXR.dimension, useDynamicScale: true, enableRandomWrite: true, name: string.Format("{0}_AO Packed history_{1}", id, frameIndex));
return rtHandleSystem.Alloc(Vector2.one * scaleFactor, TextureXR.slices, filterMode: FilterMode.Point, colorFormat: GraphicsFormat.R8G8B8A8_UNorm, dimension: TextureXR.dimension, useDynamicScale: true, enableRandomWrite: true, name: string.Format("{0}_AO Packed history_{1}", id, frameIndex));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1052,13 +1052,14 @@ class DebugViewMaterialData
public ComputeBufferHandle perVoxelOffset;
public DBufferOutput dbuffer;
public GBufferOutput gbuffer;
public TextureHandle depthBuffer;

public Texture clearColorTexture;
public RenderTexture clearDepthTexture;
public bool clearDepth;
}

TextureHandle RenderDebugViewMaterial(RenderGraph renderGraph, CullingResults cull, HDCamera hdCamera, BuildGPULightListOutput lightLists, DBufferOutput dbuffer, GBufferOutput gbuffer)
TextureHandle RenderDebugViewMaterial(RenderGraph renderGraph, CullingResults cull, HDCamera hdCamera, BuildGPULightListOutput lightLists, DBufferOutput dbuffer, GBufferOutput gbuffer, TextureHandle depthBuffer)
{
bool msaa = hdCamera.msaaEnabled;

Expand All @@ -1081,6 +1082,7 @@ TextureHandle RenderDebugViewMaterial(RenderGraph renderGraph, CullingResults cu
passData.debugGBufferMaterial = m_currentDebugViewMaterialGBuffer;
passData.outputColor = builder.WriteTexture(output);
passData.gbuffer = ReadGBuffer(gbuffer, builder);
passData.depthBuffer = builder.ReadTexture(depthBuffer);

builder.SetRenderFunc(
(DebugViewMaterialData data, RenderGraphContext context) =>
Expand All @@ -1090,6 +1092,7 @@ TextureHandle RenderDebugViewMaterial(RenderGraph renderGraph, CullingResults cu
{
data.debugGBufferMaterial.SetTexture(HDShaderIDs._GBufferTexture[i], gbufferHandles.mrt[i]);
}
data.debugGBufferMaterial.SetTexture(HDShaderIDs._CameraDepthTexture, data.depthBuffer);

HDUtils.DrawFullScreen(context.cmd, data.debugGBufferMaterial, data.outputColor);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ TextureHandle RenderPostProcess(RenderGraph renderGraph,

source = FXAAPass(renderGraph, hdCamera, source);

hdCamera.didResetPostProcessingHistoryInLastFrame = hdCamera.resetPostProcessingHistory;

hdCamera.resetPostProcessingHistory = false;
}

Expand Down Expand Up @@ -779,8 +781,9 @@ internal RTHandle GetExposureTextureHandle(RTHandle rt)

RTHandle GetPreviousExposureTexture(HDCamera camera)
{
// See GetExposureTexture
return GetExposureTextureHandle(camera.currentExposureTextures.previous);
// If the history was reset in the previous frame, then the history buffers were actually rendered with a neutral EV100 exposure multiplier
return (camera.didResetPostProcessingHistoryInLastFrame && !IsExposureFixed(camera)) ?
m_EmptyExposureTexture : GetExposureTextureHandle(camera.currentExposureTextures.previous);
}

RTHandle GetExposureDebugData()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void RecordRenderGraph(RenderRequest renderRequest,
// Stop Single Pass is after post process.
StartXRSinglePass(m_RenderGraph, hdCamera);

colorBuffer = RenderDebugViewMaterial(m_RenderGraph, cullingResults, hdCamera, gpuLightListOutput, prepassOutput.dbuffer, prepassOutput.gbuffer);
colorBuffer = RenderDebugViewMaterial(m_RenderGraph, cullingResults, hdCamera, gpuLightListOutput, prepassOutput.dbuffer, prepassOutput.gbuffer, prepassOutput.depthBuffer);
colorBuffer = ResolveMSAAColor(m_RenderGraph, hdCamera, colorBuffer);
}
else if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) &&
Expand Down