Skip to content

Internal/2022.3/staging #8141

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 41 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fa0dd43
[Port] [2022.3] [UUM-84459] Add a condition to the Receiver Motion Re…
svc-reach-platform-support Jan 30, 2025
e965355
[Port] [2022.3] Fix issue where padding was different between tabs in…
svc-reach-platform-support Jan 31, 2025
a84cfce
[Port] [2022.3] UUM-92512: Light Cookie Atlas is leaking
svc-reach-platform-support Feb 3, 2025
d18c85f
[Port] [2022.3] Fix NullReferenceException thrown when updating a leg…
svc-reach-platform-support Feb 7, 2025
4d11665
UUM-84784 Warnings in DownsampleDepth.shader
RoseHirigoyen Feb 7, 2025
b697653
[2022.3][VFX][Fix] Avoid trying to access context's data when it does…
ludovic-theobald Feb 10, 2025
5c4d652
[UUM-96388] Fix for 2022.3.X: Terrain Detail objects are not rendered…
bslapc Feb 10, 2025
4c2fb9d
Backport of 45293 and 55256
alelievr Feb 12, 2025
af755f7
[Port] [2022.3] [2d] Fix (Case UUM-71736) Texture is lost when reconn…
venkify Feb 12, 2025
72f1c74
[Port] [2022.3] Graphics docs feedback fixes February 2025
markg-unity Feb 12, 2025
f82e3bd
[Backport 2022.3][UUM-87636] Fix sprite instancing with 2d shaders
kennytann Feb 18, 2025
e4627cd
[22.3] Bump SRP packages to 14.0.12
theopnv Feb 18, 2025
e007ff8
Minor feedback fixes in Graphics package docs
fatimah-f Feb 24, 2025
9e8d4ac
[Port] [2022.3] Graphics docs feedback fixes February 2025 pt2
markg-unity Feb 24, 2025
d29c8af
[2022.3][UUM-90792] Fix camera sorting layer not breaking batch for U…
kennytann Feb 24, 2025
57fc336
[Port] [2022.3] DOCG-6644 Clarify URP shadows shader example
svc-reach-platform-support Feb 26, 2025
f42d921
2022.3: Fixed the generation of new artifact ID of ShaderGraph on eve…
Saiprasad945 Mar 3, 2025
b03c3f9
[Port] [2022.3] [VFX] Prevent buffer overflow when parent system has …
gabrieldelacruz Mar 3, 2025
2fe59f5
[Port] [2022.3] [VFX] Fix missing invalidation in case of SetTexture
PaulDemeulenaere Mar 3, 2025
f28fb89
2022.3: Fix seams in water, when the quad is selected.
vrethinachalam Mar 5, 2025
0a3f681
Fixed offscreen UI scaling
alelievr Mar 5, 2025
4cc23b3
[Port] [2022.3] DOCG-5799 Clarify Sample Graphics Buffer and custom t…
svc-reach-platform-support Mar 5, 2025
b771674
[Port] [2022.3] [VFX/SG] Fix Unexpected Visible Dead Particles
PaulDemeulenaere Mar 7, 2025
8dbead7
[Port] [2022.3] [2d] Fix Case UUM-90726
svc-reach-platform-support Mar 7, 2025
b94293b
[Port] [2022.3] [UUM-85456] Fix missing fog parameters in sprite subt…
svc-reach-platform-support Mar 10, 2025
37a88d1
[Port][2022.3][VFX] Various vfx toolbar tweaks
julienamsellem Mar 10, 2025
23a5049
[Port] [2022.3] [URP] DecalProjector: Fixed material-properties updat…
svc-reach-platform-support Mar 10, 2025
4c43f18
[Port] [2022.3] ShaderGraph: remove duplicate LIGHTMAP_ON and DIRLIGH…
svc-reach-platform-support Mar 12, 2025
55e533f
[Port] [2022.3] Fix water memleak on domain reload.
eh-unity Mar 12, 2025
93f6fa2
[Port] [2022.3][UUM-99455] Fix post processing resolve for Renderer2D
svc-reach-platform-support Mar 13, 2025
216ff38
[Port] [2022.3] [UUM-11350] Fix runtime light2d not created with targ…
svc-reach-platform-support Mar 18, 2025
5c5a634
[2022.3][UUM-95754] Add layer mask in renderer 2d data
kennytann Mar 18, 2025
47372e9
[Port] [2022.3] [VFX] Add support for Shader Graph BakedGI node in VF…
svc-reach-platform-support Mar 18, 2025
d58c81f
[Port] [2022.3] [URP] Fixed emission-enabling evaluation.
svc-reach-platform-support Mar 18, 2025
412832e
[Port] [2022.3] Switch to OnDidApplyAnimationProperties instead of Up…
svc-reach-platform-support Mar 20, 2025
f6f0296
[22.3] - Remove local reference of code coverage package from SRP
Mar 20, 2025
a6dd3ef
[Backport][2022.3][VFX] Help link color
julienamsellem Mar 22, 2025
9ec2c08
[Port] [2022.3] [URP] Fix shadow jittering issue with TAA in deferred…
Mar 26, 2025
c2be909
[Port] [2022.3] [HDRP] fix for HDRP Lit Shader compilation
svc-reach-platform-support Mar 26, 2025
fd8b50d
[Port] [2022.3] [ShaderGraph][Universal] Fix an NRE for URP sub-datas.
svc-reach-platform-support Mar 31, 2025
abc0bd6
Merge PR #62772 from graphics/urp/xr/uum-75383
JangkyuSeo Apr 4, 2025
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
11 changes: 11 additions & 0 deletions Packages/com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [14.0.11] - 2025-02-13

