Skip to content

Merge 8.x.x/hd/staging #153

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 117 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
7bbf2b3
[8.x.x Backport]Fixed the MaxLightCount being display when the light …
anisunity Mar 17, 2020
b7d1529
[8.x.x Backport] Update documentation to mention more explicitely the…
anisunity Mar 17, 2020
409f4df
[8.x.x Backport] Make subsection in decal debug menu to specify "affe…
FrancescoC-unity Mar 17, 2020
22acc8c
Support cookie on light backing for Disc Area Light #6138
skhiat Mar 17, 2020
bef451e
Hdrp /lookdev/fix crash on adding volume as viewed game object #6129
RSlysz Mar 17, 2020
c1d7ea1
fixed changelog
sebastienlagarde Mar 17, 2020
5c316e3
Add smoothness remark (#6226)
FrancescoC-unity Mar 17, 2020
ea21c80
Removed legacy VR code from HDRP #5923
fabien-unity Mar 17, 2020
daeb5fd
Fixed duplicated entry for com.unity.modules.xr in the runtime asmdef…
fabien-unity Mar 17, 2020
e13c586
Improve light clipping and culling #2 #4711
EvgeniiG Mar 17, 2020
5542b5b
Hdrp/fix/decal material ui errors #6225
alelievr Mar 17, 2020
c698ea4
Fix z-fighting in sceneview when scene lighting is off (#6213)
pmavridis Mar 17, 2020
cb56b4f
Update CHANGELOG.md
sebastienlagarde Mar 17, 2020
52bf1d5
Mention default post processing in default volumes. (#6233)
FrancescoC-unity Mar 17, 2020
98c6578
Fix cubemap inspector so that thumbnail for cubemap work #6231
FrancescoC-unity Mar 17, 2020
5d5afe0
- Fix an exception in ray tracing that happens if two LOD levels are …
anisunity Mar 17, 2020
fe0c42a
[Backport 8.x.x] Fix some typos in the debug menu (#6249)
FrancescoC-unity Mar 18, 2020
9978787
Added debug exposure to light hierarchy debug. (#6216)
JulienIgnace-Unity Mar 18, 2020
8e09b16
- Rejecting history for ray traced reflections based on a threshold e…
anisunity Mar 18, 2020
bd908e4
Clearer naming of tile and cluster categories for environment lights …
FrancescoC-unity Mar 19, 2020
b48722e
Fix texture curve destroy (#6277)
alelievr Mar 19, 2020
dd858c6
Fixed an issue with refraction model and ray traced recursive renderi…
anisunity Mar 19, 2020
ae7c57f
fix for Fogbugz 1214609 - HDRP Wizard addively increases the Light In…
sebastienlagarde Mar 19, 2020
9e00796
Fixed an issue where a dynamic sky changing any frame may not update …
JulienIgnace-Unity Mar 19, 2020
96a8968
Add XR setting to control camera jitter for temporal effects #6259
fabien-unity Mar 19, 2020
72f952d
fix unreachable code in TextureXR.useTexArray (#6260)
fabien-unity Mar 19, 2020
2d70b64
Deprecate Utilities namespace #6219
fredericv-unity3d Mar 19, 2020
bb430d6
Fix issue on thumbnail generation so that no error on new project and…
FrancescoC-unity Mar 19, 2020
1f7c317
Update CHANGELOG.md
sebastienlagarde Mar 19, 2020
31f052b
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Mar 19, 2020
f8d575e
[8.x.x Backport] Partial fix LookDev opened when CoreRP package reimp…
RSlysz Mar 24, 2020
adf5c8f
[Backport 8.x.x] Hdrp/fix default volume switch (#6336)
JulienIgnace-Unity Mar 24, 2020
4a02d32
[Backport 8.x.x] Fixed an issue where AO override would not override …
JulienIgnace-Unity Mar 24, 2020
5e851ea
[Backport 8.x.x] Fixed an issue where Volume inspector might not refr…
JulienIgnace-Unity Mar 24, 2020
7b46c5d
Hdrp/fix material baked emission #5392
RSlysz Mar 25, 2020
9ecc3c4
Fixed volume components lifespan in the clipboard #5869
Chman Mar 13, 2020
225f724
Hdrp/fix/particle light shadows #6111
alelievr Mar 24, 2020
305a253
Bugfix: uncached reflection probe cameras were reseting the debug mod…
pmavridis Mar 24, 2020
ce5e527
Fix case in PBR sky where a camera below ground might invalidate resu…
FrancescoC-unity Mar 25, 2020
58c81b6
Hdrp/probe scale 1219246 (#6288)
skhiat Mar 24, 2020
98c3f8f
Update CHANGELOG.md
sebastienlagarde Mar 26, 2020
ed0969c
Split set rendering feature set and API validity check #6301
FrancescoC-unity Mar 24, 2020
0dbea13
Fix Render Texture with XR #6306
fabien-unity Mar 24, 2020
91e4b0d
Fix sRGB mismatch with XR SDK #6311
fabien-unity Mar 24, 2020
acea9c4
Fix XR single-pass with Mock HMD plugin #6313
fabien-unity Mar 24, 2020
9126531
Fix XR culling with multiple cameras #6314
fabien-unity Mar 24, 2020
86f417a
Add custom pass opaque rendering error message #6330
alelievr Mar 24, 2020
446ba01
Update Light-Component.md (#6332)
JordanL8 Mar 24, 2020
fe78aa7
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Mar 26, 2020
0f33375
Update CHANGELOG.md
sebastienlagarde Mar 26, 2020
7ab67dd
Update TextureCurve.cs
sebastienlagarde Mar 26, 2020
3fa39ef
fix merge issue
sebastienlagarde Mar 25, 2020
b0731ec
Merge branch '8.x.x/hd/staging' of https://github.com/Unity-Technolog…
sebastienlagarde Mar 26, 2020
373646a
Update CHANGELOG.md
sebastienlagarde Mar 26, 2020
5eb72bc
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Mar 26, 2020
67e2479
- Fixed an issue related to the envlightdatasrt not being bound in re…
anisunity Mar 27, 2020
35eaf83
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Mar 27, 2020
bbbc325
First pass of light loop optimizations (still single threaded) (#6367…
FrancescoC-unity Mar 27, 2020
d2c36b4
Catch and handle NRefactory parser exceptions (#6392)
vlad-andreev Mar 27, 2020
926dd50
Avoid negative input to sqrt() (#6397)
ChristianF-ARM Mar 27, 2020
9c1cddc
Refreshed the GUIDs for additional post processing data to avoid conf…
Chman Mar 27, 2020
6317ca3
Added known issues page (#6447)
JordanL8 Mar 30, 2020
21f86db
Platform/playstation #6380
timcannellunity3d Mar 28, 2020
1e0901c
Shadow cascade tooltip fix (when using the metric mode) #6448
pmavridis Mar 30, 2020
be0bac0
Focus on Decal uses the extends of the projectors #6449
skhiat Mar 30, 2020
c22659b
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Mar 30, 2020
2ca7f4d
[8.x.x Backport] Fixed how the area light influence volume is compute…
anisunity Mar 31, 2020
23e8ba6
Fixed usage of light size data that are not available at runtime. (#6…
anisunity Apr 1, 2020
06dbd25
Changed the diffusion profile warning on the material to an info and …
anisunity Apr 1, 2020
283af98
Fix shadow tesselation culling (#6477)
alelievr Mar 31, 2020
7d5589f
Add option to disable XR rendering on the camera settings #6372
fabien-unity Apr 1, 2020
aa12bc4
Move scene view camera settings to camera settings window #6390
pmavridis Mar 31, 2020
7801cf0
Corrected typo and changed links to .md (#6414)
JordanL8 Mar 31, 2020
c520900
Hdrp /fix reset of HDAdditionalLightData #6453
RSlysz Apr 1, 2020
f251095
Fix null error when leaving debug menu #6467
sebastienlagarde Mar 31, 2020
581d6db
Hdrp /fix drag area width at left of light intensity #6471
RSlysz Apr 1, 2020
3246b8e
Fix issue with baked reflection probes constantly marked as dirty wi…
FrancescoC-unity Apr 1, 2020
b445a2f
Fix custom pass depth copy #6484
alelievr Apr 1, 2020
0d576ea
Hdrp /lookdev ui fixes #6491
RSlysz Apr 1, 2020
c3df4e1
Expose a debug constant in ShaderLab to make HDRP/Unlit SRP Batcher c…
JussiKnuuttila Apr 1, 2020
5c7d949
fix unused leftover (#6497)
RSlysz Apr 1, 2020
f6a0d33
Fix custom pass test reference images (#6512)
alelievr Apr 1, 2020
7d508c6
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Apr 2, 2020
f09e664
[8.x.x Backport] Fixed a weird behavior in the scalable settings draw…
anisunity Apr 3, 2020
182e74e
Fixed an usage of a a compute buffer not bound (1229964) (#27)
sebastienlagarde Apr 7, 2020
69d5bee
Removed wrongly serialized fields in StaticLightingSky (#6441)
JulienIgnace-Unity Apr 3, 2020
7a231fc
Fix issues in the post process system with RenderTexture being invali…
JulienIgnace-Unity Apr 3, 2020
1a7ff0a
Fixed an issue where changing the default volume profile from another…
JulienIgnace-Unity Apr 3, 2020
65d0145
Hdrp/docs/glossary f number (#6523)
JordanL8 Apr 2, 2020
942b319
path validation when creating new volume profile (#36)
sebastienlagarde Apr 7, 2020
d15725c
Clamp probes compression factor to 0 #19
FrancescoC-unity Apr 7, 2020
c78c097
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Apr 8, 2020
04bdb77
[Backport 8.x.x] Fix various leaks in HDRP (#119)
JulienIgnace-Unity Apr 15, 2020
855d644
[8.x.x backport] Follow references when deleting unloading unused ass…
FrancescoC-unity Apr 15, 2020
1b2bd02
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Apr 16, 2020
4d8fe2a
Fix MSAA resolve when there is no motion vectors
adrien-de-tocqueville Apr 14, 2020
66ab3ad
Fix issues causing planar probes to be broken with multiple cameras i…
FrancescoC-unity Apr 15, 2020
145dcc4
Axf - Add specaa, add baked ao, fix reflection hierarchy for carpaint.
slunity Apr 9, 2020
a097643
Hdrp/fix/custom pass msaa rendering info
alelievr Apr 9, 2020
79dab8c
Added disocclusion and ghosting to the glossary (#75)
JordanL8 Apr 9, 2020
90c473b
fix switch shader compilation (#111)
sebastienlagarde Apr 14, 2020
bed4007
Update SceneViewDrawMode.cs (#118)
sebastienlagarde Apr 14, 2020
e111a3c
Fix culling of reflection probes that change position
pmavridis Apr 15, 2020
2847da1
Fix null reference when processing light probe
pmavridis Apr 15, 2020
91adc7d
Fix black screen in XR when HDRP package is present but not used
fabien-unity Apr 15, 2020
edae0c2
[8.x.x Backport] Fixed an issue with the specularFGD term being used …
anisunity Apr 16, 2020
448183d
Added support for rasterized area light shadows in StackLit + slight …
slunity Apr 16, 2020
7894820
fix Stacklit.hlsl after merge
sebastienlagarde Apr 16, 2020
6173e4d
Update the scripting API for FrameSettings, FrameSettingsOverrideMask…
RSlysz Apr 16, 2020
a41f7a5
Vfx/docs/bulk review continued (#78)
JordanL8 Apr 14, 2020
9bfbc94
Added baked GI rp support caveat and made setting shadow filter quali…
JordanL8 Apr 16, 2020
c8cfc92
Merge branch '8.x.x/release' into 8.x.x/hd/staging
sebastienlagarde Apr 16, 2020
0a0c477
Fix for white flash happening when changing lighting condition (like …
sebastienlagarde Apr 16, 2020
59d426d
Fix issue with metal shader and raytracing
sebastienlagarde Mar 27, 2020
4c23027
Fix default volume profile collapse
alelievr Apr 16, 2020
b58176a
Update AxF-Shader.md (#152)
JordanL8 Apr 16, 2020
27d2abf
Bind missing buffer #159
victor-unity Apr 16, 2020
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
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 @@ -50,6 +50,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed culling of planar reflection probes that change position (case 1218651)
- Fixed null reference when processing lightprobe (case 1235285)
- Fix black screen in XR when HDRP package is present but not used.
- Fixed white flash happening with auto-exposure in some cases (case 1223774)
- Fixed NaN which can appear with real time reflection and inf value
- Fixed raytracing shader compilation on Metal
- Fixed an issue that was collapsing the volume components in the HDRP default settings
- Fixed warning about missing bound decal buffer

### Changed
- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This process does not duplicate the Textures and other resources that the origin

### Creating AxF Materials from scratch

New Materials in HDRP use the [Lit Shader](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/Lit-Shader.html) by default. To create an AxF Material from scratch, create a Material and then make it use the AxF Shader. To do this:
New Materials in HDRP use the [Lit Shader](Lit-Shader.md) by default. To create an AxF Material from scratch, create a Material and then make it use the AxF Shader. To do this:

1. In the Unity Editor, navigate to your Project's Asset window.
2. Right-click the Asset Window and select **Create > Material**. This adds a new Material to your Unity Project’s Asset folder.
Expand Down Expand Up @@ -60,8 +60,9 @@ Note: The AxF Importer imports every Texture as half float, linear, sRGB gamut (
| --------------------- | ------------------------------------------------------------ |
| **Material Tiling U** | Sets the tile rate along the x-axis for every Texture in the **Surface Inputs** section. HDRP uses this value to tile the Textures along the x-axis of the Material’s surface, in object space. |
| **Material Tiling V** | Sets the tile rate along the y-axis for every Texture in the **Surface Inputs** section. HDRP uses this value to tile the Textures along the y-axis of the Material’s surface, in object space. |
| **BRDF Type** | Controls the main AxF Material representation.<br/>&#8226; **SVBRDF**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - SVBRDF](https://docs.google.com/document/d/1_Oq2hsx3J7h8GHKoQM_8qf6Ip5VlHv_31K7dYYVOEmU/edit#heading=h.f1msh9g44mev).<br/>&#8226;**CAR_PAINT**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - CAR_PAINT](https://docs.google.com/document/d/1_Oq2hsx3J7h8GHKoQM_8qf6Ip5VlHv_31K7dYYVOEmU/edit#heading=h.eorkre6buegg). |
| **BRDF Type** | Controls the main AxF Material representation.<br/>&#8226; **SVBRDF**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - SVBRDF](#SVBRDF).<br/>&#8226;**CAR_PAINT**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - CAR_PAINT](#CAR_PAINT). |

<a name="SVBRDF"></a>
#### BRDF Type - SVBRDF

| **Property** | **Description** |
Expand All @@ -86,6 +87,7 @@ Note: The AxF Importer imports every Texture as half float, linear, sRGB gamut (
| **- Enable Refraction** | Indicates whether the clear coat is refractive. If you enable this checkbox, HDRP uses angles refracted by the clear coat to evaluate the undercoat of the Material surface. |
| **- - Clearcoat IOR** | Specifies a Texture (red channel only) that implicitly defines the index of refraction (IOR) for the clear coat by encoding it to a monochromatic (single value) F0 (aka as specular color or Fresnel reflectance at 0 degree incidence. This also assumes the coat interfaces with air). As such, the value is in the range of **0** to **1** and HDRP calculates the final IOR as:<br/>`IOR = (1.0 + squareRoot(R) ) / (1.0 - squareRoot(R))`<br/>Where **R** is the normalized value in the red color channel of this Texture. Note: HDRP uses this IOR for both coat refraction and, if enabled, transmission and reflectance calculations through and on the coat. Therefore, you must always assign a Texture to this property when you enable clear coat. |

<a name="CAR_PAINT"></a>
#### BRDF Type - CAR_PAINT

| **Property** | **Description** |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class Styles
ReorderableList m_BeforeTransparentCustomPostProcesses;
ReorderableList m_BeforePostProcessCustomPostProcesses;
ReorderableList m_AfterPostProcessCustomPostProcesses;
int m_CurrentVolumeProfileHash;
int m_CurrentVolumeProfileInstanceID;

public void OnGUI(string searchContext)
{
Expand Down Expand Up @@ -209,9 +209,9 @@ void Draw_VolumeInspector()
EditorGUILayout.EndHorizontal();

// The state of the profile can change without the asset reference changing so in this case we need to reset the editor.
if (m_CurrentVolumeProfileHash != asset.GetHashCode() && m_CachedDefaultVolumeProfileEditor != null)
if (m_CurrentVolumeProfileInstanceID != asset.GetInstanceID() && m_CachedDefaultVolumeProfileEditor != null)
{
m_CurrentVolumeProfileHash = asset.GetHashCode();
m_CurrentVolumeProfileInstanceID = asset.GetInstanceID();
m_CachedDefaultVolumeProfileEditor = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ float4 SampleEnv(LightLoopContext lightLoopContext, int index, float3 texCoord,
color.rgb = SampleSkyTexture(texCoord, lod, sliceIdx).rgb;
}

// Planar, Reflection Probes and Sky aren't pre-expose, so best to clamp to max16 here in case of inf
color.rgb = ClampToFloat16Max(color.rgb);

return color;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Shader "Hidden/HDRP/ScreenSpaceShadows"
#pragma target 4.5
#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ Shader "HDRP/LayeredLit"
HLSLINCLUDE

#pragma target 4.5
#pragma only_renderers d3d11 playstation xboxone vulkan metal switch

#pragma shader_feature_local _ALPHATEST_ON
#pragma shader_feature_local _DEPTHOFFSET_ON
Expand Down Expand Up @@ -527,6 +526,8 @@ Shader "HDRP/LayeredLit"
ColorMask 0

HLSLPROGRAM

#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer
Expand Down Expand Up @@ -556,7 +557,7 @@ Shader "HDRP/LayeredLit"
Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index

Cull [_CullMode]
ZTest[_ZTestGBuffer]
ZTest [_ZTestGBuffer]

Stencil
{
Expand All @@ -567,6 +568,8 @@ Shader "HDRP/LayeredLit"
}

HLSLPROGRAM

#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer
Expand All @@ -593,8 +596,8 @@ Shader "HDRP/LayeredLit"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl"

#pragma vertex Vert
#pragma fragment Frag
Expand All @@ -612,6 +615,8 @@ Shader "HDRP/LayeredLit"
Cull Off

HLSLPROGRAM

#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer
Expand Down Expand Up @@ -652,6 +657,8 @@ Shader "HDRP/LayeredLit"
ZWrite On

HLSLPROGRAM

#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer
Expand Down Expand Up @@ -690,6 +697,8 @@ Shader "HDRP/LayeredLit"
ColorMask 0

HLSLPROGRAM

#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer
Expand Down Expand Up @@ -726,6 +735,8 @@ Shader "HDRP/LayeredLit"
ZWrite On

HLSLPROGRAM

#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer
Expand Down Expand Up @@ -774,6 +785,8 @@ Shader "HDRP/LayeredLit"
Cull [_CullMode]

HLSLPROGRAM

#pragma only_renderers d3d11 playstation xboxone vulkan metal switch
//enable GPU instancing support
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer
Expand Down Expand Up @@ -837,6 +850,8 @@ Shader "HDRP/LayeredLit"

HLSLPROGRAM

#pragma only_renderers d3d11

#pragma raytracing surface_shader

#pragma multi_compile _ DEBUG_DISPLAY
Expand Down Expand Up @@ -880,6 +895,8 @@ Shader "HDRP/LayeredLit"

HLSLPROGRAM

#pragma only_renderers d3d11

#pragma raytracing surface_shader

#pragma multi_compile _ DEBUG_DISPLAY
Expand Down Expand Up @@ -919,6 +936,8 @@ Shader "HDRP/LayeredLit"

HLSLPROGRAM

#pragma only_renderers d3d11

#pragma raytracing surface_shader

#pragma multi_compile _ DEBUG_DISPLAY
Expand Down Expand Up @@ -954,6 +973,8 @@ Shader "HDRP/LayeredLit"

HLSLPROGRAM

#pragma only_renderers d3d11

#pragma raytracing surface_shader

#define SHADERPASS SHADERPASS_RAYTRACING_VISIBILITY
Expand All @@ -978,6 +999,8 @@ Shader "HDRP/LayeredLit"

HLSLPROGRAM

#pragma only_renderers d3d11

#pragma raytracing surface_shader

#pragma multi_compile _ DEBUG_DISPLAY
Expand Down Expand Up @@ -1010,6 +1033,8 @@ Shader "HDRP/LayeredLit"

HLSLPROGRAM

#pragma only_renderers d3d11

#pragma raytracing surface_shader

#pragma multi_compile _ DEBUG_DISPLAY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,26 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn
}
else
{
if (IsExposureFixed())
// Fix exposure is store in Exposure Textures at the beginning of the frame as there is no need for color buffer
// Dynamic exposure (Auto, curve) is store in Exposure Textures at the end of the frame (as it rely on color buffer)
// Texture current and previous are swapped at the beginning of the frame.
bool isFixedExposure = IsExposureFixed();
if (isFixedExposure)
{
using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.FixedExposure)))
{
DoFixedExposure(cmd, camera);
}
}

cmd.SetGlobalTexture(HDShaderIDs._ExposureTexture, GetExposureTexture(camera));
// Note: GetExposureTexture(camera) must be call AFTER the call of DoFixedExposure to be correctly taken into account
// When we use Dynamic Exposure and we reset history we can't use pre-exposure (as there is no information)
// For this reasons we put neutral value at the beginning of the frame in Exposure textures and
// apply processed exposure from color buffer at the end of the Frame, only for a single frame.
// After that we re-use the pre-exposure system
RTHandle currentExposureTexture = (camera.resetPostProcessingHistory && !isFixedExposure) ? m_EmptyExposureTexture : GetExposureTexture(camera);

cmd.SetGlobalTexture(HDShaderIDs._ExposureTexture, currentExposureTexture);
cmd.SetGlobalTexture(HDShaderIDs._PrevExposureTexture, GetPreviousExposureTexture(camera));
}
}
Expand Down Expand Up @@ -485,9 +496,9 @@ void PoolSource(ref RTHandle src, RTHandle dst)
cmd.DispatchCompute(cs, kernel, (camera.actualWidth + 7) / 8, (camera.actualHeight + 7) / 8, camera.viewCount);

PoolSource(ref source, destination);
}
}
}
}

if (m_PostProcessEnabled)
{
Expand Down Expand Up @@ -876,9 +887,9 @@ void DoDynamicExposure(CommandBuffer cmd, HDCamera camera, RTHandle colorBuffer,

if (camera.resetPostProcessingHistory)
{
kernel = cs.FindKernel("KReset");
cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, prevExposure);
cmd.DispatchCompute(cs, kernel, 1, 1, 1);
// For Dynamic Exposure, we need to undo the pre-exposure from the color buffer to calculate the correct one
// When we reset history we must setup neutral value
prevExposure = m_EmptyExposureTexture; // Use neutral texture
}

m_ExposureVariants[0] = 1; // (int)exposureSettings.luminanceSource.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3104,6 +3104,10 @@ void RenderDBuffer(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext
{
// We still bind black textures to make sure that something is bound (can be a problem on some platforms)
m_DbufferManager.BindBlackTextures(cmd);

// Bind buffer to make sure that something is bound .
cmd.SetGlobalBuffer(HDShaderIDs._DecalPropertyMaskBufferSRV, m_DbufferManager.propertyMaskBuffer);

return;
}

Expand Down