Skip to content

Commit dd54558

Browse files
committed
Adding a minimal lit used for RTGI in peformance mode
DIspatch binned rays in 1D instead of 2D Fix an issue with the half resolution Mode Only read the geometric attributes that are required using the share pass info and shader graph defines Fix an issue with the color intensity of emissive for performance rtgi
1 parent 66b5a7e commit dd54558

28 files changed

+250
-168
lines changed
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
130130
- Added CustomPassUtils API to simplify Blur, Copy and DrawRenderers custom passes.
131131
- Added Histogram guided automatic exposure.
132132
- Added few exposure debug modes.
133+
- Added a minimal lit used for RTGI in peformance mode.
134+
- Dispatch binned rays in 1D instead of 2D.
133135

134136
### Fixed
135137
- Fix when rescale probe all direction below zero (1219246)
@@ -622,6 +624,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
622624
- Fixed Wizard check on default volume profile to also check it is not the default one in package.
623625
- Fix erroneous central depth sampling in TAA.
624626
- Fixed light layers not correctly disabled when the lightlayers is set to Nothing and Lightlayers isn't enabled in HDRP Asset
627+
- Fix an issue with the half resolution Mode (performance)
628+
- Fix an issue with the color intensity of emissive for performance rtgi
625629

626630
### Changed
627631
- Improve MIP selection for decals on Transparents
@@ -754,6 +758,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
754758
- Slightly changed the TAA anti-flicker mechanism so that it is more aggressive on almost static images (only on High preset for now).
755759
- Changed default exposure compensation to 0.
756760
- Refactored shadow caching system.
761+
- Only read the geometric attributes that are required using the share pass info and shader graph defines.
757762

758763
## [7.1.1] - 2019-09-05
759764

com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/FabricRaytracing.hlsl

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,21 @@ void FitToStandardLit( SurfaceData surfaceData
3939
outStandardlit.fresnel0 = surfaceData.specularColor;
4040
outStandardlit.coatMask = 0.0;
4141
outStandardlit.emissiveAndBaked = builtinData.bakeDiffuseLighting * surfaceData.ambientOcclusion + builtinData.emissiveColor;
42-
#ifdef LIGHT_LAYERS
43-
outStandardlit.renderingLayers = builtinData.renderingLayers;
44-
#endif
45-
#ifdef SHADOWS_SHADOWMASK
46-
outStandardlit.shadowMasks = BUILTIN_DATA_SHADOW_MASK;
47-
#endif
42+
outStandardlit.isUnlit = 0;
43+
}
44+
45+
void FitToMinimalLit( SurfaceData surfaceData
46+
, BuiltinData builtinData
47+
, float3 normalWS
48+
, out StandardBSDFData outStandardlit)
49+
{
50+
outStandardlit.baseColor = surfaceData.baseColor;
51+
outStandardlit.specularOcclusion = 1.0;
52+
outStandardlit.normalWS = normalWS;
53+
outStandardlit.perceptualRoughness = 0.0;
54+
outStandardlit.fresnel0 = 0.0;
55+
outStandardlit.coatMask = 0.0;
56+
outStandardlit.emissiveAndBaked = builtinData.emissiveColor;
4857
outStandardlit.isUnlit = 0;
4958
}
5059
#endif

com.unity.render-pipelines.high-definition/Runtime/Material/Hair/HairRayTracing.hlsl

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,21 @@ void FitToStandardLit( SurfaceData surfaceData
3939
outStandardlit.fresnel0 = DEFAULT_HAIR_SPECULAR_VALUE;
4040
outStandardlit.coatMask = 0.0;
4141
outStandardlit.emissiveAndBaked = builtinData.bakeDiffuseLighting * surfaceData.ambientOcclusion + builtinData.emissiveColor;
42-
#ifdef LIGHT_LAYERS
43-
outStandardlit.renderingLayers = builtinData.renderingLayers;
44-
#endif
45-
#ifdef SHADOWS_SHADOWMASK
46-
outStandardlit.shadowMasks = BUILTIN_DATA_SHADOW_MASK;
47-
#endif
42+
outStandardlit.isUnlit = 0;
43+
}
44+
45+
void FitToMinimalLit( SurfaceData surfaceData
46+
, BuiltinData builtinData
47+
, float3 normalWS
48+
, out StandardBSDFData outStandardlit)
49+
{
50+
outStandardlit.baseColor = surfaceData.diffuseColor;
51+
outStandardlit.specularOcclusion = 1.0;
52+
outStandardlit.normalWS = normalWS;
53+
outStandardlit.perceptualRoughness = 0.0;
54+
outStandardlit.fresnel0 = 0.0;
55+
outStandardlit.coatMask = 0.0;
56+
outStandardlit.emissiveAndBaked = builtinData.emissiveColor;
4857
outStandardlit.isUnlit = 0;
4958
}
5059
#endif

com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ Shader "HDRP/LayeredLit"
909909
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
910910
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl"
911911

912+
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl"
912913
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
913914

914915
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl"
@@ -949,6 +950,7 @@ Shader "HDRP/LayeredLit"
949950
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
950951
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl"
951952

953+
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl"
952954
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
953955

954956
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl"
@@ -986,6 +988,7 @@ Shader "HDRP/LayeredLit"
986988
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
987989
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
988990

991+
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl"
989992
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Deferred/RaytracingIntersectonGBuffer.hlsl"
990993

991994
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
@@ -1014,6 +1017,7 @@ Shader "HDRP/LayeredLit"
10141017

10151018
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
10161019
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
1020+
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl"
10171021
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
10181022

10191023
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
@@ -1044,6 +1048,7 @@ Shader "HDRP/LayeredLit"
10441048

10451049
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
10461050
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl"
1051+
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl"
10471052
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/SubSurface/RaytracingIntersectionSubSurface.hlsl"
10481053

10491054
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
@@ -1083,6 +1088,7 @@ Shader "HDRP/LayeredLit"
10831088
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracingLightLoop.hlsl"
10841089
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Lighting.hlsl"
10851090

1091+
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl"
10861092
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingIntersection.hlsl"
10871093

10881094
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl"

0 commit comments

Comments
 (0)