This version is compatible with Unity 2022.3.59f1.

### Fixed
- Fixed PackFloat2To8 in packing.hlsl.
- Rendering Debugger - Keep the correct selected panel when entering and exiting from playmode.
- Fixed _FOVEATED_RENDERING_NON_UNIFORM_RASTER shader compilation errors.
- Rendering Debugger - Silent crash when selecting a Volume component with public RTHandles.
- Fix truncated vector warning in DownSampleDepth shader

## [14.0.10] - 2024-04-03

This version is compatible with Unity 2022.3.24f1.
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.unity.render-pipelines.core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.render-pipelines.core",
"description": "SRP Core makes it easier to create or customize a Scriptable Render Pipeline (SRP). SRP Core contains reusable code, including boilerplate code for working with platform-specific graphics APIs, utility functions for common rendering operations, and shader libraries. The code in SRP Core is use by the High Definition Render Pipeline (HDRP) and Universal Render Pipeline (URP). If you are creating a custom SRP from scratch or customizing a prebuilt SRP, using SRP Core will save you time.",
"version": "14.0.11",
"version": "14.0.12",
"unity": "2022.3",
"displayName": "Core RP Library",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [14.0.11] - 2025-02-13

This version is compatible with Unity 2022.3.59f1.

Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [14.0.10] - 2024-04-03

This version is compatible with Unity 2022.3.24f1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "com.unity.render-pipelines.high-definition-config",
"description": "Configuration files for the High Definition Render Pipeline.",
"version": "14.0.11",
"version": "14.0.12",
"unity": "2022.3",
"displayName": "High Definition RP Config",
"dependencies": {
"com.unity.render-pipelines.core": "14.0.11"
"com.unity.render-pipelines.core": "14.0.12"
}
}
51 changes: 51 additions & 0 deletions Packages/com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,57 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [14.0.11] - 2025-02-13

This version is compatible with Unity 2022.3.59f1.

### Changed
- Transparent materials now appear opaque when using Mipmap Streaming debug views for increased clarity.
- Create the Global Settings asset in to the current opened folder.
- Create the Global Settings asset in to the current opened folder.

