From af68826a8737e2767eda05d4036bb70280536041 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 29 Apr 2021 09:23:16 +0200 Subject: [PATCH 1/9] Opt-out of builtin auto baking of ambient/reflection probe. #4324 --- .../CHANGELOG.md | 57 +++++++++++++++++-- .../RenderPipeline/HDRenderPipeline.cs | 2 + 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b8414736085..5918d3789d5 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -24,12 +24,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed fog precision in some camera positions (case 1329603). - Fixed contact shadows tile coordinates calculations. - Fixed blocky looking bloom when dynamic resolution scaling was used. +- Fixrf for wrong cached area light initialization. +- Fixed an issue where auto baking of ambient and reflection probe done for builtin renderer would cause wrong baking in HDRP. -### Fixed - -- Fix for wrong cached area light initialization. - - +### Changed ## [10.5.0] - 2021-04-19 @@ -130,6 +128,55 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed SRP batcher not compatible with Decal (case 1311586) - Fixed issue with different shadow atlas stomping on each other when they have same resolution. - Fixed wrong color buffer being bound to pre refraction custom passes. +<<<<<<< HEAD +======= +- Fixed issue in Probe Reference Volume authoring component triggering an asset reload on all operations. +- Fixed grey screen on playstation platform when histogram exposure is enabled but the curve mapping is not used. +- Fixed HDRPAsset loosing its reference to the ray tracing resources when clicking on a different quality level that doesn't have ray tracing (case 1320304). +- Fixed SRP batcher not compatible with Decal (case 1311586). +- Fixed error message when having MSAA and Screen Space Shadows (case 1318698). +- Fixed Nans happening when the history render target is bigger than the current viewport (case 1321139). +- Fixed Tube and Disc lights mode selection (case 1317776) +- Fixed preview camera updating the skybox material triggering GI baking (case 1314361/1314373). +- The default LookDev volume profile is now copied and referenced in the Asset folder instead of the package folder. +- Fixed SSS on console platforms. +- Assets going through the migration system are now dirtied. +- Fixed warning fixed on ShadowLoop include (HDRISky and Unlit+ShadowMatte) +- Fixed SSR Precision for 4K Screens +- Fixed issue with gbuffer debug view when virtual texturing is enabled. +- Fixed volumetric fog noise due to sun light leaking (case 1319005) +- Fixed an issue with Decal normal blending producing NaNs. +- Fixed issue in wizard when resource folder don't exist +- Fixed issue with Decal projector edge on Metal (case 1286074) +- Fixed Exposure Frame Settings control issues on Planar reflection probes (case 1312153). Dynamic reflections now keep their own exposure relative to their parent camera. +- Fixed multicamera rendering for Dynamic Resolution Scaling using dx12 hardware mode. Using a planar reflection probe (another render camera) should be safe. +- Fixed Render Graph Debug UI not refreshing correctly in the Render Pipeline Debugger. +- Fixed SSS materials in planar reflections (case 1319027). +- Fixed Decal's pivot edit mode 2D slider gizmo not supporting multi-edition +- Fixed missing Update in Wizard's DXR Documentation +- Fixed issue were the final image is inverted in the Y axis. Occurred only on final Player (non-dev for any platform) that use Dynamic Resolution Scaling with Contrast Adaptive Sharpening filter. +- Fixed a bug with Reflection Probe baking would result in an incorrect baking reusing other's Reflection Probe baking +- Fixed volumetric fog being visually chopped or missing when using hardware Dynamic Resolution Scaling. +- Fixed generation of the packed depth pyramid when hardware Dynamic Resolution Scaling is enabled. +- Fixed issue were the final image is inverted in the Y axis. Occurred only on final Player (non-dev for any platform) that use Dynamic Resolution Scaling with Contrast Adaptive Sharpening filter. +- Fixed a bug with Reflection Probe baking would result in an incorrect baking reusing other's Reflection Probe baking +- Fixed Decal's UV edit mode with negative UV +- Fixed issue with the color space of AOVs (case 1324759) +- Fixed issue with history buffers when using multiple AOVs (case 1323684). +- Fixed camera preview with multi selection (case 1324126). +- Fix potential NaN on apply distortion pass. +- Fixed the camera controller in the template with the old input system (case 1326816). +- Fixed broken Lanczos filter artifacts on ps4, caused by a very aggressive epsilon (case 1328904) +- Fixed global Settings ignore the path set via Fix All in HDRP wizard (case 1327978) +- Fixed issue with an assert getting triggered with OnDemand shadows. +- Fixed GBuffer clear option in FrameSettings not working +- Fixed usage of Panini Projection with floating point HDRP and Post Processing color buffers. +- Fixed a NaN generating in Area light code. +- Fixed CustomPassUtils scaling issues when used with RTHandles allocated from a RenderTexture. +- Fixed ResourceReloader that was not call anymore at pipeline construction +- Fixed undo of some properties on light editor. +- Fixed an issue where auto baking of ambient and reflection probe done for builtin renderer would cause wrong baking in HDRP. +>>>>>>> 1f51ef158b... Opt-out of builtin auto baking of ambient/reflection probe. (#4324) ### Changed - Updated the tooltip for the Decal Angle Fade property (requires to enable Decal Layers in both HDRP asset and Frame settings) (case 1308048). diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 6bc416391dd..7b70ccb1420 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -918,6 +918,8 @@ void SetRenderingFeatures() , overridesShadowmask = true // Don't display the shadow mask UI in Quality Settings , overrideShadowmaskMessage = "\nThe Shadowmask Mode used at run time can be found in the Shadows section of Light component." , overridesRealtimeReflectionProbes = true // Don't display the real time reflection probes checkbox UI in Quality Settings + , autoAmbientProbeBaking = false + , autoDefaultReflectionProbeBaking = false }; Lightmapping.SetDelegate(GlobalIlluminationUtils.hdLightsDelegate); From 835b3caeb9178e5900c56fb579fbb5f36dc7a5df Mon Sep 17 00:00:00 2001 From: NetteVI Date: Wed, 12 May 2021 10:27:49 -0700 Subject: [PATCH 2/9] Fix Unifed Shader Precision Model in SRP shaders by supporting half precision on desktop #4349 --- com.unity.render-pipelines.core/CHANGELOG.md | 4 +-- .../ShaderLibrary/Common.hlsl | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 796a1fe9b26..82eeeb197a3 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -6,11 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [10.6.0] - 2021-04-29 -Version Updated -The version number for this package has increased due to a version update of a related graphics package. - ### Fixed - Fixed ACES filter artefact due to half floating point error on some mobile platforms. +- Fixed Explicit half precision not working even when Unified Shader Precision Model is enabled. ## [10.5.0] - 2021-04-19 diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl index 9c653ee2d5e..514a53320c6 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl @@ -87,6 +87,20 @@ #define REAL_IS_HALF 0 #endif // Do we have half? +#if REAL_IS_HALF || (defined(UNITY_UNIFIED_SHADER_PRECISION_MODEL) && (defined(UNITY_COMPILER_HLSL) || defined(UNITY_COMPILER_DXC))) +#define half min16float +#define half2 min16float2 +#define half3 min16float3 +#define half4 min16float4 +#define half2x2 min16float2x2 +#define half2x3 min16float2x3 +#define half3x2 min16float3x2 +#define half3x3 min16float3x3 +#define half3x4 min16float3x4 +#define half4x3 min16float4x3 +#define half4x4 min16float4x4 +#endif + #if REAL_IS_HALF #define real half #define real2 half2 @@ -102,19 +116,6 @@ #define real4x3 half4x3 #define real4x4 half4x4 -#define half min16float -#define half2 min16float2 -#define half3 min16float3 -#define half4 min16float4 - -#define half2x2 min16float2x2 -#define half2x3 min16float2x3 -#define half3x2 min16float3x2 -#define half3x3 min16float3x3 -#define half3x4 min16float3x4 -#define half4x3 min16float4x3 -#define half4x4 min16float4x4 - #define REAL_MIN HALF_MIN #define REAL_MAX HALF_MAX #define REAL_EPS HALF_EPS From 31ef7b0254ca47f1b019f2ecec017981e9732a42 Mon Sep 17 00:00:00 2001 From: Vic Cooper <63712500+Vic-Cooper@users.noreply.github.com> Date: Tue, 11 May 2021 08:29:49 +0100 Subject: [PATCH 3/9] Improved property descriptions (#4451) * Improved property descriptions Improved descriptions to address Remi's slack question: "How is calculated the distance at which diffusion profile stops having an effect in HDRP ? And what does it depends on ?" * Fixed scale 0.01 > 0.001 --- .../Documentation~/Diffusion-Profile.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Diffusion-Profile.md b/com.unity.render-pipelines.high-definition/Documentation~/Diffusion-Profile.md index 7b17c072fee..c6d0404bd24 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Diffusion-Profile.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Diffusion-Profile.md @@ -1,6 +1,6 @@ # Diffusion Profile -The High Definition Render Pipeline (HDRP) stores most [subsurface scattering](Subsurface-Scattering.md) settings in a __Diffusion Profile__ Asset. You can assign a __Diffusion Profile__ Asset directly to Materials that use Subsurface Scattering. +The High Definition Render Pipeline (HDRP) stores most [Subsurface Scattering](Subsurface-Scattering.md) settings in a __Diffusion Profile__ Asset. You can assign a __Diffusion Profile__ Asset directly to Materials that use Subsurface Scattering. To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffusion Profile__. @@ -12,9 +12,9 @@ To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffu | Property| Description | |:---|:---| | **Name** | The name of the Diffusion Profile. | -| **Scattering Distance** | Use the color picker to select the shape and blur radius of the Diffusion Profile. Defines how far light travels below the surface. This affects the color bleeding and blurring behavior of Subsurface Scattering, as well as the color tint of Transmission. | -| **Max Radius** | An informative helper value that displays the effective maximum radius (in millimeters) of the effect you define in Scattering Distance. You can not change this value directly. | -| **Index of Refraction** | Use the slider to set the refractive behavior of the Material. Larger values increase the intensity of specular reflection. For example, the index of refraction of skin is about 1.4. For more example values for the index of refraction of different materials, see Pixel and Poly’s [list of indexes of refraction values](https://pixelandpoly.com/ior.html). | +| **Scattering Distance** | Use the color picker (circle icon) to define how far each light channel in the Diffusion Profile travels below the surface:

**R**: Defines how far the red light channel travels below the surface.
**G**: Controls how far the green light channel travels below the surface.
**B**: Controls how far the blue light channel travels below the surface.

The overall color affects the Transmission tint. | +| **Max Radius** | The maximum radius of the effect you define in **Scattering Distance**. The size of this value depends on the world scale. For example, when the world scale is 1, this value is in meters. When the world scale is 0.001, this value is in millimeters.

When the size of this radius is smaller than a pixel on the screen, HDRP does not apply Subsurface Scattering. | +| **Index of Refraction** | This value is controlled by the highest of the **Scattering Distance** RGB values.Use the slider to set the refractive behavior of the Material. Larger values increase the intensity of specular reflection. For example, the index of refraction of skin is about 1.4. For more example values for the index of refraction of different materials, see Pixel and Poly’s [list of indexes of refraction values](https://pixelandpoly.com/ior.html). | | **World Scale** | Controls the scale of Unity’s world units for this Diffusion Profile. By default, HDRP assumes that 1 Unity unit is 1 meter. This property only affects the subsurface scattering pass. | From 11239365d57efd3e6f577462f6d5a983e9dfa4c2 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Mon, 31 May 2021 23:59:32 +0200 Subject: [PATCH 4/9] [HDRP] Merge Hd/bugfix #4731 --- .../None/2008_Debug_SubSurfaceScattering.png | 3 + .../2008_Debug_SubSurfaceScattering.png.meta | 110 ++ .../2008_Debug_SubSurfaceScattering.unity | 1026 +++++++++++++++++ ...2008_Debug_SubSurfaceScattering.unity.meta | 7 + .../ProjectSettings/EditorBuildSettings.asset | 3 + .../CHANGELOG.md | 8 + .../Documentation~/Anti-Aliasing.md | 3 +- .../Documentation~/Decal-Projector.md | 1 - .../ShaderGraph/ShaderPass.template.hlsl | 3 + .../Lit/ShaderGraph/ShaderPass.template.hlsl | 3 + .../Runtime/Debug/DebugFullScreen.shader | 4 +- .../Debug/DebugViewMaterialGBuffer.shader | 4 +- .../Runtime/Material/Lit/Lit.hlsl | 2 +- .../SubsurfaceScatteringManagerRT.cs | 6 +- .../RenderPipeline/Settings/FrameSettings.cs | 4 +- .../ShaderPass/ShaderPassPathTracing.hlsl | 3 +- .../VFXGraph/Shaders/VFXLitPixelOutput.hlsl | 4 +- 17 files changed, 1178 insertions(+), 16 deletions(-) create mode 100644 TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png create mode 100644 TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png.meta create mode 100644 TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity create mode 100644 TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity.meta diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png new file mode 100644 index 00000000000..ca1b2313eef --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f01a861cfead987d879a6d9c4aa02faec211d0b3192169c9e6494fb34f1be60 +size 13520 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png.meta b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png.meta new file mode 100644 index 00000000000..488f349dd66 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2008_Debug_SubSurfaceScattering.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 99baeef9419ef7e4b9f4fd9dbd7d22ad +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity new file mode 100644 index 00000000000..456d8bcbbd0 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity @@ -0,0 +1,1026 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: b3552b8b565642645a61a532898f73f6, + type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &251055521 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 251055525} + - component: {fileID: 251055524} + - component: {fileID: 251055523} + - component: {fileID: 251055522} + m_Layer: 0 + m_Name: Plane (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &251055522 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 251055521} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &251055523 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 251055521} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 743ca717a4d50684f8a4717b5afd8976, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &251055524 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 251055521} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &251055525 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 251055521} + m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 1.25, y: 1.25, z: 0} + m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} +--- !u!1 &321196266 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 321196268} + - component: {fileID: 321196267} + - component: {fileID: 321196269} + m_Layer: 0 + m_Name: Global Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &321196267 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 321196266} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 94acb726607bf8f4fa833981233fffc5, type: 2} +--- !u!4 &321196268 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 321196266} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7, y: -0.36, z: -47.317177} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &321196269 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 321196266} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: -100 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: f940a8037e6cda542891dc1aac1fa4e8, type: 2} +--- !u!1 &940557428 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 940557432} + - component: {fileID: 940557431} + - component: {fileID: 940557430} + - component: {fileID: 940557429} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &940557429 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 940557428} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &940557430 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 940557428} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 367a0f5962806ca4eb97aec45e6cf758, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &940557431 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 940557428} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &940557432 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 940557428} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &966091370 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 966091374} + - component: {fileID: 966091373} + - component: {fileID: 966091372} + - component: {fileID: 966091371} + m_Layer: 0 + m_Name: Plane (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &966091371 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 966091370} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &966091372 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 966091370} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a672301dfeead7a4ba9c40364e0c2195, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &966091373 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 966091370} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &966091374 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 966091370} + m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068} + m_LocalPosition: {x: -1.25, y: 1.25, z: 0} + m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} +--- !u!1 &998453645 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 998453648} + - component: {fileID: 998453647} + - component: {fileID: 998453646} + m_Layer: 0 + m_Name: Point Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &998453646 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 998453645} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Intensity: 100 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_SpotIESCutoffPercent: 100 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 0 + m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0.025 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 0.99 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + m_IESPoint: {fileID: 0} + m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 + m_AreaLightShadowCone: 120 + m_UseScreenSpaceShadows: 0 + m_InteractsWithSky: 1 + m_AngularDiameter: 0.5 + m_FlareSize: 2 + m_FlareTint: {r: 1, g: 1, b: 1, a: 1} + m_FlareFalloff: 4 + m_SurfaceTexture: {fileID: 0} + m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} + m_Distance: 1.5e+11 + m_UseRayTracedShadows: 0 + m_NumRayTracingSamples: 4 + m_FilterTracedShadow: 1 + m_FilterSizeTraced: 16 + m_SunLightConeAngle: 0.5 + m_LightShadowRadius: 0.5 + m_SemiTransparentShadow: 0 + m_ColorShadow: 1 + m_DistanceBasedFiltering: 0 + m_EvsmExponent: 15 + m_EvsmLightLeakBias: 0 + m_EvsmVarianceBias: 0.00001 + m_EvsmBlurPasses: 0 + m_LightlayersMask: 1 + m_LinkShadowLayers: 1 + m_ShadowNearPlane: 0.1 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 16 + m_MinFilterSize: 0.1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 0 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 0 + m_UseOverride: 1 + m_Level: 0 + m_RayTracedContactShadow: 0 + m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} + m_PenumbraTint: 0 + m_NormalBias: 0.75 + m_SlopeBias: 0.5 + m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 + m_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_preserveCachedShadow: 0 + m_OnDemandShadowRenderOnPlacement: 1 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 0 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 +--- !u!108 &998453647 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 998453645} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 7.957747 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &998453648 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 998453645} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.83, z: -0.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1906697871 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1906697874} + - component: {fileID: 1906697873} + - component: {fileID: 1906697872} + m_Layer: 0 + m_Name: PerryHead + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1906697872 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1906697871} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0c7859dab232f9d4c8cba2497fce6465, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1906697873 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1906697871} + m_Mesh: {fileID: 4300000, guid: 003b412a0b1ef1e4c9038104f29ee2d4, type: 3} +--- !u!4 &1906697874 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1906697871} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1958577326 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1958577328} + - component: {fileID: 1958577327} + m_Layer: 0 + m_Name: DebugView + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1958577327 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1958577326} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a9ad82d3a5300af40a7a6a9927907436, type: 3} + m_Name: + m_EditorClassIdentifier: + settingType: 1 + gBuffer: 0 + fullScreenDebugMode: 0 + lightlayers: 0 + lightingFullScreenDebugMode: 14 +--- !u!4 &1958577328 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1958577326} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.039338082, y: 0.4417772, z: -1.0576167} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2058112913 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2058112915} + - component: {fileID: 2058112914} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2058112914 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2058112913} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: 94acb726607bf8f4fa833981233fffc5, type: 2} + m_StaticLightingSkyUniqueID: 0 + m_StaticLightingCloudsUniqueID: 0 +--- !u!4 &2058112915 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2058112913} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &2105304950 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1132393308280272, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_Name + value: HDRP_Test_Camera + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.z + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9848078 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.z + value: 0.17364816 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: field of view + value: 38.7 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_FocalLength + value: 34.170994 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_Version + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 + value: 70005818916701 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderPipelineAsset + value: + objectReference: {fileID: 11400000, guid: cdc7edacd77500a4cb795307905f3bac, + type: 2} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: checkMemoryAllocation + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderGraphCompatible + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.TargetHeight + value: 480 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.AverageCorrectnessThreshold + value: 0.00016 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.PerPixelCorrectnessThreshold + value: 0.0016 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1958577327} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SetDebugView + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: DebugViewController, Unity.RenderPipelines.HighDefinition-Tests.Runtime + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity.meta b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity.meta new file mode 100644 index 00000000000..c40ef4cbf16 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/2008_Debug_SubSurfaceScattering.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bb4c2806fa330ce4a8015c64186b031d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset b/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset index 4f953b3212f..fb7b3ebef99 100644 --- a/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset +++ b/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset @@ -233,6 +233,9 @@ EditorBuildSettings: - enabled: 0 path: Assets/Scenes/2007_Debug_LightCluster.unity guid: b7fbbc7d0a8ea854aae81bc3243df0ff + - enabled: 1 + path: Assets/Scenes/2008_Debug_SubSurfaceScattering.unity + guid: bb4c2806fa330ce4a8015c64186b031d - enabled: 1 path: Assets/Scenes/3001_AreaShadowsDeferred.unity guid: 490feb5a82328c647b87259fba42ec1f diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 5918d3789d5..fe9f34281b8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -26,6 +26,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed blocky looking bloom when dynamic resolution scaling was used. - Fixrf for wrong cached area light initialization. - Fixed an issue where auto baking of ambient and reflection probe done for builtin renderer would cause wrong baking in HDRP. +- Fixed the ray traced sub subsurface scattering debug mode not displaying only the RTSSS Data (case 1332904). +- Fixed for discrepancies in intensity and saturation between screen space refraction and probe refraction. +- Fixed a divide-by-zero warning for anisotropic shaders (Fabric, Lit). +- Fixed VfX lit particle AOV output color space. +- Fixed path traced transparent unlit material (case 1335500). +- Fixed support of Distortion with MSAA +- Fixed contact shadow debug views not displaying correctly upon resizing of view. +- Fixed an error when deleting the 3D Texture mask of a local volumetric fog volume (case 1339330). ### Changed diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md b/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md index b6179f3fa8e..43406365a4d 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md @@ -81,8 +81,7 @@ When you use MSAA, be aware of the following: 1. [Screen space reflection (SSR)](Override-Screen-Space-Reflection.md). 2. Screen space shadows. 3. [Temporal Anti-aliasing](#TAA). - 4. Distortion. - 5. Normal Buffer patch up by Decals. + 4. Normal Buffer patch up by Decals. It mean Decal which affect material's normal will not affect Screen space reflection (SSR). This is not a problem as the effect is disabled, see 1. - MSAA does not affect the following features. HDRP does not disable these effects, it just does not process MSAA for them: 1. [Post-processing](Post-Processing-Main.md). 3. [Subsurface scattering](Subsurface-Scattering.md). diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md index 8662c809fed..21c74bf2764 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md @@ -42,7 +42,6 @@ Using the Inspector allows you to change all of the Decal Projector properties, | **Draw Distance** | The distance from the Camera to the Decal at which this projector stops projecting the decal and HDRP no longer renders the decal. | | **Start Fade** | Use the slider to set the distance from the Camera at which the projector begins to fade out the decal. Scales from 0 to 1 and represents a percentage of the **Draw Distance**. A value of 0.9 begins fading the decal out at 90% of the **Draw Distance** and finished fading it out at the **Draw Distance**. | | **Angle Fade** | Use the min-max slider to control the fade out range of the decal based on the angle between the Decal backward direction and the vertex normal of the receiving surface. Only available if [Decal Layers](Decal.md) feature is enabled. | -| **End Angle Fade** | Use the slider to set the angle from the Decal backward direction at which the projector stop to fade out the decal. Scales from 0 to 180 and represents an angle in degree. Only available if [Decal Layers](Decal.md) feature is enabled. | | **Tiling** | Scales the decal Material along its UV axes. | | **Offset** | Offsets the decal Material along its UV axes. Use this with the **UV Scale** when using a Material atlas for your decal. | | **Fade Factor** | Allows you to manually fade the decal in and out. A value of 0 makes the decal fully transparent, and a value of 1 makes the decal as opaque as defined by the **Material**. The **Material** manages the maximum opacity of the decal using **Global Opacity** and an opacity map. | diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/ShaderPass.template.hlsl b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/ShaderPass.template.hlsl index 4b55f896c4f..52bc819a377 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/ShaderPass.template.hlsl +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/ShaderPass.template.hlsl @@ -44,6 +44,9 @@ void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDes #ifdef _MATERIAL_FEATURE_COTTON_WOOL surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_FABRIC_COTTON_WOOL; $SurfaceDescription.Smoothness: surfaceData.perceptualSmoothness = lerp(0.0, 0.6, surfaceDescription.Smoothness); + #else + // Initialize the normal to something non-zero to avoid div-zero warnings for anisotropy. + surfaceData.normalWS = float3(0, 1, 0); #endif #ifdef _MATERIAL_FEATURE_SUBSURFACE_SCATTERING diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/ShaderPass.template.hlsl b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/ShaderPass.template.hlsl index 6c0bc05a8fe..6488c6f1cff 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/ShaderPass.template.hlsl +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/ShaderPass.template.hlsl @@ -57,6 +57,9 @@ void BuildSurfaceData(FragInputs fragInputs, inout SurfaceDescription surfaceDes #ifdef _MATERIAL_FEATURE_ANISOTROPY surfaceData.materialFeatures |= MATERIALFEATUREFLAGS_LIT_ANISOTROPY; + + // Initialize the normal to something non-zero to avoid a div-zero warning for anisotropy. + surfaceData.normalWS = float3(0, 1, 0); #endif #ifdef _MATERIAL_FEATURE_IRIDESCENCE diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader index 06687852d88..47ea37b3110 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader @@ -291,7 +291,7 @@ Shader "Hidden/HDRP/DebugFullScreen" } if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_CONTACT_SHADOWS) { - uint contactShadowData = LOAD_TEXTURE2D_X(_ContactShadowTexture, input.texcoord * _ScreenSize.xy).r; + uint contactShadowData = LOAD_TEXTURE2D_X(_ContactShadowTexture, (uint2)input.positionCS.xy).r; // when the index is -1 we display all contact shadows uint mask = (_DebugContactShadowLightIndex == -1) ? -1 : 1 << _DebugContactShadowLightIndex; @@ -301,7 +301,7 @@ Shader "Hidden/HDRP/DebugFullScreen" } if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_CONTACT_SHADOWS_FADE) { - uint contactShadowData = LOAD_TEXTURE2D_X(_ContactShadowTexture, input.texcoord * _ScreenSize.xy).r; + uint contactShadowData = LOAD_TEXTURE2D_X(_ContactShadowTexture, (uint2)input.positionCS.xy).r; float fade = float((contactShadowData >> 24)) / 255.0; return float4(fade.xxx, 0.0); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewMaterialGBuffer.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewMaterialGBuffer.shader index 0dce4a9fb90..0af8fa010d2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewMaterialGBuffer.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewMaterialGBuffer.shader @@ -118,8 +118,8 @@ Shader "Hidden/HDRP/DebugViewMaterialGBuffer" { // TEMP! // For now, the final blit in the backbuffer performs an sRGB write - // So in the meantime we apply the inverse transform to linear data to compensate. - if (!needLinearToSRGB) + // So in the meantime we apply the inverse transform to linear data to compensate, unless we output to AOVs. + if (!needLinearToSRGB && _DebugAOVOutput == 0) result = SRGBToLinear(max(0, result)); return float4(result, 1.0); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl index 2fc1390c73a..727b6892a45 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl @@ -1998,7 +1998,7 @@ IndirectLighting EvaluateBSDF_Env( LightLoopContext lightLoopContext, lighting.specularReflected = envLighting; #if HAS_REFRACTION else - lighting.specularTransmitted = envLighting * preLightData.transparentTransmittance; + lighting.specularTransmitted = envLighting; #endif return lighting; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs index bd976997b69..35485b9db36 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs @@ -470,12 +470,12 @@ TextureHandle RenderSubsurfaceScatteringRT(RenderGraph renderGraph, HDCamera hdC // Denoise the result rtsssResult = DenoiseRTSSS(renderGraph, hdCamera, rtsssResult, depthStencilBuffer, normalBuffer, motionVectorsBuffer); - // Compose it - rtsssResult = CombineRTSSS(renderGraph, hdCamera, rtsssResult, depthStencilBuffer, sssColor, ssgiBuffer, diffuseBuffer, colorBuffer); - // Push this version of the texture for debug PushFullScreenDebugTexture(renderGraph, diffuseBuffer, FullScreenDebugMode.RayTracedSubSurface); + // Compose it + rtsssResult = CombineRTSSS(renderGraph, hdCamera, rtsssResult, depthStencilBuffer, sssColor, ssgiBuffer, diffuseBuffer, colorBuffer); + // Return the result return rtsssResult; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs index a50eb53ca91..4a9e2721154 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs @@ -798,8 +798,8 @@ internal static void Sanitize(ref FrameSettings sanitizedFrameSettings, Camera c sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.Decals] &= renderPipelineSettings.supportDecals && !preview; sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.DecalLayers] &= renderPipelineSettings.supportDecalLayers && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.Decals]; sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentPostpass] &= renderPipelineSettings.supportTransparentDepthPostpass && !preview && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentObjects]; - bool distortion = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.Distortion] &= renderPipelineSettings.supportDistortion && !msaa && !preview; - sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.RoughDistortion] &= distortion && !msaa && !preview; + bool distortion = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.Distortion] &= renderPipelineSettings.supportDistortion && !preview; + sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.RoughDistortion] &= distortion && !preview; sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.LowResTransparent] &= renderPipelineSettings.lowresTransparentSettings.enabled && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentObjects]; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl index 40d9acda0d2..eaf62726037 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl @@ -209,7 +209,8 @@ void ComputeSurfaceScattering(inout PathIntersection pathIntersection : SV_RayPa if (builtinData.opacity < 1.0) { RayDesc rayDescriptor; - rayDescriptor.Origin = GetAbsolutePositionWS(fragInput.positionRWS) - fragInput.tangentToWorld[2] * _RaytracingRayBias; + float bias = dot(WorldRayDirection(), fragInput.tangentToWorld[2]) > 0.0 ? _RaytracingRayBias : -_RaytracingRayBias; + rayDescriptor.Origin = fragInput.positionRWS + bias * fragInput.tangentToWorld[2]; rayDescriptor.Direction = WorldRayDirection(); rayDescriptor.TMin = 0.0; rayDescriptor.TMax = FLT_INF; diff --git a/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl b/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl index ab8602b8766..e551f2a269e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl @@ -66,8 +66,8 @@ float4 VFXCalcPixelOutputForward(const SurfaceData surfaceData, const BuiltinDat // TEMP! // For now, the final blit in the backbuffer performs an sRGB write - // So in the meantime we apply the inverse transform to linear data to compensate. - if (!needLinearToSRGB) + // So in the meantime we apply the inverse transform to linear data to compensate, unless we output to AOVs. + if (!needLinearToSRGB && _DebugAOVOutput == 0) result = SRGBToLinear(max(0, result)); outColor = float4(result, 1.0); From d11e8b409f85938d40217de1f783f693bd558a22 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Mon, 14 Jun 2021 21:32:37 +0200 Subject: [PATCH 5/9] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fe9f34281b8..bd3606c8af7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -33,7 +33,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed path traced transparent unlit material (case 1335500). - Fixed support of Distortion with MSAA - Fixed contact shadow debug views not displaying correctly upon resizing of view. -- Fixed an error when deleting the 3D Texture mask of a local volumetric fog volume (case 1339330). ### Changed From 3b078a87088543bfb4f00690460282b84d7ab812 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Sat, 29 May 2021 21:50:21 +0200 Subject: [PATCH 6/9] [HDRP] Merge Hd/bugfix #4713 --- .../CHANGELOG.md | 7 +++ .../Lighting/HDLightUI.ContextualMenu.cs | 2 + .../RenderPipeline/HDRenderPipelineUI.Skin.cs | 1 + .../RenderPipeline/HDRenderPipelineUI.cs | 13 +++++- .../Runtime/Compositor/CompositionManager.cs | 27 ++++++++++++ .../Shaders/TemporalAntiAliasing.shader | 2 + .../Runtime/RenderPipeline/Camera/HDCamera.cs | 7 +++ .../HDRenderPipeline.LightLoop.cs | 2 + .../RenderPipeline/HDRenderPipeline.cs | 43 ++++++++++++------- .../Raytracing/HDRaytracingManager.cs | 2 + .../RenderPass/CustomPass/CustomPassUtils.cs | 8 ++-- 11 files changed, 93 insertions(+), 21 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index bd3606c8af7..bafc5abbdd3 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -33,8 +33,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed path traced transparent unlit material (case 1335500). - Fixed support of Distortion with MSAA - Fixed contact shadow debug views not displaying correctly upon resizing of view. +- Fixed white flash when camera is reset and SSR Accumulation mode is on. +- Fixed an issue with TAA causing objects not to render at extremely high far flip plane values. +- Fixed a memory leak related to not disposing of the RTAS at the end HDRP's lifecycle. +- Fixed overdraw in custom pass utils blur and Copy functions (case 1333648); +- Fixed invalid pass index 1 in DrawProcedural error. ### Changed +- Display an info box and disable MSAA asset entry when ray tracing is enabled. +- Changed light reset to preserve type. ## [10.5.0] - 2021-04-19 diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.ContextualMenu.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.ContextualMenu.cs index 0d703e4a6a7..a2234099c9d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.ContextualMenu.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.ContextualMenu.cs @@ -27,6 +27,7 @@ static void ResetLight(MenuCommand menuCommand) Light light = go.GetComponent(); HDAdditionalLightData lightAdditionalData = go.GetComponent(); + HDLightType lightType = lightAdditionalData.type; Assert.IsNotNull(light); Assert.IsNotNull(lightAdditionalData); @@ -36,6 +37,7 @@ static void ResetLight(MenuCommand menuCommand) // To avoid duplicating init code we copy default settings to Reset additional data // Note: we can't call this code inside the HDAdditionalLightData, thus why we don't wrap it in a Reset() function HDUtils.s_DefaultHDAdditionalLightData.CopyTo(lightAdditionalData); + lightAdditionalData.type = lightType; } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 2c4777bd8d6..86e23243b0c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -133,6 +133,7 @@ public class GeneralSection public static readonly GUIContent supportedRayTracingMode = EditorGUIUtility.TrTextContent("Supported Ray Tracing Mode (Preview)"); public static readonly GUIContent rayTracingUnsupportedWarning = EditorGUIUtility.TrTextContent("Ray tracing is not supported on your device. Please refer to the documentation."); public static readonly GUIContent rayTracingDX12OnlyWarning = EditorGUIUtility.TrTextContent("Ray tracing is currently only supported on DX12."); + public static readonly GUIContent rayTracingMSAAUnsupported = EditorGUIUtility.TrTextContent("When Ray tracing is enabled in asset, MSAA is not supported. Please refer to the documentation."); public static readonly GUIContent maximumLODLevel = EditorGUIUtility.TrTextContent("Maximum LOD Level"); public static readonly GUIContent LODBias = EditorGUIUtility.TrTextContent("LOD Bias"); internal static readonly GUIContent supportProbeVolumeContent = EditorGUIUtility.TrTextContent("Probe Volume", "When enabled, HDRP allocates Shader variants and memory for probe volume based GI. This allows you to use probe volumes in your Unity Project."); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index eb91b232f9d..f51d296c162 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -919,17 +919,26 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri // MSAA is an option that is only available in full forward but Camera can be set in Full Forward only. Thus MSAA have no dependency currently //Note: do not use SerializedProperty.enumValueIndex here as this enum not start at 0 as it is used as flags. bool msaaAllowed = true; + bool hasRayTracing = false; for (int index = 0; index < serialized.serializedObject.targetObjects.Length && msaaAllowed; ++index) { - var litShaderMode = (serialized.serializedObject.targetObjects[index] as HDRenderPipelineAsset).currentPlatformRenderPipelineSettings.supportedLitShaderMode; - msaaAllowed &= litShaderMode == SupportedLitShaderMode.ForwardOnly || litShaderMode == SupportedLitShaderMode.Both; + var settings = (serialized.serializedObject.targetObjects[index] as HDRenderPipelineAsset).currentPlatformRenderPipelineSettings; + var litShaderMode = settings.supportedLitShaderMode; + bool rayTracedSupported = settings.supportRayTracing; + hasRayTracing |= rayTracedSupported; + msaaAllowed &= (litShaderMode == SupportedLitShaderMode.ForwardOnly || litShaderMode == SupportedLitShaderMode.Both) && !rayTracedSupported; } + using (new EditorGUI.DisabledScope(!msaaAllowed)) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serialized.renderPipelineSettings.MSAASampleCount, Styles.MSAASampleCountContent); --EditorGUI.indentLevel; } + if (hasRayTracing && serialized.renderPipelineSettings.MSAASampleCount.intValue != (int)MSAASamples.None) + { + EditorGUILayout.HelpBox(Styles.rayTracingMSAAUnsupported.text, MessageType.Info, wide: true); + } EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportMotionVectors, Styles.supportMotionVectorContent); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportRuntimeDebugDisplay, Styles.supportRuntimeDebugDisplayContent); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs index 9fca7f978ad..c6c46f5f8f8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs @@ -802,12 +802,39 @@ void CustomRender(ScriptableRenderContext context, HDCamera camera) if (camera.camera.targetTexture) { + // When rendering to texture (or to camera bridge) we don't need to flip the image. + // If this matrix was used for the game view, then the image would appear flipped, hense the name of the variable. m_ShaderVariablesGlobalCB._ViewProjMatrix = m_ViewProjMatrixFlipped; ConstantBuffer.PushGlobal(cmd, m_ShaderVariablesGlobalCB, HDShaderIDs._ShaderVariablesGlobal); cmd.Blit(null, camera.camera.targetTexture, m_Material, m_Material.FindPass("ForwardOnly")); + + var recorderCaptureActions = CameraCaptureBridge.GetCaptureActions(camera.camera); + if (recorderCaptureActions != null) + { + for (recorderCaptureActions.Reset(); recorderCaptureActions.MoveNext();) + { + recorderCaptureActions.Current(camera.camera.targetTexture, cmd); + } + } } else { + var recorderCaptureActions = CameraCaptureBridge.GetCaptureActions(camera.camera); + + if (recorderCaptureActions != null) + { + m_ShaderVariablesGlobalCB._ViewProjMatrix = m_ViewProjMatrixFlipped; + cmd.SetInvertCulling(true); + ConstantBuffer.PushGlobal(cmd, m_ShaderVariablesGlobalCB, HDShaderIDs._ShaderVariablesGlobal); + cmd.Blit(null, BuiltinRenderTextureType.CameraTarget, m_Material, m_Material.FindPass("ForwardOnly")); + for (recorderCaptureActions.Reset(); recorderCaptureActions.MoveNext();) + { + recorderCaptureActions.Current(BuiltinRenderTextureType.CameraTarget, cmd); + } + cmd.SetInvertCulling(false); + } + + // When we render directly to game view, we render the image flipped up-side-down, like other HDRP cameras m_ShaderVariablesGlobalCB._ViewProjMatrix = m_ViewProjMatrix; ConstantBuffer.PushGlobal(cmd, m_ShaderVariablesGlobalCB, HDShaderIDs._ShaderVariablesGlobal); cmd.Blit(null, BuiltinRenderTextureType.CameraTarget, m_Material, m_Material.FindPass("ForwardOnly")); diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntiAliasing.shader b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntiAliasing.shader index 2457fa4bb9e..9778188f990 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntiAliasing.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/TemporalAntiAliasing.shader @@ -16,6 +16,8 @@ Shader "Hidden/HDRP/TemporalAA" #pragma multi_compile_local _ ANTI_RINGING #pragma multi_compile_local LOW_QUALITY MEDIUM_QUALITY HIGH_QUALITY POST_DOF + #pragma editor_sync_compilation + #pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index c4d7e5eb314..76823c5e304 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -84,6 +84,7 @@ public struct ViewConstants public bool volumetricHistoryIsValid = false; internal int volumetricValidFrames = 0; + internal int colorPyramidHistoryValidFrames = 0; /// Width actually used for rendering after dynamic resolution and XR is applied. public int actualWidth { get; private set; } @@ -135,6 +136,7 @@ public void Reset() volumetricHistoryIsValid = false; volumetricValidFrames = 0; colorPyramidHistoryIsValid = false; + colorPyramidHistoryValidFrames = 0; } /// @@ -1408,6 +1410,11 @@ Matrix4x4 GetJitteredProjectionMatrix(Matrix4x4 origProj) planes.top += planeJitter.y; planes.bottom += planeJitter.y; + // Reconstruct the far plane for the jittered matrix. + // For extremely high far clip planes, the decomposed projection zFar evaluates to infinity. + if (float.IsInfinity(planes.zFar)) + planes.zFar = frustum.planes[5].distance; + proj = Matrix4x4.Frustum(planes); } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs index 7da3a470980..78597750cca 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs @@ -402,6 +402,7 @@ LightingOutput RenderDeferredLighting( RenderGraph renderGraph, class RenderSSRPassData { public RenderSSRParameters parameters; + public bool validColorPyramid; public TextureHandle depthBuffer; public TextureHandle depthPyramid; public TextureHandle normalBuffer; @@ -467,6 +468,7 @@ TextureHandle RenderSSR( RenderGraph renderGraph, passData.stencilBuffer = builder.ReadTexture(prepassOutput.stencilBuffer); passData.clearCoatMask = builder.ReadTexture(clearCoatMask); passData.coarseStencilBuffer = builder.ReadComputeBuffer(prepassOutput.coarseStencilBuffer); + passData.validColorPyramid = hdCamera.colorPyramidHistoryValidFrames > 1; passData.normalBuffer = builder.ReadTexture(prepassOutput.resolvedNormalBuffer); passData.motionVectorsBuffer = builder.ReadTexture(prepassOutput.resolvedMotionVectorsBuffer); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 7b70ccb1420..20ae88be1c5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -4897,22 +4897,30 @@ static void RenderSSR( in RenderSSRParameters parameters, if (parameters.usePBRAlgo) { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.SsrAccumulate))) + if (!parameters.validColorPyramid) { - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._DepthTexture, depthTexture); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._CameraDepthTexture, depthPyramid); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._NormalBufferTexture, normalBuffer); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._ColorPyramidTexture, previousColorPyramid); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrHitPointTexture, SsrHitPointTexture); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SSRAccumTexture, ssrAccum); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrLightingTextureRW, ssrLightingTexture); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrAccumPrev, ssrAccumPrev); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrClearCoatMaskTexture, clearCoatMask); - cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._CameraMotionVectorsTexture, motionVectorsBuffer); - - ConstantBuffer.Push(cmd, parameters.cb, cs, HDShaderIDs._ShaderVariablesScreenSpaceReflection); - - cmd.DispatchCompute(cs, parameters.accumulateKernel, HDUtils.DivRoundUp(parameters.width, 8), HDUtils.DivRoundUp(parameters.height, 8), parameters.viewCount); + CoreUtils.SetRenderTarget(cmd, ssrAccum, ClearFlag.Color, Color.clear); + CoreUtils.SetRenderTarget(cmd, ssrAccumPrev, ClearFlag.Color, Color.clear); + } + else + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.SsrAccumulate))) + { + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._DepthTexture, depthTexture); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._CameraDepthTexture, depthPyramid); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._NormalBufferTexture, normalBuffer); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._ColorPyramidTexture, previousColorPyramid); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrHitPointTexture, SsrHitPointTexture); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SSRAccumTexture, ssrAccum); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrLightingTextureRW, ssrLightingTexture); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrAccumPrev, ssrAccumPrev); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._SsrClearCoatMaskTexture, clearCoatMask); + cmd.SetComputeTextureParam(cs, parameters.accumulateKernel, HDShaderIDs._CameraMotionVectorsTexture, motionVectorsBuffer); + + ConstantBuffer.Push(cmd, parameters.cb, cs, HDShaderIDs._ShaderVariablesScreenSpaceReflection); + + cmd.DispatchCompute(cs, parameters.accumulateKernel, HDUtils.DivRoundUp(parameters.width, 8), HDUtils.DivRoundUp(parameters.height, 8), parameters.viewCount); + } } } } @@ -4959,6 +4967,11 @@ void RenderSSR(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext ren { cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, TextureXR.GetClearTexture()); hdCamera.colorPyramidHistoryIsValid = true; // For the next frame... + hdCamera.colorPyramidHistoryValidFrames = 0; + } + else + { + hdCamera.colorPyramidHistoryValidFrames++; } if (parameters.usePBRAlgo) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs index 956e3de8e2f..bf66a33a7d8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs @@ -127,6 +127,8 @@ internal void InitRayTracingManager() internal void ReleaseRayTracingManager() { + m_CurrentRAS.Dispose(); + if (m_RayTracingLightCluster != null) m_RayTracingLightCluster.ReleaseResources(); if (m_RayCountManager != null) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassUtils.cs index 5257a8ae254..354cb9e499d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassUtils.cs @@ -96,7 +96,7 @@ public static void DownSample(in CustomPassContext ctx, RTHandle source, RTHandl propertyBlock.SetTexture(HDShaderIDs._Source, source); propertyBlock.SetVector(HDShaderIDs._SourceScaleBias, sourceScaleBias); SetSourceSize(propertyBlock, source); - ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, downSamplePassIndex, MeshTopology.Quads, 4, 1, propertyBlock); + ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, downSamplePassIndex, MeshTopology.Triangles, 3, 1, propertyBlock); } } @@ -137,7 +137,7 @@ public static void Copy(in CustomPassContext ctx, RTHandle source, RTHandle dest propertyBlock.SetTexture(HDShaderIDs._Source, source); propertyBlock.SetVector(HDShaderIDs._SourceScaleBias, sourceScaleBias); SetSourceSize(propertyBlock, source); - ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, copyPassIndex, MeshTopology.Quads, 4, 1, propertyBlock); + ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, copyPassIndex, MeshTopology.Triangles, 3, 1, propertyBlock); } } @@ -183,7 +183,7 @@ public static void VerticalGaussianBlur(in CustomPassContext ctx, RTHandle sourc propertyBlock.SetFloat(HDShaderIDs._SampleCount, sampleCount); propertyBlock.SetFloat(HDShaderIDs._Radius, radius); SetSourceSize(propertyBlock, source); - ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, verticalBlurPassIndex, MeshTopology.Quads, 4, 1, propertyBlock); + ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, verticalBlurPassIndex, MeshTopology.Triangles, 3, 1, propertyBlock); } } @@ -229,7 +229,7 @@ public static void HorizontalGaussianBlur(in CustomPassContext ctx, RTHandle sou propertyBlock.SetFloat(HDShaderIDs._SampleCount, sampleCount); propertyBlock.SetFloat(HDShaderIDs._Radius, radius); SetSourceSize(propertyBlock, source); - ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, horizontalBlurPassIndex, MeshTopology.Quads, 4, 1, propertyBlock); + ctx.cmd.DrawProcedural(Matrix4x4.identity, customPassUtilsMaterial, horizontalBlurPassIndex, MeshTopology.Triangles, 3, 1, propertyBlock); } } From 006c5c866d9f07c6eba6185fe526981a38746cde Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 15 Jun 2021 00:14:29 +0200 Subject: [PATCH 7/9] fix compil issue --- .../Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs | 2 -- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs index 78597750cca..7da3a470980 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs @@ -402,7 +402,6 @@ LightingOutput RenderDeferredLighting( RenderGraph renderGraph, class RenderSSRPassData { public RenderSSRParameters parameters; - public bool validColorPyramid; public TextureHandle depthBuffer; public TextureHandle depthPyramid; public TextureHandle normalBuffer; @@ -468,7 +467,6 @@ TextureHandle RenderSSR( RenderGraph renderGraph, passData.stencilBuffer = builder.ReadTexture(prepassOutput.stencilBuffer); passData.clearCoatMask = builder.ReadTexture(clearCoatMask); passData.coarseStencilBuffer = builder.ReadComputeBuffer(prepassOutput.coarseStencilBuffer); - passData.validColorPyramid = hdCamera.colorPyramidHistoryValidFrames > 1; passData.normalBuffer = builder.ReadTexture(prepassOutput.resolvedNormalBuffer); passData.motionVectorsBuffer = builder.ReadTexture(prepassOutput.resolvedMotionVectorsBuffer); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 20ae88be1c5..4185837f724 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -4746,6 +4746,7 @@ struct RenderSSRParameters public int accumulateKernel; public bool transparentSSR; public bool usePBRAlgo; + public bool validColorPyramid; public int width, height, viewCount; @@ -4765,6 +4766,7 @@ RenderSSRParameters PrepareSSRParameters(HDCamera hdCamera, in HDUtils.PackedMip parameters.accumulateKernel = m_SsrAccumulateKernel; parameters.transparentSSR = transparentSSR; parameters.usePBRAlgo = !transparentSSR && volumeSettings.usedAlgorithm.value == ScreenSpaceReflectionAlgorithm.PBRAccumulation; + parameters.validColorPyramid = hdCamera.colorPyramidHistoryValidFrames > 1; parameters.width = hdCamera.actualWidth; parameters.height = hdCamera.actualHeight; From f19ef5b7b6d40d4fa21f39efaa9b70823109d099 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Tue, 15 Jun 2021 20:04:22 +0200 Subject: [PATCH 8/9] Update SubsurfaceScatteringManagerRT.cs --- .../SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs index 35485b9db36..59f5c55aad8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs @@ -471,7 +471,7 @@ TextureHandle RenderSubsurfaceScatteringRT(RenderGraph renderGraph, HDCamera hdC rtsssResult = DenoiseRTSSS(renderGraph, hdCamera, rtsssResult, depthStencilBuffer, normalBuffer, motionVectorsBuffer); // Push this version of the texture for debug - PushFullScreenDebugTexture(renderGraph, diffuseBuffer, FullScreenDebugMode.RayTracedSubSurface); + PushFullScreenDebugTexture(renderGraph, rtsssResult, FullScreenDebugMode.RayTracedSubSurface); // Compose it rtsssResult = CombineRTSSS(renderGraph, hdCamera, rtsssResult, depthStencilBuffer, sssColor, ssgiBuffer, diffuseBuffer, colorBuffer); From 343fa77707af56ac910419ba5a18882b4e4bc90a Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Tue, 15 Jun 2021 20:38:24 +0200 Subject: [PATCH 9/9] Update 902_Materials_SG_Variants_Lit.png --- .../Direct3D12/None/902_Materials_SG_Variants_Lit.png | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/902_Materials_SG_Variants_Lit.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/902_Materials_SG_Variants_Lit.png index 524e4906bb3..b74fbf09771 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/902_Materials_SG_Variants_Lit.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/902_Materials_SG_Variants_Lit.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2423916043f6d18052859393aae1a14020a3389c61fa46b6815449580971a9a8 -size 187113 +oid sha256:3f491566d3a001a77d87d1bdf04840f96f81adb7a577f9442f177b9273ba84c6 +size 213004