### Fixed
- Fixed an assert triggered when the decal count goes over the light count.
- Fixed scene modification when exiting play mode with the graphics compositor enabled.
- Added Graphics Compositor Limitation section for VR.
- Fixed underwater applied when water is disabled.
- Fixed cinematic eye shader lighting from directional lights.
- Fixed TAA post sharpen in XR.
- Banding in IES importer.
- Fixed realloc of history buffer when XR is enabled.
- Fixed invalid AABB errors in some other cases.
- Added framesettings to render volumetric clouds in half res to reduce jittering.
- Regenerate the hlsl include that where out of date.
- Cached shadow : Fix corruption when using a non square atlas and improve blit performance.
- Fixed an issue where the default terrain shader for HDRP was outputting incorrect albedo values to the lightmapper.
- Fixed a NullReferenceException when exiting Play Mode with HDRP + DLSS + XR.
- Fixed a motion blur blending issue.
- Fixed an issue where the Mipmap Streaming debug views would show up incorrectly when certain features were enabled (SRP Batcher, Volumetric Fog, Volumetric Clouds, and,...).
- Fixed an issue where certain Mipmap Streaming debug views (for example: "Mip Count") would not show up correctly on Metal.
- Fixed an issue where the Rendering Debugger "Terrain Texture" drop-down would appear only when enabling a Fullscreen Debug Mode, instead of appearing when enabling a Mipmap Streaming debug view as intended.
- Changed ProbeSettings.cubeResolution field from internal to public.
- Fixed shader warnings from TAA shader on Metal.
- Reduced some artifacts from High-Quality (PCSS) shadows for point and spot lights.
- Fixed issue with EndCameraRendering being called before renderContext submission.
- HDRP: SSGI, Ray traced GI, Path traced GI and No-GI now match when using an IBL.
- Reimporting ShaderGraph assets no longer triggers a UnityVCS/Perfoce local checkout.
- Fixed graphic corruption on some mobile platforms.
- Fixed sun flicker where the sun is close to cloud boundaries.
- Ignore material variants with log message.
- Fixed an issue where UI images using render textures would not render properly with HDR enabled.
- Added clamp to HairAngleWorld to prevent nan from FastASin.
- Fixed an issue where cascade shadows and distance shadowmask were not blended properly.
- Fixed invalid global state pushed when using override camera rendering in the CustomPassUtils functions.
- Fixed wrong SSR when using a shader graph with a clear coat value of 0.
- Fixed HDRP ambient scene lighting leaking into the material preview window.
- Fixed black line artifacts on top of the screen with DRS and downsampled SSAO.
- Fixed HDRP sky rendering when Camera Relative Rendering is disabled.
- Fixed artifacts when blending cascade shadows and distance shadowmask.
- Added a condition to the Receiver Motion Rejection function(feature) to check that the pixel has actually moved.
- Fixed an issue where the padding in the Lighting window was different between tabs.
- Fixed refraction sampling with DRS.
- Fixed color pyramid sampling when distortion is enabled after the distortion pass.

## [14.0.10] - 2024-04-03

This version is compatible with Unity 2022.3.24f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ HDRP ray tracing in Unity has the following limitations:
- Ray tracing isn't supported when rendering [Reflection Probes](Reflection-Probe.md).
- HDRP doesn't support [orthographic projection](HDRP-Camera.md). If you enable orthographic projection mode, you might experience rendering problems for Transparent Materials, volumetrics and planar reflections.
- Ray Traced and Screen Space effects won't appear recursively in [Ray Traced Reflections](Ray-Traced-Reflections.md), [Ray Traced Global Illumination](Ray-Traced-Global-Illumination.md) or [Recursive Ray Tracing](Ray-Tracing-Recursive-Rendering.md). This means, for example, you won't be able to see [Screen Space Global Illumination](Override-Screen-Space-GI.md) in [ray-traced reflection](Ray-Traced-Reflections.md).
- Doesn't support water.

### Unsupported shader graph nodes for ray tracing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ HDRP path tracing in Unity 2020.2 has the following limitations:
- MSAA.
- [Graphics.DrawMesh](https://docs.unity3d.com/ScriptReference/Graphics.DrawMesh.html) or [Graphics.RenderMesh](https://docs.unity3d.com/2022.1/Documentation/ScriptReference/Graphics.RenderMesh.html), because rasterization and ray tracing are different ways of generating an image.
- [Streaming Virtual Texturing](https://docs.unity3d.com/Documentation/Manual/svt-streaming-virtual-texturing.html).

- Vertex animation, for example wind deformation of vegetation.

### Unsupported shader graph nodes for path tracing

When building your custom shaders using shader graph, some nodes are incompatible with ray/path tracing. You need either to avoid using them or provide an alternative behavior using the [ray tracing shader node](SGNode-Raytracing-Quality). Here is the list of the incompatible nodes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace UnityEditor.Rendering.HighDefinition
{
Expand All @@ -16,16 +17,7 @@ class HDLightingWindowEnvironmentSectionEditor : LightingWindowEnvironmentSectio
{
class Styles
{
public static GUIStyle headerStyle;
static Styles()
{
headerStyle = new GUIStyle(EditorStyles.foldoutHeader);
headerStyle.fontStyle = FontStyle.Bold;
headerStyle.fontSize = 12;
headerStyle.margin = new RectOffset(17, 0, 0, 0);
headerStyle.padding = new RectOffset(16, 1, 0, 0);
headerStyle.fixedHeight = 21;
}
public static readonly GUIStyle inspectorTitle = "IN Title";
}

class SerializedStaticLightingSky
Expand Down Expand Up @@ -78,6 +70,8 @@ bool toggleValue
}
}

static MethodInfo k_FoldoutTitlebar;

public override void OnEnable()
{
m_SerializedActiveSceneLightingSky = new SerializedStaticLightingSky(GetStaticLightingSkyForScene(EditorSceneManager.GetActiveScene()));
Expand Down Expand Up @@ -149,35 +143,20 @@ public override void OnInspectorGUI()

void DrawGUI()
{
Rect mainSeparator = EditorGUILayout.GetControlRect(GUILayout.Height(1));
mainSeparator.xMin -= 3;
mainSeparator.xMax += 4;
EditorGUI.DrawRect(mainSeparator, EditorGUIUtility.isProSkin
? new Color32(26, 26, 26, 255)
: new Color32(127, 127, 127, 255));

Rect line = EditorGUILayout.GetControlRect();
line.xMin -= 3;
line.xMax += 4;
line.y -= 2;
line.yMax += 4;
if (k_FoldoutTitlebar == null)
{
var flags = BindingFlags.NonPublic | BindingFlags.Static;
Type[] args = new Type[] { typeof(Rect), typeof(GUIContent), typeof(bool), typeof(bool) };
k_FoldoutTitlebar = typeof(EditorGUI).GetMethod("FoldoutTitlebar", flags, null, args, null);
}

toggleValue = EditorGUI.Foldout(line, toggleValue, EditorGUIUtility.TrTextContent("Environment (HDRP)", "Sky lighting environment for active Scene"), Styles.headerStyle);
var labelRect = GUILayoutUtility.GetRect(GUIContent.none, Styles.inspectorTitle, GUILayout.ExpandWidth(true));
var label = EditorGUIUtility.TrTextContent("Environment (HDRP)", "Sky lighting environment for active Scene");

EditorGUI.DrawRect(line, EditorGUIUtility.isProSkin
? new Color(1f, 1f, 1f, 0.03f)
: new Color(1f, 1f, 1f, 0.2f));
toggleValue = (bool)k_FoldoutTitlebar.Invoke(null, new object[] { labelRect, label, toggleValue, true });

if (m_ToggleValue)
{
Rect separator = EditorGUILayout.GetControlRect(GUILayout.Height(1));
separator.xMin -= 3;
separator.xMax += 4;
separator.y -= 1;
EditorGUI.DrawRect(separator, EditorGUIUtility.isProSkin
? new Color32(48, 48, 48, 255)
: new Color32(186, 186, 186, 255));

++EditorGUI.indentLevel;

//cannot use SerializeProperty due to logic in the property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1948,9 +1948,9 @@ IndirectLighting EvaluateBSDF_ScreenspaceRefraction(LightLoopContext lightLoopCo
float mipLevel = preLightData.transparentSSMipLevel;

// Clamp to avoid potential leaks around the edges when the dynamic resolution is set to low and the smoothness too.
float2 diffLimit = _ColorPyramidUvScaleAndLimitPrevFrame.xy - _ColorPyramidUvScaleAndLimitPrevFrame.zw;
float2 diffLimit = _ColorPyramidUvScaleAndLimitCurrentFrame.xy - _ColorPyramidUvScaleAndLimitCurrentFrame.zw;
float2 diffLimitMipAdjusted = diffLimit * pow(2.0,2.0 + ceil(abs(mipLevel)));
float2 limit = _ColorPyramidUvScaleAndLimitPrevFrame.xy - diffLimitMipAdjusted;
float2 limit = _ColorPyramidUvScaleAndLimitCurrentFrame.xy - diffLimitMipAdjusted;

samplingUV.xy = min(samplingUV.xy, limit);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ float3 GetEmissiveColor(SurfaceData surfaceData)
return _EmissiveColor * lerp(float3(1.0, 1.0, 1.0), surfaceData.baseColor.rgb, _AlbedoAffectEmissive);
}

#ifdef _EMISSIVE_COLOR_MAP
float3 GetEmissiveColor(SurfaceData surfaceData, UVMapping emissiveMapMapping)
{
float3 emissiveColor = GetEmissiveColor(surfaceData);
#ifdef _EMISSIVE_COLOR_MAP
emissiveColor *= SAMPLE_UVMAPPING_TEXTURE2D(_EmissiveColorMap, sampler_EmissiveColorMap, emissiveMapMapping).rgb;
#endif // _EMISSIVE_COLOR_MAP
return emissiveColor;
}
#endif // _EMISSIVE_COLOR_MAP

void GetBuiltinData(FragInputs input, float3 V, inout PositionInputs posInput, SurfaceData surfaceData, float alpha, float3 bentNormalWS, float depthOffset, out BuiltinData builtinData)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ void RecordRenderGraph(RenderRequest renderRequest,
});
GenerateColorPyramid(m_RenderGraph, hdCamera, colorBuffer, distortionColorPyramid, FullScreenDebugMode.PreRefractionColorPyramid, distortionRendererList);
currentColorPyramid = distortionColorPyramid;


// The color pyramid for distortion is not an history, so it need to be sampled appropriate RT handle scale. Thus we need to update it
var newScale = new Vector4(RTHandles.rtHandleProperties.rtHandleScale.x, RTHandles.rtHandleProperties.rtHandleScale.y, 0, 0);
m_ShaderVariablesGlobalCB._ColorPyramidUvScaleAndLimitCurrentFrame = newScale;
PushGlobalCameraParams(m_RenderGraph, hdCamera);
}

using (new RenderGraphProfilingScope(m_RenderGraph, ProfilingSampler.Get(HDProfileId.Distortion)))
Expand Down Expand Up @@ -941,9 +947,9 @@ class RenderOffscreenUIData
public Rect viewport;
}

TextureHandle CreateOffscreenUIBuffer(RenderGraph renderGraph, MSAASamples msaaSamples)
TextureHandle CreateOffscreenUIBuffer(RenderGraph renderGraph, MSAASamples msaaSamples, Rect viewport)
{
return renderGraph.CreateTexture(new TextureDesc(Vector2.one, false, true)
return renderGraph.CreateTexture(new TextureDesc((int)viewport.width, (int)viewport.height, false, true)
{ colorFormat = GraphicsFormat.R8G8B8A8_SRGB, clearBuffer = false, msaaSamples = msaaSamples, name = "UI Buffer" });
}

Expand All @@ -954,7 +960,8 @@ TextureHandle RenderTransparentUI(RenderGraph renderGraph, HDCamera hdCamera)
{
using (var builder = renderGraph.AddRenderPass<RenderOffscreenUIData>("UI Rendering", out var passData, ProfilingSampler.Get(HDProfileId.OffscreenUIRendering)))
{
output = builder.UseColorBuffer(CreateOffscreenUIBuffer(renderGraph, hdCamera.msaaSamples), 0);
// We cannot use rendererlist here because of the path tracing denoiser which will make it invalid due to multiple rendering per frame
output = builder.UseColorBuffer(CreateOffscreenUIBuffer(renderGraph, hdCamera.msaaSamples, hdCamera.finalViewport), 0);

passData.camera = hdCamera.camera;
passData.frameSettings = hdCamera.frameSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,8 @@ void UpdateShaderVariablesGlobalCB(HDCamera hdCamera, CommandBuffer cmd)
m_ShaderVariablesGlobalCB._EnableRecursiveRayTracing = 0;
m_ShaderVariablesGlobalCB._SpecularOcclusionBlend = 1.0f;
}

m_ShaderVariablesGlobalCB._ColorPyramidUvScaleAndLimitCurrentFrame = HDUtils.ComputeViewportScaleAndLimit(hdCamera.historyRTHandleProperties.currentViewportSize, hdCamera.historyRTHandleProperties.currentRenderTargetSize);
m_ShaderVariablesGlobalCB._ColorPyramidUvScaleAndLimitPrevFrame = HDUtils.ComputeViewportScaleAndLimit(hdCamera.historyRTHandleProperties.previousViewportSize, hdCamera.historyRTHandleProperties.previousRenderTargetSize);

ConstantBuffer.PushGlobal(cmd, m_ShaderVariablesGlobalCB, HDShaderIDs._ShaderVariablesGlobal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ static class HDShaderIDs
public static readonly int _LightLayersTexture = Shader.PropertyToID("_LightLayersTexture");
public static readonly int _DistortionTexture = Shader.PropertyToID("_DistortionTexture");
public static readonly int _ColorPyramidTexture = Shader.PropertyToID("_ColorPyramidTexture");
public static readonly int _ColorPyramidUvScaleAndLimitPrevFrame = Shader.PropertyToID("_ColorPyramidUvScaleAndLimitPrevFrame");
public static readonly int _RoughDistortion = Shader.PropertyToID("_RoughDistortion");

public static readonly int _DebugColorPickerTexture = Shader.PropertyToID("_DebugColorPickerTexture");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void ValidateHistory(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 groupTh

// Was the object of this pixel moving?
uint stencilValue = GetStencilValue(LOAD_TEXTURE2D_X(_StencilTexture, centerCoord));
if ((stencilValue & _ObjectMotionStencilBit) != 0)
if ((stencilValue & _ObjectMotionStencilBit) != 0 && any(abs(velocity) > 0))
historyRejectionResult = historyRejectionResult | HISTORYREJECTIONFLAGS_MOTION;

// If none of the previous conditions have failed, the the history is valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ Shader "Hidden/HDRP/DownsampleDepth"
#else
uint2 fullResUpperCorner = uint2((((float2)input.positionCS.xy - 0.5f) * 2.0) + 0.5f);
float4 depths;
depths.x = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner, 0);
depths.y = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner + uint2(0, 1), 0);
depths.z = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner + uint2(1, 0), 0);
depths.w = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner + uint2(1, 1), 0);
depths.x = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner, 0).r;
depths.y = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner + uint2(0, 1), 0).r;
depths.z = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner + uint2(1, 0), 0).r;
depths.w = LOAD_TEXTURE2D_X_LOD(_SourceDownsampleDepth, fullResUpperCorner + uint2(1, 1), 0).r;

float minDepth = MinDepth(depths);
#if MIN_DOWNSAMPLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ float3 LoadCameraColor(uint2 pixelCoords, uint lod)

float3 SampleCameraColor(float2 uv, float lod)
{
return SAMPLE_TEXTURE2D_X_LOD(_ColorPyramidTexture, s_trilinear_clamp_sampler, uv * _RTHandleScaleHistory.xy, lod).rgb;
return SAMPLE_TEXTURE2D_X_LOD(_ColorPyramidTexture, s_trilinear_clamp_sampler, uv * _ColorPyramidUvScaleAndLimitCurrentFrame.xy, lod).rgb;
}

float3 LoadCameraColor(uint2 pixelCoords)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ unsafe struct ShaderVariablesGlobal
// See ScreenCoordOverride.hlsl for details.
public Vector4 _ScreenSizeOverride;
public Vector4 _ScreenCoordScaleBias;

public Vector4 _ColorPyramidUvScaleAndLimitCurrentFrame;
public Vector4 _ColorPyramidUvScaleAndLimitPrevFrame;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ GLOBAL_CBUFFER_START(ShaderVariablesGlobal, b0)
float _DeExposureMultiplier;
float4 _ScreenSizeOverride;
float4 _ScreenCoordScaleBias;
float4 _ColorPyramidUvScaleAndLimitCurrentFrame;
float4 _ColorPyramidUvScaleAndLimitPrevFrame;
CBUFFER_END

Expand Down
Loading