From 7bbf2b3f7302d872416086323f9c5c2ca3ed37ae Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Tue, 17 Mar 2020 12:14:15 +0100 Subject: [PATCH 001/200] [8.x.x Backport]Fixed the MaxLightCount being display when the light volume debug menu is on ColorAndEdge. (#6210) * Fixed the MaxLightCount being display when the light volume debug menu is on ColorAndEdge. * Update CHANGELOG.md Co-authored-by: sebastienlagarde --- .../CHANGELOG.md | 1 + .../Runtime/Debug/DebugDisplay.cs | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fc3ec33f7b5..f46b8484614 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the HDRP asset migration code not being called after an upgrade of the package - Fixed draw renderers custom pass out of bound exception - Fixed an issue with emissive light meshes not being in the RAS. +- Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 8f34f033a72..16db54faa1b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -905,14 +905,11 @@ void RegisterLightingDebug() list.Add(new DebugUI.BoolField { displayName = "Display Light Volumes", getter = () => data.lightingDebugSettings.displayLightVolumes, setter = value => data.lightingDebugSettings.displayLightVolumes = value, onValueChanged = RefreshLightingDebug }); if (data.lightingDebugSettings.displayLightVolumes) { - list.Add(new DebugUI.Container + list.Add(new DebugUI.EnumField { displayName = "Light Volume Debug Type", getter = () => (int)data.lightingDebugSettings.lightVolumeDebugByCategory, setter = value => data.lightingDebugSettings.lightVolumeDebugByCategory = (LightVolumeDebug)value, autoEnum = typeof(LightVolumeDebug), getIndex = () => data.lightVolumeDebugTypeEnumIndex, setIndex = value => data.lightVolumeDebugTypeEnumIndex = value, onValueChanged = RefreshLightingDebug }); + if (data.lightingDebugSettings.lightVolumeDebugByCategory == LightVolumeDebug.Gradient) { - children = - { - new DebugUI.EnumField { displayName = "Light Volume Debug Type", getter = () => (int)data.lightingDebugSettings.lightVolumeDebugByCategory, setter = value => data.lightingDebugSettings.lightVolumeDebugByCategory = (LightVolumeDebug)value, autoEnum = typeof(LightVolumeDebug), getIndex = () => data.lightVolumeDebugTypeEnumIndex, setIndex = value => data.lightVolumeDebugTypeEnumIndex = value }, - new DebugUI.UIntField { displayName = "Max Debug Light Count", getter = () => (uint)data.lightingDebugSettings.maxDebugLightCount, setter = value => data.lightingDebugSettings.maxDebugLightCount = value, min = () => 0, max = () => 24, incStep = 1 } - } - }); + list.Add(new DebugUI.UIntField { displayName = "Max Debug Light Count", getter = () => (uint)data.lightingDebugSettings.maxDebugLightCount, setter = value => data.lightingDebugSettings.maxDebugLightCount = value, min = () => 0, max = () => 24, incStep = 1 }); + } } list.Add(new DebugUI.BoolField { displayName = "Display Cookie Atlas", getter = () => data.lightingDebugSettings.displayCookieAtlas, setter = value => data.lightingDebugSettings.displayCookieAtlas = value, onValueChanged = RefreshLightingDebug}); From b7d15299a7f70438b52bbe9cb5c67c8a7051e41e Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Tue, 17 Mar 2020 12:22:34 +0100 Subject: [PATCH 002/200] [8.x.x Backport] Update documentation to mention more explicitely the lack of support of vertex animation (#6204) * Update documentation to mention more explicitely the lack of support of vertex animation * Update Ray-Tracing-Getting-Started.md Co-authored-by: sebastienlagarde --- .../Documentation~/Ray-Tracing-Getting-Started.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md b/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md index 8b86928e41e..1a7c0d7e3ce 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md @@ -184,7 +184,10 @@ d3d12: generating mipmaps for array textures is not yet supported. There is no support for ray tracing on other platform than DX12 for now. HDRP ray tracing in Unity 2019.3 has the following limitations: -- Does not support deformers (skin, vertex animation). +- Does not support deformers (skinning, blend shape, alembic, vertex animation). +- Does not support tessellation +- Does not support per pixel displacement (parallax occlusion mapping, height map, depth offset) - Does not support VFX and Terrain. - Does not support several of HDRP's Materials. This includes Hair, StackLit, Eye, and AxF Materials. - Does not have correct culling for shadows. It uses frustum culling instead. +HDRP ray tracing in Unity 2020.1 and above add support for skinning, blend shapes and alembic. From 409f4dfb89388f094b9d3bdc2a5e0569385f8e90 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 17 Mar 2020 11:24:53 +0000 Subject: [PATCH 003/200] [8.x.x Backport] Make subsection in decal debug menu to specify "affect transparents" (#6202) * Make subsection in decal debug menu * changelog --- .../CHANGELOG.md | 1 + .../Runtime/Debug/DebugDisplay.cs | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index f46b8484614..f6c93624f75 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -454,6 +454,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix Inf source in LTC for area lights. - Fixed alpha clipping test (comparison was '>', now '>=') - Fixed preview camera (eg. shader graph preview) when path tracing is on +- Fixed issue with unclear naming of debug menu for decals. ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 16db54faa1b..55f128b5413 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -88,7 +88,7 @@ public class DebugDisplaySettings : IDebugData DebugUI.Widget[] m_DebugMaterialItems; DebugUI.Widget[] m_DebugLightingItems; DebugUI.Widget[] m_DebugRenderingItems; - DebugUI.Widget[] m_DebugDecalsItems; + DebugUI.Widget[] m_DebugDecalsAffectingTransparentItems; static GUIContent[] s_LightingFullScreenDebugStrings = null; static int[] s_LightingFullScreenDebugValues = null; @@ -648,7 +648,7 @@ void RefreshLightingDebug(DebugUI.Field field, T value) void RefreshDecalsDebug(DebugUI.Field field, T value) { - UnregisterDebugItems(k_PanelDecals, m_DebugDecalsItems); + UnregisterDebugItems(k_PanelDecals, m_DebugDecalsAffectingTransparentItems); RegisterDecalsDebug(); } @@ -1049,14 +1049,17 @@ void RegisterRenderingDebug() void RegisterDecalsDebug() { - m_DebugDecalsItems = new DebugUI.Widget[] + m_DebugDecalsAffectingTransparentItems = new DebugUI.Widget[] { new DebugUI.BoolField { displayName = "Display Atlas", getter = () => data.decalsDebugSettings.displayAtlas, setter = value => data.decalsDebugSettings.displayAtlas = value}, new DebugUI.UIntField { displayName = "Mip Level", getter = () => data.decalsDebugSettings.mipLevel, setter = value => data.decalsDebugSettings.mipLevel = value, min = () => 0u, max = () => (uint)(RenderPipelineManager.currentPipeline as HDRenderPipeline).GetDecalAtlasMipCount() } }; var panel = DebugManager.instance.GetPanel(k_PanelDecals, true); - panel.children.Add(m_DebugDecalsItems); + var decalAffectingTransparent = new DebugUI.Container() { displayName = "Decals Affecting Transparent Objects" }; + decalAffectingTransparent.children.Add(m_DebugDecalsAffectingTransparentItems); + + panel.children.Add(decalAffectingTransparent); } internal void RegisterDebug() @@ -1071,7 +1074,7 @@ internal void RegisterDebug() internal void UnregisterDebug() { - UnregisterDebugItems(k_PanelDecals, m_DebugDecalsItems); + UnregisterDebugItems(k_PanelDecals, m_DebugDecalsAffectingTransparentItems); DisableProfilingRecorders(); UnregisterDebugItems(k_PanelDisplayStats, m_DebugDisplayStatsItems); From 22acc8c17097338b160185ffdf1c036ba173dd19 Mon Sep 17 00:00:00 2001 From: skhiat <55133890+skhiat@users.noreply.github.com> Date: Tue, 17 Mar 2020 12:36:56 +0100 Subject: [PATCH 004/200] Support cookie on light backing for Disc Area Light #6138 --- .../CHANGELOG.md | 1 + .../Editor/Lighting/HDLightUI.cs | 2 +- .../Lighting/GlobalIlluminationUtils.cs | 33 ++++++++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index f6c93624f75..2094eb85075 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added the exposure sliders to the planar reflection probe preview - Added a warning and workaround instructions that appear when you enable XR single-pass after the first frame with the XR SDK. - Added an "enable" toggle to the SSR volume component. +- Added support of cookie baking and add support on Disc light. ### Fixed - Fix Changelog diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index 715877c2ca0..9f427379e68 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -725,7 +725,7 @@ static void DrawEmissionContent(SerializedHDLight serialized, Editor owner) ShowCookieTextureWarnings(serialized.settings.cookie); } - else if (serialized.areaLightShape == AreaLightShape.Rectangle) + else if (serialized.areaLightShape == AreaLightShape.Rectangle || serialized.areaLightShape == AreaLightShape.Disc) { EditorGUILayout.ObjectField( serialized.areaLightCookie, s_Styles.areaLightCookie ); ShowCookieTextureWarnings(serialized.areaLightCookie.objectReferenceValue as Texture); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIlluminationUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIlluminationUtils.cs index 2600a50aa02..97aa015afac 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIlluminationUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/GlobalIlluminationUtils.cs @@ -14,6 +14,11 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) add = HDUtils.s_DefaultHDAdditionalLightData; } + Cookie cookie; + LightmapperUtils.Extract(light, out cookie); + lightDataGI.cookieID = cookie.instanceID; + lightDataGI.cookieScale = cookie.scale; + // TODO: Currently color temperature is not handled at runtime, need to expose useColorTemperature publicly Color cct = new Color(1.0f, 1.0f, 1.0f); #if UNITY_EDITOR @@ -50,9 +55,9 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) #else lightDataGI.mode = LightmapperUtils.Extract(light.bakingOutput.lightmapBakeType); #endif - + lightDataGI.shadow = (byte)(light.shadows != LightShadows.None ? 1 : 0); - + HDLightType lightType = add.ComputeLightType(light); if (lightType != HDLightType.Area) { @@ -67,11 +72,11 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) switch (lightType) { case HDLightType.Directional: - lightDataGI.orientation.SetLookRotation(light.transform.forward, Vector3.up); - lightDataGI.position = Vector3.zero; + lightDataGI.orientation = light.transform.rotation; + lightDataGI.position = light.transform.position; lightDataGI.range = 0.0f; - lightDataGI.coneAngle = 0.0f; - lightDataGI.innerConeAngle = 0.0f; + lightDataGI.coneAngle = add.shapeWidth; + lightDataGI.innerConeAngle = add.shapeHeight; #if UNITY_EDITOR lightDataGI.shape0 = light.shadows != LightShadows.None ? (Mathf.Deg2Rad * light.shadowAngle) : 0.0f; #else @@ -80,6 +85,8 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) lightDataGI.shape1 = 0.0f; lightDataGI.type = UnityEngine.Experimental.GlobalIllumination.LightType.Directional; lightDataGI.falloff = FalloffType.Undefined; + lightDataGI.coneAngle = add.shapeWidth; + lightDataGI.innerConeAngle = add.shapeHeight; break; case HDLightType.Spot: @@ -105,7 +112,7 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) spot.innerConeAngle = light.spotAngle * Mathf.Deg2Rad * add.innerSpotPercent01; spot.falloff = add.applyRangeAttenuation ? FalloffType.InverseSquared : FalloffType.InverseSquaredNoRangeAttenuation; spot.angularFalloff = AngularFalloffType.AnalyticAndInnerAngle; - lightDataGI.Init(ref spot); + lightDataGI.Init(ref spot, ref cookie); lightDataGI.shape1 = (float)AngularFalloffType.AnalyticAndInnerAngle; } break; @@ -124,7 +131,7 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) pyramid.angle = light.spotAngle * Mathf.Deg2Rad; pyramid.aspectRatio = add.aspectRatio; pyramid.falloff = add.applyRangeAttenuation ? FalloffType.InverseSquared : FalloffType.InverseSquaredNoRangeAttenuation; - lightDataGI.Init(ref pyramid); + lightDataGI.Init(ref pyramid, ref cookie); } break; @@ -141,7 +148,7 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) box.range = light.range; box.width = add.shapeWidth; box.height = add.shapeHeight; - lightDataGI.Init(ref box); + lightDataGI.Init(ref box, ref cookie); } break; @@ -152,7 +159,7 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) break; case HDLightType.Point: - lightDataGI.orientation = Quaternion.identity; + lightDataGI.orientation = light.transform.rotation; lightDataGI.position = light.transform.position; lightDataGI.range = light.range; lightDataGI.coneAngle = 0.0f; @@ -167,7 +174,7 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) lightDataGI.type = UnityEngine.Experimental.GlobalIllumination.LightType.Point; lightDataGI.falloff = add.applyRangeAttenuation ? FalloffType.InverseSquared : FalloffType.InverseSquaredNoRangeAttenuation; break; - + case HDLightType.Area: switch (add.areaLightShape) { @@ -187,12 +194,13 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) // TEMP: for now, if we bake a rectangle type this will disable the light for runtime, need to speak with GI team about it! lightDataGI.type = UnityEngine.Experimental.GlobalIllumination.LightType.Rectangle; lightDataGI.falloff = add.applyRangeAttenuation ? FalloffType.InverseSquared : FalloffType.InverseSquaredNoRangeAttenuation; + lightDataGI.cookieID = add.areaLightCookie ? add.areaLightCookie.GetInstanceID() : 0; break; case AreaLightShape.Tube: lightDataGI.InitNoBake(lightDataGI.instanceID); break; - + case AreaLightShape.Disc: lightDataGI.orientation = light.transform.rotation; lightDataGI.position = light.transform.position; @@ -209,6 +217,7 @@ public static bool LightDataGIExtract(Light light, ref LightDataGI lightDataGI) // TEMP: for now, if we bake a rectangle type this will disable the light for runtime, need to speak with GI team about it! lightDataGI.type = UnityEngine.Experimental.GlobalIllumination.LightType.Disc; lightDataGI.falloff = add.applyRangeAttenuation ? FalloffType.InverseSquared : FalloffType.InverseSquaredNoRangeAttenuation; + lightDataGI.cookieID = add.areaLightCookie ? add.areaLightCookie.GetInstanceID() : 0; break; default: From bef451effb3b7d316ed872938a9976778b32d694 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Tue, 17 Mar 2020 12:39:32 +0100 Subject: [PATCH 005/200] Hdrp /lookdev/fix crash on adding volume as viewed game object #6129 --- .../Editor/LookDev/Stage.cs | 4 ++++ .../Runtime/Volume/Volume.cs | 19 ++++++++++++------- .../CHANGELOG.md | 1 + 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs b/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs index 5c05703393c..0d96a34a421 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs @@ -196,6 +196,10 @@ static void InitAddedObjectsRecursively(GameObject go) var lineRenderer = go.GetComponent(); if (lineRenderer != null) lineRenderer.lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.Off; + + var volumes = go.GetComponents(); + foreach (var volume in volumes) + volume.UpdateLayer(); //force update of layer now as the Update can be called after we unregister volume from manager foreach (Transform child in go.transform) InitAddedObjectsRecursively(child.gameObject); diff --git a/com.unity.render-pipelines.core/Runtime/Volume/Volume.cs b/com.unity.render-pipelines.core/Runtime/Volume/Volume.cs index 09b01f8e33e..8d6c6283802 100644 --- a/com.unity.render-pipelines.core/Runtime/Volume/Volume.cs +++ b/com.unity.render-pipelines.core/Runtime/Volume/Volume.cs @@ -114,12 +114,7 @@ void Update() // real-time as the user could change it at any time in the editor or at runtime. // Because no event is raised when the layer changes, we have to track it on every // frame :/ - int layer = gameObject.layer; - if (layer != m_PreviousLayer) - { - VolumeManager.instance.UpdateVolumeLayer(this, m_PreviousLayer, layer); - m_PreviousLayer = layer; - } + UpdateLayer(); // Same for priority. We could use a property instead, but it doesn't play nice with the // serialization system. Using a custom Attribute/PropertyDrawer for a property is @@ -127,11 +122,21 @@ void Update() // our case. if (priority != m_PreviousPriority) { - VolumeManager.instance.SetLayerDirty(layer); + VolumeManager.instance.SetLayerDirty(gameObject.layer); m_PreviousPriority = priority; } } + internal void UpdateLayer() + { + int layer = gameObject.layer; + if (layer != m_PreviousLayer) + { + VolumeManager.instance.UpdateVolumeLayer(this, m_PreviousLayer, layer); + m_PreviousLayer = layer; + } + } + #if UNITY_EDITOR // TODO: Look into a better volume previsualization system List m_TempColliders; diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 2094eb85075..b350bcfd80d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed draw renderers custom pass out of bound exception - Fixed an issue with emissive light meshes not being in the RAS. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. +- Fix LookDev issue when adding a GameObject containing a Volume into the LookDev's view. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. From c1d7ea10085b33a13a6f5a0e3fb75f08fb93eecb Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 17 Mar 2020 12:44:34 +0100 Subject: [PATCH 006/200] fixed changelog --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 59f069f3299..190ed5e3271 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -34,6 +34,7 @@ The version number for this package has increased due to a version update of a r - Fix LookDev EnvironmentLibrary tab when asset is deleted - Fix LookDev used Cubemap when asset is deleted - Fixed the definition of `rcp()` for GLES2. +- Fix LookDev issue when adding a GameObject containing a Volume into the LookDev's view. ### Changed - Restored usage of ENABLE_VR to fix compilation errors on some platforms. diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b350bcfd80d..2094eb85075 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -44,7 +44,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed draw renderers custom pass out of bound exception - Fixed an issue with emissive light meshes not being in the RAS. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. -- Fix LookDev issue when adding a GameObject containing a Volume into the LookDev's view. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. From 5c316e3a76e80ae3510ccb3092a9b4602990cb26 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 17 Mar 2020 11:48:27 +0000 Subject: [PATCH 007/200] Add smoothness remark (#6226) --- .../Documentation~/Refraction-in-HDRP.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Refraction-in-HDRP.md b/com.unity.render-pipelines.high-definition/Documentation~/Refraction-in-HDRP.md index 156970cfbf6..a693f3965b3 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Refraction-in-HDRP.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Refraction-in-HDRP.md @@ -18,6 +18,8 @@ To set up refraction on your Material, you need to do the following: For more information on the properties that control refraction, see [Surface Type](Surface-Type.html). +Note that, intuitively, the less smooth the material is for the refracting object the blurrier the refraction will be. + Settings up a Probe Proxy Volume is also necessary if you want to use screen space refraction effectively. This is because screen space refraction uses the Probe Proxy Volume to approximate the scene and find the correct refracted color. To obtain the best results, the proxy volume should approximate as much of the Scene where refracted rays are intended to land as possible. For more information on proxy volumes, see the [Reflection Proxy Volume](Reflection-Proxy-Volume.html) page. ## Refraction calculation From ea21c80ffa80bd0ae7e8b951db967512fcbebbdd Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Tue, 17 Mar 2020 09:11:28 -0400 Subject: [PATCH 008/200] Removed legacy VR code from HDRP #5923 --- .../CHANGELOG.md | 1 + .../Camera/HDCameraUI.Drawers.cs | 28 ------- .../RenderPipeline/Camera/HDCameraUI.Skin.cs | 13 --- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 4 +- .../Runtime/RenderPipeline/HDProfileId.cs | 2 + .../HDRenderPipeline.LightLoop.cs | 4 +- .../HDRenderPipeline.RenderGraph.cs | 4 +- .../HDRenderPipeline.RenderGraphUtils.cs | 9 +- .../RenderPipeline/HDRenderPipeline.cs | 27 +++--- .../RenderPass/CustomPass/CustomPassVolume.cs | 2 +- .../Runtime/RenderPipeline/Utility/HDUtils.cs | 6 -- .../Runtime/RenderPipeline/XR/XRPass.cs | 82 +++++-------------- .../Runtime/RenderPipeline/XR/XRSystem.cs | 80 +----------------- 13 files changed, 51 insertions(+), 211 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 2094eb85075..616693261c1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. - Light dimmer can now get values higher than one and was renamed to multiplier in the UI. - Removed info box requesting volume component for Visual Environment and updated the documentation with the relevant information. +- Removed legacy VR code ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs index 1f44121f2a4..b4fe3f6cbbd 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs @@ -18,7 +18,6 @@ enum Expandable Output = 1 << 2, Orthographic = 1 << 3, RenderLoop = 1 << 4, - XR = 1 << 5 } enum ProjectionType @@ -91,7 +90,6 @@ static HDCameraUI() SectionFrameSettings, SectionPhysicalSettings, SectionOutputSettings, - SectionXRSettings }; string key = $"HDRP:{typeof(HDCameraUI).Name}:ShutterSpeedState"; @@ -158,19 +156,6 @@ static HDCameraUI() ) ); - public static readonly CED.IDrawer SectionXRSettings = CED.Conditional( - (serialized, owner) => XRGraphics.tryEnable, - CED.FoldoutGroup( - xrSettingsHeaderContent, - Expandable.XR, - k_ExpandedState, - CED.Group( - Drawer_FieldVR, - Drawer_FieldTargetEye - ) - ) - ); - public static readonly CED.IDrawer SectionFrameSettings = CED.Conditional( (serialized, owner) => k_ExpandedState[Expandable.General], CED.Group((serialized, owner) => @@ -527,12 +512,6 @@ static void Drawer_CameraWarnings(SerializedHDCamera p, Editor owner) } } - static void Drawer_FieldVR(SerializedHDCamera p, Editor owner) - { - EditorGUILayout.PropertyField(p.baseCameraSettings.stereoSeparation, stereoSeparationContent); - EditorGUILayout.PropertyField(p.baseCameraSettings.stereoConvergence, stereoConvergenceContent); - } - #if ENABLE_MULTIPLE_DISPLAYS static void Drawer_SectionMultiDisplay(SerializedHDCamera p, Editor owner) { @@ -547,13 +526,6 @@ static void Drawer_SectionMultiDisplay(SerializedHDCamera p, Editor owner) #endif - static readonly int[] k_TargetEyeValues = { (int)StereoTargetEyeMask.Both, (int)StereoTargetEyeMask.Left, (int)StereoTargetEyeMask.Right, (int)StereoTargetEyeMask.None }; - - static void Drawer_FieldTargetEye(SerializedHDCamera p, Editor owner) - { - EditorGUILayout.IntPopup(p.baseCameraSettings.targetEye, k_TargetEyes, k_TargetEyeValues, targetEyeContent); - } - static MethodInfo k_DisplayUtility_GetDisplayIndices = Type.GetType("UnityEditor.DisplayUtility,UnityEditor") .GetMethod("GetDisplayIndices"); static int[] DisplayUtility_GetDisplayIndices() diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs index 1cc4d712f6e..f07b7951c06 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs @@ -8,7 +8,6 @@ static partial class HDCameraUI const string generalSettingsHeaderContent = "General"; const string physicalSettingsHeaderContent = "Physical"; const string outputSettingsHeaderContent = "Output"; - const string xrSettingsHeaderContent = "XR"; const string clippingPlaneMultiFieldTitle = "Clipping Planes"; @@ -63,18 +62,6 @@ static partial class HDCameraUI static readonly GUIContent targetDisplayContent = EditorGUIUtility.TrTextContent("Target Display"); #endif - - static readonly GUIContent stereoSeparationContent = EditorGUIUtility.TrTextContent("Stereo Separation"); - static readonly GUIContent stereoConvergenceContent = EditorGUIUtility.TrTextContent("Stereo Convergence"); - static readonly GUIContent targetEyeContent = EditorGUIUtility.TrTextContent("Target Eye"); - static readonly GUIContent[] k_TargetEyes = //order must match k_TargetEyeValues - { - new GUIContent("Both"), - new GUIContent("Left"), - new GUIContent("Right"), - new GUIContent("None (Main Display)"), - }; - static readonly GUIContent[] antialiasingModeNames = { new GUIContent("No Anti-aliasing"), 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 72bc6142ad7..e6a375931e6 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 @@ -601,12 +601,13 @@ internal void SetupGlobalParams(CommandBuffer cmd, int frameCount) float exposureMultiplierForProbes = 1.0f / Mathf.Max(probeRangeCompressionFactor, 1e-6f); cmd.SetGlobalFloat(HDShaderIDs._ProbeExposureScale, exposureMultiplierForProbes); - // TODO: qualify this code with xr.singlePassEnabled when compute shaders can use keywords + // XRTODO: qualify this code with xr.singlePassEnabled when compute shaders can use keywords if (true) { cmd.SetGlobalInt(HDShaderIDs._XRViewCount, viewCount); // Convert AoS to SoA for GPU constant buffer until we can use StructuredBuffer via command buffer + // XRTODO: use the new API and remove this code for (int i = 0; i < viewCount; i++) { m_XRViewMatrix[i] = m_XRViewConstants[i].viewMatrix; @@ -1119,6 +1120,7 @@ void UpdateVolumeAndPhysicalParameters() Matrix4x4 GetJitteredProjectionMatrix(Matrix4x4 origProj) { // Do not add extra jitter in VR (micro-variations from head tracking are enough) + // XRTODO: make this a setting in GlobalXRSettings instead of assuming if (xr.enabled) { taaJitter = Vector4.zero; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs index 815883bdd96..71b595144f0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs @@ -140,6 +140,8 @@ internal enum HDProfileId // Misc VolumeUpdate, CustomPassVolumeUpdate, + + // XR XROcclusionMesh, XRMirrorView, XRCustomMirrorView, 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 0284bc0988c..12bf3e37994 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 @@ -254,9 +254,9 @@ RenderGraphResource RenderSSR( RenderGraph renderGraph, //var settings = hdCamera.volumeStack.GetComponent(); //if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && settings.rayTracing.value) //{ - // hdCamera.xr.StartSinglePass(cmd, hdCamera.camera, renderContext); + // hdCamera.xr.StartSinglePass(cmd); // RenderRayTracedReflections(hdCamera, cmd, m_SsrLightingTexture, renderContext, m_FrameCount); - // hdCamera.xr.StopSinglePass(cmd, hdCamera.camera, renderContext); + // hdCamera.xr.StopSinglePass(cmd); //} //else { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index bc4914815f2..dcb7d0f13e6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -107,9 +107,9 @@ void ExecuteWithRenderGraph( RenderRequest renderRequest, // TODO RENDERGRAPH //using (new ProfilingSample(cmd, "Render screen space shadows", CustomSamplerId.ScreenSpaceShadows.GetSampler())) //{ - // hdCamera.xr.StartSinglePass(cmd, camera, renderContext); + // hdCamera.xr.StartSinglePass(cmd); // RenderScreenSpaceShadows(hdCamera, cmd); - // hdCamera.xr.StopSinglePass(cmd, camera, renderContext); + // hdCamera.xr.StopSinglePass(cmd); //} var volumetricLighting = VolumetricLightingPass(m_RenderGraph, hdCamera, volumetricDensityBuffer, m_TileAndClusterData.bigTileLightList, shadowResult, m_FrameCount); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs index fce18652309..c9d55df10eb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs @@ -66,7 +66,6 @@ Color GetColorBufferClearColor(HDCamera hdCamera) // XR Specific class XRRenderingPassData { - public Camera camera; public XRPass xr; } @@ -76,13 +75,12 @@ internal static void StartXRSinglePass(RenderGraph renderGraph, HDCamera hdCamer { using (var builder = renderGraph.AddRenderPass("Start XR single-pass", out var passData)) { - passData.camera = hdCamera.camera; passData.xr = hdCamera.xr; builder.SetRenderFunc( (XRRenderingPassData data, RenderGraphContext context) => { - data.xr.StartSinglePass(context.cmd, data.camera, context.renderContext); + data.xr.StartSinglePass(context.cmd); }); } } @@ -94,13 +92,12 @@ internal static void StopXRSinglePass(RenderGraph renderGraph, HDCamera hdCamera { using (var builder = renderGraph.AddRenderPass("Stop XR single-pass", out var passData)) { - passData.camera = hdCamera.camera; passData.xr = hdCamera.xr; builder.SetRenderFunc( (XRRenderingPassData data, RenderGraphContext context) => { - data.xr.StopSinglePass(context.cmd, data.camera, context.renderContext); + data.xr.StopSinglePass(context.cmd); }); } } @@ -122,7 +119,7 @@ void EndCameraXR(RenderGraph renderGraph, HDCamera hdCamera) builder.SetRenderFunc( (EndCameraXRPassData data, RenderGraphContext ctx) => { - data.hdCamera.xr.EndCamera(ctx.cmd, data.hdCamera, ctx.renderContext); + data.hdCamera.xr.EndCamera(ctx.cmd, data.hdCamera); }); } } 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 588c26a742f..70aa8c2de0c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1938,16 +1938,16 @@ AOVRequestData aovRequest return; } - hdCamera.xr.StartSinglePass(cmd, camera, renderContext); + hdCamera.xr.StartSinglePass(cmd); ClearBuffers(hdCamera, cmd); // Render XR occlusion mesh to depth buffer early in the frame to improve performance if (hdCamera.xr.enabled && m_Asset.currentPlatformRenderPipelineSettings.xrSettings.occlusionMesh) { - hdCamera.xr.StopSinglePass(cmd, camera, renderContext); + hdCamera.xr.StopSinglePass(cmd); hdCamera.xr.RenderOcclusionMeshes(cmd, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); - hdCamera.xr.StartSinglePass(cmd, camera, renderContext); + hdCamera.xr.StartSinglePass(cmd); } // Bind the custom color/depth before the first custom pass @@ -2053,7 +2053,7 @@ AOVRequestData aovRequest msaaEnabled ? m_SharedRTManager.GetStencilBuffer(msaaEnabled) : null, m_SharedRTManager.GetCoarseStencilBuffer(), cmd); - hdCamera.xr.StopSinglePass(cmd, camera, renderContext); + hdCamera.xr.StopSinglePass(cmd); var buildLightListTask = new HDGPUAsyncTask("Build light list", ComputeQueueType.Background); // It is important that this task is in the same queue as the build light list due to dependency it has on it. If really need to move it, put an extra fence to make sure buildLightListTask has finished. @@ -2167,9 +2167,9 @@ void Callback(CommandBuffer c, HDCamera cam) RenderContactShadows(hdCamera, cmd); PushFullScreenDebugTexture(hdCamera, cmd, m_ContactShadowBuffer, FullScreenDebugMode.ContactShadows); - hdCamera.xr.StartSinglePass(cmd, camera, renderContext); + hdCamera.xr.StartSinglePass(cmd); RenderScreenSpaceShadows(hdCamera, cmd); - hdCamera.xr.StopSinglePass(cmd, camera, renderContext); + hdCamera.xr.StopSinglePass(cmd); if (hdCamera.frameSettings.VolumeVoxelizationRunsAsync()) { @@ -2203,7 +2203,7 @@ void Callback(CommandBuffer c, HDCamera cam) SSRTask.End(cmd, hdCamera); } - hdCamera.xr.StartSinglePass(cmd, camera, renderContext); + hdCamera.xr.StartSinglePass(cmd); RenderDeferredLighting(hdCamera, cmd); @@ -2355,7 +2355,7 @@ void Callback(CommandBuffer c, HDCamera cam) RenderDebug(hdCamera, cmd, cullingResults); - hdCamera.xr.StopSinglePass(cmd, hdCamera.camera, renderContext); + hdCamera.xr.StopSinglePass(cmd); using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.BlitToFinalRTDevBuildOnly))) { @@ -2370,7 +2370,7 @@ void Callback(CommandBuffer c, HDCamera cam) } // XR mirror view and blit do device - hdCamera.xr.EndCamera(cmd, hdCamera, renderContext); + hdCamera.xr.EndCamera(cmd, hdCamera); // Send all the color graphics buffer to client systems if required. SendColorGraphicsBuffer(cmd, hdCamera); @@ -2483,10 +2483,7 @@ void SetupCameraProperties(HDCamera hdCamera, ScriptableRenderContext renderCont renderContext.ExecuteCommandBuffer(cmd); cmd.Clear(); - if (hdCamera.xr.legacyMultipassEnabled) - renderContext.SetupCameraProperties(hdCamera.camera, hdCamera.xr.enabled, hdCamera.xr.legacyMultipassEye); - else - renderContext.SetupCameraProperties(hdCamera.camera, hdCamera.xr.enabled); + renderContext.SetupCameraProperties(hdCamera.camera, hdCamera.xr.enabled); } void InitializeGlobalResources(ScriptableRenderContext renderContext) @@ -3819,9 +3816,9 @@ void RenderSSR(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext ren bool usesRaytracedReflections = hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && settings.rayTracing.value; if (usesRaytracedReflections) { - hdCamera.xr.StartSinglePass(cmd, hdCamera.camera, renderContext); + hdCamera.xr.StartSinglePass(cmd); RenderRayTracedReflections(hdCamera, cmd, m_SsrLightingTexture, renderContext, m_FrameCount); - hdCamera.xr.StopSinglePass(cmd, hdCamera.camera, renderContext); + hdCamera.xr.StopSinglePass(cmd); } else { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassVolume.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassVolume.cs index d62fec80b74..debfc10836e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassVolume.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassVolume.cs @@ -218,7 +218,7 @@ internal void AggregateCullingParameters(ref ScriptableCullingParameters culling // By default we don't want the culling to return any objects cullingParameters.cullingMask = 0; - cullingParameters.cullingOptions &= CullingOptions.Stereo; // We just keep stereo if enabled and clear the other flags + cullingParameters.cullingOptions = CullingOptions.None; foreach (var injectionPoint in injectionPoints) GetActivePassVolume(injectionPoint)?.AggregateCullingParameters(ref cullingParameters, hdCamera); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs index 59ca696143d..d21b1fcb6f6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs @@ -945,11 +945,5 @@ internal static void DisplayUnsupportedAPIMessage(string graphicAPI = null) string msg = "Platform " + currentPlatform + " with device " + graphicAPI + " is not supported with High Definition Render Pipeline, no rendering will occur"; DisplayUnsupportedMessage(msg); } - - internal static void DisplayUnsupportedXRMessage() - { - string msg = "AR/VR devices are not supported, no rendering will occur"; - DisplayUnsupportedMessage(msg); - } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs index 1bf30769c78..a4523b22549 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs @@ -37,17 +37,6 @@ internal struct XRView internal readonly Rect viewport; internal readonly Mesh occlusionMesh; internal readonly int textureArraySlice; - internal readonly Camera.StereoscopicEye legacyStereoEye; - - internal XRView(Camera camera, Camera.StereoscopicEye eye, int dstSlice) - { - projMatrix = camera.GetStereoProjectionMatrix(eye); - viewMatrix = camera.GetStereoViewMatrix(eye); - viewport = camera.pixelRect; - occlusionMesh = null; - textureArraySlice = dstSlice; - legacyStereoEye = eye; - } internal XRView(Matrix4x4 proj, Matrix4x4 view, Rect vp, int dstSlice) { @@ -56,7 +45,6 @@ internal XRView(Matrix4x4 proj, Matrix4x4 view, Rect vp, int dstSlice) viewport = vp; occlusionMesh = null; textureArraySlice = dstSlice; - legacyStereoEye = (Camera.StereoscopicEye)(-1); } #if ENABLE_VR && ENABLE_XR_MODULE @@ -67,7 +55,6 @@ internal XRView(XRDisplaySubsystem.XRRenderPass renderPass, XRDisplaySubsystem.X viewport = renderParameter.viewport; occlusionMesh = renderParameter.occlusionMesh; textureArraySlice = renderParameter.textureArraySlice; - legacyStereoEye = (Camera.StereoscopicEye)(-1); // Convert viewport from normalized to screen space viewport.x *= renderPass.renderTargetDesc.width; @@ -116,10 +103,6 @@ class XRPass CustomMirrorView customMirrorView = null; internal void SetCustomMirrorView(CustomMirrorView callback) => customMirrorView = callback; - // Legacy multipass support - internal int legacyMultipassEye { get => (int)views[0].legacyStereoEye; } - internal bool legacyMultipassEnabled { get => enabled && !singlePassEnabled && legacyMultipassEye >= 0; } - internal static XRPass Create(XRPassCreateInfo createInfo) { XRPass passInfo = GenericPool.Get(); @@ -148,11 +131,6 @@ internal static XRPass Create(XRPassCreateInfo createInfo) return passInfo; } - internal void AddView(Camera camera, Camera.StereoscopicEye eye, int textureArraySlice = -1) - { - AddViewInternal(new XRView(camera, eye, textureArraySlice)); - } - internal void AddView(Matrix4x4 proj, Matrix4x4 view, Rect vp, int textureArraySlice = -1) { AddViewInternal(new XRView(proj, view, vp, textureArraySlice)); @@ -212,28 +190,14 @@ internal void AddViewInternal(XRView xrView) /// /// Enable XR single-pass rendering. /// - public void StartSinglePass(CommandBuffer cmd, Camera camera, ScriptableRenderContext renderContext) + public void StartSinglePass(CommandBuffer cmd) { if (enabled) { // Required for some legacy shaders (text for example) cmd.SetViewProjectionMatrices(GetViewMatrix(), GetProjMatrix()); - if (camera.stereoEnabled) - { - // Reset scissor and viewport for C++ stereo code - cmd.DisableScissorRect(); - cmd.SetViewport(camera.pixelRect); - - renderContext.ExecuteCommandBuffer(cmd); - cmd.Clear(); - - if (legacyMultipassEnabled) - renderContext.StartMultiEye(camera, legacyMultipassEye); - else - renderContext.StartMultiEye(camera); - } - else if (singlePassEnabled) + if (singlePassEnabled) { if (viewCount <= TextureXR.slices) { @@ -251,39 +215,35 @@ public void StartSinglePass(CommandBuffer cmd, Camera camera, ScriptableRenderCo /// /// Disable XR single-pass rendering. /// - public void StopSinglePass(CommandBuffer cmd, Camera camera, ScriptableRenderContext renderContext) + public void StopSinglePass(CommandBuffer cmd) { if (enabled) { - if (camera.stereoEnabled) - { - renderContext.ExecuteCommandBuffer(cmd); - cmd.Clear(); - renderContext.StopMultiEye(camera); - } - else - { - cmd.DisableShaderKeyword("STEREO_INSTANCING_ON"); - cmd.SetInstanceMultiplier(1); - } + cmd.DisableShaderKeyword("STEREO_INSTANCING_ON"); + cmd.SetInstanceMultiplier(1); } } - internal void EndCamera(CommandBuffer cmd, HDCamera hdCamera, ScriptableRenderContext renderContext) + /// Obsolete + [Obsolete] + public void StartSinglePass(CommandBuffer cmd, Camera camera, ScriptableRenderContext renderContext) + { + StartSinglePass(cmd); + } + + /// Obsolete + [Obsolete] + public void StopSinglePass(CommandBuffer cmd, Camera camera, ScriptableRenderContext renderContext) + { + StopSinglePass(cmd); + } + + internal void EndCamera(CommandBuffer cmd, HDCamera hdCamera) { if (!enabled) return; - StopSinglePass(cmd, hdCamera.camera, renderContext); - - // Legacy VR - push to XR headset and/or display mirror - if (hdCamera.camera.stereoEnabled) - { - if (legacyMultipassEnabled) - renderContext.StereoEndRender(hdCamera.camera, legacyMultipassEye, legacyMultipassEye == 1); - else - renderContext.StereoEndRender(hdCamera.camera); - } + StopSinglePass(cmd); // Callback for custom mirror view if (customMirrorView != null) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index f2c85d785d9..a6f2ac37fa8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -1,6 +1,5 @@ -// XRSystem is where information about XR views and passes are read from 3 exclusive sources: +// XRSystem is where information about XR views and passes are read from 2 exclusive sources: // - XRDisplaySubsystem from the XR SDK -// - the 'legacy' C++ stereo rendering path and XRSettings // - custom XR layout (only internal for now) using System; @@ -92,12 +91,7 @@ internal int GetMaxViews() // XRTODO : replace by API from XR SDK, assume we have 2 slices until then maxViews = 2; } - else #endif - { - if (XRGraphics.stereoRenderingMode == XRGraphics.StereoRenderingMode.SinglePassInstanced) - maxViews = 2; - } if (testModeEnabled) maxViews = Math.Max(maxViews, 2); @@ -107,7 +101,7 @@ internal int GetMaxViews() internal List<(Camera, XRPass)> SetupFrame(Camera[] cameras, bool singlePassAllowed, bool singlePassTestModeActive) { - bool xrSdkActive = RefreshXrSdk(); + bool xrActive = RefreshXrSdk(); if (framePasses.Count > 0) { @@ -125,9 +119,6 @@ internal int GetMaxViews() if (camera == null) continue; - // Read XR SDK or legacy settings - bool xrEnabled = xrSdkActive || (camera.stereoEnabled && XRGraphics.enabled); - // Enable XR layout only for gameview camera bool xrSupported = camera.cameraType == CameraType.Game && camera.targetTexture == null; @@ -135,24 +126,12 @@ internal int GetMaxViews() { // custom layout in used } - else if (xrEnabled && xrSupported) + else if (xrActive && xrSupported) { // Disable vsync on the main display when rendering to a XR device QualitySettings.vSyncCount = 0; - if (XRGraphics.renderViewportScale != 1.0f) - { - Debug.LogWarning("RenderViewportScale has no effect with this render pipeline. Use dynamic resolution instead."); - } - - if (xrSdkActive) - { - CreateLayoutFromXrSdk(camera, singlePassAllowed); - } - else - { - CreateLayoutLegacyStereo(camera); - } + CreateLayoutFromXrSdk(camera, singlePassAllowed); } else { @@ -200,57 +179,6 @@ bool RefreshXrSdk() return false; } - void CreateLayoutLegacyStereo(Camera camera) - { - if (!camera.TryGetCullingParameters(true, out var cullingParams)) - { - Debug.LogError("Unable to get Culling Parameters from camera!"); - return; - } - - var passCreateInfo = new XRPassCreateInfo - { - multipassId = 0, - cullingPassId = 0, - cullingParameters = cullingParams, - renderTarget = camera.targetTexture, - customMirrorView = null - }; - - if (XRGraphics.stereoRenderingMode == XRGraphics.StereoRenderingMode.MultiPass) - { - if (camera.stereoTargetEye == StereoTargetEyeMask.Both || camera.stereoTargetEye == StereoTargetEyeMask.Left) - { - var pass = XRPass.Create(passCreateInfo); - pass.AddView(camera, Camera.StereoscopicEye.Left, 0); - - AddPassToFrame(camera, pass); - passCreateInfo.multipassId++; - } - - - if (camera.stereoTargetEye == StereoTargetEyeMask.Both || camera.stereoTargetEye == StereoTargetEyeMask.Right) - { - var pass = XRPass.Create(passCreateInfo); - pass.AddView(camera, Camera.StereoscopicEye.Right, 1); - - AddPassToFrame(camera, pass); - } - } - else - { - var pass = XRPass.Create(passCreateInfo); - - if (camera.stereoTargetEye == StereoTargetEyeMask.Both || camera.stereoTargetEye == StereoTargetEyeMask.Left) - pass.AddView(camera, Camera.StereoscopicEye.Left, 0); - - if (camera.stereoTargetEye == StereoTargetEyeMask.Both || camera.stereoTargetEye == StereoTargetEyeMask.Right) - pass.AddView(camera, Camera.StereoscopicEye.Right, 1); - - AddPassToFrame(camera, pass); - } - } - void CreateLayoutFromXrSdk(Camera camera, bool singlePassAllowed) { #if ENABLE_VR && ENABLE_XR_MODULE From daeb5fdfe0cdaf5b36b17b7be91d83e013b0197f Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Tue, 17 Mar 2020 09:15:14 -0400 Subject: [PATCH 009/200] Fixed duplicated entry for com.unity.modules.xr in the runtime asmdef file #5895 --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + .../Runtime/Unity.RenderPipelines.Core.Runtime.asmdef | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 190ed5e3271..7f2fa1d9b33 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -35,6 +35,7 @@ The version number for this package has increased due to a version update of a r - Fix LookDev used Cubemap when asset is deleted - Fixed the definition of `rcp()` for GLES2. - Fix LookDev issue when adding a GameObject containing a Volume into the LookDev's view. +- Fixed duplicated entry for com.unity.modules.xr in the runtime asmdef file ### Changed - Restored usage of ENABLE_VR to fix compilation errors on some platforms. diff --git a/com.unity.render-pipelines.core/Runtime/Unity.RenderPipelines.Core.Runtime.asmdef b/com.unity.render-pipelines.core/Runtime/Unity.RenderPipelines.Core.Runtime.asmdef index e604c9ea9fc..dee97e1417e 100644 --- a/com.unity.render-pipelines.core/Runtime/Unity.RenderPipelines.Core.Runtime.asmdef +++ b/com.unity.render-pipelines.core/Runtime/Unity.RenderPipelines.Core.Runtime.asmdef @@ -21,11 +21,6 @@ "expression": "1.0.0", "define": "ENABLE_XR_MODULE" }, - { - "name": "com.unity.modules.xr", - "expression": "1.0.0", - "define": "ENABLE_XR_MODULE" - }, { "name": "com.unity.inputsystem", "expression": "0.0.0", From e13c5860da9aeff837164d8873f26adb4f35ab02 Mon Sep 17 00:00:00 2001 From: Evgenii Golubev Date: Tue, 17 Mar 2020 07:36:45 -0700 Subject: [PATCH 010/200] Improve light clipping and culling #2 #4711 --- .../CHANGELOG.md | 2 + .../Runtime/Lighting/LightEvaluation.hlsl | 14 +++- .../Runtime/Lighting/LightLoop/LightLoop.cs | 70 +++++++++---------- 3 files changed, 48 insertions(+), 38 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 616693261c1..cd48cffb9b7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -50,6 +50,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Light dimmer can now get values higher than one and was renamed to multiplier in the UI. - Removed info box requesting volume component for Visual Environment and updated the documentation with the relevant information. - Removed legacy VR code +- Add range-based clipping to box lights (case 1178780) +- Improve area light culling (case 1085873) ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl index e35df0cc382..51237056a5b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl @@ -362,7 +362,12 @@ float4 EvaluateCookie_Punctual(LightLoopContext lightLoopContext, LightData ligh // Perform orthographic or perspective projection. float perspectiveZ = (lightType != GPULIGHTTYPE_PROJECTOR_BOX) ? positionLS.z : 1.0; float2 positionCS = positionLS.xy / perspectiveZ; - bool isInBounds = Max3(abs(positionCS.x), abs(positionCS.y), 1.0 - positionLS.z) <= light.boxLightSafeExtent; + + float z = positionLS.z; + float r = light.range; + + // Box lights have no range attenuation, so we must clip manually. + bool isInBounds = Max3(abs(positionCS.x), abs(positionCS.y), abs(z - 0.5 * r) - 0.5 * r + 1) <= light.boxLightSafeExtent; // Remap the texture coordinates from [-1, 1]^2 to [0, 1]^2. float2 positionNDC = positionCS * 0.5 + 0.5; @@ -390,7 +395,12 @@ float4 EvaluateCookie_Punctual(LightLoopContext lightLoopContext, LightData ligh // Perform orthographic or perspective projection. float perspectiveZ = (lightType != GPULIGHTTYPE_PROJECTOR_BOX) ? positionLS.z : 1.0; float2 positionCS = positionLS.xy / perspectiveZ; - bool isInBounds = Max3(abs(positionCS.x), abs(positionCS.y), 1.0 - positionLS.z) <= light.boxLightSafeExtent; + + float z = positionLS.z; + float r = light.range; + + // Box lights have no range attenuation, so we must clip manually. + bool isInBounds = Max3(abs(positionCS.x), abs(positionCS.y), abs(z - 0.5 * r) - 0.5 * r + 1) <= light.boxLightSafeExtent; // Manually clamp to border (black). cookie.a = isInBounds ? 1.0 : 0.0; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index f969fa4d690..b2d2439d737 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -105,33 +105,33 @@ class LightDefinitions [GenerateHLSL] struct SFiniteLightBound { - public Vector3 boxAxisX; - public Vector3 boxAxisY; - public Vector3 boxAxisZ; - public Vector3 center; // a center in camera space inside the bounding volume of the light source. - public Vector2 scaleXY; - public float radius; + public Vector3 boxAxisX; // Scaled by the extents (half-size) + public Vector3 boxAxisY; // Scaled by the extents (half-size) + public Vector3 boxAxisZ; // Scaled by the extents (half-size) + public Vector3 center; // Center of the bounds (box) in camera space + public Vector2 scaleXY; // Scale applied to the top of the box to turn it into a truncated pyramid + public float radius; // Circumscribed sphere for the bounds (box) }; [GenerateHLSL] struct LightVolumeData { - public Vector3 lightPos; - public uint lightVolume; + public Vector3 lightPos; // Of light's "origin" + public uint lightVolume; // Type index - public Vector3 lightAxisX; - public uint lightCategory; + public Vector3 lightAxisX; // Normalized + public uint lightCategory; // Category index - public Vector3 lightAxisY; - public float radiusSq; + public Vector3 lightAxisY; // Normalized + public float radiusSq; // Cone and sphere: light range squared - public Vector3 lightAxisZ; // spot +Z axis - public float cotan; + public Vector3 lightAxisZ; // Normalized + public float cotan; // Cone: cotan of the aperture (half-angle) - public Vector3 boxInnerDist; + public Vector3 boxInnerDist; // Box: extents (half-size) of the inner box public uint featureFlags; - public Vector3 boxInvRange; + public Vector3 boxInvRange; // Box: 1 / (OuterBoxExtents - InnerBoxExtents) public float unused2; }; @@ -1630,63 +1630,61 @@ void GetLightVolumeDataAndBound(LightCategory lightCategory, GPULightType gpuLig else if (gpuLightType == GPULightType.Tube) { Vector3 dimensions = new Vector3(lightDimensions.x + 2 * range, 2 * range, 2 * range); // Omni-directional - Vector3 extents = 0.5f * dimensions; + Vector3 extents = 0.5f * dimensions; + Vector3 centerVS = positionVS; - bound.center = positionVS; + bound.center = centerVS; bound.boxAxisX = extents.x * xAxisVS; bound.boxAxisY = extents.y * yAxisVS; bound.boxAxisZ = extents.z * zAxisVS; + bound.radius = extents.magnitude; bound.scaleXY.Set(1.0f, 1.0f); - bound.radius = extents.magnitude; - lightVolumeData.lightPos = positionVS; + lightVolumeData.lightPos = centerVS; lightVolumeData.lightAxisX = xAxisVS; lightVolumeData.lightAxisY = yAxisVS; lightVolumeData.lightAxisZ = zAxisVS; - lightVolumeData.boxInnerDist = new Vector3(lightDimensions.x, 0, 0); - lightVolumeData.boxInvRange.Set(1.0f / range, 1.0f / range, 1.0f / range); + lightVolumeData.boxInvRange.Set(1.0f / extents.x, 1.0f / extents.y, 1.0f / extents.z); lightVolumeData.featureFlags = (uint)LightFeatureFlags.Area; } else if (gpuLightType == GPULightType.Rectangle) { Vector3 dimensions = new Vector3(lightDimensions.x + 2 * range, lightDimensions.y + 2 * range, range); // One-sided - Vector3 extents = 0.5f * dimensions; - Vector3 centerVS = positionVS + extents.z * zAxisVS; + Vector3 extents = 0.5f * dimensions; + Vector3 centerVS = positionVS + extents.z * zAxisVS; - bound.center = centerVS; + bound.center = centerVS; bound.boxAxisX = extents.x * xAxisVS; bound.boxAxisY = extents.y * yAxisVS; bound.boxAxisZ = extents.z * zAxisVS; + bound.radius = extents.magnitude; bound.scaleXY.Set(1.0f, 1.0f); - bound.radius = extents.magnitude; - lightVolumeData.lightPos = centerVS; + lightVolumeData.lightPos = centerVS; lightVolumeData.lightAxisX = xAxisVS; lightVolumeData.lightAxisY = yAxisVS; lightVolumeData.lightAxisZ = zAxisVS; - lightVolumeData.boxInnerDist = extents; - lightVolumeData.boxInvRange.Set(Mathf.Infinity, Mathf.Infinity, Mathf.Infinity); + lightVolumeData.boxInvRange.Set(1.0f / extents.x, 1.0f / extents.y, 1.0f / extents.z); lightVolumeData.featureFlags = (uint)LightFeatureFlags.Area; } else if (gpuLightType == GPULightType.ProjectorBox) { Vector3 dimensions = new Vector3(lightDimensions.x, lightDimensions.y, range); // One-sided - Vector3 extents = 0.5f * dimensions; - Vector3 centerVS = positionVS + extents.z * zAxisVS; + Vector3 extents = 0.5f * dimensions; + Vector3 centerVS = positionVS + extents.z * zAxisVS; - bound.center = centerVS; + bound.center = centerVS; bound.boxAxisX = extents.x * xAxisVS; bound.boxAxisY = extents.y * yAxisVS; bound.boxAxisZ = extents.z * zAxisVS; - bound.radius = extents.magnitude; + bound.radius = extents.magnitude; bound.scaleXY.Set(1.0f, 1.0f); - lightVolumeData.lightPos = centerVS; + lightVolumeData.lightPos = centerVS; lightVolumeData.lightAxisX = xAxisVS; lightVolumeData.lightAxisY = yAxisVS; lightVolumeData.lightAxisZ = zAxisVS; - lightVolumeData.boxInnerDist = extents; - lightVolumeData.boxInvRange.Set(Mathf.Infinity, Mathf.Infinity, Mathf.Infinity); + lightVolumeData.boxInvRange.Set(1.0f / extents.x, 1.0f / extents.y, 1.0f / extents.z); lightVolumeData.featureFlags = (uint)LightFeatureFlags.Punctual; } else if (gpuLightType == GPULightType.Disc) From 5542b5be1c60681aa0c1327547672e0407dcf9f5 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Tue, 17 Mar 2020 15:42:56 +0100 Subject: [PATCH 011/200] Hdrp/fix/decal material ui errors #6225 --- .../CHANGELOG.md | 1 + .../Editor/Material/Unlit/HDShaderGUI.cs | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index cd48cffb9b7..874c89ac4b8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed draw renderers custom pass out of bound exception - Fixed an issue with emissive light meshes not being in the RAS. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. +- Fixed error in the console when switching shader to decal in the material UI. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs index ae84659a07e..0c887989336 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs @@ -80,9 +80,13 @@ protected static void ResetMaterialCustomRenderQueue(Material material) throw new ArgumentException("Unknown SurfaceType"); } - float sortingPriority = material.GetFloat(kTransparentSortPriority); - bool alphaTest = material.GetFloat(kAlphaCutoffEnabled) > 0.5f; - material.renderQueue = HDRenderQueue.ChangeType(targetQueueType, (int)sortingPriority, alphaTest); + // Decal doesn't have properties to compute the render queue + if (material.HasProperty(kTransparentSortPriority) && material.HasProperty(kAlphaCutoffEnabled)) + { + float sortingPriority = material.GetFloat(kTransparentSortPriority); + bool alphaTest = material.GetFloat(kAlphaCutoffEnabled) > 0.5f; + material.renderQueue = HDRenderQueue.ChangeType(targetQueueType, (int)sortingPriority, alphaTest); + } } readonly static string[] floatPropertiesToSynchronize = { From c698ea4ce58c9f9708a341fd52b3909116b39912 Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Tue, 17 Mar 2020 17:40:57 +0100 Subject: [PATCH 012/200] Fix z-fighting in sceneview when scene lighting is off (#6213) * Do not override the depth state of transparent materials in RenderDebugView * Changelog * Changelog - add case number Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 874c89ac4b8..681abd58ce2 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -460,6 +460,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed alpha clipping test (comparison was '>', now '>=') - Fixed preview camera (eg. shader graph preview) when path tracing is on - Fixed issue with unclear naming of debug menu for decals. +- Fixed z-fighting in scene view when scene lighting is off (case 1203927) ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled 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 70aa8c2de0c..57fb32f0858 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -3259,7 +3259,7 @@ void RenderDebugViewMaterial(CullingResults cull, HDCamera hdCamera, ScriptableR DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListOpaque); // Render forward transparent - var rendererListTransparent = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_AllTransparentPassNames, m_CurrentRendererConfigurationBakedLighting, stateBlock: m_DepthStateOpaque)); + var rendererListTransparent = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_AllTransparentPassNames, m_CurrentRendererConfigurationBakedLighting)); DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListTransparent); } } From cb56b4f4256803fff3dca017430217dbbcc96f01 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 17 Mar 2020 17:44:10 +0100 Subject: [PATCH 013/200] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 681abd58ce2..fe462f32de6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with emissive light meshes not being in the RAS. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. - Fixed error in the console when switching shader to decal in the material UI. +- Fixed z-fighting in scene view when scene lighting is off (case 1203927) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. @@ -460,7 +461,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed alpha clipping test (comparison was '>', now '>=') - Fixed preview camera (eg. shader graph preview) when path tracing is on - Fixed issue with unclear naming of debug menu for decals. -- Fixed z-fighting in scene view when scene lighting is off (case 1203927) ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled From 52bf1d59228e997bb5d40180469987f860ff7b7c Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 17 Mar 2020 17:12:37 +0000 Subject: [PATCH 014/200] Mention default post processing in default volumes. (#6233) --- .../Documentation~/Post-Processing-Main.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md b/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md index 8bb78aaff8a..65b33496234 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md @@ -2,7 +2,7 @@ The High Definition Render Pipeline (HDRP) includes its own purpose-built implementation for [post-processing](https://docs.unity3d.com/Manual/PostProcessingOverview.html). This is built into HDRP, so you do not need to install any other package. -This implementation uses the [Volume](Volumes.html) system. You add post-processing effects to your Camera in the same way you add any other [Volume Override](Volume-Components.html). +This implementation uses the [Volume](Volumes.html) system. You add post-processing effects to your Camera in the same way you add any other [Volume Override](Volume-Components.html). Note that HDRP already enables some post-processing effects in the [Default Settings Volume Profile](Default-Settings-Window.html). The images below show a Scene with and without HDRP post-processing. From 98c6578c884250a0fec6d6052855b0723b328a95 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 17 Mar 2020 18:35:26 +0000 Subject: [PATCH 015/200] Fix cubemap inspector so that thumbnail for cubemap work #6231 --- .../CHANGELOG.md | 1 + .../Lighting/Reflection/HDCubemapInspector.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fe462f32de6..b0c876ff9b8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. - Fixed error in the console when switching shader to decal in the material UI. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) +- Fixed issue that prevented cubemap thumbnails from rendering. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs index 2f230b4f8ff..d160aab7c45 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs @@ -191,5 +191,22 @@ static void InitIcons() s_ExposureLow = EditorGUIUtility.IconContent("SceneViewLighting"); s_PreLabel = "preLabel"; } + public override Texture2D RenderStaticPreview(string assetPath, Object[] subAssets, int width, int height) + { + m_CameraDistance = 1.25f; + m_CameraPhi = Mathf.PI * 0.33f; + m_CameraTheta = Mathf.PI; + + InitPreview(); + + UpdateCamera(); + + m_PreviewUtility.ambientColor = Color.black; + m_PreviewUtility.BeginStaticPreview(new Rect(0, 0, width, height)); + m_PreviewUtility.DrawMesh(sphereMesh, Matrix4x4.identity, m_ReflectiveMaterial, 0); + m_PreviewUtility.camera.Render(); + + return m_PreviewUtility.EndStaticPreview(); + } } } From 5d5afe04d415d1d498275c1fa0a7c68facb32065 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Tue, 17 Mar 2020 23:47:05 +0100 Subject: [PATCH 016/200] - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. (#6197) Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b0c876ff9b8..e4b09b98534 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error in the console when switching shader to decal in the material UI. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) - Fixed issue that prevented cubemap thumbnails from rendering. +- Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. 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 bb03bb73132..5e8e5c21cce 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 @@ -438,7 +438,10 @@ internal void BuildRayTracingAccelerationStructure(HDCamera hdCamera) { Renderer currentRenderer = currentLOD.renderers[rendererIdx]; // Add this fella to the renderer list - m_RayTracingRendererReference.Add(currentRenderer.GetInstanceID(), 1); + // Unfortunately, we need to check that this renderer was not already pushed into the list (happens if the user uses the same mesh renderer + // for two LODs) + if (!m_RayTracingRendererReference.ContainsKey(currentRenderer.GetInstanceID())) + m_RayTracingRendererReference.Add(currentRenderer.GetInstanceID(), 1); } } } From fe0c42a732ef1b8fa669ad83591c8c17005db044 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 18 Mar 2020 10:55:53 +0000 Subject: [PATCH 017/200] [Backport 8.x.x] Fix some typos in the debug menu (#6249) * Backport renaming * changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Debug/DebugDisplay.cs | 4 ++-- .../Runtime/Material/Builtin/BuiltinData.cs | 8 ++++---- .../Runtime/Material/Builtin/BuiltinData.cs.hlsl | 8 ++++---- .../Runtime/Material/Builtin/BuiltinData.hlsl | 2 +- .../Runtime/Material/Eye/Eye.cs | 2 +- .../Runtime/Material/Fabric/Fabric.cs | 2 +- .../Runtime/Material/Hair/Hair.cs | 4 ++-- .../Runtime/Material/Lit/Lit.cs | 4 ++-- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e4b09b98534..6aa8ab30cf7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) - Fixed issue that prevented cubemap thumbnails from rendering. - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. +- Fix some typos in the debug menu. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 55f128b5413..bcc96f54a63 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -606,7 +606,7 @@ void RegisterMaterialDebug() { var list = new List(); - list.Add(new DebugUI.EnumField { displayName = "Common Material Property", getter = () => (int)data.materialDebugSettings.debugViewMaterialCommonValue, setter = value => SetDebugViewCommonMaterialProperty((MaterialSharedProperty)value), autoEnum = typeof(MaterialSharedProperty), getIndex = () => (int)data.materialDebugSettings.debugViewMaterialCommonValue, setIndex = value => { data.ResetExclusiveEnumIndices(); data.materialDebugSettings.debugViewMaterialCommonValue = (MaterialSharedProperty)value; } }); + list.Add(new DebugUI.EnumField { displayName = "Common Material Properties", getter = () => (int)data.materialDebugSettings.debugViewMaterialCommonValue, setter = value => SetDebugViewCommonMaterialProperty((MaterialSharedProperty)value), autoEnum = typeof(MaterialSharedProperty), getIndex = () => (int)data.materialDebugSettings.debugViewMaterialCommonValue, setIndex = value => { data.ResetExclusiveEnumIndices(); data.materialDebugSettings.debugViewMaterialCommonValue = (MaterialSharedProperty)value; } }); list.Add( new DebugUI.EnumField { displayName = "Material", getter = () => (data.materialDebugSettings.debugViewMaterial[0]) == 0 ? 0 : data.materialDebugSettings.debugViewMaterial[1], setter = value => SetDebugViewMaterial(value), enumNames = MaterialDebugSettings.debugViewMaterialStrings, enumValues = MaterialDebugSettings.debugViewMaterialValues, getIndex = () => data.materialDebugSettings.materialEnumIndex, setIndex = value => { data.ResetExclusiveEnumIndices(); data.materialDebugSettings.materialEnumIndex = value; } }); list.Add( new DebugUI.EnumField { displayName = "Engine", getter = () => data.materialDebugSettings.debugViewEngine, setter = value => SetDebugViewEngine(value), enumNames = MaterialDebugSettings.debugViewEngineStrings, enumValues = MaterialDebugSettings.debugViewEngineValues, getIndex = () => data.engineEnumIndex, setIndex = value => { data.ResetExclusiveEnumIndices(); data.engineEnumIndex = value; } }); list.Add( new DebugUI.EnumField { displayName = "Attributes", getter = () => (int)data.materialDebugSettings.debugViewVarying, setter = value => SetDebugViewVarying((DebugViewVarying)value), autoEnum = typeof(DebugViewVarying), getIndex = () => data.attributesEnumIndex, setIndex = value => { data.ResetExclusiveEnumIndices(); data.attributesEnumIndex = value; } }); @@ -675,7 +675,7 @@ void RegisterLightingDebug() new DebugUI.BoolField { displayName = "Show Directional Lights", getter = () => data.lightingDebugSettings.showDirectionalLight, setter = value => data.lightingDebugSettings.showDirectionalLight = value }, new DebugUI.BoolField { displayName = "Show Punctual Lights", getter = () => data.lightingDebugSettings.showPunctualLight, setter = value => data.lightingDebugSettings.showPunctualLight = value }, new DebugUI.BoolField { displayName = "Show Area Lights", getter = () => data.lightingDebugSettings.showAreaLight, setter = value => data.lightingDebugSettings.showAreaLight = value }, - new DebugUI.BoolField { displayName = "Show Reflection Probe", getter = () => data.lightingDebugSettings.showReflectionProbe, setter = value => data.lightingDebugSettings.showReflectionProbe = value }, + new DebugUI.BoolField { displayName = "Show Reflection Probes", getter = () => data.lightingDebugSettings.showReflectionProbe, setter = value => data.lightingDebugSettings.showReflectionProbe = value }, } }); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs index b047bb30299..377f3658cf7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs @@ -25,9 +25,9 @@ public struct BuiltinData // We would prefer to split lighting and material information but for performance reasons, // those lighting information are fill // at the same time than material information. - [SurfaceDataAttributes("Bake Diffuse Lighting", false, true, FieldPrecision.Real)] + [SurfaceDataAttributes("Baked Diffuse Lighting", false, true, FieldPrecision.Real)] public Vector3 bakeDiffuseLighting; // This is the result of sampling lightmap/lightprobe/proxyvolume - [SurfaceDataAttributes("Back Bake Diffuse Lighting", false, true, FieldPrecision.Real)] + [SurfaceDataAttributes("Back Baked Diffuse Lighting", false, true, FieldPrecision.Real)] public Vector3 backBakeDiffuseLighting; // This is the result of sampling lightmap/lightprobe/proxyvolume from the back for transmission // Use for float instead of vector4 to ease the debug (no performance impact) @@ -45,7 +45,7 @@ public struct BuiltinData public Vector3 emissiveColor; // These is required for motion blur and temporalAA - [SurfaceDataAttributes("MotionVector", precision = FieldPrecision.Real)] + [SurfaceDataAttributes("Motion Vector", precision = FieldPrecision.Real)] public Vector2 motionVector; // Distortion @@ -55,7 +55,7 @@ public struct BuiltinData public float distortionBlur; // Define the color buffer mipmap level to use // Misc - [SurfaceDataAttributes("RenderingLayers")] + [SurfaceDataAttributes("Rendering Layers")] public uint renderingLayers; [SurfaceDataAttributes("Depth Offset")] diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl index a40100d10ca..6c9cc02867d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.cs.hlsl @@ -8,8 +8,8 @@ // UnityEngine.Rendering.HighDefinition.Builtin+BuiltinData: static fields // #define DEBUGVIEW_BUILTIN_BUILTINDATA_OPACITY (100) -#define DEBUGVIEW_BUILTIN_BUILTINDATA_BAKE_DIFFUSE_LIGHTING (101) -#define DEBUGVIEW_BUILTIN_BUILTINDATA_BACK_BAKE_DIFFUSE_LIGHTING (102) +#define DEBUGVIEW_BUILTIN_BUILTINDATA_BAKED_DIFFUSE_LIGHTING (101) +#define DEBUGVIEW_BUILTIN_BUILTINDATA_BACK_BAKED_DIFFUSE_LIGHTING (102) #define DEBUGVIEW_BUILTIN_BUILTINDATA_SHADOWMASK_0 (103) #define DEBUGVIEW_BUILTIN_BUILTINDATA_SHADOWMASK_1 (104) #define DEBUGVIEW_BUILTIN_BUILTINDATA_SHADOWMASK_2 (105) @@ -58,11 +58,11 @@ void GetGeneratedBuiltinDataDebug(uint paramId, BuiltinData builtindata, inout f case DEBUGVIEW_BUILTIN_BUILTINDATA_OPACITY: result = builtindata.opacity.xxx; break; - case DEBUGVIEW_BUILTIN_BUILTINDATA_BAKE_DIFFUSE_LIGHTING: + case DEBUGVIEW_BUILTIN_BUILTINDATA_BAKED_DIFFUSE_LIGHTING: result = builtindata.bakeDiffuseLighting; needLinearToSRGB = true; break; - case DEBUGVIEW_BUILTIN_BUILTINDATA_BACK_BAKE_DIFFUSE_LIGHTING: + case DEBUGVIEW_BUILTIN_BUILTINDATA_BACK_BAKED_DIFFUSE_LIGHTING: result = builtindata.backBakeDiffuseLighting; needLinearToSRGB = true; break; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl index ab5e84820fa..5c0b1fd9e2c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl @@ -69,7 +69,7 @@ void GetBuiltinDataDebug(uint paramId, BuiltinData builtinData, inout float3 res switch (paramId) { - case DEBUGVIEW_BUILTIN_BUILTINDATA_BAKE_DIFFUSE_LIGHTING: + case DEBUGVIEW_BUILTIN_BUILTINDATA_BAKED_DIFFUSE_LIGHTING: // TODO: require a remap // TODO: we should not gamma correct, but easier to debug for now without correct high range value result = builtinData.bakeDiffuseLighting; needLinearToSRGB = true; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.cs index 369edb2c47b..e6088f255b0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.cs @@ -22,7 +22,7 @@ public enum MaterialFeatureFlags [GenerateHLSL(PackingRules.Exact, false, false, true, 1500)] public struct SurfaceData { - [SurfaceDataAttributes("MaterialFeatures")] + [SurfaceDataAttributes("Material Features")] public uint materialFeatures; // Standard diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/Fabric.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/Fabric.cs index 168dc9e90c0..c602b810c46 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/Fabric.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/Fabric.cs @@ -25,7 +25,7 @@ public enum MaterialFeatureFlags [GenerateHLSL(PackingRules.Exact, false, false, true, 1300)] public struct SurfaceData { - [SurfaceDataAttributes("MaterialFeatures")] + [SurfaceDataAttributes("Material Features")] public uint materialFeatures; // Standard diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.cs index 3da14b35c81..dfe960f625c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.cs @@ -18,7 +18,7 @@ public enum MaterialFeatureFlags [GenerateHLSL(PackingRules.Exact, false, false, true, 1400)] public struct SurfaceData { - [SurfaceDataAttributes("MaterialFeatures")] + [SurfaceDataAttributes("Material Features")] public uint materialFeatures; [MaterialSharedPropertyMapping(MaterialSharedProperty.AmbientOcclusion)] @@ -46,7 +46,7 @@ public struct SurfaceData [SurfaceDataAttributes("Transmittance")] public Vector3 transmittance; - [SurfaceDataAttributes("RimTransmissionIntensity")] + [SurfaceDataAttributes("Rim Transmission Intensity")] public float rimTransmissionIntensity; // Anisotropic diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs index e5db2dc20d3..3ec1640b95a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.cs @@ -29,7 +29,7 @@ public enum MaterialFeatureFlags [GenerateHLSL(PackingRules.Exact, false, false, true, 1000)] public struct SurfaceData { - [SurfaceDataAttributes("MaterialFeatures")] + [SurfaceDataAttributes("Material Features")] public uint materialFeatures; // Standard @@ -101,7 +101,7 @@ public struct SurfaceData public Vector3 transmittanceColor; [SurfaceDataAttributes("Transmittance Absorption Distance", precision = FieldPrecision.Real)] public float atDistance; - [SurfaceDataAttributes("Transmittance mask", precision = FieldPrecision.Real)] + [SurfaceDataAttributes("Transmittance Mask", precision = FieldPrecision.Real)] public float transmittanceMask; }; From 9978787c12f35cbe48413ad0bb5b22e7222107e2 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 18 Mar 2020 12:06:32 +0100 Subject: [PATCH 018/200] Added debug exposure to light hierarchy debug. (#6216) # Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Debug/DebugDisplay.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 6aa8ab30cf7..8a5ee62d575 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue that prevented cubemap thumbnails from rendering. - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. - Fix some typos in the debug menu. +- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index bcc96f54a63..5f2e838fdaf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -1179,7 +1179,7 @@ internal bool DebugNeedsExposure() DebugViewGbuffer debugGBuffer = (DebugViewGbuffer)data.materialDebugSettings.debugViewGBuffer; return (debugLighting == DebugLightingMode.DiffuseLighting || debugLighting == DebugLightingMode.SpecularLighting || debugLighting == DebugLightingMode.VisualizeCascade) || (data.lightingDebugSettings.overrideAlbedo || data.lightingDebugSettings.overrideNormal || data.lightingDebugSettings.overrideSmoothness || data.lightingDebugSettings.overrideSpecularColor || data.lightingDebugSettings.overrideEmissiveColor || data.lightingDebugSettings.overrideAmbientOcclusion) || - (debugGBuffer == DebugViewGbuffer.BakeDiffuseLightingWithAlbedoPlusEmissive) || + (debugGBuffer == DebugViewGbuffer.BakeDiffuseLightingWithAlbedoPlusEmissive) || (data.lightingDebugSettings.debugLightFilterMode != DebugLightFilterMode.None) || (data.fullScreenDebugMode == FullScreenDebugMode.PreRefractionColorPyramid || data.fullScreenDebugMode == FullScreenDebugMode.FinalColorPyramid || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceReflections || data.fullScreenDebugMode == FullScreenDebugMode.LightCluster || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceShadows || data.fullScreenDebugMode == FullScreenDebugMode.NanTracker || data.fullScreenDebugMode == FullScreenDebugMode.ColorLog) || data.fullScreenDebugMode == FullScreenDebugMode.RayTracedGlobalIllumination; } } From 8e09b167610f182d3d549120867a42f98a8d26bc Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Wed, 18 Mar 2020 12:23:02 +0100 Subject: [PATCH 019/200] - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. (#6254) --- .../CHANGELOG.md | 1 + .../Denoising/ReflectionDenoiser.compute | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 8a5ee62d575..7190c2003e6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Removed legacy VR code - Add range-based clipping to box lights (case 1178780) - Improve area light culling (case 1085873) +- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute index b762bd53f23..6e66f08da24 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/ReflectionDenoiser.compute @@ -20,6 +20,11 @@ // Tile size of this compute #define REFLECTION_FILTER_TILE_SIZE 8 +//#pragma enable_d3d11_debug_symbols + +// Thereshold at which we decide to reject the reflection history +#define REFLECTION_HISTORY_REJECTION_THRESHOLD 0.75 + TEXTURE2D_X(_DenoiseInputTexture); TEXTURE2D_X(_HistoryBuffer); RW_TEXTURE2D_X(float4, _DenoiseOutputTextureRW); @@ -51,9 +56,17 @@ void TemporalAccumulation(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 gr float velocityLength = length(velocity); float2 uv = posInputs.positionNDC; - float3 color = Fetch(_DenoiseInputTexture, uv, 0.0, _RTHandleScale.xy) * GetCurrentExposureMultiplier(); - float3 history = Fetch(_HistoryBuffer, posInputs.positionNDC - velocity, 0.0, _RTHandleScaleHistory.xy) * GetCurrentExposureMultiplier(); + float4 historyRaw = Fetch4(_HistoryBuffer, posInputs.positionNDC - velocity, 0.0, _RTHandleScaleHistory.xy); + float3 history = historyRaw.xyz * GetCurrentExposureMultiplier(); + + // If the validity of the history is lower than a given threshold, we do not want to use it + if (historyRaw.w < REFLECTION_HISTORY_REJECTION_THRESHOLD) + { + _DenoiseOutputTextureRW[COORD_TEXTURE2D_X(centerCoord)] = float4(color * GetInverseCurrentExposureMultiplier(), LOAD_TEXTURE2D_X(_DenoiseInputTexture, centerCoord).w); + return; + } + float3 topLeft = Fetch(_DenoiseInputTexture, uv, -RADIUS, _RTHandleScale.xy) * GetCurrentExposureMultiplier(); float3 bottomRight = Fetch(_DenoiseInputTexture, uv, RADIUS, _RTHandleScale.xy) * GetCurrentExposureMultiplier(); @@ -100,7 +113,9 @@ void CopyHistory(uint3 dispatchThreadId : SV_DispatchThreadID) if (any(dispatchThreadId.xy > uint2(_ScreenSize.xy))) return; // Out of bounds, discard - _DenoiseOutputTextureRW[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = _DenoiseInputTexture[COORD_TEXTURE2D_X(dispatchThreadId.xy)]; + float4 currentColor = _DenoiseInputTexture[COORD_TEXTURE2D_X(dispatchThreadId.xy)]; + // We need to apply a step function on the blend factor to evaluate the validity of the history (if it is stricly higher than 0.0 then its valid) + _DenoiseOutputTextureRW[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = float4(currentColor.xyz, currentColor.w > 0.0 ? 1.0 : 0.0); } int _DenoiserFilterRadius; From bd908e41b0aa2fd52ee89d01dd61c0b17db85761 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Thu, 19 Mar 2020 09:08:01 +0000 Subject: [PATCH 020/200] Clearer naming of tile and cluster categories for environment lights #6227 --- .../CHANGELOG.md | 1 + .../Runtime/Debug/DebugDisplay.cs | 20 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7190c2003e6..571a94800e0 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Add range-based clipping to box lights (case 1178780) - Improve area light culling (case 1085873) - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. +- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 5f2e838fdaf..f27b847060f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -98,6 +98,8 @@ public class DebugDisplaySettings : IDebugData static int[] s_MaterialFullScreenDebugValues = null; static GUIContent[] s_MsaaSamplesDebugStrings = null; static int[] s_MsaaSamplesDebugValues = null; + static GUIContent[] s_TileAndClusterDebugStrings = null; + static int[] s_TileAndClusterDebugValues = null; static List s_CameraNames = new List(); static GUIContent[] s_CameraNamesStrings = null; @@ -208,6 +210,8 @@ internal DebugDisplaySettings() FillFullScreenDebugEnum(ref s_RenderingFullScreenDebugStrings, ref s_RenderingFullScreenDebugValues, FullScreenDebugMode.MinRenderingFullScreenDebug, FullScreenDebugMode.MaxRenderingFullScreenDebug); FillFullScreenDebugEnum(ref s_MaterialFullScreenDebugStrings, ref s_MaterialFullScreenDebugValues, FullScreenDebugMode.MinMaterialFullScreenDebug, FullScreenDebugMode.MaxMaterialFullScreenDebug); + FillTileClusterDebugEnum(); + s_MaterialFullScreenDebugStrings[(int)FullScreenDebugMode.ValidateDiffuseColor - ((int)FullScreenDebugMode.MinMaterialFullScreenDebug)] = new GUIContent("Diffuse Color"); s_MaterialFullScreenDebugStrings[(int)FullScreenDebugMode.ValidateSpecularColor - ((int)FullScreenDebugMode.MinMaterialFullScreenDebug)] = new GUIContent("Metal or SpecularColor"); @@ -885,7 +889,7 @@ void RegisterLightingDebug() { children = { - new DebugUI.EnumField { displayName = "Tile/Cluster Debug By Category", getter = () => (int)data.lightingDebugSettings.tileClusterDebugByCategory, setter = value => data.lightingDebugSettings.tileClusterDebugByCategory = (TileClusterCategoryDebug)value, autoEnum = typeof(TileClusterCategoryDebug), getIndex = () => data.tileClusterDebugByCategoryEnumIndex, setIndex = value => data.tileClusterDebugByCategoryEnumIndex = value } + new DebugUI.EnumField { displayName = "Tile/Cluster Debug By Category", getter = () => (int)data.lightingDebugSettings.tileClusterDebugByCategory, setter = value => data.lightingDebugSettings.tileClusterDebugByCategory = (TileClusterCategoryDebug)value, enumNames = s_TileAndClusterDebugStrings, enumValues = s_TileAndClusterDebugValues, getIndex = () => data.tileClusterDebugByCategoryEnumIndex, setIndex = value => data.tileClusterDebugByCategoryEnumIndex = value } } }); } @@ -1107,6 +1111,20 @@ void FillFullScreenDebugEnum(ref GUIContent[] strings, ref int[] values, FullScr index++; } } + void FillTileClusterDebugEnum() + { + string[] names = Enum.GetNames(typeof(TileClusterCategoryDebug)); + for(int i=0; i new GUIContent(t)) + .ToArray(); + s_TileAndClusterDebugValues = (int[])Enum.GetValues(typeof(TileClusterCategoryDebug)); + } static string FormatVector(Vector3 v) { From b48722e8d98794f066e345e7791f258e35a16fb7 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Thu, 19 Mar 2020 12:07:47 +0100 Subject: [PATCH 021/200] Fix texture curve destroy (#6277) # Conflicts: # com.unity.render-pipelines.core/CHANGELOG.md --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + .../Runtime/Utilities/TextureCurve.cs | 43 +++++++------------ .../Runtime/Volume/VolumeComponent.cs | 14 ++++++ .../Runtime/Volume/VolumeParameter.cs | 5 +++ .../Runtime/Sky/SkyManager.cs | 1 + 5 files changed, 37 insertions(+), 27 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 7f2fa1d9b33..6210901563e 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -36,6 +36,7 @@ The version number for this package has increased due to a version update of a r - Fixed the definition of `rcp()` for GLES2. - Fix LookDev issue when adding a GameObject containing a Volume into the LookDev's view. - Fixed duplicated entry for com.unity.modules.xr in the runtime asmdef file +- Fixed the texture curve being destroyed from another thread than main (case 1211754) ### Changed - Restored usage of ENABLE_VR to fix compilation errors on some platforms. diff --git a/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs b/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs index 4e3b9ea2c1d..4a1e3235d64 100644 --- a/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs +++ b/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs @@ -14,7 +14,7 @@ namespace UnityEngine.Rendering /// A wrapper around AnimationCurve to automatically bake it into a texture. /// [Serializable] - public class TextureCurve : IDisposable + public class TextureCurve { const int k_Precision = 128; // Edit LutBuilder3D if you change this value const float k_Step = 1f / k_Precision; @@ -78,23 +78,9 @@ public TextureCurve(Keyframe[] keys, float zeroValue, bool loop, in Vector2 boun } /// - /// Finalizer. + /// Releases the internal texture resource. /// - ~TextureCurve() - { - ReleaseUnityResources(); - } - - /// - /// Cleans up the internal texture resource. - /// - public void Dispose() - { - ReleaseUnityResources(); - GC.SuppressFinalize(this); - } - - void ReleaseUnityResources() + public void Release() { CoreUtils.Destroy(m_Texture); m_Texture = null; @@ -127,17 +113,18 @@ static TextureFormat GetTextureFormat() /// A 128x1 texture. public Texture2D GetTexture() { - if (m_IsTextureDirty) + if (m_Texture == null) { - if (m_Texture == null) - { - m_Texture = new Texture2D(k_Precision, 1, GetTextureFormat(), false, true); - m_Texture.name = "CurveTexture"; - m_Texture.hideFlags = HideFlags.HideAndDontSave; - m_Texture.filterMode = FilterMode.Bilinear; - m_Texture.wrapMode = TextureWrapMode.Clamp; - } + m_Texture = new Texture2D(k_Precision, 1, GetTextureFormat(), false, true); + m_Texture.name = "CurveTexture"; + m_Texture.hideFlags = HideFlags.HideAndDontSave; + m_Texture.filterMode = FilterMode.Bilinear; + m_Texture.wrapMode = TextureWrapMode.Clamp; + m_IsTextureDirty = true; + } + if (m_IsTextureDirty) + { var pixels = new Color[k_Precision]; for (int i = 0; i < pixels.Length; i++) @@ -254,6 +241,8 @@ public class TextureCurveParameter : VolumeParameter public TextureCurveParameter(TextureCurve value, bool overrideState = false) : base(value, overrideState) { } + public override void Release() => m_Value.Release(); + // TODO: TextureCurve interpolation } -} +} \ No newline at end of file diff --git a/com.unity.render-pipelines.core/Runtime/Volume/VolumeComponent.cs b/com.unity.render-pipelines.core/Runtime/Volume/VolumeComponent.cs index 6d0dad29a1a..37288fbb311 100644 --- a/com.unity.render-pipelines.core/Runtime/Volume/VolumeComponent.cs +++ b/com.unity.render-pipelines.core/Runtime/Volume/VolumeComponent.cs @@ -209,5 +209,19 @@ public override int GetHashCode() return hash; } } + + /// + /// Unity calls this method before the object is destroyed. + /// + protected virtual void OnDestroy() => Release(); + + /// + /// Releases all the allocated resources. + /// + public void Release() + { + for (int i = 0; i < parameters.Count; i++) + parameters[i].Release(); + } } } diff --git a/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs b/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs index 84d334c5b08..8fa9e1078e9 100644 --- a/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs +++ b/com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs @@ -103,6 +103,11 @@ public static bool IsObjectParameter(Type type) return type.BaseType != null && IsObjectParameter(type.BaseType); } + + /// + /// Override this method to free all allocated resources + /// + public virtual void Release() {} } /// diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs index 4e8852b73c0..dcd0c4cd226 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -337,6 +337,7 @@ public void Cleanup() m_CachedSkyContexts[i].Cleanup(); m_StaticLightingSky.Cleanup(); + lightingOverrideVolumeStack.Dispose(); #if UNITY_EDITOR CoreUtils.Destroy(m_DefaultPreviewSky); From dd858c6b0f815070f77bfea18654714060e16021 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Thu, 19 Mar 2020 12:15:46 +0100 Subject: [PATCH 022/200] Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). (#6270) --- .../CHANGELOG.md | 1 + .../Runtime/Material/Lit/LitRaytracing.hlsl | 11 +++++++++++ .../ShaderPass/ShaderPassRaytracingForward.hlsl | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 571a94800e0..9e149a2113d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. - Fix some typos in the debug menu. - Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. +- Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRaytracing.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRaytracing.hlsl index 3f7eec7efe0..54dadd272ba 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRaytracing.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitRaytracing.hlsl @@ -16,6 +16,17 @@ IndirectLighting EvaluateBSDF_RaytracedRefraction(LightLoopContext lightLoopCont return lighting; } +#if HAS_REFRACTION +void OverrideRefractionData(SurfaceData surfaceData, float refractionDistance, float3 refractionPositionWS, inout BSDFData bsdfData, inout PreLightData preLightData) +{ + // This variable is only used for SSRefraction, we intentionally put an invalid value in it. + bsdfData.absorptionCoefficient = TransmittanceColorAtDistanceToAbsorption(surfaceData.transmittanceColor, refractionDistance); + preLightData.transparentRefractV = 0.0; + preLightData.transparentPositionWS = refractionPositionWS; + preLightData.transparentTransmittance = exp(-bsdfData.absorptionCoefficient * refractionDistance); +} +#endif + #endif #if (SHADERPASS == SHADERPASS_RAYTRACING_GBUFFER) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingForward.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingForward.hlsl index 56bc1dd51d9..0723ba0bea3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingForward.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassRaytracingForward.hlsl @@ -93,6 +93,13 @@ void ClosestHitForward(inout RayIntersection rayIntersection : SV_RayPayload, At transmitted = transmittedIntersection.color; refractedWeight = 1.0; additionalRayCount += transmittedIntersection.rayCount; + + // Given that we are sharing code with rasterization, we need to override properly the refraction parameters + OverrideRefractionData(surfaceData, + transmittedIntersection.t, + pointWSPos + transmittedIntersection.t * refractedDir, + bsdfData, + preLightData); } #endif #endif From ae7c57fe8290d7aef587e84f66858c9511779ab6 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Thu, 19 Mar 2020 12:27:00 +0100 Subject: [PATCH 023/200] fix for Fogbugz 1214609 - HDRP Wizard addively increases the Light Intesity instead of setting it (#6266) --- .../Documentation~/Render-Pipeline-Wizard.md | 2 +- .../Editor/DefaultScene/HDWizard.Window.cs | 2 +- .../Editor/Upgraders/UpgradeStandardShaderMaterials.cs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Render-Pipeline-Wizard.md b/com.unity.render-pipelines.high-definition/Documentation~/Render-Pipeline-Wizard.md index 88b5a6d0b74..38fde79730d 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Render-Pipeline-Wizard.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Render-Pipeline-Wizard.md @@ -102,5 +102,5 @@ When upgrading a project from the built-in render pipeline to HDRP, you need to - **Upgrade Project Materials to High Definition Materials**: Upgrades every Material in your Unity Project to HDRP Materials. - **Upgrade Selected Materials to High Definition Materials**: Upgrades every Material currently selected to HDRP Materials. -- **Upgrade Unity Builtin Scene Light Intensity for High Definition**: Upgrades each Light in the current Scene to HDRP compatible intensity values. +- **Multiply Unity Builtin Directional Light Intensity to match High Definition**: Multiply intensity of each Directional Light in the current Scene to match HDRP compatible intensity values. Caution: This script should be executed only once. diff --git a/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs b/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs index 77e9947fd6f..2c301b272bc 100644 --- a/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs +++ b/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs @@ -41,7 +41,7 @@ static class Style public const string migrateAllButton = "Upgrade Project Materials to High Definition Materials"; public const string migrateSelectedButton = "Upgrade Selected Materials to High Definition Materials"; - public const string migrateLights = "Upgrade Unity Builtin Scene Light Intensity for High Definition"; + public const string migrateLights = "Multiply Unity Builtin Directional Light Intensity to match High Definition"; public const string migrateMaterials = "Upgrade HDRP Materials to Latest Version"; public const string hdrpVersionLast = "You are using High-Definition Render Pipeline lastest {0} version."; //{0} will be replaced when displayed by the version number. diff --git a/com.unity.render-pipelines.high-definition/Editor/Upgraders/UpgradeStandardShaderMaterials.cs b/com.unity.render-pipelines.high-definition/Editor/Upgraders/UpgradeStandardShaderMaterials.cs index ba4382aa032..d07e9d15459 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Upgraders/UpgradeStandardShaderMaterials.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Upgraders/UpgradeStandardShaderMaterials.cs @@ -33,12 +33,13 @@ internal static void UpgradeMaterialsSelection() MaterialUpgrader.UpgradeSelection(GetHDUpgraders(), "Upgrade to HD Material"); } - [MenuItem("Edit/Render Pipeline/Upgrade Unity Builtin Scene Light Intensity for High Definition", priority = CoreUtils.editMenuPriority2)] + [MenuItem("Edit/Render Pipeline/Multiply Unity Builtin Directional Light Intensity to match High Definition", priority = CoreUtils.editMenuPriority2)] internal static void UpgradeLights() { Light[] lights = Light.GetLights(LightType.Directional, 0); foreach (var l in lights) { + Undo.RecordObject(l, "Light intensity x PI"); l.intensity *= Mathf.PI; } } From 9e007964f0e4660afb1cc5462b76b74b3c8dd8ff Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 19 Mar 2020 12:33:01 +0100 Subject: [PATCH 024/200] Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. #6235 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Sky/SkyManager.cs | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9e149a2113d..e2106a63b22 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix some typos in the debug menu. - Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. - Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). +- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs index dcd0c4cd226..447da6c071e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -83,8 +83,6 @@ public void Reset() // We keep around the renderer and the rendering context to avoid useless allocation if they get reused. hash = 0; refCount = 0; - if (renderingContext != null) - renderingContext.ClearAmbientProbe(); } public void Cleanup() @@ -552,8 +550,7 @@ void AllocateNewRenderingContext(SkyUpdateContext skyContext, int slot, int newH if (context.renderingContext == null) context.renderingContext = new SkyRenderingContext(m_Resolution, m_IBLFilterArray.Length, supportConvolution, previousAmbientProbe, name); - else - context.renderingContext.UpdateAmbientProbe(previousAmbientProbe); + skyContext.cachedSkyRenderingContextId = slot; } @@ -633,7 +630,7 @@ internal void ReleaseCachedContext(int id) cachedContext.refCount--; if (cachedContext.refCount == 0) - cachedContext.Cleanup(); + cachedContext.Reset(); } bool IsCachedContextValid(SkyUpdateContext skyContext) From 96a89683635f45f58478950dd694c4fa7f6fe51b Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Thu, 19 Mar 2020 07:40:48 -0400 Subject: [PATCH 025/200] Add XR setting to control camera jitter for temporal effects #6259 --- .../CHANGELOG.md | 1 + .../RenderPipeline/HDRenderPipelineUI.Skin.cs | 1 + .../Editor/RenderPipeline/HDRenderPipelineUI.cs | 1 + .../Settings/SerializedXRSettings.cs | 2 ++ .../Runtime/RenderPipeline/Camera/HDCamera.cs | 5 ++--- .../RenderPipeline/XR/GlobalXRSettings.cs | 5 ++++- .../Runtime/RenderPipeline/XR/XRSystem.cs | 16 +++++++++++++--- .../Runtime/ShaderLibrary/Blit.shader | 6 ------ 8 files changed, 24 insertions(+), 13 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e2106a63b22..7be02cd56fb 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added a warning and workaround instructions that appear when you enable XR single-pass after the first frame with the XR SDK. - Added an "enable" toggle to the SSR volume component. - Added support of cookie baking and add support on Disc light. +- Added XR setting to control camera jitter for temporal effects ### Fixed - Fix Changelog 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 e78b1a0adf4..c1aedeca879 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 @@ -184,6 +184,7 @@ public class GeneralSection public static readonly GUIContent XRSinglePass = EditorGUIUtility.TrTextContent("Single Pass", "When enabled, XR views are rendered simultaneously and the render loop is processed only once. This setting will improve CPU and GPU performance but will use more GPU memory."); public static readonly GUIContent XROcclusionMesh = EditorGUIUtility.TrTextContent("Occlusion Mesh", "When enabled, the occlusion mesh will be rendered for each view during the depth prepass to reduce shaded fragments."); + public static readonly GUIContent XRCameraJitter = EditorGUIUtility.TrTextContent("Camera Jitter", "When enabled, jitter will be added to the camera to provide more samples for temporal effects. This is usually not required in VR due to micro variations from the tracking."); public static readonly GUIContent lutSize = EditorGUIUtility.TrTextContent("Grading LUT Size", "Sets size of the internal and external color grading lookup textures (LUTs)."); public static readonly GUIContent lutFormat = EditorGUIUtility.TrTextContent("Grading LUT Format", "Specifies the encoding format for color grading lookup textures. Lower precision formats are faster and use less memory at the expense of color precision."); 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 6da2fed2e01..bd41dd2e4e1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -569,6 +569,7 @@ static void Drawer_SectionXRSettings(SerializedHDRenderPipelineAsset serialized, { EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.singlePass, Styles.XRSinglePass); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.occlusionMesh, Styles.XROcclusionMesh); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.cameraJitter, Styles.XRCameraJitter); } static private bool m_ShowDoFLowQualitySection = false; diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedXRSettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedXRSettings.cs index 5ba0b879de7..4a462298ef0 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedXRSettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedXRSettings.cs @@ -8,6 +8,7 @@ class SerializedXRSettings public SerializedProperty singlePass; public SerializedProperty occlusionMesh; + public SerializedProperty cameraJitter; public SerializedXRSettings(SerializedProperty root) { @@ -15,6 +16,7 @@ public SerializedXRSettings(SerializedProperty root) singlePass = root.Find((GlobalXRSettings s) => s.singlePass); occlusionMesh = root.Find((GlobalXRSettings s) => s.occlusionMesh); + cameraJitter = root.Find((GlobalXRSettings s) => s.cameraJitter); } } } 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 e6a375931e6..6dad9dea362 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 @@ -1119,9 +1119,8 @@ void UpdateVolumeAndPhysicalParameters() Matrix4x4 GetJitteredProjectionMatrix(Matrix4x4 origProj) { - // Do not add extra jitter in VR (micro-variations from head tracking are enough) - // XRTODO: make this a setting in GlobalXRSettings instead of assuming - if (xr.enabled) + // Do not add extra jitter in VR unless requested (micro-variations from head tracking are usually enough) + if (xr.enabled && !HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.xrSettings.cameraJitter) { taaJitter = Vector4.zero; return origProj; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/GlobalXRSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/GlobalXRSettings.cs index 4c4de05bbef..07e631a68b6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/GlobalXRSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/GlobalXRSettings.cs @@ -11,12 +11,15 @@ public struct GlobalXRSettings internal static GlobalXRSettings NewDefault() => new GlobalXRSettings() { singlePass = true, - occlusionMesh = true + occlusionMesh = true, + cameraJitter = false }; /// Use single pass. public bool singlePass; /// Use occlusion mesh. public bool occlusionMesh; + /// Add jitter to camera for temporal effects. + public bool cameraJitter; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index a6f2ac37fa8..36fc9f4d668 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -344,7 +344,7 @@ bool LayoutSinglePassTestMode(XRLayout frameLayout) customMirrorView = null }; - var viewInfo = new XRViewCreateInfo + var viewInfo2 = new XRViewCreateInfo { projMatrix = camera.projectionMatrix, viewMatrix = camera.worldToCameraMatrix, @@ -352,12 +352,22 @@ bool LayoutSinglePassTestMode(XRLayout frameLayout) textureArraySlice = -1 }; + // Change the first view so that it's a different viewpoint and projection to detect more issues + var viewInfo1 = viewInfo2; + var planes = viewInfo1.projMatrix.decomposeProjection; + planes.left *= 0.44f; + planes.right *= 0.88f; + planes.top *= 0.11f; + planes.bottom *= 0.33f; + viewInfo1.projMatrix = Matrix4x4.Frustum(planes); + viewInfo1.viewMatrix *= Matrix4x4.Translate(new Vector3(.34f, 0.25f, -0.08f)); + // single-pass 2x rendering { XRPass pass = frameLayout.CreatePass(passInfo); - for (int viewIndex = 0; viewIndex < TextureXR.slices; viewIndex++) - frameLayout.AddViewToPass(viewInfo, pass); + frameLayout.AddViewToPass(viewInfo1, pass); + frameLayout.AddViewToPass(viewInfo2, pass); } // valid layout diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader index 148fd968e22..c55177f8125 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader @@ -97,9 +97,6 @@ Shader "Hidden/HDRP/Blit" { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); float2 uv = input.texcoord.xy; -#if UNITY_SINGLE_PASS_STEREO - uv.x = (uv.x + unity_StereoEyeIndex) * 0.5; -#endif return SAMPLE_TEXTURE2D_X_LOD(_BlitTexture, sampler_LinearRepeat, uv, _BlitMipLevel); } @@ -107,9 +104,6 @@ Shader "Hidden/HDRP/Blit" { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); float2 uv = input.texcoord.xy; -#if UNITY_SINGLE_PASS_STEREO - uv.x = (uv.x + unity_StereoEyeIndex) * 0.5; -#endif return SAMPLE_TEXTURE2D_X_LOD(_BlitTexture, sampler_PointRepeat, uv, _BlitMipLevel); } From 72f952d88b009acae4964764d82342a4c48a5e4d Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Thu, 19 Mar 2020 07:46:42 -0400 Subject: [PATCH 026/200] fix unreachable code in TextureXR.useTexArray (#6260) Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + .../Runtime/Textures/TextureXR.cs | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 6210901563e..90b8d628086 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -37,6 +37,7 @@ The version number for this package has increased due to a version update of a r - Fix LookDev issue when adding a GameObject containing a Volume into the LookDev's view. - Fixed duplicated entry for com.unity.modules.xr in the runtime asmdef file - Fixed the texture curve being destroyed from another thread than main (case 1211754) +- Fixed unreachable code in TextureXR.useTexArray ### Changed - Restored usage of ENABLE_VR to fix compilation errors on some platforms. diff --git a/com.unity.render-pipelines.core/Runtime/Textures/TextureXR.cs b/com.unity.render-pipelines.core/Runtime/Textures/TextureXR.cs index e5f40685b5d..bc984323b6b 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/TextureXR.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/TextureXR.cs @@ -38,16 +38,13 @@ public static bool useTexArray { case GraphicsDeviceType.Direct3D11: case GraphicsDeviceType.Direct3D12: - return SystemInfo.graphicsDeviceType != GraphicsDeviceType.XboxOne; - case GraphicsDeviceType.PlayStation4: - return true; - case GraphicsDeviceType.Vulkan: return true; - } - return false; + default: + return false; + } } } From 2d70b648ea49791da03bb86690c65638c6a17e7e Mon Sep 17 00:00:00 2001 From: fredericv-unity3d <55485372+fredericv-unity3d@users.noreply.github.com> Date: Thu, 19 Mar 2020 12:53:07 +0100 Subject: [PATCH 027/200] Deprecate Utilities namespace #6219 --- .../Editor/Utilities/EditorMaterialQuality.cs | 1 - .../Runtime/Utilities/MaterialQuality.cs | 175 ++++- .../CHANGELOG.md | 665 ++++++++++-------- .../RenderPipeline/HDRenderPipelineUI.cs | 1 - .../Settings/FrameSettingsUI.Drawers.cs | 3 +- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 1 - .../RenderPipeline/HDRenderPipeline.cs | 1 - .../RenderPipeline/HDRenderPipelineAsset.cs | 1 - .../RenderPipeline/Settings/FrameSettings.cs | 1 - 9 files changed, 535 insertions(+), 314 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs b/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs index b61838e0793..28c3c31ae9b 100644 --- a/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs +++ b/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs @@ -1,5 +1,4 @@ using UnityEngine.Rendering; -using Utilities; namespace UnityEditor.Rendering.Utilities { diff --git a/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs b/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs index 3975343b72c..01c62081140 100644 --- a/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs +++ b/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs @@ -1,13 +1,183 @@ using System; -using UnityEngine; -using UnityEngine.Rendering; +namespace UnityEngine.Rendering +{ + /// + /// Material quality flags. + /// + [Flags] + public enum MaterialQuality + { + /// Low Material Quality. + Low = 1 << 0, + /// Medium Material Quality. + Medium = 1 << 1, + /// High Material Quality. + High = 1 << 2 + } + + /// + /// Material Quality utility class. + /// + public static class MaterialQualityUtilities + { + /// + /// Keywords strings for Material Quality levels. + /// + public static string[] KeywordNames = + { + "MATERIAL_QUALITY_LOW", + "MATERIAL_QUALITY_MEDIUM", + "MATERIAL_QUALITY_HIGH", + }; + + /// + /// String representation of the MaterialQuality enum. + /// + public static string[] EnumNames = Enum.GetNames(typeof(MaterialQuality)); + + /// + /// Keywords for Material Quality levels. + /// + public static ShaderKeyword[] Keywords = + { + new ShaderKeyword(KeywordNames[0]), + new ShaderKeyword(KeywordNames[1]), + new ShaderKeyword(KeywordNames[2]), + }; + + /// + /// Returns the highest available quality level in a MaterialQuality bitfield. + /// + /// Input MaterialQuality bitfield. + /// The highest available quality level. + public static MaterialQuality GetHighestQuality(this MaterialQuality levels) + { + for (var i = Keywords.Length - 1; i >= 0; --i) + { + var level = (MaterialQuality) (1 << i); + if ((levels & level) != 0) + return level; + } + + return 0; + } + + /// + /// Returns the closest available quality level in a MaterialQuality bitfield. + /// + /// Available MaterialQuality bitfield. + /// Input MaterialQuality level. + /// The closest available quality level. + public static MaterialQuality GetClosestQuality(this MaterialQuality availableLevels, MaterialQuality requestedLevel) + { + // Special fallback when there are no available quality levels. Needs to match in the shader stripping code + if (availableLevels == 0) + return MaterialQuality.Low; + + // First we want to find the closest available quality level below the requested one. + int requestedLevelIndex = ToFirstIndex(requestedLevel); + MaterialQuality chosenQuality = (MaterialQuality)0; + for (int i = requestedLevelIndex; i >= 0; --i) + { + var level = FromIndex(i); + if ((level & availableLevels) != 0) + { + chosenQuality = level; + break; + } + } + + if (chosenQuality != 0) + return chosenQuality; + + // If none is found then we fallback to the closest above. + for (var i = requestedLevelIndex + 1; i < Keywords.Length; ++i) + { + var level = FromIndex(i); + var diff = Math.Abs(requestedLevel - level); + if ((level & availableLevels) != 0) + { + chosenQuality = level; + break; + } + } + + Debug.Assert(chosenQuality != 0); + return chosenQuality; + } + + /// + /// Set the global keyword for the provided MaterialQuality. + /// + /// MaterialQuality level to set the keyword for. + public static void SetGlobalShaderKeywords(this MaterialQuality level) + { + for (var i = 0; i < KeywordNames.Length; ++i) + { + if ((level & (MaterialQuality) (1 << i)) != 0) + Shader.EnableKeyword(KeywordNames[i]); + else + Shader.DisableKeyword(KeywordNames[i]); + } + } + + /// + /// Set the global keyword for the provided MaterialQuality. + /// + /// MaterialQuality level to set the keyword for. + /// Command Buffer used to setup the keyword. + public static void SetGlobalShaderKeywords(this MaterialQuality level, CommandBuffer cmd) + { + for (var i = 0; i < KeywordNames.Length; ++i) + { + if ((level & (MaterialQuality)(1 << i)) != 0) + cmd.EnableShaderKeyword(KeywordNames[i]); + else + cmd.DisableShaderKeyword(KeywordNames[i]); + } + } + + /// + /// Returns the index (in the MaterialQuality enum) of the first available level. + /// + /// MaterialQuality bitfield. + /// The index of the first available level. + public static int ToFirstIndex(this MaterialQuality level) + { + for (var i = 0; i < KeywordNames.Length; ++i) + { + if ((level & (MaterialQuality) (1 << i)) != 0) + return i; + } + + return -1; + } + + /// + /// Returns the enum equivalent of the index in the MaterialQuality enum list. + /// + /// Index of the material quality. + /// The equivalent enum. + public static MaterialQuality FromIndex(int index) => (MaterialQuality) (1 << index); + } +} + + +// TODO: Remove when breaking changes (introduced in 7.x.x) +// Namespace is invalid +// We will remove it in a future release but keep an obsolete version for compatibility. +// Instead, we should use 'UnityEngine.Rendering' namespace Utilities { + using UnityEngine; + using UnityEngine.Rendering; + /// /// Material quality flags. /// [Flags] + [Obsolete("Use UnityEngine.Rendering.MaterialQuality")] public enum MaterialQuality { /// Low Material Quality. @@ -21,6 +191,7 @@ public enum MaterialQuality /// /// Material Quality utility class. /// + [Obsolete("Use UnityEngine.Rendering.MaterialQualityUtilities")] public static class MaterialQualityUtilities { /// diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7be02cd56fb..417d14fe290 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -6,16 +6,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added +- Add XR setting to control camera jitter for temporal effects #6259 + +### Fixed +- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. + +### Changed +- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. +- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. + +## [7.3.0] - 2020-03-11 + ### Added - Added the exposure sliders to the planar reflection probe preview - Added a warning and workaround instructions that appear when you enable XR single-pass after the first frame with the XR SDK. - Added an "enable" toggle to the SSR volume component. -- Added support of cookie baking and add support on Disc light. -- Added XR setting to control camera jitter for temporal effects ### Fixed -- Fix Changelog - Fixed issue with AssetPostprocessors dependencies causing models to be imported twice when upgrading the package version. +- Fix player build DX12 - Fix issue with AO being misaligned when multiple view are visible. - Fix issue that caused the clamp of camera rotation motion for motion blur to be ineffective. - Fixed culling of lights with XR SDK @@ -39,68 +49,34 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed invalid game view rendering when disabling all cameras in the scene (case 1105163) - Fixed infinite reload loop while displaying Light's Shadow's Link Light Layer in Inspector of Prefab Asset. - Fixed the cookie atlas size and planar atlas size being too big after an upgrade of the HDRP asset. -- Fix player build DX12 +- Fixed alpha clipping test (comparison was '>', now '>=') +- Fixed preview camera (eg. shader graph preview) when path tracing is on +- Fixed DXR player build - Fixed compilation issue with linux vulkan and raytrace shader - Fixed the HDRP asset migration code not being called after an upgrade of the package - Fixed draw renderers custom pass out of bound exception - Fixed an issue with emissive light meshes not being in the RAS. +- Fixed a warning due to StaticLightingSky when reloading domain in some cases. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. +- Fix an exception in case two LOD levels are using the same mesh renderer. - Fixed error in the console when switching shader to decal in the material UI. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) -- Fixed issue that prevented cubemap thumbnails from rendering. -- Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. -- Fix some typos in the debug menu. -- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. +- Fixed some typos in debug menu (case 1224594) - Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). -- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. - Light dimmer can now get values higher than one and was renamed to multiplier in the UI. - Removed info box requesting volume component for Visual Environment and updated the documentation with the relevant information. -- Removed legacy VR code - Add range-based clipping to box lights (case 1178780) - Improve area light culling (case 1085873) -- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. -- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. +- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. +- Utilities namespace is obsolete, moved its content to UnityEngine.Rendering (case 1204677) -## [8.0.0] - 2020-05-25 +## [7.2.0] - 2020-02-10 ### Added -- Ray tracing support for VR single-pass -- Added sharpen filter shader parameter and UI for TemporalAA to control image quality instead of hardcoded value -- Added frame settings option for custom post process and custom passes as well as custom color buffer format option. -- Add check in wizard on SRP Batcher enabled. -- Added default implementations of OnPreprocessMaterialDescription for FBX, Obj, Sketchup and 3DS file formats. -- Added custom pass fade radius -- Added after post process injection point for custom passes -- Added basic alpha compositing support - Alpha is available afterpostprocess when using FP16 buffer format. -- Added falloff distance on Reflection Probe and Planar Reflection Probe -- Added Backplate projection from the HDRISky -- Added Shadow Matte in UnlitMasterNode, which only received shadow without lighting -- Added hability to name LightLayers in HDRenderPipelineAsset -- Added a range compression factor for Reflection Probe and Planar Reflection Probe to avoid saturation of colors. -- Added path tracing support for directional, point and spot lights, as well as emission from Lit and Unlit. -- Added non temporal version of SSAO. -- Added more detailed ray tracing stats in the debug window -- Added Disc area light (bake only) -- Added a warning in the material UI to prevent transparent + subsurface-scattering combination. -- Added XR single-pass setting into HDRP asset -- Added a penumbra tint option for lights -- Added support for depth copy with XR SDK -- Added debug setting to Render Pipeline Debug Window to list the active XR views -- Added an option to filter the result of the volumetric lighting (off by default). -- Added a transmission multiplier for directional lights -- Added XR single-pass test mode to Render Pipeline Debug Window -- Added debug setting to Render Pipeline Window to list the active XR views -- Added a new refraction mode for the Lit shader (thin). Which is a box refraction with small thickness values -- Added the code to support Barn Doors for Area Lights based on a shaderconfig option. -- Added HDRPCameraBinder property binder for Visual Effect Graph -- Added "Celestial Body" controls to the Directional Light -- Added new parameters to the Physically Based Sky -- Added Reflections to the DXR Wizard - Added the possibility to have ray traced colored and semi-transparent shadows on directional lights. -- Added a check in the custom post process template to throw an error if the default shader is not found. - Exposed the debug overlay ratio in the debug menu. - Added a separate frame settings for tonemapping alongside color grading. - Added the receive fog option in the material UI for ShaderGraphs. @@ -109,7 +85,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added Contrast Adaptive Sharpen (CAS) Upscaling effect. - Added APIs to update probe settings at runtime. - Added documentation for the rayTracingSupported method in HDRP -- Added user-selectable format for the post processing passes. +- Added user-selectable format for the post processing passes. - Added support for alpha channel in some post-processing passes (DoF, TAA, Uber). - Added warnings in FrameSettings inspector when using DXR and atempting to use Asynchronous Execution. - Exposed Stencil bits that can be used by the user. @@ -122,7 +98,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added the alpha clip enabled toggle to the material UI for all HDRP shader graphs. - Added Material Samples to explain how to use the lit shader features - Added an initial implementation of ray traced sub surface scattering -- Added AssetPostprocessors and Shadergraphs to handle Arnold Standard Surface and 3DsMax Physical material import from FBX. +- Added AssetPostprocessors and Shadergraphs to handle Arnold Standard Surface and 3DsMax Physical material import from FBX. - Added support for Smoothness Fade start work when enabling ray traced reflections. - Added Contact shadow, Micro shadows and Screen space refraction API documentation. - Added script documentation for SSR, SSAO (ray tracing), GI, Light Cluster, RayTracingSettings, Ray Counters, etc. @@ -132,223 +108,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Update documentation of HDRISky-Backplate, precise how to have Ambient Occlusion on the Backplate -- Sorting, undo, labels, layout in the Lighting Explorer. -- Fixed sky settings and materials in Shader Graph Samples package -- Fix/workaround a probable graphics driver bug in the GTAO shader. -- Fixed Hair and PBR shader graphs double sided modes -- Fixed an issue where updating an HDRP asset in the Quality setting panel would not recreate the pipeline. -- Fixed issue with point lights being considered even when occupying less than a pixel on screen (case 1183196) -- Fix a potential NaN source with iridescence (case 1183216) -- Fixed issue of spotlight breaking when minimizing the cone angle via the gizmo (case 1178279) -- Fixed issue that caused decals not to modify the roughness in the normal buffer, causing SSR to not behave correctly (case 1178336) -- Fixed lit transparent refraction with XR single-pass rendering -- Removed extra jitter for TemporalAA in VR -- Fixed ShaderGraph time in main preview -- Fixed issue on some UI elements in HDRP asset not expanding when clicking the arrow (case 1178369) -- Fixed alpha blending in custom post process -- Fixed the modification of the _AlphaCutoff property in the material UI when exposed with a ShaderGraph parameter. -- Fixed HDRP test `1218_Lit_DiffusionProfiles` on Vulkan. -- Fixed an issue where building a player in non-dev mode would generate render target error logs every frame -- Fixed crash when upgrading version of HDRP -- Fixed rendering issues with material previews -- Fixed NPE when using light module in Shuriken particle systems (1173348). -- Refresh cached shadow on editor changes -- Fixed light supported units caching (1182266) -- Fixed an issue where SSAO (that needs temporal reprojection) was still being rendered when Motion Vectors were not available (case 1184998) -- Fixed a nullref when modifying the height parameters inside the layered lit shader UI. -- Fixed Decal gizmo that become white after exiting play mode -- Fixed Decal pivot position to behave like a spotlight -- Fixed an issue where using the LightingOverrideMask would break sky reflection for regular cameras -- Fix DebugMenu FrameSettingsHistory persistency on close -- Fix DensityVolume, ReflectionProbe aned PlanarReflectionProbe advancedControl display -- Fix DXR scene serialization in wizard -- Fixed an issue where Previews would reallocate History Buffers every frame -- Fixed the SetLightLayer function in HDAdditionalLightData setting the wrong light layer -- Fix error first time a preview is created for planar -- Fixed an issue where SSR would use an incorrect roughness value on ForwardOnly (StackLit, AxF, Fabric, etc.) materials when the pipeline is configured to also allow deferred Lit. -- Fixed issues with light explorer (cases 1183468, 1183269) -- Fix dot colors in LayeredLit material inspector -- Fix undo not resetting all value when undoing the material affectation in LayerLit material -- Fix for issue that caused gizmos to render in render textures (case 1174395) -- Fixed the light emissive mesh not updated when the light was disabled/enabled -- Fixed light and shadow layer sync when setting the HDAdditionalLightData.lightlayersMask property -- Fixed a nullref when a custom post process component that was in the HDRP PP list is removed from the project -- Fixed issue that prevented decals from modifying specular occlusion (case 1178272). -- Fixed exposure of volumetric reprojection -- Fixed multi selection support for Scalable Settings in lights -- Fixed font shaders in test projects for VR by using a Shader Graph version -- Fixed refresh of baked cubemap by incrementing updateCount at the end of the bake (case 1158677). -- Fixed issue with rectangular area light when seen from the back -- Fixed decals not affecting lightmap/lightprobe -- Fixed zBufferParams with XR single-pass rendering -- Fixed moving objects not rendered in custom passes -- Fixed abstract classes listed in the + menu of the custom pass list -- Fixed custom pass that was rendered in previews -- Fixed precision error in zero value normals when applying decals (case 1181639) -- Fixed issue that triggered No Scene Lighting view in game view as well (case 1156102) -- Assign default volume profile when creating a new HDRP Asset -- Fixed fov to 0 in planar probe breaking the projection matrix (case 1182014) -- Fixed bugs with shadow caching -- Reassign the same camera for a realtime probe face render request to have appropriate history buffer during realtime probe rendering. -- Fixed issue causing wrong shading when normal map mode is Object space, no normal map is set, but a detail map is present (case 1143352) -- Fixed issue with decal and htile optimization -- Fixed TerrainLit shader compilation error regarding `_Control0_TexelSize` redefinition (case 1178480). -- Fixed warning about duplicate HDRuntimeReflectionSystem when configuring play mode without domain reload. -- Fixed an editor crash when multiple decal projectors were selected and some had null material -- Added all relevant fix actions to FixAll button in Wizard -- Moved FixAll button on top of the Wizard -- Fixed an issue where fog color was not pre-exposed correctly -- Fix priority order when custom passes are overlapping -- Fix cleanup not called when the custom pass GameObject is destroyed -- Replaced most instances of GraphicsSettings.renderPipelineAsset by GraphicsSettings.currentRenderPipeline. This should fix some parameters not working on Quality Settings overrides. -- Fixed an issue with Realtime GI not working on upgraded projects. -- Fixed issue with screen space shadows fallback texture was not set as a texture array. -- Fixed Pyramid Lights bounding box -- Fixed terrain heightmap default/null values and epsilons -- Fixed custom post-processing effects breaking when an abstract class inherited from `CustomPostProcessVolumeComponent` -- Fixed XR single-pass rendering in Editor by using ShaderConfig.s_XrMaxViews to allocate matrix array -- Multiple different skies rendered at the same time by different cameras are now handled correctly without flickering -- Fixed flickering issue happening when different volumes have shadow settings and multiple cameras are present. -- Fixed issue causing planar probes to disappear if there is no light in the scene. -- Fixed a number of issues with the prefab isolation mode (Volumes leaking from the main scene and reflection not working properly) -- Fixed an issue with fog volume component upgrade not working properly -- Fixed Spot light Pyramid Shape has shadow artifacts on aspect ratio values lower than 1 -- Fixed issue with AO upsampling in XR -- Fixed camera without HDAdditionalCameraData component not rendering -- Removed the macro ENABLE_RAYTRACING for most of the ray tracing code -- Fixed prefab containing camera reloading in loop while selected in the Project view -- Fixed issue causing NaN wheh the Z scale of an object is set to 0. -- Fixed DXR shader passes attempting to render before pipeline loaded -- Fixed black ambient sky issue when importing a project after deleting Library. -- Fixed issue when upgrading a Standard transparent material (case 1186874) -- Fixed area light cookies not working properly with stack lit -- Fixed material render queue not updated when the shader is changed in the material inspector. -- Fixed a number of issues with full screen debug modes not reseting correctly when setting another mutually exclusive mode -- Fixed compile errors for platforms with no VR support -- Fixed an issue with volumetrics and RTHandle scaling (case 1155236) -- Fixed an issue where sky lighting might be updated uselessly -- Fixed issue preventing to allow setting decal material to none (case 1196129) -- Fixed XR multi-pass decals rendering -- Fixed several fields on Light Inspector that not supported Prefab overrides -- Fixed EOL for some files -- Fixed scene view rendering with volumetrics and XR enabled -- Fixed decals to work with multiple cameras -- Fixed optional clear of GBuffer (Was always on) -- Fixed render target clears with XR single-pass rendering -- Fixed HDRP samples file hierarchy -- Fixed Light units not matching light type -- Fixed QualitySettings panel not displaying HDRP Asset -- Fixed black reflection probes the first time loading a project -- Fixed y-flip in scene view with XR SDK -- Fixed Decal projectors do not immediately respond when parent object layer mask is changed in editor. -- Fixed y-flip in scene view with XR SDK -- Fixed a number of issues with Material Quality setting -- Fixed the transparent Cull Mode option in HD unlit master node settings only visible if double sided is ticked. -- Fixed an issue causing shadowed areas by contact shadows at the edge of far clip plane if contact shadow length is very close to far clip plane. -- Fixed editing a scalable settings will edit all loaded asset in memory instead of targetted asset. -- Fixed Planar reflection default viewer FOV -- Fixed flickering issues when moving the mouse in the editor with ray tracing on. -- Fixed the ShaderGraph main preview being black after switching to SSS in the master node settings -- Fixed custom fullscreen passes in VR -- Fixed camera culling masks not taken in account in custom pass volumes -- Fixed object not drawn in custom pass when using a DrawRenderers with an HDRP shader in a build. -- Fixed injection points for Custom Passes (AfterDepthAndNormal and BeforePreRefraction were missing) -- Fixed a enum to choose shader tags used for drawing objects (DepthPrepass or Forward) when there is no override material. -- Fixed lit objects in the BeforePreRefraction, BeforeTransparent and BeforePostProcess. -- Fixed the None option when binding custom pass render targets to allow binding only depth or color. -- Fixed custom pass buffers allocation so they are not allocated if they're not used. -- Fixed the Custom Pass entry in the volume create asset menu items. -- Fixed Prefab Overrides workflow on Camera. -- Fixed alignment issue in Preset for Camera. -- Fixed alignment issue in Physical part for Camera. -- Fixed FrameSettings multi-edition. -- Fixed a bug happening when denoising multiple ray traced light shadows -- Fixed minor naming issues in ShaderGraph settings -- VFX: Removed z-fight glitches that could appear when using deferred depth prepass and lit quad primitives -- VFX: Preserve specular option for lit outputs (matches HDRP lit shader) -- Fixed an issue with Metal Shader Compiler and GTAO shader for metal -- Fixed resources load issue while upgrading HDRP package. -- Fix LOD fade mask by accounting for field of view -- Fixed spot light missing from ray tracing indirect effects. -- Fixed a UI bug in the diffusion profile list after fixing them from the wizard. -- Fixed the hash collision when creating new diffusion profile assets. -- Fixed a light leaking issue with box light casting shadows (case 1184475) -- Fixed Cookie texture type in the cookie slot of lights (Now displays a warning because it is not supported). -- Fixed a nullref that happens when using the Shuriken particle light module -- Fixed alignment in Wizard -- Fixed text overflow in Wizard's helpbox -- Fixed Wizard button fix all that was not automatically grab all required fixes -- Fixed VR tab for MacOS in Wizard -- Fixed local config package workflow in Wizard -- Fixed issue with contact shadows shifting when MSAA is enabled. -- Fixed EV100 in the PBR sky -- Fixed an issue In URP where sometime the camera is not passed to the volume system and causes a null ref exception (case 1199388) -- Fixed nullref when releasing HDRP with custom pass disabled -- Fixed performance issue derived from copying stencil buffer. -- Fixed an editor freeze when importing a diffusion profile asset from a unity package. -- Fixed an exception when trying to reload a builtin resource. -- Fixed the light type intensity unit reset when switching the light type. -- Fixed compilation error related to define guards and CreateLayoutFromXrSdk() -- Fixed documentation link on CustomPassVolume. -- Fixed player build when HDRP is in the project but not assigned in the graphic settings. -- Fixed an issue where ambient probe would be black for the first face of a baked reflection probe -- VFX: Fixed Missing Reference to Visual Effect Graph Runtime Assembly -- Fixed an issue where rendering done by users in EndCameraRendering would be executed before the main render loop. -- Fixed Prefab Override in main scope of Volume. -- Fixed alignment issue in Presset of main scope of Volume. -- Fixed persistence of ShowChromeGizmo and moved it to toolbar for coherency in ReflectionProbe and PlanarReflectionProbe. -- Fixed Alignement issue in ReflectionProbe and PlanarReflectionProbe. -- Fixed Prefab override workflow issue in ReflectionProbe and PlanarReflectionProbe. -- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in ReflectionProbe and PlanarReflectionProbe. -- Fixed Prefab override workflow issue in DensityVolume. -- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in DensityVolume. -- Fix light limit counts specified on the HDRP asset -- Fixed Quality Settings for SSR, Contact Shadows and Ambient Occlusion volume components -- Fixed decalui deriving from hdshaderui instead of just shaderui -- Use DelayedIntField instead of IntField for scalable settings -- Fixed init of debug for FrameSettingsHistory on SceneView camera -- Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' -- Fix Wizard load when none selected for RenderPipelineAsset - Fixed TerrainLitGUI when per-pixel normal property is not present. -- Fixed rendering errors when enabling debug modes with custom passes -- Fix an issue that made PCSS dependent on Atlas resolution (not shadow map res) -- Fixing a bug whith histories when n>4 for ray traced shadows -- Fixing wrong behavior in ray traced shadows for mesh renderers if their cast shadow is shadow only or double sided -- Only tracing rays for shadow if the point is inside the code for spotlight shadows -- Only tracing rays if the point is inside the range for point lights -- Fixing ghosting issues when the screen space shadow indexes change for a light with ray traced shadows -- Fixed an issue with stencil management and Xbox One build that caused corrupted output in deferred mode. -- Fixed a mismatch in behavior between the culling of shadow maps and ray traced point and spot light shadows -- Fixed recursive ray tracing not working anymore after intermediate buffer refactor. -- Fixed ray traced shadow denoising not working (history rejected all the time). -- Fixed shader warning on xbox one -- Fixed cookies not working for spot lights in ray traced reflections, ray traced GI and recursive rendering -- Fixed an inverted handling of CoatSmoothness for SSR in StackLit. -- Fixed missing distortion inputs in Lit and Unlit material UI. -- Fixed issue that propagated NaNs across multiple frames through the exposure texture. -- Fixed issue with Exclude from TAA stencil ignored. -- Fixed ray traced reflection exposure issue. -- Fixed issue with TAA history not initialising corretly scale factor for first frame -- Fixed issue with stencil test of material classification not using the correct Mask (causing false positive and bad performance with forward material in deferred) -- Fixed issue with History not reset when chaning antialiasing mode on camera -- Fixed issue with volumetric data not being initialized if default settings have volumetric and reprojection off. -- Fixed ray tracing reflection denoiser not applied in tier 1 -- Fixed the vibility of ray tracing related methods. -- Fixed the diffusion profile list not saved when clicking the fix button in the material UI. -- Fixed crash when pushing bounce count higher than 1 for ray traced GI or reflections -- Fixed PCSS softness scale so that it better match ray traced reference for punctual lights. -- Fixed exposure management for the path tracer -- Fixed AxF material UI containing two advanced options settings. -- Fixed an issue where cached sky contexts were being destroyed wrongly, breaking lighting in the LookDev -- Fixed issue that clamped PCSS softness too early and not after distance scale. -- Fixed fog affect transparent on HD unlit master node -- Fixed custom post processes re-ordering not saved. -- Fixed NPE when using scalable settings -- Fixed an issue where PBR sky precomputation was reset incorrectly in some cases causing bad performance. - Fixed a bug due to depth history begin overriden too soon -- Fixed CustomPassSampleCameraColor scale issue when called from Before Transparent injection point. -- Fixed corruption of AO in baked probes. -- Fixed issue with upgrade of projects that still had Very High as shadow filtering quality. - Fixed issue that caused Distortion UI to appear in Lit. - Fixed several issues with decal duplicating when editing them. - Fixed initialization of volumetric buffer params (1204159) @@ -384,7 +145,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shader warning in AO code. - Fixed a warning in simpledenoiser.compute - Fixed tube and rectangle light culling to use their shape instead of their range as a bounding box. -- Fixed caused by using gather on a UINT texture in motion blur. +- Fixed caused by using gather on a UINT texture in motion blur. - Fix issue with ambient occlusion breaking when dynamic resolution is active. - Fixed some possible NaN causes in Depth of Field. - Fixed Custom Pass nullref due to the new Profiling Sample API changes @@ -467,48 +228,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with MipRatio debug mode showing _DebugMatCapTexture not being set. - Fixed missing initialization of input params in Blit for VR. - Fix Inf source in LTC for area lights. -- Fixed alpha clipping test (comparison was '>', now '>=') -- Fixed preview camera (eg. shader graph preview) when path tracing is on -- Fixed issue with unclear naming of debug menu for decals. ### Changed -- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled -- Rename Emission Radius to Radius in UI in Point, Spot -- Angular Diameter parameter for directional light is no longuer an advanced property -- DXR: Remove Light Radius and Angular Diamater of Raytrace shadow. Angular Diameter and Radius are used instead. -- Remove MaxSmoothness parameters from UI for point, spot and directional light. The MaxSmoothness is now deduce from Radius Parameters -- DXR: Remove the Ray Tracing Environement Component. Add a Layer Mask to the ray Tracing volume components to define which objects are taken into account for each effect. -- Removed second cubemaps used for shadowing in lookdev -- Disable Physically Based Sky below ground -- Increase max limit of area light and reflection probe to 128 -- Change default texture for detailmap to grey -- Optimize Shadow RT load on Tile based architecture platforms. -- Improved quality of SSAO. -- Moved RequestShadowMapRendering() back to public API. -- Update HDRP DXR Wizard with an option to automatically clone the hdrp config package and setup raytracing to 1 in shaders file. -- Added SceneSelection pass for TerrainLit shader. -- Simplified Light's type API regrouping the logic in one place (Check type in HDAdditionalLightData) -- The support of LOD CrossFade (Dithering transition) in master nodes now required to enable it in the master node settings (Save variant) -- Improved shadow bias, by removing constant depth bias and substituting it with slope-scale bias. -- Fix the default stencil values when a material is created from a SSS ShaderGraph. -- Tweak test asset to be compatible with XR: unlit SG material for canvas and double-side font material -- Slightly tweaked the behaviour of bloom when resolution is low to reduce artifacts. -- Hidden fields in Light Inspector that is not relevant while in BakingOnly mode. -- Changed parametrization of PCSS, now softness is derived from angular diameter (for directional lights) or shape radius (for point/spot lights) and min filter size is now in the [0..1] range. -- Moved the copy of the geometry history buffers to right after the depth mip chain generation. -- Rename "Luminance" to "Nits" in UX for physical light unit -- Rename FrameSettings "SkyLighting" to "SkyReflection" -- Reworked XR automated tests -- The ray traced screen space shadow history for directional, spot and point lights is discarded if the light transform has changed. -- Changed the behavior for ray tracing in case a mesh renderer has both transparent and opaque submeshes. -- Improve history buffer management -- Replaced PlayerSettings.virtualRealitySupported with XRGraphics.tryEnable. -- Remove redundant FrameSettings RealTimePlanarReflection -- Improved a bit the GC calls generated during the rendering. -- Material update is now only triggered when the relevant settings are touched in the shader graph master nodes -- Changed the way Sky Intensity (on Sky volume components) is handled. It's now a combo box where users can choose between Exposure, Multiplier or Lux (for HDRI sky only) instead of both multiplier and exposure being applied all the time. Added a new menu item to convert old profiles. -- Change how method for specular occlusions is decided on inspector shader (Lit, LitTesselation, LayeredLit, LayeredLitTessellation) -- Unlocked SSS, SSR, Motion Vectors and Distortion frame settings for reflections probes. - Hide unused LOD settings in Quality Settings legacy window. - Reduced the constrained distance for temporal reprojection of ray tracing denoising - Removed shadow near plane from the Directional Light Shadow UI. @@ -556,6 +277,342 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Moved BeginCameraRendering callback right before culling. - Changed the visibility of the Indirect Lighting Controller component to public. +## [7.1.8] - 2020-01-20 + +### Fixed +- Fixed white and dark flashes on scenes with very high or very low exposure when Automatic Exposure is being used. +- Fixed memory leak in Sky when in matcap mode. + +### Changed +- On Xbox and PS4 you will also need to download the com.unity.render-pipeline.platform (ps4 or xboxone) package from the appropriate platform developer forum + +## [7.1.7] - 2019-12-11 + +### Added +- Added a check in the custom post process template to throw an error if the default shader is not found. + +### Fixed +- Fixed rendering errors when enabling debug modes with custom passes +- Fix an issue that made PCSS dependent on Atlas resolution (not shadow map res) +- Fixing a bug whith histories when n>4 for ray traced shadows +- Fixing wrong behavior in ray traced shadows for mesh renderers if their cast shadow is shadow only or double sided +- Only tracing rays for shadow if the point is inside the code for spotlight shadows +- Only tracing rays if the point is inside the range for point lights +- Fixing ghosting issues when the screen space shadow indexes change for a light with ray traced shadows +- Fixed an issue with stencil management and Xbox One build that caused corrupted output in deferred mode. +- Fixed a mismatch in behavior between the culling of shadow maps and ray traced point and spot light shadows +- Fixed recursive ray tracing not working anymore after intermediate buffer refactor. +- Fixed ray traced shadow denoising not working (history rejected all the time). +- Fixed shader warning on xbox one +- Fixed cookies not working for spot lights in ray traced reflections, ray traced GI and recursive rendering +- Fixed an inverted handling of CoatSmoothness for SSR in StackLit. +- Fixed missing distortion inputs in Lit and Unlit material UI. +- Fixed issue that propagated NaNs across multiple frames through the exposure texture. +- Fixed issue with Exclude from TAA stencil ignored. +- Fixed ray traced reflection exposure issue. +- Fixed issue with TAA history not initialising corretly scale factor for first frame +- Fixed issue with stencil test of material classification not using the correct Mask (causing false positive and bad performance with forward material in deferred) +- Fixed issue with History not reset when chaning antialiasing mode on camera +- Fixed issue with volumetric data not being initialized if default settings have volumetric and reprojection off. +- Fixed ray tracing reflection denoiser not applied in tier 1 +- Fixed the vibility of ray tracing related methods. +- Fixed the diffusion profile list not saved when clicking the fix button in the material UI. +- Fixed crash when pushing bounce count higher than 1 for ray traced GI or reflections +- Fixed PCSS softness scale so that it better match ray traced reference for punctual lights. +- Fixed exposure management for the path tracer +- Fixed AxF material UI containing two advanced options settings. +- Fixed an issue where cached sky contexts were being destroyed wrongly, breaking lighting in the LookDev +- Fixed issue that clamped PCSS softness too early and not after distance scale. +- Fixed fog affect transparent on HD unlit master node +- Fixed custom post processes re-ordering not saved. +- Fixed NPE when using scalable settings +- Fixed an issue where PBR sky precomputation was reset incorrectly in some cases causing bad performance. +- Fixed a bug in dxr due to depth history begin overriden too soon +- Fixed CustomPassSampleCameraColor scale issue when called from Before Transparent injection point. +- Fixed corruption of AO in baked probes. +- Fixed issue with upgrade of projects that still had Very High as shadow filtering quality. +- Removed shadow near plane from the Directional Light Shadow UI. +- Fixed performance issue with performances of custom pass culling. + +## [7.1.6] - 2019-11-22 + +### Added +- Added Backplate projection from the HDRISky +- Added Shadow Matte in UnlitMasterNode, which only received shadow without lighting +- Added support for depth copy with XR SDK +- Added debug setting to Render Pipeline Debug Window to list the active XR views +- Added an option to filter the result of the volumetric lighting (off by default). +- Added a transmission multiplier for directional lights +- Added XR single-pass test mode to Render Pipeline Debug Window +- Added debug setting to Render Pipeline Window to list the active XR views +- Added a new refraction mode for the Lit shader (thin). Which is a box refraction with small thickness values +- Added the code to support Barn Doors for Area Lights based on a shaderconfig option. +- Added HDRPCameraBinder property binder for Visual Effect Graph +- Added "Celestial Body" controls to the Directional Light +- Added new parameters to the Physically Based Sky +- Added Reflections to the DXR Wizard + +### Fixed +- Fixed y-flip in scene view with XR SDK +- Fixed Decal projectors do not immediately respond when parent object layer mask is changed in editor. +- Fixed y-flip in scene view with XR SDK +- Fixed a number of issues with Material Quality setting +- Fixed the transparent Cull Mode option in HD unlit master node settings only visible if double sided is ticked. +- Fixed an issue causing shadowed areas by contact shadows at the edge of far clip plane if contact shadow length is very close to far clip plane. +- Fixed editing a scalable settings will edit all loaded asset in memory instead of targetted asset. +- Fixed Planar reflection default viewer FOV +- Fixed flickering issues when moving the mouse in the editor with ray tracing on. +- Fixed the ShaderGraph main preview being black after switching to SSS in the master node settings +- Fixed custom fullscreen passes in VR +- Fixed camera culling masks not taken in account in custom pass volumes +- Fixed object not drawn in custom pass when using a DrawRenderers with an HDRP shader in a build. +- Fixed injection points for Custom Passes (AfterDepthAndNormal and BeforePreRefraction were missing) +- Fixed a enum to choose shader tags used for drawing objects (DepthPrepass or Forward) when there is no override material. +- Fixed lit objects in the BeforePreRefraction, BeforeTransparent and BeforePostProcess. +- Fixed the None option when binding custom pass render targets to allow binding only depth or color. +- Fixed custom pass buffers allocation so they are not allocated if they're not used. +- Fixed the Custom Pass entry in the volume create asset menu items. +- Fixed Prefab Overrides workflow on Camera. +- Fixed alignment issue in Preset for Camera. +- Fixed alignment issue in Physical part for Camera. +- Fixed FrameSettings multi-edition. +- Fixed a bug happening when denoising multiple ray traced light shadows +- Fixed minor naming issues in ShaderGraph settings +- Fixed an issue with Metal Shader Compiler and GTAO shader for metal +- Fixed resources load issue while upgrading HDRP package. +- Fixed LOD fade mask by accounting for field of view +- Fixed spot light missing from ray tracing indirect effects. +- Fixed a UI bug in the diffusion profile list after fixing them from the wizard. +- Fixed the hash collision when creating new diffusion profile assets. +- Fixed a light leaking issue with box light casting shadows (case 1184475) +- Fixed Cookie texture type in the cookie slot of lights (Now displays a warning because it is not supported). +- Fixed a nullref that happens when using the Shuriken particle light module +- Fixed alignment in Wizard +- Fixed text overflow in Wizard's helpbox +- Fixed Wizard button fix all that was not automatically grab all required fixes +- Fixed VR tab for MacOS in Wizard +- Fixed local config package workflow in Wizard +- Fixed issue with contact shadows shifting when MSAA is enabled. +- Fixed EV100 in the PBR sky +- Fixed an issue In URP where sometime the camera is not passed to the volume system and causes a null ref exception (case 1199388) +- Fixed nullref when releasing HDRP with custom pass disabled +- Fixed performance issue derived from copying stencil buffer. +- Fixed an editor freeze when importing a diffusion profile asset from a unity package. +- Fixed an exception when trying to reload a builtin resource. +- Fixed the light type intensity unit reset when switching the light type. +- Fixed compilation error related to define guards and CreateLayoutFromXrSdk() +- Fixed documentation link on CustomPassVolume. +- Fixed player build when HDRP is in the project but not assigned in the graphic settings. +- Fixed an issue where ambient probe would be black for the first face of a baked reflection probe +- VFX: Fixed Missing Reference to Visual Effect Graph Runtime Assembly +- Fixed an issue where rendering done by users in EndCameraRendering would be executed before the main render loop. +- Fixed Prefab Override in main scope of Volume. +- Fixed alignment issue in Presset of main scope of Volume. +- Fixed persistence of ShowChromeGizmo and moved it to toolbar for coherency in ReflectionProbe and PlanarReflectionProbe. +- Fixed Alignement issue in ReflectionProbe and PlanarReflectionProbe. +- Fixed Prefab override workflow issue in ReflectionProbe and PlanarReflectionProbe. +- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in ReflectionProbe and PlanarReflectionProbe. +- Fixed Prefab override workflow issue in DensityVolume. +- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in DensityVolume. +- Fix light limit counts specified on the HDRP asset +- Fixed Quality Settings for SSR, Contact Shadows and Ambient Occlusion volume components +- Fixed decalui deriving from hdshaderui instead of just shaderui +- Use DelayedIntField instead of IntField for scalable settings + +### Changed +- Reworked XR automated tests +- The ray traced screen space shadow history for directional, spot and point lights is discarded if the light transform has changed. +- Changed the behavior for ray tracing in case a mesh renderer has both transparent and opaque submeshes. +- Improve history buffer management +- Replaced PlayerSettings.virtualRealitySupported with XRGraphics.tryEnable. +- Remove redundant FrameSettings RealTimePlanarReflection +- Improved a bit the GC calls generated during the rendering. +- Material update is now only triggered when the relevant settings are touched in the shader graph master nodes +- Changed the way Sky Intensity (on Sky volume components) is handled. It's now a combo box where users can choose between Exposure, Multiplier or Lux (for HDRI sky only) instead of both multiplier and exposure being applied all the time. Added a new menu item to convert old profiles. +- Change how method for specular occlusions is decided on inspector shader (Lit, LitTesselation, LayeredLit, LayeredLitTessellation) +- Unlocked SSS, SSR, Motion Vectors and Distortion frame settings for reflections probes. + +## [7.1.5] - 2019-11-15 + +### Fixed +- Fixed black reflection probes the first time loading a project + +## [7.1.4] - 2019-11-13 + +### Added +- Added XR single-pass setting into HDRP asset +- Added a penumbra tint option for lights + +### Fixed +- Fixed EOL for some files +- Fixed scene view rendering with volumetrics and XR enabled +- Fixed decals to work with multiple cameras +- Fixed optional clear of GBuffer (Was always on) +- Fixed render target clears with XR single-pass rendering +- Fixed HDRP samples file hierarchy +- Fixed Light units not matching light type +- Fixed QualitySettings panel not displaying HDRP Asset + +### Changed +- Changed parametrization of PCSS, now softness is derived from angular diameter (for directional lights) or shape radius (for point/spot lights) and min filter size is now in the [0..1] range. +- Moved the copy of the geometry history buffers to right after the depth mip chain generation. +- Rename "Luminance" to "Nits" in UX for physical light unit +- Rename FrameSettings "SkyLighting" to "SkyReflection" + +## [7.1.3] - 2019-11-04 + +### Added +- Ray tracing support for VR single-pass +- Added sharpen filter shader parameter and UI for TemporalAA to control image quality instead of hardcoded value +- Added frame settings option for custom post process and custom passes as well as custom color buffer format option. +- Add check in wizard on SRP Batcher enabled. +- Added default implementations of OnPreprocessMaterialDescription for FBX, Obj, Sketchup and 3DS file formats. +- Added custom pass fade radius +- Added after post process injection point for custom passes +- Added basic alpha compositing support - Alpha is available afterpostprocess when using FP16 buffer format. +- Added falloff distance on Reflection Probe and Planar Reflection Probe +- Added hability to name LightLayers in HDRenderPipelineAsset +- Added a range compression factor for Reflection Probe and Planar Reflection Probe to avoid saturation of colors. +- Added path tracing support for directional, point and spot lights, as well as emission from Lit and Unlit. +- Added non temporal version of SSAO. +- Added more detailed ray tracing stats in the debug window +- Added Disc area light (bake only) +- Added a warning in the material UI to prevent transparent + subsurface-scattering combination. + +### Fixed +- Sorting, undo, labels, layout in the Lighting Explorer. +- Fixed sky settings and materials in Shader Graph Samples package +- Fixed light supported units caching (1182266) +- Fixed an issue where SSAO (that needs temporal reprojection) was still being rendered when Motion Vectors were not available (case 1184998) +- Fixed a nullref when modifying the height parameters inside the layered lit shader UI. +- Fixed Decal gizmo that become white after exiting play mode +- Fixed Decal pivot position to behave like a spotlight +- Fixed an issue where using the LightingOverrideMask would break sky reflection for regular cameras +- Fix DebugMenu FrameSettingsHistory persistency on close +- Fix DensityVolume, ReflectionProbe aned PlanarReflectionProbe advancedControl display +- Fix DXR scene serialization in wizard +- Fixed an issue where Previews would reallocate History Buffers every frame +- Fixed the SetLightLayer function in HDAdditionalLightData setting the wrong light layer +- Fix error first time a preview is created for planar +- Fixed an issue where SSR would use an incorrect roughness value on ForwardOnly (StackLit, AxF, Fabric, etc.) materials when the pipeline is configured to also allow deferred Lit. +- Fixed issues with light explorer (cases 1183468, 1183269) +- Fix dot colors in LayeredLit material inspector +- Fix undo not resetting all value when undoing the material affectation in LayerLit material +- Fix for issue that caused gizmos to render in render textures (case 1174395) +- Fixed the light emissive mesh not updated when the light was disabled/enabled +- Fixed light and shadow layer sync when setting the HDAdditionalLightData.lightlayersMask property +- Fixed a nullref when a custom post process component that was in the HDRP PP list is removed from the project +- Fixed issue that prevented decals from modifying specular occlusion (case 1178272). +- Fixed exposure of volumetric reprojection +- Fixed multi selection support for Scalable Settings in lights +- Fixed font shaders in test projects for VR by using a Shader Graph version +- Fixed refresh of baked cubemap by incrementing updateCount at the end of the bake (case 1158677). +- Fixed issue with rectangular area light when seen from the back +- Fixed decals not affecting lightmap/lightprobe +- Fixed zBufferParams with XR single-pass rendering +- Fixed moving objects not rendered in custom passes +- Fixed abstract classes listed in the + menu of the custom pass list +- Fixed custom pass that was rendered in previews +- Fixed precision error in zero value normals when applying decals (case 1181639) +- Fixed issue that triggered No Scene Lighting view in game view as well (case 1156102) +- Assign default volume profile when creating a new HDRP Asset +- Fixed fov to 0 in planar probe breaking the projection matrix (case 1182014) +- Fixed bugs with shadow caching +- Reassign the same camera for a realtime probe face render request to have appropriate history buffer during realtime probe rendering. +- Fixed issue causing wrong shading when normal map mode is Object space, no normal map is set, but a detail map is present (case 1143352) +- Fixed issue with decal and htile optimization +- Fixed TerrainLit shader compilation error regarding `_Control0_TexelSize` redefinition (case 1178480). +- Fixed warning about duplicate HDRuntimeReflectionSystem when configuring play mode without domain reload. +- Fixed an editor crash when multiple decal projectors were selected and some had null material +- Added all relevant fix actions to FixAll button in Wizard +- Moved FixAll button on top of the Wizard +- Fixed an issue where fog color was not pre-exposed correctly +- Fix priority order when custom passes are overlapping +- Fix cleanup not called when the custom pass GameObject is destroyed +- Replaced most instances of GraphicsSettings.renderPipelineAsset by GraphicsSettings.currentRenderPipeline. This should fix some parameters not working on Quality Settings overrides. +- Fixed an issue with Realtime GI not working on upgraded projects. +- Fixed issue with screen space shadows fallback texture was not set as a texture array. +- Fixed Pyramid Lights bounding box +- Fixed terrain heightmap default/null values and epsilons +- Fixed custom post-processing effects breaking when an abstract class inherited from `CustomPostProcessVolumeComponent` +- Fixed XR single-pass rendering in Editor by using ShaderConfig.s_XrMaxViews to allocate matrix array +- Multiple different skies rendered at the same time by different cameras are now handled correctly without flickering +- Fixed flickering issue happening when different volumes have shadow settings and multiple cameras are present. +- Fixed issue causing planar probes to disappear if there is no light in the scene. +- Fixed a number of issues with the prefab isolation mode (Volumes leaking from the main scene and reflection not working properly) +- Fixed an issue with fog volume component upgrade not working properly +- Fixed Spot light Pyramid Shape has shadow artifacts on aspect ratio values lower than 1 +- Fixed issue with AO upsampling in XR +- Fixed camera without HDAdditionalCameraData component not rendering +- Removed the macro ENABLE_RAYTRACING for most of the ray tracing code +- Fixed prefab containing camera reloading in loop while selected in the Project view +- Fixed issue causing NaN wheh the Z scale of an object is set to 0. +- Fixed DXR shader passes attempting to render before pipeline loaded +- Fixed black ambient sky issue when importing a project after deleting Library. +- Fixed issue when upgrading a Standard transparent material (case 1186874) +- Fixed area light cookies not working properly with stack lit +- Fixed material render queue not updated when the shader is changed in the material inspector. +- Fixed a number of issues with full screen debug modes not reseting correctly when setting another mutually exclusive mode +- Fixed compile errors for platforms with no VR support +- Fixed an issue with volumetrics and RTHandle scaling (case 1155236) +- Fixed an issue where sky lighting might be updated uselessly +- Fixed issue preventing to allow setting decal material to none (case 1196129) +- Fixed XR multi-pass decals rendering +- Fixed several fields on Light Inspector that not supported Prefab overrides +- VFX: Removed z-fight glitches that could appear when using deferred depth prepass and lit quad primitives +- VFX: Preserve specular option for lit outputs (matches HDRP lit shader) +- Fixed init of debug for FrameSettingsHistory on SceneView camera +- Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' +- Fix Wizard load when none selected for RenderPipelineAsset +- Fixed issue with unclear naming of debug menu for decals. + +### Changed +- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled +- Rename Emission Radius to Radius in UI in Point, Spot +- Angular Diameter parameter for directional light is no longuer an advanced property +- DXR: Remove Light Radius and Angular Diamater of Raytrace shadow. Angular Diameter and Radius are used instead. +- Remove MaxSmoothness parameters from UI for point, spot and directional light. The MaxSmoothness is now deduce from Radius Parameters +- DXR: Remove the Ray Tracing Environement Component. Add a Layer Mask to the ray Tracing volume components to define which objects are taken into account for each effect. +- Removed second cubemaps used for shadowing in lookdev +- Disable Physically Based Sky below ground +- Increase max limit of area light and reflection probe to 128 +- Change default texture for detailmap to grey +- Optimize Shadow RT load on Tile based architecture platforms. +- Improved quality of SSAO. +- Moved RequestShadowMapRendering() back to public API. +- Update HDRP DXR Wizard with an option to automatically clone the hdrp config package and setup raytracing to 1 in shaders file. +- Added SceneSelection pass for TerrainLit shader. +- Simplified Light's type API regrouping the logic in one place (Check type in HDAdditionalLightData) +- The support of LOD CrossFade (Dithering transition) in master nodes now required to enable it in the master node settings (Save variant) +- Improved shadow bias, by removing constant depth bias and substituting it with slope-scale bias. +- Fix the default stencil values when a material is created from a SSS ShaderGraph. +- Tweak test asset to be compatible with XR: unlit SG material for canvas and double-side font material +- Slightly tweaked the behaviour of bloom when resolution is low to reduce artifacts. +- Hidden fields in Light Inspector that is not relevant while in BakingOnly mode. + +## [7.1.2] - 2019-09-19 + +### Fixed +- Fix/workaround a probable graphics driver bug in the GTAO shader. +- Fixed Hair and PBR shader graphs double sided modes +- Fixed an issue where updating an HDRP asset in the Quality setting panel would not recreate the pipeline. +- Fixed issue with point lights being considered even when occupying less than a pixel on screen (case 1183196) +- Fix a potential NaN source with iridescence (case 1183216) +- Fixed issue of spotlight breaking when minimizing the cone angle via the gizmo (case 1178279) +- Fixed issue that caused decals not to modify the roughness in the normal buffer, causing SSR to not behave correctly (case 1178336) +- Fixed lit transparent refraction with XR single-pass rendering +- Removed extra jitter for TemporalAA in VR +- Fixed ShaderGraph time in main preview +- Fixed issue on some UI elements in HDRP asset not expanding when clicking the arrow (case 1178369) +- Fixed alpha blending in custom post process +- Fixed the modification of the _AlphaCutoff property in the material UI when exposed with a ShaderGraph parameter. +- Fixed HDRP test `1218_Lit_DiffusionProfiles` on Vulkan. +- Fixed an issue where building a player in non-dev mode would generate render target error logs every frame +- Fixed crash when upgrading version of HDRP +- Fixed rendering issues with material previews +- Fixed NPE when using light module in Shuriken particle systems (1173348). +- Refresh cached shadow on editor changes + ## [7.1.1] - 2019-09-05 ### Added 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 bd41dd2e4e1..51409175f00 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -2,7 +2,6 @@ using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; using System.Text; -using Utilities; using UnityEngine.Experimental.Rendering; using static UnityEngine.Rendering.HighDefinition.RenderPipelineSettings; diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs index 3a5972baca5..6901660a3c6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs @@ -1,8 +1,7 @@ using System; using UnityEngine; using UnityEngine.Rendering.HighDefinition; -using UnityEditor.Rendering; -using Utilities; +using UnityEngine.Rendering; namespace UnityEditor.Rendering.HighDefinition { 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 6dad9dea362..2ec922ed688 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 @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Utilities; using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering.RenderGraphModule; 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 57fb32f0858..20d58b31824 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -6,7 +6,6 @@ using UnityEngine.Experimental.GlobalIllumination; using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering.RenderGraphModule; -using Utilities; namespace UnityEngine.Rendering.HighDefinition { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index d40e6bbfb3d..de83731a0eb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using UnityEngine.Serialization; -using Utilities; namespace UnityEngine.Rendering.HighDefinition { 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 1bad98da64e..774bc661c16 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 @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Reflection; using System.Linq; -using Utilities; namespace UnityEngine.Rendering.HighDefinition { From bb430d67e052f8b5db6f84723eab2ee522493351 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Thu, 19 Mar 2020 14:32:20 +0000 Subject: [PATCH 028/200] Fix issue on thumbnail generation so that no error on new project and thumbnail are generated at first import #6265 --- .../CHANGELOG.md | 724 ++++++++---------- .../Lighting/Reflection/HDCubemapInspector.cs | 55 +- .../Runtime/RenderPipeline/Utility/HDUtils.cs | 36 + 3 files changed, 416 insertions(+), 399 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 417d14fe290..61a5e0d706f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -6,26 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -### Added -- Add XR setting to control camera jitter for temporal effects #6259 - -### Fixed -- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. - -### Changed -- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. -- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. - -## [7.3.0] - 2020-03-11 - ### Added - Added the exposure sliders to the planar reflection probe preview - Added a warning and workaround instructions that appear when you enable XR single-pass after the first frame with the XR SDK. - Added an "enable" toggle to the SSR volume component. +- Added support of cookie baking and add support on Disc light. +- Added XR setting to control camera jitter for temporal effects ### Fixed +- Fix Changelog - Fixed issue with AssetPostprocessors dependencies causing models to be imported twice when upgrading the package version. -- Fix player build DX12 - Fix issue with AO being misaligned when multiple view are visible. - Fix issue that caused the clamp of camera rotation motion for motion blur to be ineffective. - Fixed culling of lights with XR SDK @@ -49,34 +39,69 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed invalid game view rendering when disabling all cameras in the scene (case 1105163) - Fixed infinite reload loop while displaying Light's Shadow's Link Light Layer in Inspector of Prefab Asset. - Fixed the cookie atlas size and planar atlas size being too big after an upgrade of the HDRP asset. -- Fixed alpha clipping test (comparison was '>', now '>=') -- Fixed preview camera (eg. shader graph preview) when path tracing is on -- Fixed DXR player build +- Fix player build DX12 - Fixed compilation issue with linux vulkan and raytrace shader - Fixed the HDRP asset migration code not being called after an upgrade of the package - Fixed draw renderers custom pass out of bound exception - Fixed an issue with emissive light meshes not being in the RAS. -- Fixed a warning due to StaticLightingSky when reloading domain in some cases. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. -- Fix an exception in case two LOD levels are using the same mesh renderer. - Fixed error in the console when switching shader to decal in the material UI. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) -- Fixed some typos in debug menu (case 1224594) +- Fixed issue that prevented cubemap thumbnails from rendering. +- Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. +- Fix some typos in the debug menu. +- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. - Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). +- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. +- Fixed cubemap thumbnail generation at project load time. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. - Light dimmer can now get values higher than one and was renamed to multiplier in the UI. - Removed info box requesting volume component for Visual Environment and updated the documentation with the relevant information. +- Removed legacy VR code - Add range-based clipping to box lights (case 1178780) - Improve area light culling (case 1085873) -- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. -- Utilities namespace is obsolete, moved its content to UnityEngine.Rendering (case 1204677) +- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. +- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. -## [7.2.0] - 2020-02-10 +## [8.0.0] - 2020-05-25 ### Added +- Ray tracing support for VR single-pass +- Added sharpen filter shader parameter and UI for TemporalAA to control image quality instead of hardcoded value +- Added frame settings option for custom post process and custom passes as well as custom color buffer format option. +- Add check in wizard on SRP Batcher enabled. +- Added default implementations of OnPreprocessMaterialDescription for FBX, Obj, Sketchup and 3DS file formats. +- Added custom pass fade radius +- Added after post process injection point for custom passes +- Added basic alpha compositing support - Alpha is available afterpostprocess when using FP16 buffer format. +- Added falloff distance on Reflection Probe and Planar Reflection Probe +- Added Backplate projection from the HDRISky +- Added Shadow Matte in UnlitMasterNode, which only received shadow without lighting +- Added hability to name LightLayers in HDRenderPipelineAsset +- Added a range compression factor for Reflection Probe and Planar Reflection Probe to avoid saturation of colors. +- Added path tracing support for directional, point and spot lights, as well as emission from Lit and Unlit. +- Added non temporal version of SSAO. +- Added more detailed ray tracing stats in the debug window +- Added Disc area light (bake only) +- Added a warning in the material UI to prevent transparent + subsurface-scattering combination. +- Added XR single-pass setting into HDRP asset +- Added a penumbra tint option for lights +- Added support for depth copy with XR SDK +- Added debug setting to Render Pipeline Debug Window to list the active XR views +- Added an option to filter the result of the volumetric lighting (off by default). +- Added a transmission multiplier for directional lights +- Added XR single-pass test mode to Render Pipeline Debug Window +- Added debug setting to Render Pipeline Window to list the active XR views +- Added a new refraction mode for the Lit shader (thin). Which is a box refraction with small thickness values +- Added the code to support Barn Doors for Area Lights based on a shaderconfig option. +- Added HDRPCameraBinder property binder for Visual Effect Graph +- Added "Celestial Body" controls to the Directional Light +- Added new parameters to the Physically Based Sky +- Added Reflections to the DXR Wizard - Added the possibility to have ray traced colored and semi-transparent shadows on directional lights. +- Added a check in the custom post process template to throw an error if the default shader is not found. - Exposed the debug overlay ratio in the debug menu. - Added a separate frame settings for tonemapping alongside color grading. - Added the receive fog option in the material UI for ShaderGraphs. @@ -85,7 +110,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added Contrast Adaptive Sharpen (CAS) Upscaling effect. - Added APIs to update probe settings at runtime. - Added documentation for the rayTracingSupported method in HDRP -- Added user-selectable format for the post processing passes. +- Added user-selectable format for the post processing passes. - Added support for alpha channel in some post-processing passes (DoF, TAA, Uber). - Added warnings in FrameSettings inspector when using DXR and atempting to use Asynchronous Execution. - Exposed Stencil bits that can be used by the user. @@ -98,7 +123,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added the alpha clip enabled toggle to the material UI for all HDRP shader graphs. - Added Material Samples to explain how to use the lit shader features - Added an initial implementation of ray traced sub surface scattering -- Added AssetPostprocessors and Shadergraphs to handle Arnold Standard Surface and 3DsMax Physical material import from FBX. +- Added AssetPostprocessors and Shadergraphs to handle Arnold Standard Surface and 3DsMax Physical material import from FBX. - Added support for Smoothness Fade start work when enabling ray traced reflections. - Added Contact shadow, Micro shadows and Screen space refraction API documentation. - Added script documentation for SSR, SSAO (ray tracing), GI, Light Cluster, RayTracingSettings, Ray Counters, etc. @@ -108,36 +133,251 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Update documentation of HDRISky-Backplate, precise how to have Ambient Occlusion on the Backplate +- Sorting, undo, labels, layout in the Lighting Explorer. +- Fixed sky settings and materials in Shader Graph Samples package +- Fix/workaround a probable graphics driver bug in the GTAO shader. +- Fixed Hair and PBR shader graphs double sided modes +- Fixed an issue where updating an HDRP asset in the Quality setting panel would not recreate the pipeline. +- Fixed issue with point lights being considered even when occupying less than a pixel on screen (case 1183196) +- Fix a potential NaN source with iridescence (case 1183216) +- Fixed issue of spotlight breaking when minimizing the cone angle via the gizmo (case 1178279) +- Fixed issue that caused decals not to modify the roughness in the normal buffer, causing SSR to not behave correctly (case 1178336) +- Fixed lit transparent refraction with XR single-pass rendering +- Removed extra jitter for TemporalAA in VR +- Fixed ShaderGraph time in main preview +- Fixed issue on some UI elements in HDRP asset not expanding when clicking the arrow (case 1178369) +- Fixed alpha blending in custom post process +- Fixed the modification of the _AlphaCutoff property in the material UI when exposed with a ShaderGraph parameter. +- Fixed HDRP test `1218_Lit_DiffusionProfiles` on Vulkan. +- Fixed an issue where building a player in non-dev mode would generate render target error logs every frame +- Fixed crash when upgrading version of HDRP +- Fixed rendering issues with material previews +- Fixed NPE when using light module in Shuriken particle systems (1173348). +- Refresh cached shadow on editor changes +- Fixed light supported units caching (1182266) +- Fixed an issue where SSAO (that needs temporal reprojection) was still being rendered when Motion Vectors were not available (case 1184998) +- Fixed a nullref when modifying the height parameters inside the layered lit shader UI. +- Fixed Decal gizmo that become white after exiting play mode +- Fixed Decal pivot position to behave like a spotlight +- Fixed an issue where using the LightingOverrideMask would break sky reflection for regular cameras +- Fix DebugMenu FrameSettingsHistory persistency on close +- Fix DensityVolume, ReflectionProbe aned PlanarReflectionProbe advancedControl display +- Fix DXR scene serialization in wizard +- Fixed an issue where Previews would reallocate History Buffers every frame +- Fixed the SetLightLayer function in HDAdditionalLightData setting the wrong light layer +- Fix error first time a preview is created for planar +- Fixed an issue where SSR would use an incorrect roughness value on ForwardOnly (StackLit, AxF, Fabric, etc.) materials when the pipeline is configured to also allow deferred Lit. +- Fixed issues with light explorer (cases 1183468, 1183269) +- Fix dot colors in LayeredLit material inspector +- Fix undo not resetting all value when undoing the material affectation in LayerLit material +- Fix for issue that caused gizmos to render in render textures (case 1174395) +- Fixed the light emissive mesh not updated when the light was disabled/enabled +- Fixed light and shadow layer sync when setting the HDAdditionalLightData.lightlayersMask property +- Fixed a nullref when a custom post process component that was in the HDRP PP list is removed from the project +- Fixed issue that prevented decals from modifying specular occlusion (case 1178272). +- Fixed exposure of volumetric reprojection +- Fixed multi selection support for Scalable Settings in lights +- Fixed font shaders in test projects for VR by using a Shader Graph version +- Fixed refresh of baked cubemap by incrementing updateCount at the end of the bake (case 1158677). +- Fixed issue with rectangular area light when seen from the back +- Fixed decals not affecting lightmap/lightprobe +- Fixed zBufferParams with XR single-pass rendering +- Fixed moving objects not rendered in custom passes +- Fixed abstract classes listed in the + menu of the custom pass list +- Fixed custom pass that was rendered in previews +- Fixed precision error in zero value normals when applying decals (case 1181639) +- Fixed issue that triggered No Scene Lighting view in game view as well (case 1156102) +- Assign default volume profile when creating a new HDRP Asset +- Fixed fov to 0 in planar probe breaking the projection matrix (case 1182014) +- Fixed bugs with shadow caching +- Reassign the same camera for a realtime probe face render request to have appropriate history buffer during realtime probe rendering. +- Fixed issue causing wrong shading when normal map mode is Object space, no normal map is set, but a detail map is present (case 1143352) +- Fixed issue with decal and htile optimization +- Fixed TerrainLit shader compilation error regarding `_Control0_TexelSize` redefinition (case 1178480). +- Fixed warning about duplicate HDRuntimeReflectionSystem when configuring play mode without domain reload. +- Fixed an editor crash when multiple decal projectors were selected and some had null material +- Added all relevant fix actions to FixAll button in Wizard +- Moved FixAll button on top of the Wizard +- Fixed an issue where fog color was not pre-exposed correctly +- Fix priority order when custom passes are overlapping +- Fix cleanup not called when the custom pass GameObject is destroyed +- Replaced most instances of GraphicsSettings.renderPipelineAsset by GraphicsSettings.currentRenderPipeline. This should fix some parameters not working on Quality Settings overrides. +- Fixed an issue with Realtime GI not working on upgraded projects. +- Fixed issue with screen space shadows fallback texture was not set as a texture array. +- Fixed Pyramid Lights bounding box +- Fixed terrain heightmap default/null values and epsilons +- Fixed custom post-processing effects breaking when an abstract class inherited from `CustomPostProcessVolumeComponent` +- Fixed XR single-pass rendering in Editor by using ShaderConfig.s_XrMaxViews to allocate matrix array +- Multiple different skies rendered at the same time by different cameras are now handled correctly without flickering +- Fixed flickering issue happening when different volumes have shadow settings and multiple cameras are present. +- Fixed issue causing planar probes to disappear if there is no light in the scene. +- Fixed a number of issues with the prefab isolation mode (Volumes leaking from the main scene and reflection not working properly) +- Fixed an issue with fog volume component upgrade not working properly +- Fixed Spot light Pyramid Shape has shadow artifacts on aspect ratio values lower than 1 +- Fixed issue with AO upsampling in XR +- Fixed camera without HDAdditionalCameraData component not rendering +- Removed the macro ENABLE_RAYTRACING for most of the ray tracing code +- Fixed prefab containing camera reloading in loop while selected in the Project view +- Fixed issue causing NaN wheh the Z scale of an object is set to 0. +- Fixed DXR shader passes attempting to render before pipeline loaded +- Fixed black ambient sky issue when importing a project after deleting Library. +- Fixed issue when upgrading a Standard transparent material (case 1186874) +- Fixed area light cookies not working properly with stack lit +- Fixed material render queue not updated when the shader is changed in the material inspector. +- Fixed a number of issues with full screen debug modes not reseting correctly when setting another mutually exclusive mode +- Fixed compile errors for platforms with no VR support +- Fixed an issue with volumetrics and RTHandle scaling (case 1155236) +- Fixed an issue where sky lighting might be updated uselessly +- Fixed issue preventing to allow setting decal material to none (case 1196129) +- Fixed XR multi-pass decals rendering +- Fixed several fields on Light Inspector that not supported Prefab overrides +- Fixed EOL for some files +- Fixed scene view rendering with volumetrics and XR enabled +- Fixed decals to work with multiple cameras +- Fixed optional clear of GBuffer (Was always on) +- Fixed render target clears with XR single-pass rendering +- Fixed HDRP samples file hierarchy +- Fixed Light units not matching light type +- Fixed QualitySettings panel not displaying HDRP Asset +- Fixed black reflection probes the first time loading a project +- Fixed y-flip in scene view with XR SDK +- Fixed Decal projectors do not immediately respond when parent object layer mask is changed in editor. +- Fixed y-flip in scene view with XR SDK +- Fixed a number of issues with Material Quality setting +- Fixed the transparent Cull Mode option in HD unlit master node settings only visible if double sided is ticked. +- Fixed an issue causing shadowed areas by contact shadows at the edge of far clip plane if contact shadow length is very close to far clip plane. +- Fixed editing a scalable settings will edit all loaded asset in memory instead of targetted asset. +- Fixed Planar reflection default viewer FOV +- Fixed flickering issues when moving the mouse in the editor with ray tracing on. +- Fixed the ShaderGraph main preview being black after switching to SSS in the master node settings +- Fixed custom fullscreen passes in VR +- Fixed camera culling masks not taken in account in custom pass volumes +- Fixed object not drawn in custom pass when using a DrawRenderers with an HDRP shader in a build. +- Fixed injection points for Custom Passes (AfterDepthAndNormal and BeforePreRefraction were missing) +- Fixed a enum to choose shader tags used for drawing objects (DepthPrepass or Forward) when there is no override material. +- Fixed lit objects in the BeforePreRefraction, BeforeTransparent and BeforePostProcess. +- Fixed the None option when binding custom pass render targets to allow binding only depth or color. +- Fixed custom pass buffers allocation so they are not allocated if they're not used. +- Fixed the Custom Pass entry in the volume create asset menu items. +- Fixed Prefab Overrides workflow on Camera. +- Fixed alignment issue in Preset for Camera. +- Fixed alignment issue in Physical part for Camera. +- Fixed FrameSettings multi-edition. +- Fixed a bug happening when denoising multiple ray traced light shadows +- Fixed minor naming issues in ShaderGraph settings +- VFX: Removed z-fight glitches that could appear when using deferred depth prepass and lit quad primitives +- VFX: Preserve specular option for lit outputs (matches HDRP lit shader) +- Fixed an issue with Metal Shader Compiler and GTAO shader for metal +- Fixed resources load issue while upgrading HDRP package. +- Fix LOD fade mask by accounting for field of view +- Fixed spot light missing from ray tracing indirect effects. +- Fixed a UI bug in the diffusion profile list after fixing them from the wizard. +- Fixed the hash collision when creating new diffusion profile assets. +- Fixed a light leaking issue with box light casting shadows (case 1184475) +- Fixed Cookie texture type in the cookie slot of lights (Now displays a warning because it is not supported). +- Fixed a nullref that happens when using the Shuriken particle light module +- Fixed alignment in Wizard +- Fixed text overflow in Wizard's helpbox +- Fixed Wizard button fix all that was not automatically grab all required fixes +- Fixed VR tab for MacOS in Wizard +- Fixed local config package workflow in Wizard +- Fixed issue with contact shadows shifting when MSAA is enabled. +- Fixed EV100 in the PBR sky +- Fixed an issue In URP where sometime the camera is not passed to the volume system and causes a null ref exception (case 1199388) +- Fixed nullref when releasing HDRP with custom pass disabled +- Fixed performance issue derived from copying stencil buffer. +- Fixed an editor freeze when importing a diffusion profile asset from a unity package. +- Fixed an exception when trying to reload a builtin resource. +- Fixed the light type intensity unit reset when switching the light type. +- Fixed compilation error related to define guards and CreateLayoutFromXrSdk() +- Fixed documentation link on CustomPassVolume. +- Fixed player build when HDRP is in the project but not assigned in the graphic settings. +- Fixed an issue where ambient probe would be black for the first face of a baked reflection probe +- VFX: Fixed Missing Reference to Visual Effect Graph Runtime Assembly +- Fixed an issue where rendering done by users in EndCameraRendering would be executed before the main render loop. +- Fixed Prefab Override in main scope of Volume. +- Fixed alignment issue in Presset of main scope of Volume. +- Fixed persistence of ShowChromeGizmo and moved it to toolbar for coherency in ReflectionProbe and PlanarReflectionProbe. +- Fixed Alignement issue in ReflectionProbe and PlanarReflectionProbe. +- Fixed Prefab override workflow issue in ReflectionProbe and PlanarReflectionProbe. +- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in ReflectionProbe and PlanarReflectionProbe. +- Fixed Prefab override workflow issue in DensityVolume. +- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in DensityVolume. +- Fix light limit counts specified on the HDRP asset +- Fixed Quality Settings for SSR, Contact Shadows and Ambient Occlusion volume components +- Fixed decalui deriving from hdshaderui instead of just shaderui +- Use DelayedIntField instead of IntField for scalable settings +- Fixed init of debug for FrameSettingsHistory on SceneView camera +- Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' +- Fix Wizard load when none selected for RenderPipelineAsset - Fixed TerrainLitGUI when per-pixel normal property is not present. -- Fixed a bug due to depth history begin overriden too soon -- Fixed issue that caused Distortion UI to appear in Lit. -- Fixed several issues with decal duplicating when editing them. -- Fixed initialization of volumetric buffer params (1204159) -- Fixed an issue where frame count was incorrectly reset for the game view, causing temporal processes to fail. -- Fixed Culling group was not disposed error. -- Fixed issues on some GPU that do not support gathers on integer textures. -- Fixed an issue with ambient probe not being initialized for the first frame after a domain reload for volumetric fog. -- Fixed the scene visibility of decal projectors and density volumes -- Fixed a leak in sky manager. -- Fixed an issue where entering playmode while the light editor is opened would produce null reference exceptions. -- Fixed the debug overlay overlapping the debug menu at runtime. -- Fixed an issue with the framecount when changing scene. -- Fixed errors that occurred when using invalid near and far clip plane values for planar reflections. -- Fixed issue with motion blur sample weighting function. -- Fixed motion vectors in MSAA. -- Fixed sun flare blending (case 1205862). -- Fixed a lot of issues related to ray traced screen space shadows. -- Fixed memory leak caused by apply distortion material not being disposed. -- Fixed Reflection probe incorrectly culled when moving its parent (case 1207660) -- Fixed a nullref when upgrading the Fog volume components while the volume is opened in the inspector. -- Fix issues where decals on PS4 would not correctly write out the tile mask causing bits of the decal to go missing. -- Use appropriate label width and text content so the label is completely visible -- Fixed an issue where final post process pass would not output the default alpha value of 1.0 when using 11_11_10 color buffer format. -- Fixed SSR issue after the MSAA Motion Vector fix. -- Fixed an issue with PCSS on directional light if punctual shadow atlas was not allocated. -- Fixed an issue where shadow resolution would be wrong on the first face of a baked reflection probe. -- Fixed issue with PCSS softness being incorrect for cascades different than the first one. -- Fixed custom post process not rendering when using multiple HDRP asset in quality settings +- Fixed rendering errors when enabling debug modes with custom passes +- Fix an issue that made PCSS dependent on Atlas resolution (not shadow map res) +- Fixing a bug whith histories when n>4 for ray traced shadows +- Fixing wrong behavior in ray traced shadows for mesh renderers if their cast shadow is shadow only or double sided +- Only tracing rays for shadow if the point is inside the code for spotlight shadows +- Only tracing rays if the point is inside the range for point lights +- Fixing ghosting issues when the screen space shadow indexes change for a light with ray traced shadows +- Fixed an issue with stencil management and Xbox One build that caused corrupted output in deferred mode. +- Fixed a mismatch in behavior between the culling of shadow maps and ray traced point and spot light shadows +- Fixed recursive ray tracing not working anymore after intermediate buffer refactor. +- Fixed ray traced shadow denoising not working (history rejected all the time). +- Fixed shader warning on xbox one +- Fixed cookies not working for spot lights in ray traced reflections, ray traced GI and recursive rendering +- Fixed an inverted handling of CoatSmoothness for SSR in StackLit. +- Fixed missing distortion inputs in Lit and Unlit material UI. +- Fixed issue that propagated NaNs across multiple frames through the exposure texture. +- Fixed issue with Exclude from TAA stencil ignored. +- Fixed ray traced reflection exposure issue. +- Fixed issue with TAA history not initialising corretly scale factor for first frame +- Fixed issue with stencil test of material classification not using the correct Mask (causing false positive and bad performance with forward material in deferred) +- Fixed issue with History not reset when chaning antialiasing mode on camera +- Fixed issue with volumetric data not being initialized if default settings have volumetric and reprojection off. +- Fixed ray tracing reflection denoiser not applied in tier 1 +- Fixed the vibility of ray tracing related methods. +- Fixed the diffusion profile list not saved when clicking the fix button in the material UI. +- Fixed crash when pushing bounce count higher than 1 for ray traced GI or reflections +- Fixed PCSS softness scale so that it better match ray traced reference for punctual lights. +- Fixed exposure management for the path tracer +- Fixed AxF material UI containing two advanced options settings. +- Fixed an issue where cached sky contexts were being destroyed wrongly, breaking lighting in the LookDev +- Fixed issue that clamped PCSS softness too early and not after distance scale. +- Fixed fog affect transparent on HD unlit master node +- Fixed custom post processes re-ordering not saved. +- Fixed NPE when using scalable settings +- Fixed an issue where PBR sky precomputation was reset incorrectly in some cases causing bad performance. +- Fixed a bug due to depth history begin overriden too soon +- Fixed CustomPassSampleCameraColor scale issue when called from Before Transparent injection point. +- Fixed corruption of AO in baked probes. +- Fixed issue with upgrade of projects that still had Very High as shadow filtering quality. +- Fixed issue that caused Distortion UI to appear in Lit. +- Fixed several issues with decal duplicating when editing them. +- Fixed initialization of volumetric buffer params (1204159) +- Fixed an issue where frame count was incorrectly reset for the game view, causing temporal processes to fail. +- Fixed Culling group was not disposed error. +- Fixed issues on some GPU that do not support gathers on integer textures. +- Fixed an issue with ambient probe not being initialized for the first frame after a domain reload for volumetric fog. +- Fixed the scene visibility of decal projectors and density volumes +- Fixed a leak in sky manager. +- Fixed an issue where entering playmode while the light editor is opened would produce null reference exceptions. +- Fixed the debug overlay overlapping the debug menu at runtime. +- Fixed an issue with the framecount when changing scene. +- Fixed errors that occurred when using invalid near and far clip plane values for planar reflections. +- Fixed issue with motion blur sample weighting function. +- Fixed motion vectors in MSAA. +- Fixed sun flare blending (case 1205862). +- Fixed a lot of issues related to ray traced screen space shadows. +- Fixed memory leak caused by apply distortion material not being disposed. +- Fixed Reflection probe incorrectly culled when moving its parent (case 1207660) +- Fixed a nullref when upgrading the Fog volume components while the volume is opened in the inspector. +- Fix issues where decals on PS4 would not correctly write out the tile mask causing bits of the decal to go missing. +- Use appropriate label width and text content so the label is completely visible +- Fixed an issue where final post process pass would not output the default alpha value of 1.0 when using 11_11_10 color buffer format. +- Fixed SSR issue after the MSAA Motion Vector fix. +- Fixed an issue with PCSS on directional light if punctual shadow atlas was not allocated. +- Fixed an issue where shadow resolution would be wrong on the first face of a baked reflection probe. +- Fixed issue with PCSS softness being incorrect for cascades different than the first one. +- Fixed custom post process not rendering when using multiple HDRP asset in quality settings - Fixed probe gizmo missing id (case 1208975) - Fixed a warning in raytracingshadowfilter.compute - Fixed issue with AO breaking with small near plane values. @@ -145,7 +385,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shader warning in AO code. - Fixed a warning in simpledenoiser.compute - Fixed tube and rectangle light culling to use their shape instead of their range as a bounding box. -- Fixed caused by using gather on a UINT texture in motion blur. +- Fixed caused by using gather on a UINT texture in motion blur. - Fix issue with ambient occlusion breaking when dynamic resolution is active. - Fixed some possible NaN causes in Depth of Field. - Fixed Custom Pass nullref due to the new Profiling Sample API changes @@ -228,8 +468,48 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with MipRatio debug mode showing _DebugMatCapTexture not being set. - Fixed missing initialization of input params in Blit for VR. - Fix Inf source in LTC for area lights. +- Fixed alpha clipping test (comparison was '>', now '>=') +- Fixed preview camera (eg. shader graph preview) when path tracing is on +- Fixed issue with unclear naming of debug menu for decals. ### Changed +- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled +- Rename Emission Radius to Radius in UI in Point, Spot +- Angular Diameter parameter for directional light is no longuer an advanced property +- DXR: Remove Light Radius and Angular Diamater of Raytrace shadow. Angular Diameter and Radius are used instead. +- Remove MaxSmoothness parameters from UI for point, spot and directional light. The MaxSmoothness is now deduce from Radius Parameters +- DXR: Remove the Ray Tracing Environement Component. Add a Layer Mask to the ray Tracing volume components to define which objects are taken into account for each effect. +- Removed second cubemaps used for shadowing in lookdev +- Disable Physically Based Sky below ground +- Increase max limit of area light and reflection probe to 128 +- Change default texture for detailmap to grey +- Optimize Shadow RT load on Tile based architecture platforms. +- Improved quality of SSAO. +- Moved RequestShadowMapRendering() back to public API. +- Update HDRP DXR Wizard with an option to automatically clone the hdrp config package and setup raytracing to 1 in shaders file. +- Added SceneSelection pass for TerrainLit shader. +- Simplified Light's type API regrouping the logic in one place (Check type in HDAdditionalLightData) +- The support of LOD CrossFade (Dithering transition) in master nodes now required to enable it in the master node settings (Save variant) +- Improved shadow bias, by removing constant depth bias and substituting it with slope-scale bias. +- Fix the default stencil values when a material is created from a SSS ShaderGraph. +- Tweak test asset to be compatible with XR: unlit SG material for canvas and double-side font material +- Slightly tweaked the behaviour of bloom when resolution is low to reduce artifacts. +- Hidden fields in Light Inspector that is not relevant while in BakingOnly mode. +- Changed parametrization of PCSS, now softness is derived from angular diameter (for directional lights) or shape radius (for point/spot lights) and min filter size is now in the [0..1] range. +- Moved the copy of the geometry history buffers to right after the depth mip chain generation. +- Rename "Luminance" to "Nits" in UX for physical light unit +- Rename FrameSettings "SkyLighting" to "SkyReflection" +- Reworked XR automated tests +- The ray traced screen space shadow history for directional, spot and point lights is discarded if the light transform has changed. +- Changed the behavior for ray tracing in case a mesh renderer has both transparent and opaque submeshes. +- Improve history buffer management +- Replaced PlayerSettings.virtualRealitySupported with XRGraphics.tryEnable. +- Remove redundant FrameSettings RealTimePlanarReflection +- Improved a bit the GC calls generated during the rendering. +- Material update is now only triggered when the relevant settings are touched in the shader graph master nodes +- Changed the way Sky Intensity (on Sky volume components) is handled. It's now a combo box where users can choose between Exposure, Multiplier or Lux (for HDRI sky only) instead of both multiplier and exposure being applied all the time. Added a new menu item to convert old profiles. +- Change how method for specular occlusions is decided on inspector shader (Lit, LitTesselation, LayeredLit, LayeredLitTessellation) +- Unlocked SSS, SSR, Motion Vectors and Distortion frame settings for reflections probes. - Hide unused LOD settings in Quality Settings legacy window. - Reduced the constrained distance for temporal reprojection of ray tracing denoising - Removed shadow near plane from the Directional Light Shadow UI. @@ -277,342 +557,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Moved BeginCameraRendering callback right before culling. - Changed the visibility of the Indirect Lighting Controller component to public. -## [7.1.8] - 2020-01-20 - -### Fixed -- Fixed white and dark flashes on scenes with very high or very low exposure when Automatic Exposure is being used. -- Fixed memory leak in Sky when in matcap mode. - -### Changed -- On Xbox and PS4 you will also need to download the com.unity.render-pipeline.platform (ps4 or xboxone) package from the appropriate platform developer forum - -## [7.1.7] - 2019-12-11 - -### Added -- Added a check in the custom post process template to throw an error if the default shader is not found. - -### Fixed -- Fixed rendering errors when enabling debug modes with custom passes -- Fix an issue that made PCSS dependent on Atlas resolution (not shadow map res) -- Fixing a bug whith histories when n>4 for ray traced shadows -- Fixing wrong behavior in ray traced shadows for mesh renderers if their cast shadow is shadow only or double sided -- Only tracing rays for shadow if the point is inside the code for spotlight shadows -- Only tracing rays if the point is inside the range for point lights -- Fixing ghosting issues when the screen space shadow indexes change for a light with ray traced shadows -- Fixed an issue with stencil management and Xbox One build that caused corrupted output in deferred mode. -- Fixed a mismatch in behavior between the culling of shadow maps and ray traced point and spot light shadows -- Fixed recursive ray tracing not working anymore after intermediate buffer refactor. -- Fixed ray traced shadow denoising not working (history rejected all the time). -- Fixed shader warning on xbox one -- Fixed cookies not working for spot lights in ray traced reflections, ray traced GI and recursive rendering -- Fixed an inverted handling of CoatSmoothness for SSR in StackLit. -- Fixed missing distortion inputs in Lit and Unlit material UI. -- Fixed issue that propagated NaNs across multiple frames through the exposure texture. -- Fixed issue with Exclude from TAA stencil ignored. -- Fixed ray traced reflection exposure issue. -- Fixed issue with TAA history not initialising corretly scale factor for first frame -- Fixed issue with stencil test of material classification not using the correct Mask (causing false positive and bad performance with forward material in deferred) -- Fixed issue with History not reset when chaning antialiasing mode on camera -- Fixed issue with volumetric data not being initialized if default settings have volumetric and reprojection off. -- Fixed ray tracing reflection denoiser not applied in tier 1 -- Fixed the vibility of ray tracing related methods. -- Fixed the diffusion profile list not saved when clicking the fix button in the material UI. -- Fixed crash when pushing bounce count higher than 1 for ray traced GI or reflections -- Fixed PCSS softness scale so that it better match ray traced reference for punctual lights. -- Fixed exposure management for the path tracer -- Fixed AxF material UI containing two advanced options settings. -- Fixed an issue where cached sky contexts were being destroyed wrongly, breaking lighting in the LookDev -- Fixed issue that clamped PCSS softness too early and not after distance scale. -- Fixed fog affect transparent on HD unlit master node -- Fixed custom post processes re-ordering not saved. -- Fixed NPE when using scalable settings -- Fixed an issue where PBR sky precomputation was reset incorrectly in some cases causing bad performance. -- Fixed a bug in dxr due to depth history begin overriden too soon -- Fixed CustomPassSampleCameraColor scale issue when called from Before Transparent injection point. -- Fixed corruption of AO in baked probes. -- Fixed issue with upgrade of projects that still had Very High as shadow filtering quality. -- Removed shadow near plane from the Directional Light Shadow UI. -- Fixed performance issue with performances of custom pass culling. - -## [7.1.6] - 2019-11-22 - -### Added -- Added Backplate projection from the HDRISky -- Added Shadow Matte in UnlitMasterNode, which only received shadow without lighting -- Added support for depth copy with XR SDK -- Added debug setting to Render Pipeline Debug Window to list the active XR views -- Added an option to filter the result of the volumetric lighting (off by default). -- Added a transmission multiplier for directional lights -- Added XR single-pass test mode to Render Pipeline Debug Window -- Added debug setting to Render Pipeline Window to list the active XR views -- Added a new refraction mode for the Lit shader (thin). Which is a box refraction with small thickness values -- Added the code to support Barn Doors for Area Lights based on a shaderconfig option. -- Added HDRPCameraBinder property binder for Visual Effect Graph -- Added "Celestial Body" controls to the Directional Light -- Added new parameters to the Physically Based Sky -- Added Reflections to the DXR Wizard - -### Fixed -- Fixed y-flip in scene view with XR SDK -- Fixed Decal projectors do not immediately respond when parent object layer mask is changed in editor. -- Fixed y-flip in scene view with XR SDK -- Fixed a number of issues with Material Quality setting -- Fixed the transparent Cull Mode option in HD unlit master node settings only visible if double sided is ticked. -- Fixed an issue causing shadowed areas by contact shadows at the edge of far clip plane if contact shadow length is very close to far clip plane. -- Fixed editing a scalable settings will edit all loaded asset in memory instead of targetted asset. -- Fixed Planar reflection default viewer FOV -- Fixed flickering issues when moving the mouse in the editor with ray tracing on. -- Fixed the ShaderGraph main preview being black after switching to SSS in the master node settings -- Fixed custom fullscreen passes in VR -- Fixed camera culling masks not taken in account in custom pass volumes -- Fixed object not drawn in custom pass when using a DrawRenderers with an HDRP shader in a build. -- Fixed injection points for Custom Passes (AfterDepthAndNormal and BeforePreRefraction were missing) -- Fixed a enum to choose shader tags used for drawing objects (DepthPrepass or Forward) when there is no override material. -- Fixed lit objects in the BeforePreRefraction, BeforeTransparent and BeforePostProcess. -- Fixed the None option when binding custom pass render targets to allow binding only depth or color. -- Fixed custom pass buffers allocation so they are not allocated if they're not used. -- Fixed the Custom Pass entry in the volume create asset menu items. -- Fixed Prefab Overrides workflow on Camera. -- Fixed alignment issue in Preset for Camera. -- Fixed alignment issue in Physical part for Camera. -- Fixed FrameSettings multi-edition. -- Fixed a bug happening when denoising multiple ray traced light shadows -- Fixed minor naming issues in ShaderGraph settings -- Fixed an issue with Metal Shader Compiler and GTAO shader for metal -- Fixed resources load issue while upgrading HDRP package. -- Fixed LOD fade mask by accounting for field of view -- Fixed spot light missing from ray tracing indirect effects. -- Fixed a UI bug in the diffusion profile list after fixing them from the wizard. -- Fixed the hash collision when creating new diffusion profile assets. -- Fixed a light leaking issue with box light casting shadows (case 1184475) -- Fixed Cookie texture type in the cookie slot of lights (Now displays a warning because it is not supported). -- Fixed a nullref that happens when using the Shuriken particle light module -- Fixed alignment in Wizard -- Fixed text overflow in Wizard's helpbox -- Fixed Wizard button fix all that was not automatically grab all required fixes -- Fixed VR tab for MacOS in Wizard -- Fixed local config package workflow in Wizard -- Fixed issue with contact shadows shifting when MSAA is enabled. -- Fixed EV100 in the PBR sky -- Fixed an issue In URP where sometime the camera is not passed to the volume system and causes a null ref exception (case 1199388) -- Fixed nullref when releasing HDRP with custom pass disabled -- Fixed performance issue derived from copying stencil buffer. -- Fixed an editor freeze when importing a diffusion profile asset from a unity package. -- Fixed an exception when trying to reload a builtin resource. -- Fixed the light type intensity unit reset when switching the light type. -- Fixed compilation error related to define guards and CreateLayoutFromXrSdk() -- Fixed documentation link on CustomPassVolume. -- Fixed player build when HDRP is in the project but not assigned in the graphic settings. -- Fixed an issue where ambient probe would be black for the first face of a baked reflection probe -- VFX: Fixed Missing Reference to Visual Effect Graph Runtime Assembly -- Fixed an issue where rendering done by users in EndCameraRendering would be executed before the main render loop. -- Fixed Prefab Override in main scope of Volume. -- Fixed alignment issue in Presset of main scope of Volume. -- Fixed persistence of ShowChromeGizmo and moved it to toolbar for coherency in ReflectionProbe and PlanarReflectionProbe. -- Fixed Alignement issue in ReflectionProbe and PlanarReflectionProbe. -- Fixed Prefab override workflow issue in ReflectionProbe and PlanarReflectionProbe. -- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in ReflectionProbe and PlanarReflectionProbe. -- Fixed Prefab override workflow issue in DensityVolume. -- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in DensityVolume. -- Fix light limit counts specified on the HDRP asset -- Fixed Quality Settings for SSR, Contact Shadows and Ambient Occlusion volume components -- Fixed decalui deriving from hdshaderui instead of just shaderui -- Use DelayedIntField instead of IntField for scalable settings - -### Changed -- Reworked XR automated tests -- The ray traced screen space shadow history for directional, spot and point lights is discarded if the light transform has changed. -- Changed the behavior for ray tracing in case a mesh renderer has both transparent and opaque submeshes. -- Improve history buffer management -- Replaced PlayerSettings.virtualRealitySupported with XRGraphics.tryEnable. -- Remove redundant FrameSettings RealTimePlanarReflection -- Improved a bit the GC calls generated during the rendering. -- Material update is now only triggered when the relevant settings are touched in the shader graph master nodes -- Changed the way Sky Intensity (on Sky volume components) is handled. It's now a combo box where users can choose between Exposure, Multiplier or Lux (for HDRI sky only) instead of both multiplier and exposure being applied all the time. Added a new menu item to convert old profiles. -- Change how method for specular occlusions is decided on inspector shader (Lit, LitTesselation, LayeredLit, LayeredLitTessellation) -- Unlocked SSS, SSR, Motion Vectors and Distortion frame settings for reflections probes. - -## [7.1.5] - 2019-11-15 - -### Fixed -- Fixed black reflection probes the first time loading a project - -## [7.1.4] - 2019-11-13 - -### Added -- Added XR single-pass setting into HDRP asset -- Added a penumbra tint option for lights - -### Fixed -- Fixed EOL for some files -- Fixed scene view rendering with volumetrics and XR enabled -- Fixed decals to work with multiple cameras -- Fixed optional clear of GBuffer (Was always on) -- Fixed render target clears with XR single-pass rendering -- Fixed HDRP samples file hierarchy -- Fixed Light units not matching light type -- Fixed QualitySettings panel not displaying HDRP Asset - -### Changed -- Changed parametrization of PCSS, now softness is derived from angular diameter (for directional lights) or shape radius (for point/spot lights) and min filter size is now in the [0..1] range. -- Moved the copy of the geometry history buffers to right after the depth mip chain generation. -- Rename "Luminance" to "Nits" in UX for physical light unit -- Rename FrameSettings "SkyLighting" to "SkyReflection" - -## [7.1.3] - 2019-11-04 - -### Added -- Ray tracing support for VR single-pass -- Added sharpen filter shader parameter and UI for TemporalAA to control image quality instead of hardcoded value -- Added frame settings option for custom post process and custom passes as well as custom color buffer format option. -- Add check in wizard on SRP Batcher enabled. -- Added default implementations of OnPreprocessMaterialDescription for FBX, Obj, Sketchup and 3DS file formats. -- Added custom pass fade radius -- Added after post process injection point for custom passes -- Added basic alpha compositing support - Alpha is available afterpostprocess when using FP16 buffer format. -- Added falloff distance on Reflection Probe and Planar Reflection Probe -- Added hability to name LightLayers in HDRenderPipelineAsset -- Added a range compression factor for Reflection Probe and Planar Reflection Probe to avoid saturation of colors. -- Added path tracing support for directional, point and spot lights, as well as emission from Lit and Unlit. -- Added non temporal version of SSAO. -- Added more detailed ray tracing stats in the debug window -- Added Disc area light (bake only) -- Added a warning in the material UI to prevent transparent + subsurface-scattering combination. - -### Fixed -- Sorting, undo, labels, layout in the Lighting Explorer. -- Fixed sky settings and materials in Shader Graph Samples package -- Fixed light supported units caching (1182266) -- Fixed an issue where SSAO (that needs temporal reprojection) was still being rendered when Motion Vectors were not available (case 1184998) -- Fixed a nullref when modifying the height parameters inside the layered lit shader UI. -- Fixed Decal gizmo that become white after exiting play mode -- Fixed Decal pivot position to behave like a spotlight -- Fixed an issue where using the LightingOverrideMask would break sky reflection for regular cameras -- Fix DebugMenu FrameSettingsHistory persistency on close -- Fix DensityVolume, ReflectionProbe aned PlanarReflectionProbe advancedControl display -- Fix DXR scene serialization in wizard -- Fixed an issue where Previews would reallocate History Buffers every frame -- Fixed the SetLightLayer function in HDAdditionalLightData setting the wrong light layer -- Fix error first time a preview is created for planar -- Fixed an issue where SSR would use an incorrect roughness value on ForwardOnly (StackLit, AxF, Fabric, etc.) materials when the pipeline is configured to also allow deferred Lit. -- Fixed issues with light explorer (cases 1183468, 1183269) -- Fix dot colors in LayeredLit material inspector -- Fix undo not resetting all value when undoing the material affectation in LayerLit material -- Fix for issue that caused gizmos to render in render textures (case 1174395) -- Fixed the light emissive mesh not updated when the light was disabled/enabled -- Fixed light and shadow layer sync when setting the HDAdditionalLightData.lightlayersMask property -- Fixed a nullref when a custom post process component that was in the HDRP PP list is removed from the project -- Fixed issue that prevented decals from modifying specular occlusion (case 1178272). -- Fixed exposure of volumetric reprojection -- Fixed multi selection support for Scalable Settings in lights -- Fixed font shaders in test projects for VR by using a Shader Graph version -- Fixed refresh of baked cubemap by incrementing updateCount at the end of the bake (case 1158677). -- Fixed issue with rectangular area light when seen from the back -- Fixed decals not affecting lightmap/lightprobe -- Fixed zBufferParams with XR single-pass rendering -- Fixed moving objects not rendered in custom passes -- Fixed abstract classes listed in the + menu of the custom pass list -- Fixed custom pass that was rendered in previews -- Fixed precision error in zero value normals when applying decals (case 1181639) -- Fixed issue that triggered No Scene Lighting view in game view as well (case 1156102) -- Assign default volume profile when creating a new HDRP Asset -- Fixed fov to 0 in planar probe breaking the projection matrix (case 1182014) -- Fixed bugs with shadow caching -- Reassign the same camera for a realtime probe face render request to have appropriate history buffer during realtime probe rendering. -- Fixed issue causing wrong shading when normal map mode is Object space, no normal map is set, but a detail map is present (case 1143352) -- Fixed issue with decal and htile optimization -- Fixed TerrainLit shader compilation error regarding `_Control0_TexelSize` redefinition (case 1178480). -- Fixed warning about duplicate HDRuntimeReflectionSystem when configuring play mode without domain reload. -- Fixed an editor crash when multiple decal projectors were selected and some had null material -- Added all relevant fix actions to FixAll button in Wizard -- Moved FixAll button on top of the Wizard -- Fixed an issue where fog color was not pre-exposed correctly -- Fix priority order when custom passes are overlapping -- Fix cleanup not called when the custom pass GameObject is destroyed -- Replaced most instances of GraphicsSettings.renderPipelineAsset by GraphicsSettings.currentRenderPipeline. This should fix some parameters not working on Quality Settings overrides. -- Fixed an issue with Realtime GI not working on upgraded projects. -- Fixed issue with screen space shadows fallback texture was not set as a texture array. -- Fixed Pyramid Lights bounding box -- Fixed terrain heightmap default/null values and epsilons -- Fixed custom post-processing effects breaking when an abstract class inherited from `CustomPostProcessVolumeComponent` -- Fixed XR single-pass rendering in Editor by using ShaderConfig.s_XrMaxViews to allocate matrix array -- Multiple different skies rendered at the same time by different cameras are now handled correctly without flickering -- Fixed flickering issue happening when different volumes have shadow settings and multiple cameras are present. -- Fixed issue causing planar probes to disappear if there is no light in the scene. -- Fixed a number of issues with the prefab isolation mode (Volumes leaking from the main scene and reflection not working properly) -- Fixed an issue with fog volume component upgrade not working properly -- Fixed Spot light Pyramid Shape has shadow artifacts on aspect ratio values lower than 1 -- Fixed issue with AO upsampling in XR -- Fixed camera without HDAdditionalCameraData component not rendering -- Removed the macro ENABLE_RAYTRACING for most of the ray tracing code -- Fixed prefab containing camera reloading in loop while selected in the Project view -- Fixed issue causing NaN wheh the Z scale of an object is set to 0. -- Fixed DXR shader passes attempting to render before pipeline loaded -- Fixed black ambient sky issue when importing a project after deleting Library. -- Fixed issue when upgrading a Standard transparent material (case 1186874) -- Fixed area light cookies not working properly with stack lit -- Fixed material render queue not updated when the shader is changed in the material inspector. -- Fixed a number of issues with full screen debug modes not reseting correctly when setting another mutually exclusive mode -- Fixed compile errors for platforms with no VR support -- Fixed an issue with volumetrics and RTHandle scaling (case 1155236) -- Fixed an issue where sky lighting might be updated uselessly -- Fixed issue preventing to allow setting decal material to none (case 1196129) -- Fixed XR multi-pass decals rendering -- Fixed several fields on Light Inspector that not supported Prefab overrides -- VFX: Removed z-fight glitches that could appear when using deferred depth prepass and lit quad primitives -- VFX: Preserve specular option for lit outputs (matches HDRP lit shader) -- Fixed init of debug for FrameSettingsHistory on SceneView camera -- Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' -- Fix Wizard load when none selected for RenderPipelineAsset -- Fixed issue with unclear naming of debug menu for decals. - -### Changed -- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled -- Rename Emission Radius to Radius in UI in Point, Spot -- Angular Diameter parameter for directional light is no longuer an advanced property -- DXR: Remove Light Radius and Angular Diamater of Raytrace shadow. Angular Diameter and Radius are used instead. -- Remove MaxSmoothness parameters from UI for point, spot and directional light. The MaxSmoothness is now deduce from Radius Parameters -- DXR: Remove the Ray Tracing Environement Component. Add a Layer Mask to the ray Tracing volume components to define which objects are taken into account for each effect. -- Removed second cubemaps used for shadowing in lookdev -- Disable Physically Based Sky below ground -- Increase max limit of area light and reflection probe to 128 -- Change default texture for detailmap to grey -- Optimize Shadow RT load on Tile based architecture platforms. -- Improved quality of SSAO. -- Moved RequestShadowMapRendering() back to public API. -- Update HDRP DXR Wizard with an option to automatically clone the hdrp config package and setup raytracing to 1 in shaders file. -- Added SceneSelection pass for TerrainLit shader. -- Simplified Light's type API regrouping the logic in one place (Check type in HDAdditionalLightData) -- The support of LOD CrossFade (Dithering transition) in master nodes now required to enable it in the master node settings (Save variant) -- Improved shadow bias, by removing constant depth bias and substituting it with slope-scale bias. -- Fix the default stencil values when a material is created from a SSS ShaderGraph. -- Tweak test asset to be compatible with XR: unlit SG material for canvas and double-side font material -- Slightly tweaked the behaviour of bloom when resolution is low to reduce artifacts. -- Hidden fields in Light Inspector that is not relevant while in BakingOnly mode. - -## [7.1.2] - 2019-09-19 - -### Fixed -- Fix/workaround a probable graphics driver bug in the GTAO shader. -- Fixed Hair and PBR shader graphs double sided modes -- Fixed an issue where updating an HDRP asset in the Quality setting panel would not recreate the pipeline. -- Fixed issue with point lights being considered even when occupying less than a pixel on screen (case 1183196) -- Fix a potential NaN source with iridescence (case 1183216) -- Fixed issue of spotlight breaking when minimizing the cone angle via the gizmo (case 1178279) -- Fixed issue that caused decals not to modify the roughness in the normal buffer, causing SSR to not behave correctly (case 1178336) -- Fixed lit transparent refraction with XR single-pass rendering -- Removed extra jitter for TemporalAA in VR -- Fixed ShaderGraph time in main preview -- Fixed issue on some UI elements in HDRP asset not expanding when clicking the arrow (case 1178369) -- Fixed alpha blending in custom post process -- Fixed the modification of the _AlphaCutoff property in the material UI when exposed with a ShaderGraph parameter. -- Fixed HDRP test `1218_Lit_DiffusionProfiles` on Vulkan. -- Fixed an issue where building a player in non-dev mode would generate render target error logs every frame -- Fixed crash when upgrading version of HDRP -- Fixed rendering issues with material previews -- Fixed NPE when using light module in Shuriken particle systems (1173348). -- Refresh cached shadow on editor changes - ## [7.1.1] - 2019-09-05 ### Added diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs index d160aab7c45..b82a3d45ab0 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; using UnityEngine.Experimental.Rendering; @@ -23,7 +24,7 @@ static Mesh sphereMesh get { return s_SphereMesh ?? (s_SphereMesh = Resources.GetBuiltinResource(typeof(Mesh), "New-Sphere.fbx") as Mesh); } } - Material m_ReflectiveMaterial; + Material m_ReflectiveMaterial = null; PreviewRenderUtility m_PreviewUtility; float m_CameraPhi = 0.75f; float m_CameraTheta = 0.5f; @@ -35,20 +36,25 @@ static Mesh sphereMesh public float previewExposure = 0f; public float mipLevelPreview = 0f; - void Awake() + void InitMaterialIfNeeded() { - m_ReflectiveMaterial = new Material(Shader.Find("Debug/ReflectionProbePreview")) + if(m_ReflectiveMaterial == null) { - hideFlags = HideFlags.HideAndDontSave - }; + var shader = Shader.Find("Debug/ReflectionProbePreview"); + if(shader != null) + { + m_ReflectiveMaterial = new Material(Shader.Find("Debug/ReflectionProbePreview")) + { + hideFlags = HideFlags.HideAndDontSave + }; + } + } } void OnEnable() { if (m_PreviewUtility == null) InitPreview(); - - m_ReflectiveMaterial.SetTexture("_Cubemap", target as Texture); } void OnDisable() @@ -73,8 +79,13 @@ public override void OnPreviewGUI(Rect r, GUIStyle background) if (m_PreviewUtility == null) InitPreview(); + // We init material just before using it as the inspector might have been enabled/awaked before during import. + InitMaterialIfNeeded(); + UpdateCamera(); + m_ReflectiveMaterial.SetTexture("_Cubemap", target as Texture); + m_PreviewUtility.BeginPreview(r, GUIStyle.none); m_PreviewUtility.DrawMesh(sphereMesh, Matrix4x4.identity, m_ReflectiveMaterial, 0); m_PreviewUtility.camera.Render(); @@ -201,12 +212,38 @@ public override Texture2D RenderStaticPreview(string assetPath, Object[] subAsse UpdateCamera(); + // Force loading the needed preview shader + var previewShader = EditorGUIUtility.LoadRequired("Previews/PreviewCubemap.shader") as Shader; + var previewMaterial = new Material(previewShader) + { + hideFlags = HideFlags.HideAndDontSave + }; + + // We need to force it to go through legacy + bool assetUsedFromQuality = false; + var currentPipelineAsset = HDUtils.SwitchToBuiltinRenderPipeline(out assetUsedFromQuality); + + previewMaterial.SetVector("_CameraWorldPosition", m_PreviewUtility.camera.transform.position); + previewMaterial.SetFloat("_Mip", 0.0f); + previewMaterial.SetFloat("_Alpha", 0.0f); + previewMaterial.SetFloat("_Intensity", 1.0f); + previewMaterial.mainTexture = (target as Texture); + m_PreviewUtility.ambientColor = Color.black; m_PreviewUtility.BeginStaticPreview(new Rect(0, 0, width, height)); - m_PreviewUtility.DrawMesh(sphereMesh, Matrix4x4.identity, m_ReflectiveMaterial, 0); + m_PreviewUtility.DrawMesh(sphereMesh, Matrix4x4.identity, previewMaterial, 0); + m_PreviewUtility.camera.Render(); + + var outTexture = m_PreviewUtility.EndStaticPreview(); + + // Reset back to whatever asset was used before the rendering + HDUtils.RestoreRenderPipelineAsset(assetUsedFromQuality, currentPipelineAsset); + + // Dummy empty render call to reset the pipeline in RenderPipelineManager m_PreviewUtility.camera.Render(); - return m_PreviewUtility.EndStaticPreview(); + return outTexture; + } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs index d21b1fcb6f6..21d727622b9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs @@ -449,6 +449,42 @@ internal static string GetHDRenderPipelinePath() internal static string GetCorePath() => "Packages/com.unity.render-pipelines.core/"; + // It returns the previously set RenderPipelineAsset, assetWasFromQuality is true if the current asset was set through the quality settings + internal static RenderPipelineAsset SwitchToBuiltinRenderPipeline(out bool assetWasFromQuality) + { + var graphicSettingAsset = GraphicsSettings.renderPipelineAsset; + assetWasFromQuality = false; + if (graphicSettingAsset != null) + { + // Check if the currently used pipeline is the one from graphics settings + if (GraphicsSettings.currentRenderPipeline == graphicSettingAsset) + { + GraphicsSettings.renderPipelineAsset = null; + return graphicSettingAsset; + } + } + // If we are here, it means the asset comes from quality settings + var assetFromQuality = QualitySettings.renderPipeline; + QualitySettings.renderPipeline = null; + assetWasFromQuality = true; + return assetFromQuality; + } + + // Set the renderPipelineAsset, either on the quality settings if it was unset from there or in GraphicsSettings. + // IMPORTANT: RenderPipelineManager.currentPipeline won't be HDRP until a camera.Render() call is made. + internal static void RestoreRenderPipelineAsset(bool wasUnsetFromQuality, RenderPipelineAsset renderPipelineAsset) + { + if(wasUnsetFromQuality) + { + QualitySettings.renderPipeline = renderPipelineAsset; + } + else + { + GraphicsSettings.renderPipelineAsset = renderPipelineAsset; + } + + } + internal struct PackedMipChainInfo { public Vector2Int textureSize; From 1f7c3179b016a349f8a6bb78a9b85b257bca803f Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Thu, 19 Mar 2020 15:46:22 +0100 Subject: [PATCH 029/200] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 61a5e0d706f..38372f45385 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -50,7 +50,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue that prevented cubemap thumbnails from rendering. - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. - Fix some typos in the debug menu. -- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. - Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. - Fixed cubemap thumbnail generation at project load time. @@ -64,6 +63,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Improve area light culling (case 1085873) - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. - Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. +- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. +- Utilities namespace is obsolete, moved its content to UnityEngine.Rendering (case 1204677) ## [8.0.0] - 2020-05-25 From f8d575edcee6f66afafa66c502a428f5ef684f29 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Tue, 24 Mar 2020 09:44:24 +0100 Subject: [PATCH 030/200] [8.x.x Backport] Partial fix LookDev opened when CoreRP package reimported (#6289) * Fix null texture usage happening on CoreRP upgrade * Partially fix garbage collected stylesheet issue. (Need more work on UIElement side, see case 1228706 ) * Update CHANGELOG.md * Clean log --- com.unity.render-pipelines.core/CHANGELOG.md | 4 +- .../Editor/LookDev/DisplayWindow.cs | 90 ++++++++++++++++--- .../Editor/LookDev/LookDev.cs | 21 +++-- 3 files changed, 97 insertions(+), 18 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 90b8d628086..86f7fb6773f 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -6,8 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -Version Updated -The version number for this package has increased due to a version update of a related graphics package. +### Fixed +- Fixed issue when LookDev window is opened and the CoreRP Package is updated to a newer version. ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs index e9b029d6b49..043b61a7aca 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs @@ -200,8 +200,28 @@ event Action IViewDisplayer.OnUpdateRequested remove => OnUpdateRequestedInternal -= value; } + StyleSheet styleSheet = null; + StyleSheet styleSheetLight = null; + void OnEnable() { + //Stylesheet + // Try to load stylesheet. Timing can be odd while upgrading packages (case 1219692). + // In this case, it will be fixed in OnGUI. Though it can spawn error while reimporting assets. + // Waiting for filter on stylesheet (case 1228706) to remove last error. + if (styleSheet == null || styleSheet.Equals(null)) + { + styleSheet = AssetDatabase.LoadAssetAtPath(Style.k_uss); + if (styleSheet != null && !styleSheet.Equals(null)) + rootVisualElement.styleSheets.Add(styleSheet); + } + if (!EditorGUIUtility.isProSkin && styleSheetLight != null && !styleSheetLight.Equals(null)) + { + styleSheetLight = AssetDatabase.LoadAssetAtPath(Style.k_uss_personal_overload); + if (styleSheetLight != null && !styleSheetLight.Equals(null)) + rootVisualElement.styleSheets.Add(styleSheetLight); + } + //Call the open function to configure LookDev // in case the window where open when last editor session finished. // (Else it will open at start and has nothing to display). @@ -213,15 +233,6 @@ void OnEnable() // /!\ be sure to have a minSize that will allow a non negative sized viewport even with side panel open this.minSize = new Vector2(600, 400); - rootVisualElement.styleSheets.Add( - AssetDatabase.LoadAssetAtPath(Style.k_uss)); - - if (!EditorGUIUtility.isProSkin) - { - rootVisualElement.styleSheets.Add( - AssetDatabase.LoadAssetAtPath(Style.k_uss_personal_overload)); - } - CreateToolbar(); m_MainContainer = new VisualElement() { name = Style.k_MainContainerName }; @@ -458,6 +469,9 @@ Rect IViewDisplayer.GetRect(ViewCompositionIndex index) Vector2 m_LastSecondViewSize = new Vector2(); void IViewDisplayer.SetTexture(ViewCompositionIndex index, Texture texture) { + if (texture == null) + return; + bool updated = false; switch (index) { @@ -589,6 +603,62 @@ IStyle GetEnvironmentContenairDraggerStyle() } } - void OnGUI() => OnUpdateRequestedInternal?.Invoke(); + void OnGUI() + { + //Stylesheet + // [case 1219692] if LookDev is open while reimporting CoreRP package, + // stylesheet can be null. In this case, we can have a null stylesheet + // registered as it got destroyed. Reloading it. As we cannot just + // remove a null entry, we must filter and reconstruct the while list. + if (styleSheet == null || styleSheet.Equals(null) + || (!EditorGUIUtility.isProSkin && (styleSheetLight == null || styleSheetLight.Equals(null)))) + { + // While (case 1228706) is still on going, we sill close and reopen the look dev. + // This will prevent spawning error at frame. + LookDev.Close(); + LookDev.Open(); + return; + + // Following lines is the correct fix if UIElement filter garbage collected Stylesheet. + + //System.Collections.Generic.List usedStyleSheets = new System.Collections.Generic.List(); + //int currentCount = rootVisualElement.styleSheets.count; + //for (int i = 0; i < currentCount; ++i) + //{ + // StyleSheet sheet = rootVisualElement.styleSheets[i]; + // if (sheet != null && !sheet.Equals(null)) + // usedStyleSheets.Add(sheet); + //} + //rootVisualElement.styleSheets.Clear(); + //foreach (StyleSheet sheet in usedStyleSheets) + // rootVisualElement.styleSheets.Add(sheet); + + //styleSheet = AssetDatabase.LoadAssetAtPath(Style.k_uss); + //if (styleSheet != null && !styleSheet.Equals(null)) + //{ + // rootVisualElement.styleSheets.Add(styleSheet); + // if (!EditorGUIUtility.isProSkin) + // { + // rootVisualElement.styleSheets.Add( + // AssetDatabase.LoadAssetAtPath(Style.k_uss_personal_overload)); + // } + //} + + //if (styleSheet == null || styleSheet.Equals(null)) + //{ + // styleSheet = AssetDatabase.LoadAssetAtPath(Style.k_uss); + // if (styleSheet != null && !styleSheet.Equals(null)) + // rootVisualElement.styleSheets.Add(styleSheet); + //} + //if (!EditorGUIUtility.isProSkin && styleSheetLight != null && !styleSheetLight.Equals(null)) + //{ + // styleSheetLight = AssetDatabase.LoadAssetAtPath(Style.k_uss_personal_overload); + // if (styleSheetLight != null && !styleSheetLight.Equals(null)) + // rootVisualElement.styleSheets.Add(styleSheetLight); + //} + } + + OnUpdateRequestedInternal?.Invoke(); + } } } diff --git a/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs b/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs index 59d57666f5b..08f04fb0eda 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs @@ -90,14 +90,24 @@ internal static void SaveConfig(string path = lastRenderingDataSavePath) InternalEditorUtility.SaveToSerializedFileAndForget(new[] { currentContext }, path, true); } - /// open the LookDev window + /// Open the LookDev window public static void Open() { - s_ViewDisplayer = EditorWindow.GetWindow(); - s_EnvironmentDisplayer = EditorWindow.GetWindow(); + var Window = EditorWindow.GetWindow(); + s_ViewDisplayer = Window; + s_EnvironmentDisplayer = Window; ConfigureLookDev(reloadWithTemporaryID: false); } + /// Close the LookDev window + public static void Close() + { + (s_ViewDisplayer as EditorWindow)?.Close(); + s_ViewDisplayer = null; + (s_EnvironmentDisplayer as EditorWindow)?.Close(); + s_EnvironmentDisplayer = null; + } + [Callbacks.DidReloadScripts] static void OnEditorReload() { @@ -131,7 +141,7 @@ static void WaitingSRPReloadForConfiguringRenderer(int maxAttempt, bool reloadWi () => WaitingSRPReloadForConfiguringRenderer(maxAttempt, reloadWithTemporaryID, ++attemptNumber); else { - (s_ViewDisplayer as EditorWindow)?.Close(); + Close(); throw new System.Exception("LookDev is not supported by this Scriptable Render Pipeline: " + (RenderPipelineManager.currentPipeline == null ? "No SRP in use" : RenderPipelineManager.currentPipeline.ToString())); @@ -148,8 +158,7 @@ static void ConfigureRenderer(bool reloadWithTemporaryID) static void LinkViewDisplayer() { - EditorApplication.playModeStateChanged += state => - (s_ViewDisplayer as EditorWindow)?.Close(); + EditorApplication.playModeStateChanged += state => Close(); s_ViewDisplayer.OnClosed += () => { From adf5c8f27271119935c42f4b9aa9118a92d97697 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Tue, 24 Mar 2020 09:48:07 +0100 Subject: [PATCH 031/200] [Backport 8.x.x] Hdrp/fix default volume switch (#6336) * Fixed an issue where default volume would not update when switching profile. * Fixed an issue when setting the default volume for the first time where the hdrp asset would not be dirtied * Changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../RenderPipeline/Settings/EditorDefaultSettings.cs | 3 +++ .../Runtime/RenderPipeline/HDRenderPipeline.cs | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 61a6188fefd..26d073487af 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. - Fixed cubemap thumbnail generation at project load time. +- Fixed an issue where default volume would not update when switching profile. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/EditorDefaultSettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/EditorDefaultSettings.cs index 27aba1a3297..b08e0c09d33 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/EditorDefaultSettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/EditorDefaultSettings.cs @@ -23,8 +23,11 @@ internal static VolumeProfile GetOrAssignDefaultVolumeProfile() internal static VolumeProfile GetOrAssignDefaultVolumeProfile(HDRenderPipelineAsset hdrpAsset) { if (hdrpAsset.defaultVolumeProfile == null || hdrpAsset.defaultVolumeProfile.Equals(null)) + { hdrpAsset.defaultVolumeProfile = hdrpAsset.renderPipelineEditorResources.defaultSettingsVolumeProfile; + EditorUtility.SetDirty(hdrpAsset); + } return hdrpAsset.defaultVolumeProfile; } 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 20d58b31824..b7e12c2c334 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -55,6 +55,7 @@ internal static Volume GetOrCreateDefaultVolume() s_DefaultVolume.priority = float.MinValue; s_DefaultVolume.sharedProfile = defaultVolumeProfile; } + if ( // In case the asset was deleted or the reference removed s_DefaultVolume.sharedProfile == null || s_DefaultVolume.sharedProfile.Equals(null) @@ -65,7 +66,14 @@ internal static Volume GetOrCreateDefaultVolume() || !UnityEditor.AssetDatabase.Contains(s_DefaultVolume.sharedProfile) #endif ) + { s_DefaultVolume.sharedProfile = defaultVolumeProfile; + } + + if (s_DefaultVolume.sharedProfile != defaultVolumeProfile) + { + s_DefaultVolume.sharedProfile = defaultVolumeProfile; + } return s_DefaultVolume; } From 4a02d320b88bddd4c51b304111dc1074d2ff9356 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Tue, 24 Mar 2020 09:51:41 +0100 Subject: [PATCH 032/200] [Backport 8.x.x] Fixed an issue where AO override would not override specular occlusion (#6339) * Manual cherry pick of 9162acb50898c948e35475bb1c0d58dbea4217b7 * Changelog Co-authored-by: sebastienlagarde --- .../CHANGELOG.md | 1 + .../Material/Eye/ShaderGraph/EyePass.template | 18 +++++++------- .../Fabric/ShaderGraph/FabricPass.template | 18 +++++++------- .../Hair/ShaderGraph/HairPass.template | 22 ++++++++--------- .../Lit/ShaderGraph/HDLitPass.template | 23 +++++++++--------- .../PBR/ShaderGraph/HDPBRPass.template | 6 ++--- .../ShaderGraph/StackLitPass.template | 8 +++---- .../Runtime/Debug/DebugDisplay.cs | 2 +- .../Material/LayeredLit/LayeredLitData.hlsl | 24 +++++++++---------- .../Runtime/Material/Lit/LitData.hlsl | 24 +++++++++---------- .../Material/TerrainLit/TerrainLitData.hlsl | 12 +++++----- 11 files changed, 79 insertions(+), 79 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 26d073487af..a64e114b00a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. - Fixed cubemap thumbnail generation at project load time. - Fixed an issue where default volume would not update when switching profile. +- Fixed an issue where AO override would not override specular occlusion. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template index bae9ef75d1e..488c0cdbc4c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template @@ -250,15 +250,6 @@ $include("SharedCode.template.hlsl") bentNormalWS = surfaceData.irisNormalWS; // Use diffuse normal (iris) to fetch GI, unless users provide explicit bent normal (not affected by decals) $BentNormal: GetNormalWS(fragInputs, surfaceDescription.BentNormal, bentNormalWS, doubleSidedConstants); -#if defined(_SPECULAR_OCCLUSION_CUSTOM) - // Just use the value passed through via the slot (not active otherwise) -#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL) - // If we have bent normal and ambient occlusion, process a specular occlusion - surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness)); -#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO) - surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); -#endif - #ifdef DEBUG_DISPLAY if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) { @@ -269,6 +260,15 @@ $include("SharedCode.template.hlsl") // as it can modify attribute use for static lighting ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); #endif + +#if defined(_SPECULAR_OCCLUSION_CUSTOM) + // Just use the value passed through via the slot (not active otherwise) +#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL) + // If we have bent normal and ambient occlusion, process a specular occlusion + surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness)); +#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO) + surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); +#endif } void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template index 3b5cc699b5a..9983b17ebea 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricPass.template @@ -308,15 +308,6 @@ Pass surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS); -#if defined(_SPECULAR_OCCLUSION_CUSTOM) - // Just use the value passed through via the slot (not active otherwise) -#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL) - // If we have bent normal and ambient occlusion, process a specular occlusion - surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness)); -#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO) - surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); -#endif - #if defined(DEBUG_DISPLAY) && !defined(SHADER_STAGE_RAY_TRACING) if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) { @@ -327,6 +318,15 @@ Pass // as it can modify attribute use for static lighting ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); #endif + +#if defined(_SPECULAR_OCCLUSION_CUSTOM) + // Just use the value passed through via the slot (not active otherwise) +#elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL) + // If we have bent normal and ambient occlusion, process a specular occlusion + surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, PerceptualSmoothnessToPerceptualRoughness(surfaceData.perceptualSmoothness)); +#elif defined(_AMBIENT_OCCLUSION) && defined(_SPECULAR_OCCLUSION_FROM_AO) + surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); +#endif } void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template index bb9232e3c6d..d74a36907cd 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template @@ -286,6 +286,17 @@ $include("SharedCode.template.hlsl") $BentNormal: GetNormalWS(fragInputs, surfaceDescription.BentNormal, bentNormalWS, doubleSidedConstants); +#ifdef DEBUG_DISPLAY + if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) + { + // TODO: need to update mip info + } + + // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData + // as it can modify attribute use for static lighting + ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); +#endif + #if defined(_SPECULAR_OCCLUSION_CUSTOM) // Just use the value passed through via the slot (not active otherwise) #elif defined(_SPECULAR_OCCLUSION_FROM_AO_BENT_NORMAL) @@ -298,17 +309,6 @@ $include("SharedCode.template.hlsl") #ifdef _ENABLE_GEOMETRIC_SPECULAR_AA surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold); #endif - -#ifdef DEBUG_DISPLAY - if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) - { - // TODO: need to update mip info - } - - // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData - // as it can modify attribute use for static lighting - ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); -#endif } void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template index 029ac8721d2..32319cd3db4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitPass.template @@ -333,6 +333,17 @@ Pass surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS); +#if defined(DEBUG_DISPLAY) && !defined(SHADER_STAGE_RAY_TRACING) + if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) + { + // TODO: need to update mip info + surfaceData.metallic = 0; + } + + // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData + // as it can modify attribute use for static lighting + ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); +#endif // By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion. // If user provide bent normal then we process a better term @@ -348,18 +359,6 @@ Pass #ifdef _ENABLE_GEOMETRIC_SPECULAR_AA surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, fragInputs.tangentToWorld[2], surfaceDescription.SpecularAAScreenSpaceVariance, surfaceDescription.SpecularAAThreshold); #endif - -#if defined(DEBUG_DISPLAY) && !defined(SHADER_STAGE_RAY_TRACING) - if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) - { - // TODO: need to update mip info - surfaceData.metallic = 0; - } - - // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData - // as it can modify attribute use for static lighting - ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); -#endif } void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData RAY_TRACING_OPTIONAL_PARAMETERS) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template index 9e92e0271c0..a2f37b143d8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template @@ -195,9 +195,6 @@ $include("SharedCode.template.hlsl") surfaceData.tangentWS = Orthonormalize(surfaceData.tangentWS, surfaceData.normalWS); - // By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion as PBR master node don't have any option - surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); - #ifdef DEBUG_DISPLAY if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) { @@ -209,6 +206,9 @@ $include("SharedCode.template.hlsl") // as it can modify attribute use for static lighting ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); #endif + + // By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion as PBR master node don't have any option + surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); } void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template index 6c5a9566a80..a22141de1c3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template @@ -515,10 +515,6 @@ $include("SharedCode.template.hlsl") float coatTextureFilteringVariance = 0.0; //$NormalTexturtextureFiltering: coatTextureFilteringVariance = DecodeVariance(surfaceDescription.CodedCoatNormalVarianceMeasure); - $SpecularAA: surfaceData.perceptualSmoothnessA = NormalFiltering(surfaceData.perceptualSmoothnessA, geometricVariance + textureFilteringVariance, surfaceDescription.SpecularAAThreshold); - $SpecularAA: surfaceData.perceptualSmoothnessB = NormalFiltering(surfaceData.perceptualSmoothnessB, geometricVariance + textureFilteringVariance, surfaceDescription.SpecularAAThreshold); - $SpecularAA: surfaceData.coatPerceptualSmoothness = NormalFiltering(surfaceData.coatPerceptualSmoothness, geometricVariance + coatTextureFilteringVariance, surfaceDescription.SpecularAAThreshold); - #if defined(DEBUG_DISPLAY) if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) { @@ -529,6 +525,10 @@ $include("SharedCode.template.hlsl") // as it can modify attributes used for static lighting ApplyDebugToSurfaceData(fragInputs.tangentToWorld, surfaceData); #endif + + $SpecularAA: surfaceData.perceptualSmoothnessA = NormalFiltering(surfaceData.perceptualSmoothnessA, geometricVariance + textureFilteringVariance, surfaceDescription.SpecularAAThreshold); + $SpecularAA: surfaceData.perceptualSmoothnessB = NormalFiltering(surfaceData.perceptualSmoothnessB, geometricVariance + textureFilteringVariance, surfaceDescription.SpecularAAThreshold); + $SpecularAA: surfaceData.coatPerceptualSmoothness = NormalFiltering(surfaceData.coatPerceptualSmoothness, geometricVariance + coatTextureFilteringVariance, surfaceDescription.SpecularAAThreshold); } void GetSurfaceAndBuiltinData(FragInputs fragInputs, float3 V, inout PositionInputs posInput, out SurfaceData surfaceData, out BuiltinData builtinData) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index f27b847060f..20d469a4084 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -858,7 +858,7 @@ void RegisterLightingDebug() }); } - list.Add(new DebugUI.BoolField { displayName = "Override AmbientOcclusion", getter = () => data.lightingDebugSettings.overrideAmbientOcclusion, setter = value => data.lightingDebugSettings.overrideAmbientOcclusion = value, onValueChanged = RefreshLightingDebug }); + list.Add(new DebugUI.BoolField { displayName = "Override Ambient Occlusion", getter = () => data.lightingDebugSettings.overrideAmbientOcclusion, setter = value => data.lightingDebugSettings.overrideAmbientOcclusion = value, onValueChanged = RefreshLightingDebug }); if (data.lightingDebugSettings.overrideAmbientOcclusion) { list.Add(new DebugUI.Container diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index bb6a929c12a..ab216729cbc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -785,6 +785,18 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p bentNormalWS = surfaceData.normalWS; #endif +#if defined(DEBUG_DISPLAY) && !defined(SHADER_STAGE_RAY_TRACING) + if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) + { + surfaceData.baseColor = GetTextureDataDebug(_DebugMipMapMode, layerTexCoord.base0.uv, _BaseColorMap0, _BaseColorMap0_TexelSize, _BaseColorMap0_MipInfo, surfaceData.baseColor); + surfaceData.metallic = 0; + } + + // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData + // as it can modify attribute use for static lighting + ApplyDebugToSurfaceData(input.tangentToWorld, surfaceData); +#endif + // By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion. // If user provide bent normal then we process a better term #if (defined(_BENTNORMALMAP0) || defined(_BENTNORMALMAP1) || defined(_BENTNORMALMAP2) || defined(_BENTNORMALMAP3)) && defined(_SPECULAR_OCCLUSION_FROM_BENT_NORMAL_MAP) @@ -804,18 +816,6 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, input.tangentToWorld[2], _SpecularAAScreenSpaceVariance, _SpecularAAThreshold); #endif -#if defined(DEBUG_DISPLAY) && !defined(SHADER_STAGE_RAY_TRACING) - if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) - { - surfaceData.baseColor = GetTextureDataDebug(_DebugMipMapMode, layerTexCoord.base0.uv, _BaseColorMap0, _BaseColorMap0_TexelSize, _BaseColorMap0_MipInfo, surfaceData.baseColor); - surfaceData.metallic = 0; - } - - // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData - // as it can modify attribute use for static lighting - ApplyDebugToSurfaceData(input.tangentToWorld, surfaceData); -#endif - GetBuiltinData(input, V, posInput, surfaceData, alpha, bentNormalWS, depthOffset, builtinData); RAY_TRACING_OPTIONAL_ALPHA_TEST_PASS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl index d6fe083be86..c7ea5698d82 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl @@ -259,6 +259,18 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p bentNormalWS = surfaceData.normalWS; #endif +#if defined(DEBUG_DISPLAY) && !defined(SHADER_STAGE_RAY_TRACING) + if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) + { + surfaceData.baseColor = GetTextureDataDebug(_DebugMipMapMode, layerTexCoord.base.uv, _BaseColorMap, _BaseColorMap_TexelSize, _BaseColorMap_MipInfo, surfaceData.baseColor); + surfaceData.metallic = 0; + } + + // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData + // as it can modify attribute use for static lighting + ApplyDebugToSurfaceData(input.tangentToWorld, surfaceData); +#endif + // By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion. // If user provide bent normal then we process a better term #if defined(_BENTNORMALMAP) && defined(_SPECULAR_OCCLUSION_FROM_BENT_NORMAL_MAP) @@ -281,18 +293,6 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p surfaceData.perceptualSmoothness = GeometricNormalFiltering(surfaceData.perceptualSmoothness, input.tangentToWorld[2], _SpecularAAScreenSpaceVariance, _SpecularAAThreshold); #endif -#if defined(DEBUG_DISPLAY) && !defined(SHADER_STAGE_RAY_TRACING) - if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) - { - surfaceData.baseColor = GetTextureDataDebug(_DebugMipMapMode, layerTexCoord.base.uv, _BaseColorMap, _BaseColorMap_TexelSize, _BaseColorMap_MipInfo, surfaceData.baseColor); - surfaceData.metallic = 0; - } - - // We need to call ApplyDebugToSurfaceData after filling the surfarcedata and before filling builtinData - // as it can modify attribute use for static lighting - ApplyDebugToSurfaceData(input.tangentToWorld, surfaceData); -#endif - // Caution: surfaceData must be fully initialize before calling GetBuiltinData GetBuiltinData(input, V, posInput, surfaceData, alpha, bentNormalWS, depthOffset, builtinData); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl index d970c565ac0..dbadb893782 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLitData.hlsl @@ -228,12 +228,6 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn float3 bentNormalWS = surfaceData.normalWS; - // By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion. - // Don't do spec occ from Ambient if there is no mask mask -#if defined(_MASKMAP) && !defined(_SPECULAR_OCCLUSION_NONE) - surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); -#endif - #ifdef DEBUG_DISPLAY if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) { @@ -245,5 +239,11 @@ void GetSurfaceAndBuiltinData(inout FragInputs input, float3 V, inout PositionIn ApplyDebugToSurfaceData(input.tangentToWorld, surfaceData); #endif + // By default we use the ambient occlusion with Tri-ace trick (apply outside) for specular occlusion. + // Don't do spec occ from Ambient if there is no mask mask +#if defined(_MASKMAP) && !defined(_SPECULAR_OCCLUSION_NONE) + surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness)); +#endif + GetBuiltinData(input, V, posInput, surfaceData, 1, bentNormalWS, 0, builtinData); } From 5e851ea103cd2c36c753960609fd5b70d161e17c Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Tue, 24 Mar 2020 09:54:19 +0100 Subject: [PATCH 033/200] [Backport 8.x.x] Fixed an issue where Volume inspector might not refresh correctly in some cases. (#6335) * Fixed an issue where Volume inspector might not refresh correctly in some cases. * changelog Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs | 4 ++++ com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 2 files changed, 5 insertions(+) diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs index 859a43693c5..a9e96ed1b9d 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs @@ -187,7 +187,11 @@ public override void OnInspectorGUI() else { if (assetHasChanged || profileRef != m_ComponentList.asset) + { + serializedObject.ApplyModifiedProperties(); + serializedObject.Update(); RefreshEffectListEditor(profileRef); + } if (!multiEdit) { diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a64e114b00a..9ffb6738616 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed cubemap thumbnail generation at project load time. - Fixed an issue where default volume would not update when switching profile. - Fixed an issue where AO override would not override specular occlusion. +- Fixed an issue where Volume inspector might not refresh correctly in some cases. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. From 7b46c5d3aeca99ffb061276b63cdb2fb60192951 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Wed, 25 Mar 2020 13:00:34 +0100 Subject: [PATCH 034/200] Hdrp/fix material baked emission #5392 --- .../CHANGELOG.md | 25 ++++++++++ .../Editor/Material/PBR/HDPBRLit.cs | 6 +-- .../Material/UIBlocks/EmissionUIBlock.cs | 49 +++++++++++++++++-- .../Material/UIBlocks/ShaderGraphUIBlock.cs | 8 ++- 4 files changed, 76 insertions(+), 12 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9ffb6738616..53e0ba11f64 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -69,6 +69,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. - Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. - Utilities namespace is obsolete, moved its content to UnityEngine.Rendering (case 1204677) +- Hidden unsupported choice in emission in Materials ## [8.0.0] - 2020-05-25 @@ -561,6 +562,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Hide the Probes section in the Renderer editos because it was unused. - Moved BeginCameraRendering callback right before culling. - Changed the visibility of the Indirect Lighting Controller component to public. +<<<<<<< HEAD +======= +- Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. +- Improved behaviour of transmission color on transparent surfaces in path tracing. +- Light dimmer can now get values higher than one and was renamed to multiplier in the UI. +- Removed info box requesting volume component for Visual Environment and updated the documentation with the relevant information. +- Improved light selection oracle for light sampling in path tracing. +- Stripped ray tracing subsurface passes with ray tracing is not enabled. +- Remove LOD cross fade code for ray tracing shaders +- Removed legacy VR code +- Add range-based clipping to box lights (case 1178780) +- Improve area light culling (case 1085873) +- Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. +- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. +- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. +- Utilities namespace is obsolete, moved its content to UnityEngine.Rendering (case 1204677) +- Obsolete Utilities namespace was removed, instead use UnityEngine.Rendering (case 1204677) +- Moved most of the compute shaders to the multi_compile API instead of multiple kernels. +- Use multi_compile API for deferred compute shader with shadow mask. +- Remove the raytracing rendering queue system to make recursive raytraced material work when raytracing is disabled +- Changed a few resources used by ray tracing shaders to be global resources (using register space1) for improved CPU performance. +- All custom pass volumes are now executed for one injection point instead of the first one. +- Hidden unsupported choice in emission in Materials +>>>>>>> 4e749150f9... Hdrp/fix material baked emission (#5392) ## [7.1.1] - 2019-09-05 diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs index 7fe5e89df34..8e793ffd2d4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs @@ -8,10 +8,8 @@ class HDPBRLitGUI : ShaderGUI public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { materialEditor.PropertiesDefaultGUI(props); - if (materialEditor.EmissionEnabledProperty()) - { - materialEditor.LightmapEmissionFlagsProperty(MaterialEditor.kMiniTextureFieldLabelIndentLevel, true, true); - } + + EmissionUIBlock.BakedEmissionEnabledProperty(materialEditor); // Make sure all selected materials are initialized. string materialTag = "MotionVector"; diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs index 292ac8ea228..08eeee01db4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs @@ -3,6 +3,8 @@ using UnityEngine; using UnityEngine.Rendering.HighDefinition; using UnityEngine.Rendering; +using System.Reflection; +using System.Linq.Expressions; namespace UnityEditor.Rendering.HighDefinition { @@ -17,6 +19,17 @@ public enum Features All = ~0 } + static Func GetLightingSettingsOrDefaultsFallback; + + static EmissionUIBlock() + { + Type lightMappingType = typeof(Lightmapping); + var getLightingSettingsOrDefaultsFallbackInfo = lightMappingType.GetMethod("GetLightingSettingsOrDefaultsFallback", BindingFlags.Static | BindingFlags.NonPublic); + var getLightingSettingsOrDefaultsFallbackLambda = Expression.Lambda>(Expression.Call(null, getLightingSettingsOrDefaultsFallbackInfo)); + GetLightingSettingsOrDefaultsFallback = getLightingSettingsOrDefaultsFallbackLambda.Compile(); + } + + public class Styles { public const string header = "Emission Inputs"; @@ -31,6 +44,7 @@ public class Styles public static GUIContent UVEmissiveMappingText = new GUIContent("Emission UV mapping", ""); public static GUIContent texWorldScaleText = new GUIContent("World Scale", "Sets the tiling factor HDRP applies to Planar/Trilinear mapping."); + public static GUIContent bakedEmission = new GUIContent("Baked Emission", ""); } MaterialProperty emissiveColorLDR = null; @@ -145,12 +159,41 @@ void DrawEmissionGUI() // Emission for GI? if ((m_Features & Features.EnableEmissionForGI) != 0) { - if (materialEditor.EmissionEnabledProperty()) + BakedEmissionEnabledProperty(materialEditor); + } + } + + + public static bool BakedEmissionEnabledProperty(MaterialEditor materialEditor) + { + Material[] materials = Array.ConvertAll(materialEditor.targets, (UnityEngine.Object o) => { return (Material)o; }); + + // Calculate isMixed + bool enabled = materials[0].globalIlluminationFlags == MaterialGlobalIlluminationFlags.BakedEmissive; + bool isMixed = false; + for (int i = 1; i < materials.Length; i++) + { + if ((materials[i].globalIlluminationFlags == MaterialGlobalIlluminationFlags.BakedEmissive) != enabled) + { + isMixed = true; + break; + } + } + + // initial checkbox for enabling/disabling emission + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = isMixed; + enabled = EditorGUILayout.Toggle(Styles.bakedEmission, enabled); + EditorGUI.showMixedValue = false; + if (EditorGUI.EndChangeCheck()) + { + foreach (Material mat in materials) { - // change the GI flag and fix it up with emissive as black if necessary - materialEditor.LightmapEmissionFlagsProperty(MaterialEditor.kMiniTextureFieldLabelIndentLevel, true, true); + mat.globalIlluminationFlags = enabled ? MaterialGlobalIlluminationFlags.BakedEmissive : MaterialGlobalIlluminationFlags.EmissiveIsBlack; } + return enabled; } + return !isMixed && enabled; } void DoEmissiveTextureProperty(MaterialProperty color) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs index 0648baabce4..12b758968ec 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs @@ -26,7 +26,8 @@ public enum Features protected static class Styles { - public static readonly string header = "Exposed Properties"; + public const string header = "Exposed Properties"; + public static readonly GUIContent bakedEmission = new GUIContent("Baked Emission", ""); } Expandable m_ExpandableBit; @@ -146,10 +147,7 @@ void PropertiesDefaultGUI(MaterialProperty[] properties) void DrawEmissionGI() { - if (materialEditor.EmissionEnabledProperty()) - { - materialEditor.LightmapEmissionFlagsProperty(MaterialEditor.kMiniTextureFieldLabelIndentLevel, true, true); - } + EmissionUIBlock.BakedEmissionEnabledProperty(materialEditor); } // Track additional velocity state. See SG-ADDITIONALVELOCITY-NOTE From 9ecc3c437d1da2613c7eeeed9a010d739c9e250a Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 13 Mar 2020 11:35:57 +0100 Subject: [PATCH 035/200] Fixed volume components lifespan in the clipboard #5869 --- com.unity.render-pipelines.core/CHANGELOG.md | 5 +++ .../Volume/VolumeComponentListEditor.cs | 34 +++++++++---------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 86f7fb6773f..07cd383246c 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed issue when LookDev window is opened and the CoreRP Package is updated to a newer version. +- Fixed copy/pasting of Volume Components when loading a new scene ## [8.0.0] - 2020-05-25 @@ -34,10 +35,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix LookDev EnvironmentLibrary tab when asset is deleted - Fix LookDev used Cubemap when asset is deleted - Fixed the definition of `rcp()` for GLES2. +<<<<<<< HEAD - Fix LookDev issue when adding a GameObject containing a Volume into the LookDev's view. - Fixed duplicated entry for com.unity.modules.xr in the runtime asmdef file - Fixed the texture curve being destroyed from another thread than main (case 1211754) - Fixed unreachable code in TextureXR.useTexArray +======= +- Fixed copy/pasting of Volume Components when loading a new scene +>>>>>>> 70f887c8f7... Fixed volume components lifespan in the clipboard (#5869) ### Changed - Restored usage of ENABLE_VR to fix compilation errors on some platforms. diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs index d54ced280a5..f487281dc3c 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs @@ -58,8 +58,6 @@ public sealed class VolumeComponentListEditor Dictionary m_EditorTypes; // Component type => Editor type List m_Editors; - static VolumeComponent s_ClipboardContent; - /// /// Creates a new instance of to use in an /// existing editor. @@ -416,33 +414,33 @@ internal void MoveComponent(int id, int offset) m_Editors[id] = prev; } - // Copy/pasting is simply done by creating an in memory copy of the selected component and - // copying over the serialized data to another; it doesn't use nor affect the OS clipboard static bool CanPaste(VolumeComponent targetComponent) { - return s_ClipboardContent != null - && s_ClipboardContent.GetType() == targetComponent.GetType(); + if (string.IsNullOrWhiteSpace(EditorGUIUtility.systemCopyBuffer)) + return false; + + string clipboard = EditorGUIUtility.systemCopyBuffer; + int separator = clipboard.IndexOf('|'); + + if (separator < 0) + return false; + + return targetComponent.GetType().AssemblyQualifiedName == clipboard.Substring(0, separator); } static void CopySettings(VolumeComponent targetComponent) { - if (s_ClipboardContent != null) - { - CoreUtils.Destroy(s_ClipboardContent); - s_ClipboardContent = null; - } - - s_ClipboardContent = (VolumeComponent)ScriptableObject.CreateInstance(targetComponent.GetType()); - EditorUtility.CopySerializedIfDifferent(targetComponent, s_ClipboardContent); + string typeName = targetComponent.GetType().AssemblyQualifiedName; + string typeData = JsonUtility.ToJson(targetComponent); + EditorGUIUtility.systemCopyBuffer = $"{typeName}|{typeData}"; } static void PasteSettings(VolumeComponent targetComponent) { - Assert.IsNotNull(s_ClipboardContent); - Assert.AreEqual(s_ClipboardContent.GetType(), targetComponent.GetType()); - + string clipboard = EditorGUIUtility.systemCopyBuffer; + string typeData = clipboard.Substring(clipboard.IndexOf('|') + 1); Undo.RecordObject(targetComponent, "Paste Settings"); - EditorUtility.CopySerializedIfDifferent(s_ClipboardContent, targetComponent); + JsonUtility.FromJsonOverwrite(typeData, targetComponent); } } } From 225f724db0f2b67c3b2fa7c8ddf463b5437e1ab9 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Tue, 24 Mar 2020 10:29:28 +0100 Subject: [PATCH 036/200] Hdrp/fix/particle light shadows #6111 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Lighting/Light/HDAdditionalLightData.cs | 6 +++--- .../Runtime/Lighting/Shadow/HDShadowUtils.cs | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 53e0ba11f64..ef4619b2d4c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where default volume would not update when switching profile. - Fixed an issue where AO override would not override specular occlusion. - Fixed an issue where Volume inspector might not refresh correctly in some cases. +- Half fixed shuriken particle light that cast shadows (only the first one will be correct) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index c20ec99b1ad..8429e5d3130 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -1873,7 +1873,7 @@ internal int UpdateShadowRequest(HDCamera hdCamera, HDShadowManager manager, HDS // Assign all setting common to every lights - SetCommonShadowRequestSettings(shadowRequest, cameraPos, invViewProjection, shadowRequest.deviceProjectionYFlip * shadowRequest.view, viewportSize, lightIndex); + SetCommonShadowRequestSettings(shadowRequest, visibleLight, cameraPos, invViewProjection, shadowRequest.deviceProjectionYFlip * shadowRequest.view, viewportSize, lightIndex); } shadowRequest.atlasViewport = resolutionRequest.atlasViewport; @@ -1893,7 +1893,7 @@ internal int UpdateShadowRequest(HDCamera hdCamera, HDShadowManager manager, HDS return firstShadowRequestIndex; } - void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, Vector3 cameraPos, Matrix4x4 invViewProjection, Matrix4x4 viewProjection, Vector2 viewportSize, int lightIndex) + void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, VisibleLight visibleLight, Vector3 cameraPos, Matrix4x4 invViewProjection, Matrix4x4 viewProjection, Vector2 viewportSize, int lightIndex) { // zBuffer param to reconstruct depth position (for transmission) float f = legacyLight.range; @@ -1917,7 +1917,7 @@ void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, Vector3 camer if (lightType == HDLightType.Directional || lightType == HDLightType.Spot && spotLightShape == SpotLightShape.Box) shadowRequest.position = new Vector3(shadowRequest.view.m03, shadowRequest.view.m13, shadowRequest.view.m23); else - shadowRequest.position = (ShaderConfig.s_CameraRelativeRendering != 0) ? transform.position - cameraPos : transform.position; + shadowRequest.position = (ShaderConfig.s_CameraRelativeRendering != 0) ? visibleLight.GetPosition() - cameraPos : visibleLight.GetPosition(); shadowRequest.shadowToWorld = invViewProjection.transpose; shadowRequest.zClip = (lightType != HDLightType.Directional); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs index dc1bd7a93df..e3b684ac530 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs @@ -73,7 +73,7 @@ public static void ExtractDirectionalLightData(VisibleLight visibleLight, Vector splitData.shadowCascadeBlendCullingFactor = .6f; // get lightDir - lightDir = visibleLight.light.transform.forward; + lightDir = visibleLight.GetForward(); // TODO: At some point this logic should be moved to C#, then the parameters cullResults and lightIndex can be removed as well // For directional lights shadow data is extracted from the cullResults, so that needs to be somehow provided here. // Check ScriptableShadowsUtility.cpp ComputeDirectionalShadowMatricesAndCullingPrimitives(...) for details. @@ -230,7 +230,7 @@ static Matrix4x4 ExtractSpotLightMatrix(VisibleLight vl, float spotAngle, float splitData.cullingSphere.Set(0.0f, 0.0f, 0.0f, float.NegativeInfinity); splitData.cullingPlaneCount = 0; // get lightDir - lightDir = vl.light.transform.forward; + lightDir = vl.GetForward(); // calculate view Matrix4x4 scaleMatrix = Matrix4x4.identity; scaleMatrix.m22 = -1.0f; @@ -253,9 +253,9 @@ static Matrix4x4 ExtractPointLightMatrix(VisibleLight vl, uint faceIdx, float ne splitData.cullingSphere.Set(0.0f, 0.0f, 0.0f, float.NegativeInfinity); // get lightDir - lightDir = vl.light.transform.forward; + lightDir = vl.GetForward(); // calculate the view matrices - Vector3 lpos = vl.light.transform.position; + Vector3 lpos = vl.GetPosition(); view = kCubemapFaces[faceIdx]; Vector3 inverted_viewpos = kCubemapFaces[faceIdx].MultiplyPoint(-lpos); view.SetColumn(3, new Vector4(inverted_viewpos.x, inverted_viewpos.y, inverted_viewpos.z, 1.0f)); From 305a2536ffbb449a1ffd7b293c113d3ca193ea22 Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Tue, 24 Mar 2020 09:49:16 +0100 Subject: [PATCH 037/200] Bugfix: uncached reflection probe cameras were reseting the debug mode #6245 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- .../Runtime/Utilities/CameraCache.cs | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ef4619b2d4c..d6a0e7460e3 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where AO override would not override specular occlusion. - Fixed an issue where Volume inspector might not refresh correctly in some cases. - Half fixed shuriken particle light that cast shadows (only the first one will be correct) +- Fixed issue with uncached reflection probe cameras reseting the debug mode (case 1224601) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. 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 b7e12c2c334..2626d58a71b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1525,7 +1525,7 @@ void AddHDProbeRenderRequests( for (int j = 0; j < cameraSettings.Count; ++j) { - var camera = m_ProbeCameraCache.GetOrCreate((viewerTransform, visibleProbe, j), m_FrameCount); + var camera = m_ProbeCameraCache.GetOrCreate((viewerTransform, visibleProbe, j), m_FrameCount, CameraType.Reflection); var additionalCameraData = camera.GetComponent(); if (additionalCameraData == null) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs index 01efcc665f7..16cec78e9fe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs @@ -23,11 +23,12 @@ class CameraCache: IDisposable /// /// This frame count is assigned to the returned camera to know the age of its last use. /// + /// The type of camera to create if one does not exists. /// /// The cached camera if the key was found, /// otherwise a new camera that was inserted in the cache during the call. /// - public Camera GetOrCreate(K key, int frameCount) + public Camera GetOrCreate(K key, int frameCount, CameraType cameraType = CameraType.Game) { if (m_Cache == null) throw new ObjectDisposedException(nameof(CameraCache)); @@ -35,6 +36,7 @@ public Camera GetOrCreate(K key, int frameCount) if (!m_Cache.TryGetValue(key, out var camera) || camera.camera == null || camera.camera.Equals(null)) { camera = (new GameObject().AddComponent(), frameCount); + camera.camera.cameraType = cameraType; m_Cache[key] = camera; } else From ce5e52787a0c14bb2fb844f18d74a796d8d13f2a Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 25 Mar 2020 18:50:33 +0000 Subject: [PATCH 038/200] Fix case in PBR sky where a camera below ground might invalidate result of a camera above #6272 --- .../CHANGELOG.md | 1 + .../PhysicallyBasedSky/PhysicallyBasedSky.cs | 18 +++++++++++ .../Runtime/Sky/SkyManager.cs | 32 +++++++++++++++---- .../Runtime/Sky/SkySettings.cs | 11 +++++++ 4 files changed, 55 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d6a0e7460e3..f7bddb9ab2a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where Volume inspector might not refresh correctly in some cases. - Half fixed shuriken particle light that cast shadows (only the first one will be correct) - Fixed issue with uncached reflection probe cameras reseting the debug mode (case 1224601) +- Fixed issue with atmospheric fog turning black if a planar reflection probe is placed below ground level. (case 1226588) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs index ffc2a97f4ef..202f4be7312 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs @@ -348,6 +348,24 @@ internal int GetPrecomputationHashCode() return hash; } + /// + /// Returns the hash code of the sky parameters. + /// + /// The camera we want to use to compute the hash of the sky. + /// The hash code of the sky parameters. + public override int GetHashCode(Camera camera) + { + int hash = GetHashCode(); + Vector3 cameraLocation = camera.transform.position; + float r = Vector3.Distance(cameraLocation, GetPlanetCenterPosition(cameraLocation)); + float R = GetPlanetaryRadius(); + + bool isPbrSkyActive = r > R; // Disable sky rendering below the ground + + hash = hash * 23 + isPbrSkyActive.GetHashCode(); + return hash; + } + /// Returns the hash code of the parameters of the sky. /// The hash code of the parameters of the sky. public override int GetHashCode() diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs index 447da6c071e..52bb03f685c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -643,12 +643,20 @@ bool IsCachedContextValid(SkyUpdateContext skyContext) return id != -1 && (skyContext.skySettings.GetSkyRendererType() == m_CachedSkyContexts[id].type) && (m_CachedSkyContexts[id].hash != 0); } - int ComputeSkyHash(SkyUpdateContext skyContext, Light sunLight, SkyAmbientMode ambientMode, bool staticSky = false) + int ComputeSkyHash(HDCamera camera, SkyUpdateContext skyContext, Light sunLight, SkyAmbientMode ambientMode, bool staticSky = false) { int sunHash = 0; if (sunLight != null) sunHash = GetSunLightHashCode(sunLight); - int skyHash = sunHash * 23 + skyContext.skySettings.GetHashCode(); + + // For planar reflections we want to use the parent position for hash. + Camera cameraForHash = camera.camera; + if (camera.camera.cameraType == CameraType.Reflection && camera.parentCamera != null) + { + cameraForHash = camera.parentCamera; + } + + int skyHash = sunHash * 23 + skyContext.skySettings.GetHashCode(cameraForHash); skyHash = skyHash * 23 + (staticSky ? 1 : 0); skyHash = skyHash * 23 + (ambientMode == SkyAmbientMode.Static ? 1 : 0); return skyHash; @@ -684,14 +692,24 @@ public void UpdateEnvironment( HDCamera hdCamera, m_BuiltinParameters.commandBuffer = cmd; m_BuiltinParameters.sunLight = sunLight; m_BuiltinParameters.pixelCoordToViewDirMatrix = hdCamera.mainViewConstants.pixelCoordToViewDirWS; - m_BuiltinParameters.worldSpaceCameraPos = hdCamera.mainViewConstants.worldSpaceCameraPos; + Vector3 worldSpaceCameraPos = hdCamera.mainViewConstants.worldSpaceCameraPos; + // For planar reflections we use the parent camera position for all the runtime computations. + // This is to avoid cases in which the probe camera is below ground and the parent is not, leading to + // in case of PBR sky to a black sky. All other parameters are left as is. + // This can introduce inaccuracies, but they should be acceptable if the distance parent camera - probe camera is + // small. + if (hdCamera.camera.cameraType == CameraType.Reflection && hdCamera.parentCamera != null) + { + worldSpaceCameraPos = hdCamera.parentCamera.transform.position; + } + m_BuiltinParameters.worldSpaceCameraPos = worldSpaceCameraPos; m_BuiltinParameters.viewMatrix = hdCamera.mainViewConstants.viewMatrix; m_BuiltinParameters.screenSize = m_CubemapScreenSize; m_BuiltinParameters.debugSettings = null; // We don't want any debug when updating the environment. m_BuiltinParameters.frameIndex = frameIndex; m_BuiltinParameters.skySettings = skyContext.skySettings; - int skyHash = ComputeSkyHash(skyContext, sunLight, ambientMode, staticSky); + int skyHash = ComputeSkyHash(hdCamera, skyContext, sunLight, ambientMode, staticSky); bool forceUpdate = updateRequired; // Acquire the rendering context, if the context was invalid or the hash has changed, this will request for an update. @@ -751,7 +769,7 @@ public void UpdateEnvironment( HDCamera hdCamera, #if UNITY_EDITOR // In the editor when we change the sky we want to make the GI dirty so when baking again the new sky is taken into account. // Changing the hash of the rendertarget allow to say that GI is dirty - renderingContext.skyboxCubemapRT.rt.imageContentsHash = new Hash128((uint)skyContext.skySettings.GetHashCode(), 0, 0, 0); + renderingContext.skyboxCubemapRT.rt.imageContentsHash = new Hash128((uint)skyContext.skySettings.GetHashCode(hdCamera.camera), 0, 0, 0); #endif } } @@ -837,7 +855,7 @@ public void PreRenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer cmd); SkyAmbientMode ambientMode = hdCamera.volumeStack.GetComponent().skyAmbientMode.value; - int skyHash = ComputeSkyHash(skyContext, sunLight, ambientMode); + int skyHash = ComputeSkyHash(hdCamera, skyContext, sunLight, ambientMode); AcquireSkyRenderingContext(skyContext, skyHash); skyContext.skyRenderer.DoUpdate(m_BuiltinParameters); if (depthBuffer != BuiltinSkyParameters.nullRT && normalBuffer != BuiltinSkyParameters.nullRT) @@ -869,7 +887,7 @@ public void RenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, R cmd); SkyAmbientMode ambientMode = hdCamera.volumeStack.GetComponent().skyAmbientMode.value; - int skyHash = ComputeSkyHash(skyContext, sunLight, ambientMode); + int skyHash = ComputeSkyHash(hdCamera, skyContext, sunLight, ambientMode); AcquireSkyRenderingContext(skyContext, skyHash); skyContext.skyRenderer.DoUpdate(m_BuiltinParameters); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkySettings.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkySettings.cs index d7bbcbca572..73c790cad10 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkySettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkySettings.cs @@ -139,6 +139,17 @@ public abstract class SkySettings : VolumeComponent /// /// Returns the hash code of the sky parameters. /// + /// The camera we want to use to compute the hash of the sky. + /// The hash code of the sky parameters. + virtual public int GetHashCode(Camera camera) + { + // By default we don't need to consider the camera position. + return GetHashCode(); + } + + /// + /// Returns the hash code of the sky parameters. When used with PBR Sky please use the GetHashCode variant that takes a camera as parameter. + /// /// The hash code of the sky parameters. public override int GetHashCode() { From 58c81b6c11a1ca0d83864684a9bb0981e63e7bf5 Mon Sep 17 00:00:00 2001 From: skhiat <55133890+skhiat@users.noreply.github.com> Date: Tue, 24 Mar 2020 10:27:01 +0100 Subject: [PATCH 039/200] Hdrp/probe scale 1219246 (#6288) * Fix when scale down < 0 all direction of box Influence Volume * Update Change log --- .../CHANGELOG.md | 1 + .../Reflection/PlanarReflectionProbeEditor.cs | 7 +++---- .../Volume/InfluenceVolumeUI.Drawers.cs | 15 ++++++++++----- .../Volume/InfluenceVolumeUI.Handles.cs | 12 +++++++----- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index f7bddb9ab2a..56a54a84a1b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -141,6 +141,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added the Tint parameter to Sky Colored Fog. ### Fixed +- Fix when rescale probe all direction below zero (1219246) - Update documentation of HDRISky-Backplate, precise how to have Ambient Occlusion on the Backplate - Sorting, undo, labels, layout in the Lighting Explorer. - Fixed sky settings and materials in Shader Graph Samples package diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs index 2824111b0aa..cbece4f9ae9 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs @@ -161,7 +161,7 @@ void OnOverlayGUI(Object target, SceneView sceneView) var previewWidth = k_PreviewHeight; var previewSize = new Rect(previewWidth, k_PreviewHeight + EditorGUIUtility.singleLineHeight + 2, 0, 0); - + if (Event.current.type == EventType.Layout || !firstDraw && Event.current.type == EventType.Repaint) { @@ -304,7 +304,7 @@ static void DrawCapturePositionGizmo(PlanarReflectionProbe probe) k_PreviewMaterial.SetPass(0); Graphics.DrawMeshNow(k_QuadMesh, Matrix4x4.TRS(mirrorPosition, mirrorRotation, Vector3.one * capturePointPreviewSize * 2)); } - + static void InitIcons() { s_MipMapLow = EditorGUIUtility.IconContent("PreTextureMipMapLow"); @@ -320,7 +320,6 @@ struct PlanarReflectionProbeUISettingsProvider : HDProbeUI.IProbeUISettingsProvi bool InfluenceVolumeUI.IInfluenceUISettingsProvider.drawNormal => false; bool InfluenceVolumeUI.IInfluenceUISettingsProvider.drawFace => false; - ProbeSettingsOverride HDProbeUI.IProbeUISettingsProvider.displayedCaptureSettings => new ProbeSettingsOverride { probe = ProbeSettingsFields.frustumFieldOfViewMode @@ -360,7 +359,7 @@ struct PlanarReflectionProbeUISettingsProvider : HDProbeUI.IProbeUISettingsProvi camera = CameraSettingsFields.none } }; - + Type HDProbeUI.IProbeUISettingsProvider.customTextureType => typeof(Texture2D); static readonly HDProbeUI.ToolBar[] k_Toolbars = { diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs index 43258ec6d7d..9e4443bbc2e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs @@ -17,7 +17,6 @@ public static void Draw(SerializedInfluenceVolume serialized, Editor { var provider = new TProvider(); - EditorGUILayout.PropertyField(serialized.shape, shapeContent); switch ((InfluenceShape)serialized.shape.intValue) { @@ -57,7 +56,7 @@ public static void SetInfluenceAdvancedControlSwitch(SerializedInfluenceVolume s static void Drawer_SectionShapeBox(SerializedInfluenceVolume serialized, Editor owner, bool drawOffset, bool drawNormal, bool drawFace) { bool advanced = serialized.editorAdvancedModeEnabled.boolValue; - + //small piece of init logic previously in the removed Drawer_InfluenceAdvancedSwitch s_BoxBaseHandle.monoHandle = false; s_BoxInfluenceHandle.monoHandle = !advanced; @@ -71,6 +70,13 @@ static void Drawer_SectionShapeBox(SerializedInfluenceVolume serialized, Editor EditorGUILayout.PropertyField(serialized.boxSize, boxSizeContent); if (EditorGUI.EndChangeCheck()) { + Vector3 localSize = serialized.boxSize.vector3Value; + for (int i = 0; i < 3; ++i) + { + localSize[i] = Mathf.Max(Mathf.Epsilon, localSize[i]); + } + serialized.boxSize.vector3Value = localSize; + Vector3 blendPositive = serialized.boxBlendDistancePositive.vector3Value; Vector3 blendNegative = serialized.boxBlendDistanceNegative.vector3Value; Vector3 blendNormalPositive = serialized.boxBlendNormalDistancePositive.vector3Value; @@ -112,7 +118,7 @@ static void Drawer_SectionShapeBox(SerializedInfluenceVolume serialized, Editor EditorGUILayout.EndHorizontal(); GUILayout.Space(EditorGUIUtility.standardVerticalSpacing); - + EditorGUILayout.PropertyField(serialized.editorAdvancedModeEnabled, manipulatonTypeContent); EditorGUILayout.BeginHorizontal(); @@ -152,7 +158,7 @@ static void Drawer_AdvancedBlendDistance(SerializedInfluenceVolume serialized, b SerializedProperty editorSimplifiedModeBlendDistance = isNormal ? serialized.editorSimplifiedModeBlendNormalDistance : serialized.editorSimplifiedModeBlendDistance; Vector3 bdp = blendDistancePositive.vector3Value; Vector3 bdn = blendDistanceNegative.vector3Value; - + //resync to be sure prefab revert will keep syncs if (serialized.editorAdvancedModeEnabled.boolValue) { @@ -218,7 +224,6 @@ static void Drawer_AdvancedBlendDistance(SerializedInfluenceVolume serialized, b static void Drawer_SectionShapeSphere(SerializedInfluenceVolume serialized, Editor owner, bool drawOffset, bool drawNormal) { - EditorGUILayout.BeginHorizontal(); EditorGUILayout.PropertyField(serialized.sphereRadius, radiusContent); HDProbeUI.Drawer_ToolBarButton(HDProbeUI.ToolBar.InfluenceShape, owner, GUILayout.Width(28f), GUILayout.MinHeight(22f)); diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs index 2c8d06372fc..6591265fc2d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs @@ -23,6 +23,12 @@ public static void DrawHandles_EditBase(SerializedInfluenceVolume serialized, Ed s_SphereBaseHandle.DrawHandle(); if (EditorGUI.EndChangeCheck()) { + Vector3 localSize = serialized.boxSize.vector3Value; + for (int i = 0; i < 3; ++i) + { + localSize[i] = Mathf.Max(Mathf.Epsilon, localSize[i]); + } + serialized.boxSize.vector3Value = localSize; float radius = s_SphereBaseHandle.radius; serialized.sphereRadius.floatValue = radius; serialized.sphereBlendDistance.floatValue = Mathf.Clamp(serialized.sphereBlendDistance.floatValue, 0, radius); @@ -101,7 +107,7 @@ static void DrawBoxHandle(SerializedInfluenceVolume serialized, Editor owner, Tr { using (new Handles.DrawingScope(Matrix4x4.TRS(Vector3.zero, transform.rotation, Vector3.one))) { - box.center = Quaternion.Inverse(transform.rotation) * transform.position; + box.center = Quaternion.Inverse(transform.rotation)*transform.position; box.size = serialized.boxSize.vector3Value; EditorGUI.BeginChangeCheck(); @@ -109,10 +115,6 @@ static void DrawBoxHandle(SerializedInfluenceVolume serialized, Editor owner, Tr box.DrawHandle(); if (EditorGUI.EndChangeCheck()) { - var newPosition = transform.rotation * box.center; - Undo.RecordObject(transform, "Moving Influence"); - transform.position = newPosition; - // Clamp blend distances var blendPositive = serialized.boxBlendDistancePositive.vector3Value; var blendNegative = serialized.boxBlendDistanceNegative.vector3Value; From 98c3f8f53cb893f70f771f8a766b15491b4040dd Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Thu, 26 Mar 2020 12:51:24 +0100 Subject: [PATCH 040/200] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 56a54a84a1b..ddb47ebeda6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Half fixed shuriken particle light that cast shadows (only the first one will be correct) - Fixed issue with uncached reflection probe cameras reseting the debug mode (case 1224601) - Fixed issue with atmospheric fog turning black if a planar reflection probe is placed below ground level. (case 1226588) +- Fix when rescale probe all direction below zero (1219246) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. @@ -141,7 +142,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added the Tint parameter to Sky Colored Fog. ### Fixed -- Fix when rescale probe all direction below zero (1219246) - Update documentation of HDRISky-Backplate, precise how to have Ambient Occlusion on the Backplate - Sorting, undo, labels, layout in the Lighting Explorer. - Fixed sky settings and materials in Shader Graph Samples package From ed0969c63692393bc53534295e22ce5b655c1143 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 24 Mar 2020 09:04:12 +0000 Subject: [PATCH 041/200] Split set rendering feature set and API validity check #6301 --- .../CHANGELOG.md | 1 + .../RenderPipeline/HDRenderPipeline.cs | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ddb47ebeda6..25a610b55f0 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -61,6 +61,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with uncached reflection probe cameras reseting the debug mode (case 1224601) - Fixed issue with atmospheric fog turning black if a planar reflection probe is placed below ground level. (case 1226588) - Fix when rescale probe all direction below zero (1219246) +- Fixed issue with resources being accessed before initialization process has been performed completely. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. 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 2626d58a71b..f528c77255c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -331,12 +331,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau m_ValidAPI = true; - if (!SetRenderingFeatures()) - { - m_ValidAPI = false; - - return; - } + SetRenderingFeatures(); // The first thing we need to do is to set the defines that depend on the render pipeline settings m_RayTracingSupported = GatherRayTracingSupport(m_Asset.currentPlatformRenderPipelineSettings); @@ -359,6 +354,14 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau ValidateResources(); #endif + // We need to call this after the resource initialization as we attempt to use them in checking the supported API. + if (!CheckAPIValidity()) + { + m_ValidAPI = false; + + return; + } + // Initial state of the RTHandle system. // Tells the system that we will require MSAA or not so that we can avoid wasteful render texture allocation. // TODO: Might want to initialize to at least the window resolution to avoid un-necessary re-alloc in the player @@ -648,7 +651,7 @@ void DestroyRenderTextures() RTHandles.Release(m_CameraSssDiffuseLightingMSAABuffer); } - bool SetRenderingFeatures() + void SetRenderingFeatures() { // Set sub-shader pipeline tag Shader.globalRenderPipeline = "HDRenderPipeline"; @@ -691,7 +694,10 @@ bool SetRenderingFeatures() Debug.LogError("High Definition Render Pipeline doesn't support Gamma mode, change to Linear mode (HDRP isn't set up properly. Go to Windows > RenderPipeline > HDRP Wizard to fix your settings)."); } #endif + } + bool CheckAPIValidity() + { GraphicsDeviceType unsupportedDeviceType; if (!IsSupportedPlatform(out unsupportedDeviceType)) { From 0dbea133a757f7e1016d02d3fcbf58cbe7f4297f Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Tue, 24 Mar 2020 05:00:54 -0400 Subject: [PATCH 042/200] Fix Render Texture with XR #6306 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 25a610b55f0..b073cab1d73 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -62,6 +62,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with atmospheric fog turning black if a planar reflection probe is placed below ground level. (case 1226588) - Fix when rescale probe all direction below zero (1219246) - Fixed issue with resources being accessed before initialization process has been performed completely. +- Fixed render texture with XR ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. 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 f528c77255c..e1dc2e071b5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1782,7 +1782,7 @@ ref _cullingResults } // Render XR mirror view once all render requests have been completed - if (i == 0 && renderRequest.hdCamera.camera.cameraType == CameraType.Game) + if (i == 0 && renderRequest.hdCamera.camera.cameraType == CameraType.Game && renderRequest.hdCamera.camera.targetTexture == null) { m_XRSystem.RenderMirrorView(cmd); } From 91e4b0dc7a041fcc2b01c55a4cf37649a7f47d74 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Tue, 24 Mar 2020 04:40:41 -0400 Subject: [PATCH 043/200] Fix sRGB mismatch with XR SDK #6311 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/XR/XRSystem.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b073cab1d73..df08ea2f465 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix when rescale probe all direction below zero (1219246) - Fixed issue with resources being accessed before initialization process has been performed completely. - Fixed render texture with XR +- Fixed sRGB mismatch with XR SDK ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index 36fc9f4d668..9e52495229d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -76,7 +76,10 @@ internal static void XRSystemInit() SubsystemManager.GetInstances(displayList); for (int i = 0; i < displayList.Count; i++) + { displayList[i].disableLegacyRenderer = true; + displayList[i].sRGB = true; + } } #endif From acea9c4410762e59dca9311424bd06e058df13b1 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Tue, 24 Mar 2020 04:39:57 -0400 Subject: [PATCH 044/200] Fix XR single-pass with Mock HMD plugin #6313 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/XR/XRSystem.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index df08ea2f465..4f534787750 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with resources being accessed before initialization process has been performed completely. - Fixed render texture with XR - Fixed sRGB mismatch with XR SDK +- Fixed XR single-pass with Mock HMD plugin ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index 9e52495229d..4b89ae1d46c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -170,6 +170,7 @@ bool RefreshXrSdk() display = displayList[0]; display.disableLegacyRenderer = true; + display.textureLayout = XRDisplaySubsystem.TextureLayout.Texture2DArray; return display.running; } From 912653192ca1973d44e6b612396bf899bb50a552 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Tue, 24 Mar 2020 04:38:58 -0400 Subject: [PATCH 045/200] Fix XR culling with multiple cameras #6314 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 4f534787750..c647d5a96e5 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed render texture with XR - Fixed sRGB mismatch with XR SDK - Fixed XR single-pass with Mock HMD plugin +- Fixed XR culling with multiple cameras ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. 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 e1dc2e071b5..625add2e1eb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1310,7 +1310,7 @@ protected override void Render(ScriptableRenderContext renderContext, Camera[] c { foreach (var req in renderRequests) { - if (req.hdCamera.xr.cullingPassId == xrPass.cullingPassId) + if (camera == req.hdCamera.camera && req.hdCamera.xr.cullingPassId == xrPass.cullingPassId) { UnsafeGenericPool.Release(cullingResults); cullingResults = req.cullingResults; From 86f417a853557efb8aec118e00bc898779364c41 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Tue, 24 Mar 2020 09:32:43 +0100 Subject: [PATCH 046/200] Add custom pass opaque rendering error message #6330 --- .../CHANGELOG.md | 1 + .../Documentation~/Custom-Pass.md | 2 ++ .../DrawRenderersCustomPassDrawer.cs | 36 +++++++++++++++++-- .../RenderPass/CustomPass/CustomPass.cs | 3 ++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c647d5a96e5..ed1d3a844fd 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added an "enable" toggle to the SSR volume component. - Added support of cookie baking and add support on Disc light. - Added XR setting to control camera jitter for temporal effects +- Added an error message in the DrawRenderers custom pass when rendering opaque objects with an HDRP asset in DeferredOnly mode. ### Fixed - Fix Changelog diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md index ffdf3b73987..b5f7172e4d4 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md @@ -198,6 +198,8 @@ Here is the list of all the defines you can enable Note that you can also override the depth state of the objects in your pass. This is especially useful when you're rendering objects that are not in the camera culling mask (they are only rendered in the custom pass). Because in these objects, opaque ones will be rendered in `Depth Equal` test which only works if they already are in the depth buffer. In this case you may want to override the depth test to `Less Equal`. +**⚠️ Be careful when rendering Opaque objects if you're in deferred: All objects rendered within custom passes are rendered in Forward. It means that you'll need to set your HDRP settings Lit Shader Mode to 'Both' in case you encounter issues when building in release.** + ## Scripting API diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs index 0a95065fac7..63d835a7615 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs @@ -23,6 +23,7 @@ private class Styles public static float defaultLineSpace = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; public static float reorderableListHandleIndentWidth = 12; public static float indentSpaceInPixels = 16; + public static float helpBoxHeight = EditorGUIUtility.singleLineHeight * 2; public static GUIContent callback = new GUIContent("Event", "Chose the Callback position for this render pass object."); public static GUIContent enabled = new GUIContent("Enabled", "Enable or Disable the custom pass"); @@ -54,6 +55,7 @@ private class Styles public static string unlitShaderMessage = "HDRP Unlit shaders will force the shader passes to \"ForwardOnly\""; public static string hdrpLitShaderMessage = "HDRP Lit shaders are not supported in a custom pass"; + public static string opaqueObjectWithDeferred = "Your HDRP settings does not support ForwardOnly, some object might not render."; } //Headers and layout @@ -154,6 +156,23 @@ protected override void DoPassGUI(SerializedProperty customPass, Rect rect) } } + // Tel if we need to show a warning for rendering opaque object and we're in deferred. + bool ShowOpaqueObjectWarning() + { + // Only opaque objects are concerned + RenderQueueRange currentRange = CustomPass.GetRenderQueueRangeFromRenderQueueType((CustomPass.RenderQueueType)m_RenderQueue.intValue); + var allOpaque = HDRenderQueue.k_RenderQueue_AllOpaque; + bool customPassQueueContainsOpaqueObjects = currentRange.upperBound >= allOpaque.lowerBound && currentRange.lowerBound <= allOpaque.upperBound; + if (!customPassQueueContainsOpaqueObjects) + return false; + + // Only Deferred rendering + if (HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.supportedLitShaderMode != RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly) + return false; + + return true; + } + void DoFilters(ref Rect rect) { m_FilterFoldout.boolValue = EditorGUI.Foldout(rect, m_FilterFoldout.boolValue, Styles.filtersHeader, true); @@ -166,10 +185,17 @@ void DoFilters(ref Rect rect) // TODO: remove all this code when the fix for SerializedReference lands m_RenderQueue.intValue = (int)(CustomPass.RenderQueueType)EditorGUI.EnumPopup(rect, Styles.renderQueueFilter, (CustomPass.RenderQueueType)m_RenderQueue.intValue); rect.y += Styles.defaultLineSpace; + if (ShowOpaqueObjectWarning()) + { + Rect helpBoxRect = rect; + helpBoxRect.xMin += EditorGUI.indentLevel * Styles.indentSpaceInPixels; + helpBoxRect.height = Styles.helpBoxHeight; + EditorGUI.HelpBox(helpBoxRect, Styles.opaqueObjectWithDeferred, MessageType.Error); + rect.y += Styles.helpBoxHeight; + } //Layer mask EditorGUI.PropertyField(rect, m_LayerMask, Styles.layerMask); rect.y += Styles.defaultLineSpace; - //Shader pass list EditorGUI.indentLevel--; } } @@ -268,7 +294,13 @@ bool IsHDRPShader() protected override float GetPassHeight(SerializedProperty customPass) { - float height = Styles.defaultLineSpace * (m_FilterFoldout.boolValue ? m_FilterLines : 1); + float height = Styles.defaultLineSpace; + + if (m_FilterFoldout.boolValue) + { + height *= m_FilterLines; + height += ShowOpaqueObjectWarning() ? Styles.helpBoxHeight : 0; + } height += Styles.defaultLineSpace; // add line for overrides dropdown if (m_RendererFoldout.boolValue) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs index 1a5515ccd0a..8c9de63e61f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs @@ -375,6 +375,9 @@ protected RTHandle GetNormalBuffer() /// The custom pass render queue type. /// Returns a render queue range compatible with a ScriptableRenderContext.DrawRenderers. protected RenderQueueRange GetRenderQueueRange(CustomPass.RenderQueueType type) + => GetRenderQueueRangeFromRenderQueueType(type); + + internal static RenderQueueRange GetRenderQueueRangeFromRenderQueueType(RenderQueueType type) { switch (type) { From 446ba01adbd5c0256a7d79c15f43535b07143e21 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Tue, 24 Mar 2020 08:59:05 +0000 Subject: [PATCH 047/200] Update Light-Component.md (#6332) --- .../Documentation~/Light-Component.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md index 8367bc33edd..f5029e94aaa 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md @@ -184,13 +184,13 @@ These settings define the volumetric behavior of this Light. Alter these setting ### **Shadows** -Use the Shadows section to adjust the Shadows cast by this Light. HDRP currently does not support shadowing **Tube** Lights. Because of this, Unity does not expose the **Shadows** drop-down section in the Inspector when you select this **Type**. The Light **Types** that HDRP does support shadowing for (**Spot**, **Directional**, and **Point**) share almost all of their properties. +Use this section to adjust the Shadows cast by this Light. Note that Area Lights can't currently cast shadows for GameObjects that use a **StackLit** Material. -Unity exposes extra properties in the **Shadows** section depending on the **Mode** you set in the [General](#GeneralProperties) section. It also exposes extra properties depending on the **Filtering Quality** set in your Unity Project’s [HDRP Asset](HDRP-Asset.html). To change the **Filtering Quality** property, navigate to your Project’s **HDRP Asset > Shadows** and use the **Filtering Quality** drop-down to select the shadow filtering mode. Setting **Filtering Quality** to **High** exposes extra properties in the Light Inspector’s **Shadow** drop-down section. +Unity exposes extra properties in this section depending on the **Mode** you set in the [General](#GeneralProperties) section. Unity also exposes extra properties depending on the **Filtering Quality** set in your Unity Project’s [HDRP Asset](HDRP-Asset.html). -• For more information on shadow filtering in HDRP, see the documentation on [Shadow Filtering](Shadows-in-HDRP.html#ShadowFiltering). +• For more information on shadow filtering in HDRP, see [Shadow Filtering](Shadows-in-HDRP.html#ShadowFiltering). -• For a list of the the available filter quality presets in HDRP, see the [Filtering Qualities table](HDRP-Asset.html#FilteringQualities). +• For a list of the available filter quality presets in HDRP, see the [Filtering Qualities table](HDRP-Asset.html#FilteringQualities). #### Properties @@ -202,7 +202,7 @@ This section is only available in Realtime or Mixed light **Mode**. | -------------------------- | ------------------------------------------------------------ | | **Enable** | Enable the checkbox to let this Light cast shadows. | | **Update Mode** | Use the drop-down to select the mode that HDRP uses to determine when to update a shadow map.
For information on the modes available, see the [Shadows in HDRP documentation](Shadows-in-HDRP.html#ShadowUpdateMode). | -| **Resolution** | Set the resolution of this Light’s shadow maps. Use the drop-down to set the modeIf you enable , use the drop-down to select which quality mode to derive the resolution from. If you do not enable **Use Quality Settings**, set the resolution, measured in pixels, in the input field.A higher resolution increases the fidelity of shadows at the cost of GPU performance and memory usage, so if you experience any performance issues, try using a lower value. | +| **Resolution** | Set the resolution of this Light’s shadow maps. Use the drop-down to select which quality mode to derive the resolution from. If you do not enable **Use Quality Settings**, or you select **Custom**, set the resolution, measured in pixels, in the input field.
A higher resolution increases the fidelity of shadows at the cost of GPU performance and memory usage, so if you experience any performance issues, try using a lower value. | | **Near Plane** | The distance, in meters, from the Light that GameObjects begin to cast shadows. | | **Shadowmask Mode** | Defines how the shadowmask behaves for this Light. For detailed information on each **Shadowmask Mode**, see the documentation on [Shadowmasks](Shadows-in-HDRP.html#ShadowmaskModes). This property is only visible if you tet the **Mode**, under [General](#GeneralProperties), to **Mixed**. | | **Slope-Scale Depth Bias** | Use the slider to set the bias that HDRP adds to the distance in this Light's shadow map to avoid self intersection. This bias is proportional to the slope of the polygons represented in the shadow map.
This property only appears when you enable [more options](More-Options.html) for this section. | From 0f3337511df813c786b96a587117cf6a3933478c Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Thu, 26 Mar 2020 13:13:48 +0100 Subject: [PATCH 048/200] Update CHANGELOG.md --- com.unity.render-pipelines.core/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index e6abda1b770..1a05224fc0e 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -39,7 +39,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed duplicated entry for com.unity.modules.xr in the runtime asmdef file - Fixed the texture curve being destroyed from another thread than main (case 1211754) - Fixed unreachable code in TextureXR.useTexArray -- Fixed copy/pasting of Volume Components when loading a new scene ### Changed - Restored usage of ENABLE_VR to fix compilation errors on some platforms. From 7ab67ddab53e57a428976bddecfc637aa9e08831 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Thu, 26 Mar 2020 13:19:32 +0100 Subject: [PATCH 049/200] Update TextureCurve.cs --- .../Runtime/Utilities/TextureCurve.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs b/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs index 8d9f83885f3..5a5513d49af 100644 --- a/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs +++ b/com.unity.render-pipelines.core/Runtime/Utilities/TextureCurve.cs @@ -14,7 +14,7 @@ namespace UnityEngine.Rendering /// A wrapper around AnimationCurve to automatically bake it into a texture. ///
[Serializable] - public class TextureCurve + public class TextureCurve : IDisposable { const int k_Precision = 128; // Edit LutBuilder3D if you change this value const float k_Step = 1f / k_Precision; @@ -78,6 +78,7 @@ public TextureCurve(Keyframe[] keys, float zeroValue, bool loop, in Vector2 boun } /// + /// Finalizer. /// ~TextureCurve() {} @@ -255,4 +256,4 @@ public TextureCurveParameter(TextureCurve value, bool overrideState = false) // TODO: TextureCurve interpolation } -} \ No newline at end of file +} From 3fa39ef99c0f3b3715e18e02c901efda2047e82b Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Wed, 25 Mar 2020 23:37:10 +0100 Subject: [PATCH 050/200] fix merge issue --- .../Editor/Utilities/EditorMaterialQuality.cs | 1 + .../Runtime/Utilities/MaterialQuality.cs | 175 +----------------- .../RenderPipeline/HDRenderPipelineUI.cs | 1 + .../Settings/FrameSettingsUI.Drawers.cs | 3 +- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 1 + .../RenderPipeline/HDRenderPipeline.cs | 1 + .../RenderPipeline/HDRenderPipelineAsset.cs | 1 + .../RenderPipeline/Settings/FrameSettings.cs | 1 + 8 files changed, 10 insertions(+), 174 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs b/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs index 28c3c31ae9b..b61838e0793 100644 --- a/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs +++ b/com.unity.render-pipelines.core/Editor/Utilities/EditorMaterialQuality.cs @@ -1,4 +1,5 @@ using UnityEngine.Rendering; +using Utilities; namespace UnityEditor.Rendering.Utilities { diff --git a/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs b/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs index 01c62081140..3975343b72c 100644 --- a/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs +++ b/com.unity.render-pipelines.core/Runtime/Utilities/MaterialQuality.cs @@ -1,183 +1,13 @@ using System; +using UnityEngine; +using UnityEngine.Rendering; -namespace UnityEngine.Rendering -{ - /// - /// Material quality flags. - /// - [Flags] - public enum MaterialQuality - { - /// Low Material Quality. - Low = 1 << 0, - /// Medium Material Quality. - Medium = 1 << 1, - /// High Material Quality. - High = 1 << 2 - } - - /// - /// Material Quality utility class. - /// - public static class MaterialQualityUtilities - { - /// - /// Keywords strings for Material Quality levels. - /// - public static string[] KeywordNames = - { - "MATERIAL_QUALITY_LOW", - "MATERIAL_QUALITY_MEDIUM", - "MATERIAL_QUALITY_HIGH", - }; - - /// - /// String representation of the MaterialQuality enum. - /// - public static string[] EnumNames = Enum.GetNames(typeof(MaterialQuality)); - - /// - /// Keywords for Material Quality levels. - /// - public static ShaderKeyword[] Keywords = - { - new ShaderKeyword(KeywordNames[0]), - new ShaderKeyword(KeywordNames[1]), - new ShaderKeyword(KeywordNames[2]), - }; - - /// - /// Returns the highest available quality level in a MaterialQuality bitfield. - /// - /// Input MaterialQuality bitfield. - /// The highest available quality level. - public static MaterialQuality GetHighestQuality(this MaterialQuality levels) - { - for (var i = Keywords.Length - 1; i >= 0; --i) - { - var level = (MaterialQuality) (1 << i); - if ((levels & level) != 0) - return level; - } - - return 0; - } - - /// - /// Returns the closest available quality level in a MaterialQuality bitfield. - /// - /// Available MaterialQuality bitfield. - /// Input MaterialQuality level. - /// The closest available quality level. - public static MaterialQuality GetClosestQuality(this MaterialQuality availableLevels, MaterialQuality requestedLevel) - { - // Special fallback when there are no available quality levels. Needs to match in the shader stripping code - if (availableLevels == 0) - return MaterialQuality.Low; - - // First we want to find the closest available quality level below the requested one. - int requestedLevelIndex = ToFirstIndex(requestedLevel); - MaterialQuality chosenQuality = (MaterialQuality)0; - for (int i = requestedLevelIndex; i >= 0; --i) - { - var level = FromIndex(i); - if ((level & availableLevels) != 0) - { - chosenQuality = level; - break; - } - } - - if (chosenQuality != 0) - return chosenQuality; - - // If none is found then we fallback to the closest above. - for (var i = requestedLevelIndex + 1; i < Keywords.Length; ++i) - { - var level = FromIndex(i); - var diff = Math.Abs(requestedLevel - level); - if ((level & availableLevels) != 0) - { - chosenQuality = level; - break; - } - } - - Debug.Assert(chosenQuality != 0); - return chosenQuality; - } - - /// - /// Set the global keyword for the provided MaterialQuality. - /// - /// MaterialQuality level to set the keyword for. - public static void SetGlobalShaderKeywords(this MaterialQuality level) - { - for (var i = 0; i < KeywordNames.Length; ++i) - { - if ((level & (MaterialQuality) (1 << i)) != 0) - Shader.EnableKeyword(KeywordNames[i]); - else - Shader.DisableKeyword(KeywordNames[i]); - } - } - - /// - /// Set the global keyword for the provided MaterialQuality. - /// - /// MaterialQuality level to set the keyword for. - /// Command Buffer used to setup the keyword. - public static void SetGlobalShaderKeywords(this MaterialQuality level, CommandBuffer cmd) - { - for (var i = 0; i < KeywordNames.Length; ++i) - { - if ((level & (MaterialQuality)(1 << i)) != 0) - cmd.EnableShaderKeyword(KeywordNames[i]); - else - cmd.DisableShaderKeyword(KeywordNames[i]); - } - } - - /// - /// Returns the index (in the MaterialQuality enum) of the first available level. - /// - /// MaterialQuality bitfield. - /// The index of the first available level. - public static int ToFirstIndex(this MaterialQuality level) - { - for (var i = 0; i < KeywordNames.Length; ++i) - { - if ((level & (MaterialQuality) (1 << i)) != 0) - return i; - } - - return -1; - } - - /// - /// Returns the enum equivalent of the index in the MaterialQuality enum list. - /// - /// Index of the material quality. - /// The equivalent enum. - public static MaterialQuality FromIndex(int index) => (MaterialQuality) (1 << index); - } -} - - -// TODO: Remove when breaking changes (introduced in 7.x.x) -// Namespace is invalid -// We will remove it in a future release but keep an obsolete version for compatibility. -// Instead, we should use 'UnityEngine.Rendering' namespace Utilities { - using UnityEngine; - using UnityEngine.Rendering; - /// /// Material quality flags. /// [Flags] - [Obsolete("Use UnityEngine.Rendering.MaterialQuality")] public enum MaterialQuality { /// Low Material Quality. @@ -191,7 +21,6 @@ public enum MaterialQuality /// /// Material Quality utility class. /// - [Obsolete("Use UnityEngine.Rendering.MaterialQualityUtilities")] public static class MaterialQualityUtilities { /// 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 51409175f00..bd41dd2e4e1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -2,6 +2,7 @@ using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; using System.Text; +using Utilities; using UnityEngine.Experimental.Rendering; using static UnityEngine.Rendering.HighDefinition.RenderPipelineSettings; diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs index 6901660a3c6..3a5972baca5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs @@ -1,7 +1,8 @@ using System; using UnityEngine; using UnityEngine.Rendering.HighDefinition; -using UnityEngine.Rendering; +using UnityEditor.Rendering; +using Utilities; namespace UnityEditor.Rendering.HighDefinition { 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 2ec922ed688..6dad9dea362 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 @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Utilities; using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering.RenderGraphModule; 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 625add2e1eb..9abb63f19b9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -6,6 +6,7 @@ using UnityEngine.Experimental.GlobalIllumination; using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering.RenderGraphModule; +using Utilities; namespace UnityEngine.Rendering.HighDefinition { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs index de83731a0eb..d40e6bbfb3d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using UnityEngine.Serialization; +using Utilities; namespace UnityEngine.Rendering.HighDefinition { 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 774bc661c16..1bad98da64e 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 @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Reflection; using System.Linq; +using Utilities; namespace UnityEngine.Rendering.HighDefinition { From 373646ae7d2ceed2593f86409b60c49ee619546d Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Thu, 26 Mar 2020 13:23:13 +0100 Subject: [PATCH 051/200] 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 ae46478c18d..fa6f6d47bb7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -78,7 +78,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. - Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. - Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. -- Utilities namespace is obsolete, moved its content to UnityEngine.Rendering (case 1204677) - Hidden unsupported choice in emission in Materials ## [8.0.0] - 2020-05-25 From 67e24792406911bdc79dc7f77cc5ef51fd20157c Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Fri, 27 Mar 2020 14:20:39 +0100 Subject: [PATCH 052/200] - Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. (#6410) --- .../CHANGELOG.md | 1 + .../Raytracing/HDRaytracingRecursiveRenderer.cs | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fa6f6d47bb7..2ab175248c7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -67,6 +67,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed sRGB mismatch with XR SDK - Fixed XR single-pass with Mock HMD plugin - Fixed XR culling with multiple cameras +- Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingRecursiveRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingRecursiveRenderer.cs index 52eb12c4f0a..1ba075aa2e8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingRecursiveRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingRecursiveRenderer.cs @@ -139,14 +139,8 @@ void RaytracingRecursiveRender(HDCamera hdCamera, CommandBuffer cmd, ScriptableR cmd.SetGlobalFloat(HDShaderIDs._RaytracingPixelSpreadAngle, GetPixelSpreadAngle(hdCamera.camera.fieldOfView, hdCamera.actualWidth, hdCamera.actualHeight)); // LightLoop data - cmd.SetGlobalBuffer(HDShaderIDs._RaytracingLightCluster, lightCluster.GetCluster()); - cmd.SetGlobalBuffer(HDShaderIDs._LightDatasRT, lightCluster.GetLightDatas()); - cmd.SetGlobalVector(HDShaderIDs._MinClusterPos, lightCluster.GetMinClusterPos()); - cmd.SetGlobalVector(HDShaderIDs._MaxClusterPos, lightCluster.GetMaxClusterPos()); - cmd.SetGlobalInt(HDShaderIDs._LightPerCellCount, lightClusterSettings.maxNumLightsPercell.value); - cmd.SetGlobalInt(HDShaderIDs._PunctualLightCountRT, lightCluster.GetPunctualLightCount()); - cmd.SetGlobalInt(HDShaderIDs._AreaLightCountRT, lightCluster.GetAreaLightCount()); - + lightCluster.BindLightClusterData(cmd); + // Note: Just in case, we rebind the directional light data (in case they were not) cmd.SetGlobalBuffer(HDShaderIDs._DirectionalLightDatas, m_LightLoopLightData.directionalLightData); cmd.SetGlobalInt(HDShaderIDs._DirectionalLightCount, m_lightList.directionalLights.Count); From bbbc325882986f72c64d37356ac53e3825f75ac3 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Fri, 27 Mar 2020 17:09:06 +0000 Subject: [PATCH 053/200] First pass of light loop optimizations (still single threaded) (#6367) (#6424) * Saving 10% off the PrepareLightForGPU * 18% decrease in cost with this * Around 12% cost shaving off GetLightData * Around 6.5% win here * Faster View matrix flip * Missing *=-1 * About 7% win in preprocess light data * Another small batch * Small cleanup for first optimization pass * Tiny bit more cleanup * Address review points * Add comment * changelog # Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md --- .../CHANGELOG.md | 1 + .../Lighting/Light/HDAdditionalLightData.cs | 7 +- .../Runtime/Lighting/LightLoop/LightLoop.cs | 70 ++++++++++++++----- 3 files changed, 60 insertions(+), 18 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d2a4337540e..e58e090add4 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -81,6 +81,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. - Hidden unsupported choice in emission in Materials - All custom pass volumes are now executed for one injection point instead of the first one. +- Optimized PrepareLightsForGPU (cost reduced by over 25%) and PrepareGPULightData (around twice as fast now). ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index 7b894286946..b76c4ac2298 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -1440,7 +1440,10 @@ internal Light legacyLight { get { - TryGetComponent(out m_Light); + // Calling TryGetComponent only when needed is faster than letting the null check happen inside TryGetComponent + if (m_Light == null) + TryGetComponent(out m_Light); + return m_Light; } } @@ -1606,7 +1609,7 @@ internal void EvaluateShadowState(HDCamera hdCamera, in ProcessedLightData proce // When creating a new light, at the first frame, there is no AdditionalShadowData so we can't really render shadows m_WillRenderShadowMap &= shadowDimmer > 0; // If the shadow is too far away, we don't render it - m_WillRenderShadowMap &= type == HDLightType.Directional || processedLight.distanceToCamera < shadowFadeDistance; + m_WillRenderShadowMap &= processedLight.lightType == HDLightType.Directional || processedLight.distanceToCamera < shadowFadeDistance; // First we reset the ray tracing and screen space shadow data m_WillRenderScreenSpaceShadow = false; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 29eeffc4079..e00440045ef 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -6,6 +6,14 @@ namespace UnityEngine.Rendering.HighDefinition { static class VisibleLightExtensionMethods { + public struct VisibleLightAxisAndPosition + { + public Vector3 Position; + public Vector3 Forward; + public Vector3 Up; + public Vector3 Right; + } + public static Vector3 GetPosition(this VisibleLight value) { return value.localToWorldMatrix.GetColumn(3); @@ -25,6 +33,17 @@ public static Vector3 GetRight(this VisibleLight value) { return value.localToWorldMatrix.GetColumn(0); } + + public static VisibleLightAxisAndPosition GetAxisAndPosition(this VisibleLight value) + { + var matrix = value.localToWorldMatrix; + VisibleLightAxisAndPosition output; + output.Position = matrix.GetColumn(3); + output.Forward = matrix.GetColumn(2); + output.Up = matrix.GetColumn(1); + output.Right = matrix.GetColumn(0); + return output; + } } //----------------------------------------------------------------------------- @@ -459,8 +478,15 @@ Matrix4x4 GetWorldToViewMatrix(HDCamera hdCamera, int viewIndex) { var viewMatrix = (hdCamera.xr.enabled ? hdCamera.xr.GetViewMatrix(viewIndex) : hdCamera.camera.worldToCameraMatrix); - // camera.worldToCameraMatrix is RHS and Unity's transforms are LHS, we need to flip it to work with transforms - return s_FlipMatrixLHSRHS * viewMatrix; + // camera.worldToCameraMatrix is RHS and Unity's transforms are LHS, we need to flip it to work with transforms. + // Note that this is equivalent to s_FlipMatrixLHSRHS * viewMatrix, but faster given that it doesn't need full matrix multiply + // However if for some reason s_FlipMatrixLHSRHS changes from Matrix4x4.Scale(new Vector3(1, 1, -1)), this need to change as well. + viewMatrix.m20 *= -1; + viewMatrix.m21 *= -1; + viewMatrix.m22 *= -1; + viewMatrix.m23 *= -1; + + return viewMatrix; } // Keep track of the maximum number of XR instanced views @@ -655,6 +681,9 @@ struct ScreenSpaceShadowData int m_DebugSelectedLightShadowIndex; int m_DebugSelectedLightShadowCount; + // Data needed for the PrepareGPULightdata + List m_WorldToViewMatrices = new List(ShaderConfig.s_XrMaxViews); + static MaterialPropertyBlock m_LightLoopDebugMaterialProperties = new MaterialPropertyBlock(); bool HasLightToCull() @@ -953,6 +982,13 @@ void LightLoopNewFrame(HDCamera hdCamera) } m_TextureCaches.NewFrame(); + + m_WorldToViewMatrices.Clear(); + int viewCount = hdCamera.viewCount; + for (int viewIndex = 0; viewIndex < viewCount; ++viewIndex) + { + m_WorldToViewMatrices.Add(GetWorldToViewMatrix(hdCamera, viewIndex)); + } } bool LightLoopNeedResize(HDCamera hdCamera, TileAndClusterData tileAndClusterData) @@ -1272,7 +1308,7 @@ bool EnoughScreenSpaceShadowSlots(GPULightType gpuLightType, int screenSpaceChan } internal void GetLightData(CommandBuffer cmd, HDCamera hdCamera, HDShadowSettings shadowSettings, VisibleLight light, Light lightComponent, - int lightIndex, int shadowIndex, ref Vector3 lightDimensions, ref int screenSpaceShadowIndex, ref int screenSpaceChannelSlot) + int lightIndex, int shadowIndex, BoolScalableSetting contactShadowsScalableSetting, ref Vector3 lightDimensions, ref int screenSpaceShadowIndex, ref int screenSpaceChannelSlot) { var processedData = m_ProcessedLightData[lightIndex]; var additionalLightData = processedData.additionalLightData; @@ -1281,11 +1317,13 @@ internal void GetLightData(CommandBuffer cmd, HDCamera hdCamera, HDShadowSetting var lightData = new LightData(); + var visibleLightAxisAndPosition = light.GetAxisAndPosition(); + lightData.lightLayers = additionalLightData.GetLightLayers(); lightData.lightType = gpuLightType; - lightData.positionRWS = light.GetPosition(); + lightData.positionRWS = visibleLightAxisAndPosition.Position; bool applyRangeAttenuation = additionalLightData.applyRangeAttenuation && (gpuLightType != GPULightType.ProjectorBox); @@ -1323,9 +1361,9 @@ internal void GetLightData(CommandBuffer cmd, HDCamera hdCamera, HDShadowSetting lightData.color = GetLightColor(light); - lightData.forward = light.GetForward(); - lightData.up = light.GetUp(); - lightData.right = light.GetRight(); + lightData.forward = visibleLightAxisAndPosition.Forward; + lightData.up = visibleLightAxisAndPosition.Up; + lightData.right = visibleLightAxisAndPosition.Right; lightDimensions.x = additionalLightData.shapeWidth; lightDimensions.y = additionalLightData.shapeHeight; @@ -1453,7 +1491,7 @@ internal void GetLightData(CommandBuffer cmd, HDCamera hdCamera, HDShadowSetting float shadowDistanceFade = HDUtils.ComputeLinearDistanceFade(processedData.distanceToCamera, Mathf.Min(shadowSettings.maxShadowDistance.value, additionalLightData.shadowFadeDistance)); lightData.shadowDimmer = shadowDistanceFade * additionalLightData.shadowDimmer; lightData.volumetricShadowDimmer = shadowDistanceFade * additionalLightData.volumetricShadowDimmer; - GetContactShadowMask(additionalLightData, HDAdditionalLightData.ScalableSettings.UseContactShadow(m_Asset), hdCamera, ref lightData.contactShadowMask, ref lightData.isRayTracedContactShadow); + GetContactShadowMask(additionalLightData, contactShadowsScalableSetting, hdCamera, ref lightData.contactShadowMask, ref lightData.isRayTracedContactShadow); // We want to have a colored penumbra if the flag is on and the color is not gray bool penumbraTint = additionalLightData.penumbraTint && ((additionalLightData.shadowTint.r != additionalLightData.shadowTint.g) || (additionalLightData.shadowTint.g != additionalLightData.shadowTint.b)); @@ -1534,10 +1572,9 @@ void GetLightVolumeDataAndBound(LightCategory lightCategory, GPULightType gpuLig Vector3 positionWS = lightData.positionRWS; Vector3 positionVS = worldToView.MultiplyPoint(positionWS); - Matrix4x4 lightToView = worldToView * lightToWorld; - Vector3 xAxisVS = lightToView.GetColumn(0); - Vector3 yAxisVS = lightToView.GetColumn(1); - Vector3 zAxisVS = lightToView.GetColumn(2); + Vector3 xAxisVS = worldToView.MultiplyVector(lightToWorld.GetColumn(0)); + Vector3 yAxisVS = worldToView.MultiplyVector(lightToWorld.GetColumn(1)); + Vector3 zAxisVS = worldToView.MultiplyVector(lightToWorld.GetColumn(2)); // Fill bounds var bound = new SFiniteLightBound(); @@ -2051,7 +2088,7 @@ void PreprocessLightData(ref ProcessedLightData processedData, VisibleLight ligh processedData.additionalLightData = additionalLightData; processedData.lightType = additionalLightData.ComputeLightType(lightComponent); - processedData.distanceToCamera = (light.GetPosition() - hdCamera.camera.transform.position).magnitude; + processedData.distanceToCamera = (additionalLightData.transform.position - hdCamera.camera.transform.position).magnitude; // Evaluate the types that define the current light processedData.lightCategory = LightCategory.Count; @@ -2188,6 +2225,8 @@ void PrepareGPULightdata(CommandBuffer cmd, HDCamera hdCamera, CullingResults cu // The lightLoop is in charge, not the shadow pass. // For now we will still apply the maximum of shadow here but we don't apply the sorting by priority + slot allocation yet + BoolScalableSetting contactShadowScalableSetting = HDAdditionalLightData.ScalableSettings.UseContactShadow(m_Asset); + // 2. Go through all lights, convert them to GPU format. // Simultaneously create data for culling (LightVolumeData and SFiniteLightBound) @@ -2251,7 +2290,7 @@ void PrepareGPULightdata(CommandBuffer cmd, HDCamera hdCamera, CullingResults cu Vector3 lightDimensions = new Vector3(); // X = length or width, Y = height, Z = range (depth) // Punctual, area, projector lights - the rendering side. - GetLightData(cmd, hdCamera, hdShadowSettings, light, lightComponent, lightIndex, shadowIndex, ref lightDimensions, ref m_ScreenSpaceShadowIndex, ref m_ScreenSpaceShadowChannelSlot); + GetLightData(cmd, hdCamera, hdShadowSettings, light, lightComponent, lightIndex, shadowIndex, contactShadowScalableSetting, ref lightDimensions, ref m_ScreenSpaceShadowIndex, ref m_ScreenSpaceShadowChannelSlot); switch (lightCategory) { @@ -2269,8 +2308,7 @@ void PrepareGPULightdata(CommandBuffer cmd, HDCamera hdCamera, CullingResults cu // Then culling side. Must be call in this order as we pass the created Light data to the function for (int viewIndex = 0; viewIndex < hdCamera.viewCount; ++viewIndex) { - var worldToView = GetWorldToViewMatrix(hdCamera, viewIndex); - GetLightVolumeDataAndBound(lightCategory, gpuLightType, lightVolumeType, light, m_lightList.lights[m_lightList.lights.Count - 1], lightDimensions, worldToView, viewIndex); + GetLightVolumeDataAndBound(lightCategory, gpuLightType, lightVolumeType, light, m_lightList.lights[m_lightList.lights.Count - 1], lightDimensions, m_WorldToViewMatrices[viewIndex], viewIndex); } // We make the light position camera-relative as late as possible in order From d2c36b4a93bd0cd6a7e8fbc6e0ecc75419bf4262 Mon Sep 17 00:00:00 2001 From: vlad-andreev Date: Fri, 27 Mar 2020 14:37:47 +0100 Subject: [PATCH 054/200] Catch and handle NRefactory parser exceptions (#6392) Co-authored-by: vlad-andreev --- .../Editor/ShaderGenerator/CSharpToHLSL.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/Editor/ShaderGenerator/CSharpToHLSL.cs b/com.unity.render-pipelines.core/Editor/ShaderGenerator/CSharpToHLSL.cs index 5585be5d2b7..76391051c57 100644 --- a/com.unity.render-pipelines.core/Editor/ShaderGenerator/CSharpToHLSL.cs +++ b/com.unity.render-pipelines.core/Editor/ShaderGenerator/CSharpToHLSL.cs @@ -201,7 +201,16 @@ static void LoadTypes(string fileName) }*/ parser.Lexer.EvaluateConditionalCompilation = true; - parser.Parse(); + try + { + parser.Parse(); + } + catch + { + Debug.LogWarning($"Unable to parse {fileName}. Please not that C# 6.0 syntax is not yet supported by this tool."); + return; + } + try { var visitor = new NamespaceVisitor(); From 926dd5031fd25532492701af8262bcbdd95bb9b5 Mon Sep 17 00:00:00 2001 From: ChristianF-ARM <45175346+ChristianF-ARM@users.noreply.github.com> Date: Fri, 27 Mar 2020 12:19:45 +0100 Subject: [PATCH 055/200] Avoid negative input to sqrt() (#6397) - The calculation of `k` is not numerically robust when done in FP16 and might generate a negative value. - This can be observed as rendering artifacts on Mali drivers newer than Bifrost/Valhall R21. - This commit fixes this by by clamping `k` to [0, inf] before the `sqrt()`. - On Mali-G77 the clamp compiles down to a free output modifier on the previous instruction, so there's no performance impact. --- com.unity.render-pipelines.core/ShaderLibrary/ACES.hlsl | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/ACES.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/ACES.hlsl index 690ff71ce13..f37502a6485 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/ACES.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/ACES.hlsl @@ -316,6 +316,7 @@ half rgb_2_yc(half3 rgb) half g = rgb.y; half b = rgb.z; half k = b * (b - g) + g * (g - r) + r * (r - b); + k = max(k, 0.0h); // Clamp to avoid precision issue causing k < 0, making sqrt(k) undefined #if defined(SHADER_API_SWITCH) half chroma = k == 0.0 ? 0.0 : sqrt(k); // Fix NaN on Nintendo Switch (should not happen in theory). #else From 9c1cddc4e1d7fbff5ab98c0c5c664ad9bacd2d99 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 27 Mar 2020 14:34:28 +0100 Subject: [PATCH 056/200] Refreshed the GUIDs for additional post processing data to avoid conflicts with PPv2 (#6394) --- .../Samples~/PostProcessingData/Lens Dirt.meta | 2 +- .../Samples~/PostProcessingData/Lens Dirt/LensDirt00.png.meta | 2 +- .../Samples~/PostProcessingData/Lens Dirt/LensDirt01.png.meta | 2 +- .../Samples~/PostProcessingData/Lens Dirt/LensDirt02.png.meta | 2 +- .../Samples~/PostProcessingData/Lens Dirt/LensDirt03.png.meta | 2 +- .../Samples~/PostProcessingData/Spectral LUTs.meta | 2 +- .../Spectral LUTs/SpectralLut_BlueRed.tga.meta | 2 +- .../Spectral LUTs/SpectralLut_GreenPurple.tga.meta | 2 +- .../Spectral LUTs/SpectralLut_PurpleGreen.tga.meta | 2 +- .../Spectral LUTs/SpectralLut_RedBlue.tga.meta | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt.meta index ab581c0e915..c894f68e3b7 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3467abbb714a12d4eb9e485eb6fc53fa +guid: 0c4052e2153589e42ba972a554e51b7f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt00.png.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt00.png.meta index 566c6551586..20a0b99d453 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt00.png.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt00.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 69e847bbff1cf5449a4ee0bbd045dbc9 +guid: 203b35c8eaa5f684c9d722891603d7cf TextureImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt01.png.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt01.png.meta index 980dac3e854..c52ba616ebd 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt01.png.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt01.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3884f7a2d04ffe8409ad9200b275896f +guid: 4141aff1704350e42ac905767c717a85 TextureImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt02.png.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt02.png.meta index f90b1aa0604..b8901b945ca 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt02.png.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt02.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a2960ffde020f27409e070d92fb2e00b +guid: a82dab21d60c1df48b373e91bb1ef34b TextureImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt03.png.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt03.png.meta index 127e22d485c..1c1d8c5d568 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt03.png.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Lens Dirt/LensDirt03.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7a051dbda2d7bc447bee412427cd311e +guid: db50366cdf0244c42acc950d5344a6ac TextureImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs.meta index 6c9ec3cf7b8..f09486ab04c 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7dafb24e940e28540929b9bf2845daf6 +guid: 5e37df1a51347ec4bbfb30c02056b38a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_BlueRed.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_BlueRed.tga.meta index f47c5b8dbd2..a856b3c5ec5 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_BlueRed.tga.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_BlueRed.tga.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 318cbcd94840f1d48aca4d86234dc2e7 +guid: 3f69bf5e1dbbde7468101fe9973c55f1 timeCreated: 1473255656 licenseType: Pro TextureImporter: diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_GreenPurple.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_GreenPurple.tga.meta index 1bec2a91274..8995e8c4b34 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_GreenPurple.tga.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_GreenPurple.tga.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4a8f054acfbd08043a931cd22760758d +guid: f78fe2b7554b0db4da35740fdec502fb timeCreated: 1473255985 licenseType: Pro TextureImporter: diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_PurpleGreen.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_PurpleGreen.tga.meta index 1077fda0943..9e07d2078d5 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_PurpleGreen.tga.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_PurpleGreen.tga.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 42183971d24cfe443a346e7ec6e83bbb +guid: bdb5cf94f679c1048ab24e3b1b9c97f8 timeCreated: 1473256088 licenseType: Pro TextureImporter: diff --git a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_RedBlue.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_RedBlue.tga.meta index fbe39ef6a60..3e0c885fe4a 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_RedBlue.tga.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/PostProcessingData/Spectral LUTs/SpectralLut_RedBlue.tga.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ff5f3317371838d4fa16ac6c2acf2040 +guid: 83f20033bbfa9364a896ce61abed992c timeCreated: 1473255656 licenseType: Pro TextureImporter: From 6317ca36f77430d43c5bd5fa2db6df51c74cd6c9 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Mon, 30 Mar 2020 16:07:53 +0100 Subject: [PATCH 057/200] Added known issues page (#6447) --- .../Documentation~/Known-Issues.md | 15 +++++++++++++++ .../Documentation~/TableOfContents.md | 1 + 2 files changed, 16 insertions(+) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Known-Issues.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Known-Issues.md b/com.unity.render-pipelines.high-definition/Documentation~/Known-Issues.md new file mode 100644 index 00000000000..de23133f805 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Known-Issues.md @@ -0,0 +1,15 @@ +# Known issues + +This page contains information on known about issues you may encounter while using HDRP. Each entry describes the issue and then details the steps to follow in order to resolve the issue. + +## Material array size + +If you upgrade your HDRP Project to a later version, you may encounter an error message similar to: + +``` +Property (_Env2DCaptureForward) exceeds previous array size (48 vs 6). Cap to previous size. + +UnityEditor.EditorApplication:Internal_CallGlobalEventHandler() +``` + +To fix this issue, restart the Unity editor. \ No newline at end of file diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index 198327288c4..ef71b2f9e67 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -155,3 +155,4 @@ * [Creating a Custom Post-Process Effect](Custom-Post-Process) * [Creating a Custom Render Pass](Custom-Pass) * [HDRP Glossary](Glossary) +* [Known Issues and How To Fix Them](Known-Issues) From 21f86dbd7b0873fdefaa4bcddac463cf4be9cc09 Mon Sep 17 00:00:00 2001 From: Tim Cannell Date: Sat, 28 Mar 2020 11:20:11 +0000 Subject: [PATCH 058/200] Platform/playstation #6380 --- .../StencilShowShader.shader | 2 +- .../StencilWriteShader.shader | 2 +- .../4060_CustomPostProcess/BluePP.shader | 2 +- .../4060_CustomPostProcess/GreenPP.shader | 2 +- .../4060_CustomPostProcess/RedPP.shader | 2 +- .../BeforeOpaqueDepthAndNormal.shader | 2 +- .../Outline/Outline.shader | 2 +- .../Renderers_Test.shader | 2 +- .../Resources/ProceduralSky.shader | 2 +- .../Runtime/Resources/ProceduralSky.shader | 2 +- .../Documentation~/Creating-a-Custom-Sky.md | 2 +- .../Documentation~/Custom-Pass.md | 2 +- .../Documentation~/Custom-Post-Process.md | 2 +- .../Decal/ShaderGraph/DecalPass.template | 2 +- .../DrawDiffusionProfile.shader | 2 +- .../DrawTransmittanceGraph.shader | 2 +- .../Material/Eye/ShaderGraph/EyePass.template | 2 +- .../Hair/ShaderGraph/HairPass.template | 2 +- .../PBR/ShaderGraph/HDPBRPass.template | 2 +- .../ShaderGraph/StackLitPass.template | 2 +- .../Unlit/ShaderGraph/UnlitPass.template | 2 +- .../CustomPostProcessingShader.template | 2 +- .../CustomPassFullScreenShader.template | 2 +- .../CustomPassRenderersShader.template | 2 +- .../Shaders/GUITextureBlit2SRGB.shader | 2 +- .../ShaderGraph/HDSubShaderUtilities.cs | 8 +++---- .../Core/CoreResources/EncodeBC6H.compute | 2 +- .../Core/CoreResources/GPUCopy.compute | 2 +- .../Runtime/Debug/DebugBlitQuad.shader | 2 +- .../Runtime/Debug/DebugColorPicker.shader | 2 +- .../Runtime/Debug/DebugDisplayLatlong.shader | 2 +- .../Runtime/Debug/DebugFullScreen.shader | 2 +- .../Debug/DebugViewMaterialGBuffer.shader | 2 +- .../Runtime/Debug/DebugViewTiles.shader | 2 +- .../OpaqueAtmosphericScattering.shader | 2 +- .../Runtime/Lighting/Deferred.shader | 2 +- .../Lighting/LightLoop/Deferred.compute | 2 +- .../Lighting/LightLoop/DeferredTile.shader | 4 ++-- .../LightLoop/builddispatchindirect.compute | 2 +- .../LightLoop/cleardispatchindirect.compute | 2 +- .../LightLoop/lightlistbuild-bigtile.compute | 2 +- .../lightlistbuild-clustered.compute | 2 +- .../Lighting/LightLoop/lightlistbuild.compute | 2 +- .../Lighting/LightLoop/materialflags.compute | 2 +- .../Lighting/LightLoop/scrbound.compute | 2 +- .../ScreenSpaceReflections.compute | 2 +- .../Lighting/Shadow/ContactShadows.compute | 2 +- .../Shadow/DebugDisplayHDShadowMap.shader | 2 +- .../Runtime/Lighting/Shadow/EVSMBlur.compute | 2 +- .../Lighting/Shadow/ScreenSpaceShadows.shader | 2 +- .../Lighting/Shadow/ShadowClear.shader | 2 +- .../VolumeVoxelization.compute | 2 +- .../VolumetricLighting.compute | 2 +- .../Runtime/Material/AxF/AxF.shader | 2 +- .../AxF/PreIntegratedFGD_CookTorrance.shader | 2 +- .../Material/AxF/PreIntegratedFGD_Ward.shader | 2 +- .../Decal/ClearPropertyMaskBuffer.compute | 2 +- .../Runtime/Material/Decal/Decal.shader | 2 +- .../Material/Decal/DecalNormalBuffer.shader | 2 +- .../Material/Fabric/CharlieConvolve.shader | 2 +- .../BuildProbabilityTables.compute | 2 +- .../ComputeGgxIblSampleData.compute | 2 +- .../GGXConvolution/GGXConvolve.shader | 2 +- .../FilterAreaLightCookies.shader | 2 +- .../Material/LayeredLit/LayeredLit.shader | 2 +- .../LayeredLit/LayeredLitTessellation.shader | 2 +- .../Runtime/Material/Lit/Lit.shader | 22 +++++++++---------- .../Material/Lit/LitTessellation.shader | 2 +- ...eIntegratedFGD_CharlieFabricLambert.shader | 2 +- .../preIntegratedFGD_GGXDisneyDiffuse.shader | 2 +- .../CombineLighting.shader | 2 +- .../SubsurfaceScattering.compute | 2 +- .../Material/TerrainLit/TerrainLit.shader | 2 +- .../TerrainLit/TerrainLit_Basemap.shader | 2 +- .../TerrainLit/TerrainLit_BasemapGen.shader | 2 +- .../Runtime/Material/Unlit/Unlit.shader | 14 ++++++------ .../Shaders/ApplyExposure.compute | 2 +- .../PostProcessing/Shaders/BloomBlur.compute | 2 +- .../Shaders/BloomPrefilter.compute | 2 +- .../Shaders/BloomUpsample.compute | 2 +- .../PostProcessing/Shaders/ClearBlack.shader | 2 +- .../Shaders/DepthOfFieldCoC.compute | 2 +- .../Shaders/DepthOfFieldCoCDilate.compute | 2 +- .../Shaders/DepthOfFieldCoCReproject.compute | 2 +- .../Shaders/DepthOfFieldCombine.compute | 2 +- .../Shaders/DepthOfFieldGather.compute | 2 +- .../Shaders/DepthOfFieldKernel.compute | 2 +- .../Shaders/DepthOfFieldMip.compute | 2 +- .../Shaders/DepthOfFieldMipSafe.compute | 2 +- .../Shaders/DepthOfFieldPrefilter.compute | 2 +- .../Shaders/DepthOfFieldTileMax.compute | 2 +- .../PostProcessing/Shaders/Exposure.compute | 2 +- .../PostProcessing/Shaders/FinalPass.shader | 2 +- .../Shaders/LutBuilder3D.compute | 2 +- .../Shaders/MotionBlurMotionVecPrep.compute | 2 +- .../Shaders/MotionBlurTilePass.compute | 2 +- .../Shaders/PaniniProjection.compute | 2 +- .../SubpixelMorphologicalAntialiasing.shader | 2 +- .../Shaders/TemporalAntiAliasing.shader | 2 +- .../PostProcessing/Shaders/UberPost.compute | 2 +- .../RenderPass/ColorPyramid.compute | 2 +- .../RenderPass/ColorPyramidPS.shader | 4 ++-- .../RenderPass/DepthPyramid.compute | 2 +- .../Distortion/ApplyDistortion.shader | 2 +- .../MSAA/AmbientOcclusionResolve.shader | 2 +- .../RenderPass/MSAA/ColorResolve.shader | 2 +- .../RenderPass/MSAA/DepthValues.shader | 2 +- .../Runtime/ShaderLibrary/Blit.shader | 2 +- .../ShaderLibrary/ClearStencilBuffer.shader | 2 +- .../ShaderLibrary/CopyDepthBuffer.shader | 2 +- .../ShaderLibrary/CopyStencilBuffer.shader | 2 +- .../ShaderLibrary/DownsampleDepth.shader | 2 +- .../ResolveStencilBuffer.compute | 2 +- .../ShaderLibrary/UpsampleTransparent.shader | 2 +- .../Runtime/ShaderLibrary/XRMirrorView.shader | 2 +- .../ShaderLibrary/XROcclusionMesh.shader | 2 +- .../Sky/AmbientProbeConvolution.compute | 2 +- .../Sky/GradientSky/GradientSky.shader | 2 +- .../Runtime/Sky/HDRISky/HDRISky.shader | 2 +- .../Sky/HDRISky/IntegrateHDRISky.shader | 2 +- .../GroundIrradiancePrecomputation.compute | 2 +- .../InScatteredRadiancePrecomputation.compute | 2 +- .../PhysicallyBasedSky.shader | 2 +- .../Resources/ProceduralSky.shader | 2 +- 124 files changed, 145 insertions(+), 145 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilShowShader.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilShowShader.shader index bdc4f53b77a..4fddac06f1a 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilShowShader.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilShowShader.shader @@ -75,7 +75,7 @@ Shader "Custom/StencilShowShader" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //------------------------------------------------------------------------------------- // Variant diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilWriteShader.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilWriteShader.shader index 4083208bec2..d6eb76b74a3 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilWriteShader.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2208_And_2209_Reflection_Stencil/StencilWriteShader.shader @@ -75,7 +75,7 @@ Shader "Custom/StencilWriteShader" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //------------------------------------------------------------------------------------- // Variant diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/BluePP.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/BluePP.shader index 7ce665f3cf2..9d2b3557a88 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/BluePP.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/BluePP.shader @@ -3,7 +3,7 @@ HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/GreenPP.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/GreenPP.shader index 01e73a29bdc..81a56b25492 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/GreenPP.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/GreenPP.shader @@ -3,7 +3,7 @@ HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/RedPP.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/RedPP.shader index 94350494a62..73c98cdc85c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/RedPP.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess/RedPP.shader @@ -3,7 +3,7 @@ HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader index f96aaea6f0b..a6ddd102650 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader @@ -5,7 +5,7 @@ #pragma vertex Vert #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl" diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/Outline/Outline.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/Outline/Outline.shader index 40f0717e26e..6a1b0ad56a1 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/Outline/Outline.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/Outline/Outline.shader @@ -5,7 +5,7 @@ #pragma vertex Vert #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl" diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9701_CustomPass_DrawRenderers/Renderers_Test.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9701_CustomPass_DrawRenderers/Renderers_Test.shader index cc344f0c30e..c24fa418b7e 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9701_CustomPass_DrawRenderers/Renderers_Test.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9701_CustomPass_DrawRenderers/Renderers_Test.shader @@ -12,7 +12,7 @@ HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch // #pragma enable_d3d11_debug_symbols diff --git a/TestProjects/HDRP_Tests/Assets/Samples/High Definition RP/Procedural Sky/Runtime/ProceduralSky/Resources/ProceduralSky.shader b/TestProjects/HDRP_Tests/Assets/Samples/High Definition RP/Procedural Sky/Runtime/ProceduralSky/Resources/ProceduralSky.shader index 4e4580889cf..ea8c3f766fb 100644 --- a/TestProjects/HDRP_Tests/Assets/Samples/High Definition RP/Procedural Sky/Runtime/ProceduralSky/Resources/ProceduralSky.shader +++ b/TestProjects/HDRP_Tests/Assets/Samples/High Definition RP/Procedural Sky/Runtime/ProceduralSky/Resources/ProceduralSky.shader @@ -11,7 +11,7 @@ Shader "Hidden/HDRP/Sky/ProceduralSky" #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile _ _ENABLE_SUN_DISK diff --git a/TestProjects/VisualEffectGraph/Assets/Samples/High Definition RP/Procedural Sky/Runtime/Resources/ProceduralSky.shader b/TestProjects/VisualEffectGraph/Assets/Samples/High Definition RP/Procedural Sky/Runtime/Resources/ProceduralSky.shader index 4e4580889cf..ea8c3f766fb 100644 --- a/TestProjects/VisualEffectGraph/Assets/Samples/High Definition RP/Procedural Sky/Runtime/Resources/ProceduralSky.shader +++ b/TestProjects/VisualEffectGraph/Assets/Samples/High Definition RP/Procedural Sky/Runtime/Resources/ProceduralSky.shader @@ -11,7 +11,7 @@ Shader "Hidden/HDRP/Sky/ProceduralSky" #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile _ _ENABLE_SUN_DISK diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md b/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md index 35ed85d4180..a165bdddd69 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md @@ -175,7 +175,7 @@ Shader "Hidden/HDRP/Sky/NewSky" #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md index 7201fa685cd..2e8d98ed523 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md @@ -465,7 +465,7 @@ Shader "Hidden/Outline" #pragma vertex Vert #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md index 034e97190f7..35148a1abb8 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md @@ -123,7 +123,7 @@ Shader "Hidden/Shader/GrayScale" #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template index b50790b66d5..83f59b5fb8a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/ShaderGraph/DecalPass.template @@ -21,7 +21,7 @@ Pass HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#pragma enable_d3d11_debug_symbols #pragma multi_compile_instancing diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawDiffusionProfile.shader b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawDiffusionProfile.shader index 3b1a0cce06e..55fb717aa4c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawDiffusionProfile.shader +++ b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawDiffusionProfile.shader @@ -13,7 +13,7 @@ Shader "Hidden/HDRP/DrawDiffusionProfile" HLSLPROGRAM #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawTransmittanceGraph.shader b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawTransmittanceGraph.shader index d7001e31df2..79d6c477748 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawTransmittanceGraph.shader +++ b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DrawTransmittanceGraph.shader @@ -13,7 +13,7 @@ Shader "Hidden/HDRP/DrawTransmittanceGraph" HLSLPROGRAM #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template index 488c0cdbc4c..c52e62795e3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyePass.template @@ -21,7 +21,7 @@ Pass HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#pragma enable_d3d11_debug_symbols $splice(InstancingOptions) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template index d74a36907cd..9e9157bf35a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairPass.template @@ -21,7 +21,7 @@ Pass HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#pragma enable_d3d11_debug_symbols $splice(InstancingOptions) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template index a2f37b143d8..45dfc823d19 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/ShaderGraph/HDPBRPass.template @@ -21,7 +21,7 @@ Pass HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#pragma enable_d3d11_debug_symbols $splice(InstancingOptions) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template index a22141de1c3..6b90ff304c6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitPass.template @@ -21,7 +21,7 @@ Pass HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#pragma enable_d3d11_debug_symbols $splice(InstancingOptions) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template index fe56ba36d04..ff2dff20f11 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/UnlitPass.template @@ -20,7 +20,7 @@ Pass HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#pragma enable_d3d11_debug_symbols //enable GPU instancing support diff --git a/com.unity.render-pipelines.high-definition/Editor/PostProcessing/Templates/CustomPostProcessingShader.template b/com.unity.render-pipelines.high-definition/Editor/PostProcessing/Templates/CustomPostProcessingShader.template index 07932889a5c..89995ffd034 100644 --- a/com.unity.render-pipelines.high-definition/Editor/PostProcessing/Templates/CustomPostProcessingShader.template +++ b/com.unity.render-pipelines.high-definition/Editor/PostProcessing/Templates/CustomPostProcessingShader.template @@ -3,7 +3,7 @@ Shader "Hidden/Shader/#SCRIPTNAME#" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassFullScreenShader.template b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassFullScreenShader.template index 0e0fab3e791..0947ce622b6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassFullScreenShader.template +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassFullScreenShader.template @@ -5,7 +5,7 @@ Shader "FullScreen/#SCRIPTNAME#" #pragma vertex Vert #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassRenderersShader.template b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassRenderersShader.template index c05a7f05cc1..db7b9322e1e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassRenderersShader.template +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassRenderersShader.template @@ -12,7 +12,7 @@ Shader "Renderers/#SCRIPTNAME#" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch // #pragma enable_d3d11_debug_symbols diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/Shaders/GUITextureBlit2SRGB.shader b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/Shaders/GUITextureBlit2SRGB.shader index d04fab88f68..ce8205d7e19 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/Shaders/GUITextureBlit2SRGB.shader +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/Shaders/GUITextureBlit2SRGB.shader @@ -14,7 +14,7 @@ Shader "Hidden/GUITextureBlit2SRGB" { HLSLPROGRAM #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex vert #pragma fragment frag diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index fdfa25604b6..ab7f831c542 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -1030,7 +1030,7 @@ public static void BuildRenderStatesFromPass( // Comment set of define for Forward Opaque pass in HDRP public static List s_ExtraDefinesForwardOpaque = new List() { - "#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch", + "#pragma only_renderers d3d11 playstation xboxone vulkan metal switch", "#pragma multi_compile _ DEBUG_DISPLAY", "#pragma multi_compile _ LIGHTMAP_ON", "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", @@ -1043,7 +1043,7 @@ public static void BuildRenderStatesFromPass( public static List s_ExtraDefinesForwardTransparent = new List() { - "#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch", + "#pragma only_renderers d3d11 playstation xboxone vulkan metal switch", "#pragma multi_compile _ DEBUG_DISPLAY", "#pragma multi_compile _ LIGHTMAP_ON", "#pragma multi_compile _ DIRLIGHTMAP_COMBINED", @@ -1057,7 +1057,7 @@ public static void BuildRenderStatesFromPass( public static List s_ExtraDefinesForwardMaterialDepthOrMotion = new List() { - "#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch", + "#pragma only_renderers d3d11 playstation xboxone vulkan metal switch", "#define WRITE_NORMAL_BUFFER", "#pragma multi_compile _ WRITE_MSAA_DEPTH", HDLitSubShader.DefineRaytracingKeyword(RayTracingNode.RaytracingVariant.High) @@ -1065,7 +1065,7 @@ public static void BuildRenderStatesFromPass( public static List s_ExtraDefinesDepthOrMotion = new List() { - "#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch", + "#pragma only_renderers d3d11 playstation xboxone vulkan metal switch", "#pragma multi_compile _ WRITE_NORMAL_BUFFER", "#pragma multi_compile _ WRITE_MSAA_DEPTH", HDLitSubShader.DefineRaytracingKeyword(RayTracingNode.RaytracingVariant.High) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/EncodeBC6H.compute b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/EncodeBC6H.compute index f6f2fd5960d..2f237707c8e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/EncodeBC6H.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/EncodeBC6H.compute @@ -2,7 +2,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/BC6H.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Sampling/Sampling.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch TextureCube _Source; RWTexture2DArray _Target; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute index e6b2b342afe..2e9ada88b0c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Core/CoreResources/GPUCopy.compute @@ -1,5 +1,5 @@ -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugBlitQuad.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugBlitQuad.shader index 4b94f0429a2..8ce7397e744 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugBlitQuad.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugBlitQuad.shader @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/DebugBlitQuad" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugColorPicker.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugColorPicker.shader index 076a5c7f6ab..3b9362f22d0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugColorPicker.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugColorPicker.shader @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/DebugColorPicker" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplayLatlong.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplayLatlong.shader index b72f5797b1c..6f46213e50f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplayLatlong.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplayLatlong.shader @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/DebugDisplayLatlong" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag 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 f5bfaf2b24b..25df25c66a6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugFullScreen.shader @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/DebugFullScreen" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag 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 cdfb24af2a7..88922d713ca 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewMaterialGBuffer.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewMaterialGBuffer.shader @@ -10,7 +10,7 @@ Shader "Hidden/HDRP/DebugViewMaterialGBuffer" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewTiles.shader b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewTiles.shader index ef4b709dd3b..8e4e0262504 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewTiles.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugViewTiles.shader @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/DebugViewTiles" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/OpaqueAtmosphericScattering.shader b/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/OpaqueAtmosphericScattering.shader index f8a787015e7..eb004e6f66f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/OpaqueAtmosphericScattering.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/OpaqueAtmosphericScattering.shader @@ -3,7 +3,7 @@ Shader "Hidden/HDRP/OpaqueAtmosphericScattering" HLSLINCLUDE #pragma target 4.5 #pragma editor_sync_compilation - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile _ DEBUG_DISPLAY diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Deferred.shader b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Deferred.shader index ec2a8c70d64..abe02eecc79 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Deferred.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Deferred.shader @@ -27,7 +27,7 @@ Shader "Hidden/HDRP/Deferred" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/Deferred.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/Deferred.compute index 3ce1088838d..8093814e7d7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/Deferred.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/Deferred.compute @@ -114,7 +114,7 @@ CBUFFER_END #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStencilUsage.cs.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch //------------------------------------------------------------------------------------- // variable declaration diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/DeferredTile.shader b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/DeferredTile.shader index 5da59a25c6d..bc68896e4f4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/DeferredTile.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/DeferredTile.shader @@ -31,7 +31,7 @@ Shader "Hidden/HDRP/DeferredTile" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag @@ -293,7 +293,7 @@ Shader "Hidden/HDRP/DeferredTile" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute index ccd19ddc6a8..47bcfe684a3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/builddispatchindirect.compute @@ -1,6 +1,6 @@ #pragma kernel BuildDispatchIndirect BUILDINDIRECT=BuildDispatchIndirect IS_DRAWPROCEDURALINDIRECT=0 #pragma kernel BuildDrawProceduralIndirect BUILDINDIRECT=BuildDrawProceduralIndirect IS_DRAWPROCEDURALINDIRECT=1 -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/cleardispatchindirect.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/cleardispatchindirect.compute index bab8796f4e1..da9fe1e5db9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/cleardispatchindirect.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/cleardispatchindirect.compute @@ -1,6 +1,6 @@ #pragma kernel ClearDispatchIndirect #pragma kernel ClearDrawProceduralIndirect -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch RWBuffer g_DispatchIndirectBuffer : register( u0 ); // Indirect arguments have to be in a _buffer_, not a structured buffer diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-bigtile.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-bigtile.compute index f76aeab1863..cb5ece481ee 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-bigtile.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-bigtile.compute @@ -7,7 +7,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightingConvexHullUtils.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/SortingComputeUtils.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightCullUtils.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define EXACT_EDGE_TESTS #define PERFORM_SPHERICAL_INTERSECTION_TESTS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute index efde294863a..316a47e0568 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute @@ -26,7 +26,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/SortingComputeUtils.hlsl" #endif -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#define EXACT_EDGE_TESTS #define PERFORM_SPHERICAL_INTERSECTION_TESTS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute index 1b40aba6ded..cc0f35e5e18 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute @@ -26,7 +26,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/SortingComputeUtils.hlsl" #endif -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define FINE_PRUNING_ENABLED #define PERFORM_SPHERICAL_INTERSECTION_TESTS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/materialflags.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/materialflags.compute index 6b67169033d..1e6d0a2467b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/materialflags.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/materialflags.compute @@ -13,7 +13,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define USE_MATERIAL_FEATURE_FLAGS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/scrbound.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/scrbound.compute index 6172d031181..2681070522f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/scrbound.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/scrbound.compute @@ -10,7 +10,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightCullUtils.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch uniform int g_isOrthographic; uniform int g_iNrVisibLights; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute index b5e1b7f4d39..1da1c537015 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflections.compute @@ -3,7 +3,7 @@ //-------------------------------------------------------------------------------------------------- // #pragma enable_d3d11_debug_symbols -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel ScreenSpaceReflectionsTracing SSR_TRACE #pragma kernel ScreenSpaceReflectionsReprojection SSR_REPROJECT diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute index db865b23bd0..49960dd6b30 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute @@ -19,7 +19,7 @@ // More info on scalarization: https://flashypixels.wordpress.com/2018/11/10/intro-to-gpu-scalarization-part-2-scalarize-all-the-lights/ #define SCALARIZE_LIGHT_LOOP (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER) && SHADERPASS == SHADERPASS_FORWARD) -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch // #pragma enable_d3d11_debug_symbols diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/DebugDisplayHDShadowMap.shader b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/DebugDisplayHDShadowMap.shader index 645704be139..84cdcae64b0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/DebugDisplayHDShadowMap.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/DebugDisplayHDShadowMap.shader @@ -2,7 +2,7 @@ Shader "Hidden/ScriptableRenderPipeline/DebugDisplayHDShadowMap" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/EVSMBlur.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/EVSMBlur.compute index adf892b8a4d..9de3847588e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/EVSMBlur.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/EVSMBlur.compute @@ -10,7 +10,7 @@ #pragma kernel CopyMoments -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch Texture2D _DepthTexture; RW_TEXTURE2D(float2, _InputTexture); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader index 86e607c8a37..6857146ac21 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader @@ -5,7 +5,7 @@ Shader "Hidden/HDRP/ScreenSpaceShadows" #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowClear.shader b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowClear.shader index 9e8694e2641..72b80a6d10b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowClear.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowClear.shader @@ -2,7 +2,7 @@ Shader "Hidden/ScriptableRenderPipeline/ShadowClear" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" ENDHLSL diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumeVoxelization.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumeVoxelization.compute index cdc875aa477..31b5211dcd0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumeVoxelization.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumeVoxelization.compute @@ -3,7 +3,7 @@ //-------------------------------------------------------------------------------------------------- // #pragma enable_d3d11_debug_symbols -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel VolumeVoxelizationBruteforceMQ VolumeVoxelization=VolumeVoxelizationBruteforceMQ LIGHTLOOP_DISABLE_TILE_AND_CLUSTER VL_PRESET_MQ #pragma kernel VolumeVoxelizationTiledMQ VolumeVoxelization=VolumeVoxelizationTiledMQ VL_PRESET_MQ diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute index 287ed65d0e1..12e077504ca 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute @@ -3,7 +3,7 @@ //-------------------------------------------------------------------------------------------------- // #pragma enable_d3d11_debug_symbols -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel VolumetricLightingBruteforceMQ VolumetricLighting=VolumetricLightingBruteforceMQ LIGHTLOOP_DISABLE_TILE_AND_CLUSTER ENABLE_REPROJECTION=0 ENABLE_ANISOTROPY=0 VL_PRESET_MQ #pragma kernel VolumetricLightingTiledMQ VolumetricLighting=VolumetricLightingTiledMQ ENABLE_REPROJECTION=0 ENABLE_ANISOTROPY=0 VL_PRESET_MQ diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader index 65450fb74c7..802760a38b9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader @@ -122,7 +122,7 @@ Shader "HDRP/AxF" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //------------------------------------------------------------------------------------- // Variant diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_CookTorrance.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_CookTorrance.shader index 7dd9d0637d1..5dddd6a2842 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_CookTorrance.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_CookTorrance.shader @@ -14,7 +14,7 @@ Shader "Hidden/HDRP/PreIntegratedFGD_CookTorrance" #pragma vertex Vert #pragma fragment Frag #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define PREFER_HALF 0 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ImageBasedLighting.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_Ward.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_Ward.shader index 71a688699fa..6fb76794379 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_Ward.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/PreIntegratedFGD_Ward.shader @@ -14,7 +14,7 @@ Shader "Hidden/HDRP/PreIntegratedFGD_Ward" #pragma vertex Vert #pragma fragment Frag #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define PREFER_HALF 0 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ImageBasedLighting.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/ClearPropertyMaskBuffer.compute b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/ClearPropertyMaskBuffer.compute index 8fcdee00a6a..123c78c621b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/ClearPropertyMaskBuffer.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/ClearPropertyMaskBuffer.compute @@ -1,4 +1,4 @@ -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/Decal.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/Decal.shader index 97b81999057..7283396036d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/Decal.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/Decal.shader @@ -47,7 +47,7 @@ Shader "HDRP/Decal" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //#pragma enable_d3d11_debug_symbols //------------------------------------------------------------------------------------- diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalNormalBuffer.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalNormalBuffer.shader index 80d4f7d1895..5095638e184 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalNormalBuffer.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalNormalBuffer.shader @@ -11,7 +11,7 @@ Shader "Hidden/HDRP/Material/Decal/DecalNormalBuffer" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/Decal.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/CharlieConvolve.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/CharlieConvolve.shader index b8169c8ec66..d50d357565e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/CharlieConvolve.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/CharlieConvolve.shader @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/CharlieConvolve" HLSLPROGRAM #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/BuildProbabilityTables.compute b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/BuildProbabilityTables.compute index 82d9522cde7..489c6a09460 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/BuildProbabilityTables.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/BuildProbabilityTables.compute @@ -8,7 +8,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ImageBasedLighting.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch /* --- Input --- */ diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute index 35ee3556f23..de02fb64dcf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute @@ -3,7 +3,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ImageBasedLighting.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #if defined(SHADER_API_MOBILE) || defined(SHADER_API_SWITCH) #define MAX_IBL_SAMPLE_CNT 34 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/GGXConvolve.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/GGXConvolve.shader index 585da0d6596..b549c305f12 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/GGXConvolve.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/GGXConvolve.shader @@ -13,7 +13,7 @@ Shader "Hidden/HDRP/GGXConvolve" HLSLPROGRAM #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile _ USE_MIS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LTCAreaLight/FilterAreaLightCookies.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LTCAreaLight/FilterAreaLightCookies.shader index 6d17c387288..0e31addebf2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LTCAreaLight/FilterAreaLightCookies.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LTCAreaLight/FilterAreaLightCookies.shader @@ -2,7 +2,7 @@ Shader "CoreResources/FilterAreaLightCookies" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment frag diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index ccb09e0ed70..48fb5ccf9de 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -369,7 +369,7 @@ Shader "HDRP/LayeredLit" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _DEPTHOFFSET_ON diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader index f3e4426c363..f78c798f205 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader @@ -379,7 +379,7 @@ Shader "HDRP/LayeredLitTessellation" HLSLINCLUDE #pragma target 5.0 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _DEPTHOFFSET_ON diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 2b887d2a9dc..4a2b5895c0c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -348,7 +348,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -391,7 +391,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -440,7 +440,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -478,7 +478,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -517,7 +517,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -567,7 +567,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -614,7 +614,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -644,7 +644,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -678,7 +678,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -750,7 +750,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -816,7 +816,7 @@ Shader "HDRP/Lit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader index 7edd5db7c6b..5b2724df1d2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader @@ -236,7 +236,7 @@ Shader "HDRP/LitTessellation" HLSLINCLUDE #pragma target 5.0 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //------------------------------------------------------------------------------------- // Variant diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_CharlieFabricLambert.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_CharlieFabricLambert.shader index 2a1acb2cd3f..63d30fcba97 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_CharlieFabricLambert.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_CharlieFabricLambert.shader @@ -14,7 +14,7 @@ Shader "Hidden/HDRP/preIntegratedFGD_CharlieFabricLambert" #pragma vertex Vert #pragma fragment Frag #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define PREFER_HALF 0 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ImageBasedLighting.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_GGXDisneyDiffuse.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_GGXDisneyDiffuse.shader index 4922bb2fb61..8ca287228f8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_GGXDisneyDiffuse.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/PreIntegratedFGD/preIntegratedFGD_GGXDisneyDiffuse.shader @@ -14,7 +14,7 @@ Shader "Hidden/HDRP/preIntegratedFGD_GGXDisneyDiffuse" #pragma vertex Vert #pragma fragment Frag #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define PREFER_HALF 0 #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ImageBasedLighting.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/CombineLighting.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/CombineLighting.shader index 17236488735..178f7ad994a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/CombineLighting.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/CombineLighting.shader @@ -10,7 +10,7 @@ Shader "Hidden/HDRP/CombineLighting" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch // #pragma enable_d3d11_debug_symbols #pragma vertex Vert diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.compute b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.compute index 7118884ad0e..936a590b03f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScattering.compute @@ -5,7 +5,7 @@ //-------------------------------------------------------------------------------------------------- // #pragma enable_d3d11_debug_symbols -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel SubsurfaceScatteringMQ SubsurfaceScattering=SubsurfaceScatteringMQ SSS_ENABLE_NEAR_FIELD=0 #pragma kernel SubsurfaceScatteringHQ SubsurfaceScattering=SubsurfaceScatteringHQ SSS_ENABLE_NEAR_FIELD=1 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader index 1f73432c54f..4552cafcadd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit.shader @@ -56,7 +56,7 @@ Shader "HDRP/TerrainLit" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch // Terrain builtin keywords #pragma shader_feature_local _TERRAIN_8_LAYERS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_Basemap.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_Basemap.shader index eefc2b20259..5c01c0cbdee 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_Basemap.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_Basemap.shader @@ -42,7 +42,7 @@ Shader "Hidden/HDRP/TerrainLit_Basemap" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma shader_feature_local _DISABLE_DECALS #pragma shader_feature_local _TERRAIN_INSTANCED_PERPIXEL_NORMAL diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_BasemapGen.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_BasemapGen.shader index d6dac6680e2..95ff0b3614a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_BasemapGen.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_BasemapGen.shader @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/TerrainLit_BasemapGen" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define SURFACE_GRADIENT // Must use Surface Gradient as the normal map texture format is now RG floating point #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader index 1e4e0f53647..79e956e8c66 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader @@ -148,7 +148,7 @@ Shader "HDRP/Unlit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -196,7 +196,7 @@ Shader "HDRP/Unlit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -244,7 +244,7 @@ Shader "HDRP/Unlit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -290,7 +290,7 @@ Shader "HDRP/Unlit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -326,7 +326,7 @@ Shader "HDRP/Unlit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -364,7 +364,7 @@ Shader "HDRP/Unlit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing @@ -403,7 +403,7 @@ Shader "HDRP/Unlit" HLSLPROGRAM - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ApplyExposure.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ApplyExposure.compute index 5cb939db088..0dc06ab4412 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ApplyExposure.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ApplyExposure.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMain diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomBlur.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomBlur.compute index 6283f54301f..f6073342ab1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomBlur.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomBlur.compute @@ -3,7 +3,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMain MAIN=KMain #pragma kernel KMainDownsample MAIN=KMainDownsample DOWNSAMPLE diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomPrefilter.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomPrefilter.compute index 54c5c88583d..627a1294a87 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomPrefilter.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomPrefilter.compute @@ -3,7 +3,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomCommon.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMain diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomUpsample.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomUpsample.compute index a29375ee9aa..5cfe56c214b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomUpsample.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomUpsample.compute @@ -2,7 +2,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMainLowQ MAIN=KMainLowQ LOW_QUALITY #pragma kernel KMainHighQ MAIN=KMainHighQ HIGH_QUALITY diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ClearBlack.shader b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ClearBlack.shader index f12b936300b..58460eb2081 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ClearBlack.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/ClearBlack.shader @@ -3,7 +3,7 @@ Shader "Hidden/HDRP/ClearBlack" HLSLINCLUDE #pragma target 4.5 #pragma editor_sync_compilation - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoC.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoC.compute index 483f92eb7a5..24103a8d596 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoC.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoC.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMainPhysical #pragma kernel KMainManual diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCDilate.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCDilate.compute index 9535f976f39..01bd3790317 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCDilate.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCDilate.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMain diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCReproject.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCReproject.compute index 2796dbfc273..89a9052552a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCReproject.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCoCReproject.compute @@ -2,7 +2,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMain diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCombine.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCombine.compute index b267b1de7a3..7954badc06c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCombine.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCombine.compute @@ -2,7 +2,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMainNearFarLowQ MAIN=KMainNearFarLowQ LOW_QUALITY NEAR FAR #pragma kernel KMainNearLowQ MAIN=KMainNearLowQ LOW_QUALITY NEAR diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute index 6ddc24e0c0d..131772320c7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute @@ -2,7 +2,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "DepthOfFieldCommon.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMainFar MAIN=KMainFar FAR #pragma kernel KMainFarTiles MAIN=KMainFarTiles FAR USE_TILES diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldKernel.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldKernel.compute index c33689812c1..7532d083783 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldKernel.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldKernel.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCommon.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KParametricBlurKernel MAIN=KParametricBlurKernel GROUP_SIZE=64 diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMip.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMip.compute index 5a59686f834..1613d7d7b77 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMip.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMip.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMainColor MAIN=KMainColor CTYPE=float3 #pragma kernel KMainColorAlpha MAIN=KMainColorAlpha CTYPE=float4 diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMipSafe.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMipSafe.compute index 4c6b8a5600e..a4379e9e656 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMipSafe.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldMipSafe.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMain MAIN=KMain #pragma kernel KMainAlpha MAIN=KMainAlpha ENABLE_ALPHA diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldPrefilter.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldPrefilter.compute index 5d1e841612d..174e198da2a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldPrefilter.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldPrefilter.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMainNearFar MAIN=KMainNearFar NEAR FAR #pragma kernel KMainNear MAIN=KMainNear NEAR diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute index 9174ec0f47c..2b0e724fbfd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute @@ -2,7 +2,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "DepthOfFieldCommon.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KClear #pragma kernel KMainNearFar MAIN=KMainNearFar NEAR FAR diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/Exposure.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/Exposure.compute index d0c341ebb3e..05991e97cc5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/Exposure.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/Exposure.compute @@ -3,7 +3,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/PhysicalCamera.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KFixedExposure #pragma kernel KManualCameraExposure diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/FinalPass.shader b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/FinalPass.shader index 0f440651f75..d6020747f36 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/FinalPass.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/FinalPass.shader @@ -4,7 +4,7 @@ Shader "Hidden/HDRP/FinalPass" #pragma target 4.5 #pragma editor_sync_compilation - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile_local _ FXAA #pragma multi_compile_local _ GRAIN diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/LutBuilder3D.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/LutBuilder3D.compute index 2acd611a5c9..da9ab06c2f6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/LutBuilder3D.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/LutBuilder3D.compute @@ -2,7 +2,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KBuild_NoTonemap MAIN=KBuild_NoTonemap TONEMAPPING_NONE #pragma kernel KBuild_NeutralTonemap MAIN=KBuild_NeutralTonemap TONEMAPPING_NEUTRAL diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurMotionVecPrep.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurMotionVecPrep.compute index f4f5038c71a..a6cc4248112 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurMotionVecPrep.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurMotionVecPrep.compute @@ -2,7 +2,7 @@ #pragma kernel MotionVecPreppingCS MOTION_VEC_PREPPING -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define SKIP_PREPPING_IF_NOT_NEEDED defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurTilePass.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurTilePass.compute index 592cc63d568..00b075447dd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurTilePass.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlurTilePass.compute @@ -8,7 +8,7 @@ #pragma kernel TileGenPass TILE_GEN_KERNEL_NAME=TileGenPass GEN_PASS #pragma kernel TileNeighbourhood TILE_NEIGHBOURHOOD_KERNEL_NAME=TileNeighbourhood NEIGHBOURHOOD_PASS -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define USE_WAVE_INTRINSICS defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute index 46e0b68d5f3..a4f1c6b84f0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMainGeneric MAIN=KMainGeneric GENERIC #pragma kernel KMainUnitDistance MAIN=KMainUnitDistance UNITDISTANCE diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/SubpixelMorphologicalAntialiasing.shader b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/SubpixelMorphologicalAntialiasing.shader index b4f544290e6..00970be6749 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/SubpixelMorphologicalAntialiasing.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/SubpixelMorphologicalAntialiasing.shader @@ -8,7 +8,7 @@ Shader "Hidden/PostProcessing/SubpixelMorphologicalAntialiasing" HLSLINCLUDE -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile_local SMAA_PRESET_LOW SMAA_PRESET_MEDIUM SMAA_PRESET_HIGH ENDHLSL 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 9ed2596df37..82bff1125dc 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 @@ -12,7 +12,7 @@ Shader "Hidden/HDRP/TemporalAntialiasing" #pragma multi_compile_local _ ORTHOGRAPHIC #pragma multi_compile_local _ REDUCED_HISTORY_CONTRIB #pragma multi_compile_local _ ENABLE_ALPHA - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute index aabda26bc6b..714861745ea 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute @@ -5,7 +5,7 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPostFeatures.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/BloomCommon.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KMain_Variant0 MAIN=KMain_Variant0 VARIANT=0 #pragma kernel KMain_Variant1 MAIN=KMain_Variant1 VARIANT=1 diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramid.compute b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramid.compute index 60916a16f03..bc9622d8b75 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramid.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramid.compute @@ -19,7 +19,7 @@ // Author: Bob Brown // -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KColorGaussian KERNEL_SIZE=8 MAIN_GAUSSIAN=KColorGaussian DISABLE_TEXTURE2D_X_ARRAY #pragma kernel KColorDownsample KERNEL_SIZE=8 MAIN_DOWNSAMPLE=KColorDownsample DISABLE_TEXTURE2D_X_ARRAY diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramidPS.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramidPS.shader index c48142b1a8f..2d3c0bad80b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramidPS.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramidPS.shader @@ -12,7 +12,7 @@ Shader "ColorPyramidPS" HLSLPROGRAM #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag #define DISABLE_TEXTURE2D_X_ARRAY 1 @@ -28,7 +28,7 @@ Shader "ColorPyramidPS" HLSLPROGRAM #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma vertex Vert #pragma fragment Frag #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/ColorPyramidPS.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute index faef32024cd..e04b738a4e1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DepthPyramid.compute @@ -1,7 +1,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel KDepthDownsample8DualUav KERNEL_SIZE=8 KERNEL_NAME=KDepthDownsample8DualUav diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Distortion/ApplyDistortion.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Distortion/ApplyDistortion.shader index 6fd5921fd77..fd669c3c65f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Distortion/ApplyDistortion.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/Distortion/ApplyDistortion.shader @@ -9,7 +9,7 @@ Shader "Hidden/HDRP/ApplyDistortion" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma editor_sync_compilation #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/AmbientOcclusionResolve.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/AmbientOcclusionResolve.shader index adb33cde564..77efe0dd4a3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/AmbientOcclusionResolve.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/AmbientOcclusionResolve.shader @@ -2,7 +2,7 @@ Shader "Hidden/HDRP/AOResolve" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" //#pragma enable_d3d11_debug_symbols diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader index 5404809c935..0db2490b910 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader @@ -2,7 +2,7 @@ Shader "Hidden/HDRP/ColorResolve" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader index 219e122d14c..e3d3c2f7bba 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader @@ -2,7 +2,7 @@ Shader "Hidden/HDRP/DepthValues" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" // #pragma enable_d3d11_debug_symbols diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader index c55177f8125..20b3a47ba14 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/Blit.shader @@ -4,7 +4,7 @@ Shader "Hidden/HDRP/Blit" #pragma target 4.5 #pragma editor_sync_compilation - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile _ DISABLE_TEXTURE2D_X_ARRAY #pragma multi_compile _ BLIT_SINGLE_SLICE #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ClearStencilBuffer.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ClearStencilBuffer.shader index e0393849aa0..5ba4b5c9d3d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ClearStencilBuffer.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ClearStencilBuffer.shader @@ -8,7 +8,7 @@ Shader "Hidden/HDRP/ClearStencilBuffer" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyDepthBuffer.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyDepthBuffer.shader index 8b3bd03bb09..a6a74c576c0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyDepthBuffer.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyDepthBuffer.shader @@ -27,7 +27,7 @@ Shader "Hidden/HDRP/CopyDepthBuffer" HLSLPROGRAM #pragma target 4.5 #pragma editor_sync_compilation - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma fragment Frag #pragma vertex Vert //#pragma enable_d3d11_debug_symbols diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyStencilBuffer.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyStencilBuffer.shader index 398b57a5dd0..c15de359b38 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyStencilBuffer.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/CopyStencilBuffer.shader @@ -9,7 +9,7 @@ Shader "Hidden/HDRP/CopyStencilBuffer" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch // #pragma enable_d3d11_debug_symbols #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleDepth.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleDepth.shader index b524860a502..fd1cc990d5b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleDepth.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/DownsampleDepth.shader @@ -5,7 +5,7 @@ Shader "Hidden/HDRP/DownsampleDepth" #pragma target 4.5 #pragma editor_sync_compilation #pragma multi_compile_local MIN_DOWNSAMPLE CHECKERBOARD_DOWNSAMPLE - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ResolveStencilBuffer.compute b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ResolveStencilBuffer.compute index 7069861cd18..2c2d60ab795 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ResolveStencilBuffer.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ResolveStencilBuffer.compute @@ -1,4 +1,4 @@ -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel MAIN KERNEL_NAME=MAIN NUM_SAMPLES=1 #pragma kernel MAIN_MSAA_2 KERNEL_NAME=MAIN_MSAA_2 NUM_SAMPLES=2 MSAA diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/UpsampleTransparent.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/UpsampleTransparent.shader index 1f54de4305f..5b99327ae47 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/UpsampleTransparent.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/UpsampleTransparent.shader @@ -5,7 +5,7 @@ Shader "Hidden/HDRP/UpsampleTransparent" #pragma target 4.5 #pragma editor_sync_compilation #pragma multi_compile_local BILINEAR NEAREST_DEPTH - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XRMirrorView.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XRMirrorView.shader index d03638d3f07..618dbd72594 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XRMirrorView.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XRMirrorView.shader @@ -6,7 +6,7 @@ Shader "Hidden/HDRP/XRMirrorView" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch ENDHLSL // 0: TEXTURE2D diff --git a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XROcclusionMesh.shader b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XROcclusionMesh.shader index 98ead163baa..05730dc8889 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XROcclusionMesh.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/XROcclusionMesh.shader @@ -2,7 +2,7 @@ Shader "Hidden/HDRP/XROcclusionMesh" { HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/AmbientProbeConvolution.compute b/com.unity.render-pipelines.high-definition/Runtime/Sky/AmbientProbeConvolution.compute index e4401d11779..99f6bf1bd5d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/AmbientProbeConvolution.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/AmbientProbeConvolution.compute @@ -3,7 +3,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Sampling/Hammersley.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Sampling/Sampling.hlsl" -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel AmbientProbeConvolution KERNEL_NAME=AmbientProbeConvolution diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader b/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader index cf02f4ae391..6c9f6999425 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader @@ -6,7 +6,7 @@ Shader "Hidden/HDRP/Sky/GradientSky" #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader index 71d91824264..960e636caf4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader @@ -6,7 +6,7 @@ Shader "Hidden/HDRP/Sky/HDRISky" #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/IntegrateHDRISky.shader b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/IntegrateHDRISky.shader index e8ac82c86a7..2b2ac0af321 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/IntegrateHDRISky.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/IntegrateHDRISky.shader @@ -18,7 +18,7 @@ Shader "Hidden/HDRP/IntegrateHDRI" #pragma vertex Vert #pragma fragment Frag #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/GroundIrradiancePrecomputation.compute b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/GroundIrradiancePrecomputation.compute index 72ccc278ef7..ea44bb41abd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/GroundIrradiancePrecomputation.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/GroundIrradiancePrecomputation.compute @@ -1,5 +1,5 @@ // #pragma enable_d3d11_debug_symbols -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel MAIN_1 main=MAIN_1 SINGLE_SCATTERING #pragma kernel MAIN_S main=MAIN_S MULTIPLE_SCATTERING SRC_SS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/InScatteredRadiancePrecomputation.compute b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/InScatteredRadiancePrecomputation.compute index e2a6ba08ea7..75d8cd3d558 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/InScatteredRadiancePrecomputation.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/InScatteredRadiancePrecomputation.compute @@ -1,5 +1,5 @@ // #pragma enable_d3d11_debug_symbols -#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch +#pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma kernel MAIN_1 main=MAIN_1 SINGLE_SCATTERING #pragma kernel MAIN_S main=MAIN_S MULTIPLE_SCATTERING_GATHER SRC_SS diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader index a2516149e74..299b583f8c1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader @@ -7,7 +7,7 @@ Shader "Hidden/HDRP/Sky/PbrSky" // #pragma enable_d3d11_debug_symbols #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Samples~/ProceduralSky/Runtime/ProceduralSky/Resources/ProceduralSky.shader b/com.unity.render-pipelines.high-definition/Samples~/ProceduralSky/Runtime/ProceduralSky/Resources/ProceduralSky.shader index 4e4580889cf..ea8c3f766fb 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ProceduralSky/Runtime/ProceduralSky/Resources/ProceduralSky.shader +++ b/com.unity.render-pipelines.high-definition/Samples~/ProceduralSky/Runtime/ProceduralSky/Resources/ProceduralSky.shader @@ -11,7 +11,7 @@ Shader "Hidden/HDRP/Sky/ProceduralSky" #pragma editor_sync_compilation #pragma target 4.5 - #pragma only_renderers d3d11 ps4 xboxone vulkan metal switch + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma multi_compile _ _ENABLE_SUN_DISK From 1e0901c90243c8ca70a4ae27f114f012f12b27e8 Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Mon, 30 Mar 2020 14:51:50 +0200 Subject: [PATCH 059/200] Shadow cascade tooltip fix (when using the metric mode) #6448 --- .../CHANGELOG.md | 1 + .../Editor/Lighting/Shadow/HDShadowSettingsEditor.cs | 8 +++++++- .../Runtime/Lighting/Shadow/HDShadowSettings.cs | 12 ++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e58e090add4..9b1ff2cc772 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed XR single-pass with Mock HMD plugin - Fixed XR culling with multiple cameras - Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. +- Fixed shadow cascade tooltip when using the metric mode (case 1229232) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/HDShadowSettingsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/HDShadowSettingsEditor.cs index 3b2b41a2f57..b93e5b0aa5b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/HDShadowSettingsEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/HDShadowSettingsEditor.cs @@ -80,9 +80,15 @@ public override void OnInspectorGUI() { EditorGUI.indentLevel++; int cascadeCount = m_CascadeShadowSplitCount.value.intValue; + Debug.Assert(cascadeCount <= 4); // If we add support for more than 4 cascades, then we should add new entries in the next line + string[] cascadeOrder = { "first", "second", "third" }; + for (int i = 0; i < cascadeCount - 1; i++) { - PropertyField(m_CascadeShadowSplits[i], EditorGUIUtility.TrTextContent(string.Format("Split {0}", i + 1))); + string tooltipOverride = (unit == Unit.Metric) ? + $"Distance from the Camera (in meters) to the {cascadeOrder[i]} cascade split." : + $"Distance from the Camera (as a percentage of Max Distance) to the {cascadeOrder[i]} cascade split."; + PropertyField(m_CascadeShadowSplits[i], EditorGUIUtility.TrTextContent(string.Format("Split {0}", i + 1), tooltipOverride)); } if (HDRenderPipeline.s_UseCascadeBorders) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSettings.cs index 6b78ebab3e6..24558080a76 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSettings.cs @@ -57,14 +57,14 @@ public float[] cascadeShadowBorders /// Number of cascades HDRP uses for cascaded shadow maps. [Tooltip("Controls the number of cascades HDRP uses for cascaded shadow maps.")] public NoInterpClampedIntParameter cascadeShadowSplitCount = new NoInterpClampedIntParameter(4, 1, 4); - /// Position of the first cascade split as a percentage of Max Distance. - [Tooltip("Sets the position of the first cascade split as a percentage of Max Distance.")] + /// Position of the first cascade split as a percentage of Max Distance if the parameter is normalized or as the distance from the camera if it's not normalized. + [Tooltip("Sets the position of the first cascade split as a percentage of Max Distance if the parameter is normalized or as the distance from the camera if it's not normalized.")] public CascadePartitionSplitParameter cascadeShadowSplit0 = new CascadePartitionSplitParameter(0.05f); - /// Position of the second cascade split as a percentage of Max Distance. - [Tooltip("Sets the position of the second cascade split as a percentage of Max Distance.")] + /// Position of the second cascade split as a percentage of Max Distance if the parameter is normalized or as the distance from the camera if it's not normalized. + [Tooltip("Sets the position of the second cascade split as a percentage of Max Distance if the parameter is normalized or as the distance from the camera if it's not normalized.")] public CascadePartitionSplitParameter cascadeShadowSplit1 = new CascadePartitionSplitParameter(0.15f); - /// Sets the position of the third cascade split as a percentage of Max Distance. - [Tooltip("Position of the third cascade split as a percentage of Max Distance.")] + /// Sets the position of the third cascade split as a percentage of Max Distance if the parameter is normalized or as the distance from the camera if it's not normalized. + [Tooltip("Sets the position of the third cascade split as a percentage of Max Distance if the parameter is normalized or as the distance from the camera if it's not normalized.")] public CascadePartitionSplitParameter cascadeShadowSplit2 = new CascadePartitionSplitParameter(0.3f); /// Border size between the first and second cascade split. [Tooltip("Sets the border size between the first and second cascade split.")] From be0bac0595509e7c7dc1d011a4aae56eee8557e1 Mon Sep 17 00:00:00 2001 From: skhiat <55133890+skhiat@users.noreply.github.com> Date: Mon, 30 Mar 2020 17:25:05 +0200 Subject: [PATCH 060/200] Focus on Decal uses the extends of the projectors #6449 --- .../CHANGELOG.md | 1 + .../Editor/Material/Decal/DecalProjectorEditor.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9b1ff2cc772..fe43f25735d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -69,6 +69,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed XR culling with multiple cameras - Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. - Fixed shadow cascade tooltip when using the metric mode (case 1229232) +- Fix when rescale probe all direction below zero (1219246) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs index 876c6320074..ab124573fa3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs @@ -135,6 +135,18 @@ private void OnDisable() private void OnDestroy() => DestroyImmediate(m_MaterialEditor); + public bool HasFrameBounds() + { + return true; + } + + public Bounds OnGetFrameBounds() + { + DecalProjector decalProjector = target as DecalProjector; + + return new Bounds(decalProjector.transform.position, handle.size); + } + public void UpdateMaterialEditor() { int validMaterialsCount = 0; From 2ca7f4d531ca7a91da2c4e528124f395ec9f323f Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Tue, 31 Mar 2020 12:04:55 +0200 Subject: [PATCH 061/200] [8.x.x Backport] Fixed how the area light influence volume is computed to match rasterization. (#6455) * - Fixed how the area light influence volume is computed to match rasterization. * Fix an issue with axis order Co-authored-by: sebastienlagarde --- .../CHANGELOG.md | 1 + .../Raytracing/HDRaytracingLightCluster.cs | 44 ++++++++++++++++--- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fe43f25735d..b6bd01a5c9e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -70,6 +70,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. - Fixed shadow cascade tooltip when using the metric mode (case 1229232) - Fix when rescale probe all direction below zero (1219246) +- Fixed how the area light influence volume is computed to match rasterization. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs index 8d55e3bfad3..a7952cffdd8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs @@ -69,6 +69,9 @@ internal class HDRaytracingLightCluster int envLightCount = 0; int totalLightCount = 0; int numLightsPerCell = 0; + Bounds bounds = new Bounds(); + Vector3 minBounds = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue); + Vector3 maxBounds = new Vector3(-float.MaxValue, -float.MaxValue, -float.MaxValue); public HDRaytracingLightCluster() { @@ -239,6 +242,22 @@ void ResizeEnvLightDataBuffer(int numEnvLights) } } + void OOBBToAABBBounds(Vector3 centerWS, Vector3 extents, Vector3 up, Vector3 right, Vector3 forward, ref Bounds outBounds) + { + // Reset the bounds of the AABB + bounds.min = minBounds; + bounds.max = maxBounds; + // Push the 8 corners of the oobb into the AABB + bounds.Encapsulate(centerWS + right * extents.x + up * extents.y + forward * extents.z); + bounds.Encapsulate(centerWS + right * extents.x + up * extents.y - forward * extents.z); + bounds.Encapsulate(centerWS + right * extents.x - up * extents.y + forward * extents.z); + bounds.Encapsulate(centerWS + right * extents.x - up * extents.y - forward * extents.z); + bounds.Encapsulate(centerWS - right * extents.x + up * extents.y + forward * extents.z); + bounds.Encapsulate(centerWS - right * extents.x + up * extents.y - forward * extents.z); + bounds.Encapsulate(centerWS - right * extents.x - up * extents.y + forward * extents.z); + bounds.Encapsulate(centerWS - right * extents.x - up * extents.y - forward * extents.z); + } + void BuildGPULightVolumes(HDRayTracingLights rayTracingLights) { int totalNumLights = rayTracingLights.lightCount; @@ -270,20 +289,35 @@ void BuildGPULightVolumes(HDRayTracingLights rayTracingLights) // Reserve space in the cookie atlas m_RenderPipeline.ReserveCookieAtlasTexture(currentLight, light); + + // Grab the light range float lightRange = light.range; - m_LightVolumesCPUArray[realIndex].range = new Vector3(lightRange, lightRange, lightRange); - m_LightVolumesCPUArray[realIndex].position = currentLight.gameObject.transform.position; - m_LightVolumesCPUArray[realIndex].active = (currentLight.gameObject.activeInHierarchy ? 1 : 0); - m_LightVolumesCPUArray[realIndex].lightIndex = (uint)lightIdx; - + if (currentLight.type != HDLightType.Area) { + m_LightVolumesCPUArray[realIndex].range = new Vector3(lightRange, lightRange, lightRange); + m_LightVolumesCPUArray[realIndex].position = currentLight.gameObject.transform.position; + m_LightVolumesCPUArray[realIndex].active = (currentLight.gameObject.activeInHierarchy ? 1 : 0); + m_LightVolumesCPUArray[realIndex].lightIndex = (uint)lightIdx; m_LightVolumesCPUArray[realIndex].shape = 0; m_LightVolumesCPUArray[realIndex].lightType = 0; punctualLightCount++; } else { + // let's compute the oobb of the light influence volume first + Vector3 oobbDimensions = new Vector3(light.areaSize.x + 2 * lightRange, light.areaSize.y + 2 * lightRange, lightRange); // One-sided + Vector3 extents = 0.5f * oobbDimensions; + Vector3 oobbCenter = currentLight.gameObject.transform.position + extents.z * currentLight.gameObject.transform.forward; + + // Let's now compute an AABB that matches the previously defined OOBB + OOBBToAABBBounds(oobbCenter, extents, currentLight.gameObject.transform.up, currentLight.gameObject.transform.right, currentLight.gameObject.transform.forward, ref bounds); + + // Fill the volume data + m_LightVolumesCPUArray[realIndex].range = bounds.extents; + m_LightVolumesCPUArray[realIndex].position = bounds.center; + m_LightVolumesCPUArray[realIndex].active = (currentLight.gameObject.activeInHierarchy ? 1 : 0); + m_LightVolumesCPUArray[realIndex].lightIndex = (uint)lightIdx; m_LightVolumesCPUArray[realIndex].shape = 1; m_LightVolumesCPUArray[realIndex].lightType = 1; areaLightCount++; From 23e8ba64d4832a86afdbfc872346ee1e00b850e8 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:16:48 +0200 Subject: [PATCH 062/200] Fixed usage of light size data that are not available at runtime. (#6490) --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../RenderPipeline/Raytracing/HDRaytracingLightCluster.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b6bd01a5c9e..c8dbbbddcbe 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shadow cascade tooltip when using the metric mode (case 1229232) - Fix when rescale probe all direction below zero (1219246) - Fixed how the area light influence volume is computed to match rasterization. +- Fixed usage of light size data that are not available at runtime. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs index a7952cffdd8..0ccf1924f1d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingLightCluster.cs @@ -306,7 +306,7 @@ void BuildGPULightVolumes(HDRayTracingLights rayTracingLights) else { // let's compute the oobb of the light influence volume first - Vector3 oobbDimensions = new Vector3(light.areaSize.x + 2 * lightRange, light.areaSize.y + 2 * lightRange, lightRange); // One-sided + Vector3 oobbDimensions = new Vector3(currentLight.shapeWidth + 2 * lightRange, currentLight.shapeHeight + 2 * lightRange, lightRange); // One-sided Vector3 extents = 0.5f * oobbDimensions; Vector3 oobbCenter = currentLight.gameObject.transform.position + extents.z * currentLight.gameObject.transform.forward; From 06dbd25ac613a7d016809953fbde8fdf4e084421 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Wed, 1 Apr 2020 12:21:09 +0200 Subject: [PATCH 063/200] Changed the diffusion profile warning on the material to an info and changed the message to be more precise. (#6481) --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Material/DiffusionProfile/DiffusionProfileMaterialUI.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c8dbbbddcbe..fa9f9d8fe09 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -86,6 +86,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Hidden unsupported choice in emission in Materials - All custom pass volumes are now executed for one injection point instead of the first one. - Optimized PrepareLightsForGPU (cost reduced by over 25%) and PrepareGPULightData (around twice as fast now). +- Changed the diffusion profile warning on the material to an info and changed the message to be more precise. ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs index 93d1e87072c..726379b1193 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs @@ -8,7 +8,7 @@ namespace UnityEditor.Rendering.HighDefinition { static class DiffusionProfileMaterialUI { - static GUIContent diffusionProfileNotInHDRPAsset = new GUIContent("You must add this diffusion profile in the HDRP asset to make it work", EditorGUIUtility.IconContent("console.warnicon").image); + static GUIContent diffusionProfileNotInHDRPAsset = new GUIContent("You must make sure that this diffusion profile is either referenced in the HDRP asset or in the Diffusion Profile Override to make it work.", EditorGUIUtility.IconContent("console.infoicon").image); public static bool IsSupported(MaterialEditor materialEditor) { From 283af98dbaf7b8feb4724071a02588f174f26d86 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Tue, 31 Mar 2020 19:37:53 +0200 Subject: [PATCH 064/200] Fix shadow tesselation culling (#6477) * Fix custom pass culling params * Fixed shadow tessellation culling * revert custom pass code --- .../Runtime/Lighting/Light/HDAdditionalLightData.cs | 6 +++--- .../Runtime/Lighting/Shadow/HDShadowAtlas.cs | 2 +- .../Runtime/RenderPipeline/HDStringConstants.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index b76c4ac2298..5cfdcca69e6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -1876,7 +1876,7 @@ internal int UpdateShadowRequest(HDCamera hdCamera, HDShadowManager manager, HDS // Assign all setting common to every lights - SetCommonShadowRequestSettings(shadowRequest, visibleLight, cameraPos, invViewProjection, shadowRequest.deviceProjectionYFlip * shadowRequest.view, viewportSize, lightIndex); + SetCommonShadowRequestSettings(shadowRequest, visibleLight, cameraPos, invViewProjection, viewportSize, lightIndex); } shadowRequest.atlasViewport = resolutionRequest.atlasViewport; @@ -1896,7 +1896,7 @@ internal int UpdateShadowRequest(HDCamera hdCamera, HDShadowManager manager, HDS return firstShadowRequestIndex; } - void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, VisibleLight visibleLight, Vector3 cameraPos, Matrix4x4 invViewProjection, Matrix4x4 viewProjection, Vector2 viewportSize, int lightIndex) + void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, VisibleLight visibleLight, Vector3 cameraPos, Matrix4x4 invViewProjection, Vector2 viewportSize, int lightIndex) { // zBuffer param to reconstruct depth position (for transmission) float f = legacyLight.range; @@ -1940,7 +1940,7 @@ void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, VisibleLight } // shadow clip planes (used for tessellation clipping) - GeometryUtility.CalculateFrustumPlanes(viewProjection, m_ShadowFrustumPlanes); + GeometryUtility.CalculateFrustumPlanes(shadowRequest.deviceProjectionYFlip * shadowRequest.view, m_ShadowFrustumPlanes); if (shadowRequest.frustumPlanes?.Length != 6) shadowRequest.frustumPlanes = new Vector4[6]; // Left, right, top, bottom, near, far. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAtlas.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAtlas.cs index d6156443640..888e9c60ad1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAtlas.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAtlas.cs @@ -534,7 +534,7 @@ static void RenderShadows( RenderShadowsParameters parameters, cmd.SetGlobalMatrix(HDShaderIDs._InvProjMatrix, shadowRequest.deviceProjectionYFlip.inverse); cmd.SetGlobalMatrix(HDShaderIDs._ViewProjMatrix, viewProjection); cmd.SetGlobalMatrix(HDShaderIDs._InvViewProjMatrix, viewProjection.inverse); - cmd.SetGlobalVectorArray(HDShaderIDs._ShadowClipPlanes, shadowRequest.frustumPlanes); + cmd.SetGlobalVectorArray(HDShaderIDs._ShadowFrustumPlanes, shadowRequest.frustumPlanes); // TODO: remove this execute when DrawShadows will use a CommandBuffer renderContext.ExecuteCommandBuffer(cmd); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs index 0e6fd148a51..39bc306fde8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs @@ -250,7 +250,7 @@ static class HDShaderIDs public static readonly int _DirectionalContactShadowSampleCount = Shader.PropertyToID("_SampleCount"); public static readonly int _MicroShadowOpacity = Shader.PropertyToID("_MicroShadowOpacity"); public static readonly int _DirectionalTransmissionMultiplier = Shader.PropertyToID("_DirectionalTransmissionMultiplier"); - public static readonly int _ShadowClipPlanes = Shader.PropertyToID("_ShadowClipPlanes"); + public static readonly int _ShadowFrustumPlanes = Shader.PropertyToID("_ShadowFrustumPlanes"); public static readonly int _StencilMask = Shader.PropertyToID("_StencilMask"); public static readonly int _StencilRef = Shader.PropertyToID("_StencilRef"); From 7d5589f2b00c2940c674a76b1b94a9ceb0c91591 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Wed, 1 Apr 2020 07:50:58 -0400 Subject: [PATCH 065/200] Add option to disable XR rendering on the camera settings #6372 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs | 8 ++++++++ .../Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs | 1 + .../Editor/RenderPipeline/Camera/SerializedHDCamera.cs | 2 ++ .../Unity.RenderPipelines.HighDefinition.Editor.asmdef | 7 ++++++- .../RenderPipeline/Camera/HDAdditionalCameraData.cs | 4 ++++ .../Runtime/RenderPipeline/HDRenderPipeline.cs | 6 +++++- .../Runtime/RenderPipeline/XR/XRSystem.cs | 2 +- 8 files changed, 28 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fa9f9d8fe09..b8f7d2b419b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added support of cookie baking and add support on Disc light. - Added XR setting to control camera jitter for temporal effects - Added an error message in the DrawRenderers custom pass when rendering opaque objects with an HDRP asset in DeferredOnly mode. +- Added option to disable XR rendering on the camera settings. ### Fixed - Fix Changelog diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs index b4fe3f6cbbd..56f220191ce 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs @@ -147,6 +147,9 @@ static HDCameraUI() Expandable.Output, k_ExpandedState, CED.Group( +#if ENABLE_VR && ENABLE_XR_MANAGEMENT + Drawer_SectionXRRendering, +#endif #if ENABLE_MULTIPLE_DISPLAYS Drawer_SectionMultiDisplay, #endif @@ -512,6 +515,11 @@ static void Drawer_CameraWarnings(SerializedHDCamera p, Editor owner) } } + static void Drawer_SectionXRRendering(SerializedHDCamera p, Editor owner) + { + EditorGUILayout.PropertyField(p.xrRendering, xrRenderingContent); + } + #if ENABLE_MULTIPLE_DISPLAYS static void Drawer_SectionMultiDisplay(SerializedHDCamera p, Editor owner) { diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs index f07b7951c06..527ea9b2e5e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs @@ -57,6 +57,7 @@ static partial class HDCameraUI static readonly GUIContent viewportContent = EditorGUIUtility.TrTextContent("Viewport Rect", "Four values that indicate where on the screen HDRP draws this Camera view. Measured in Viewport Coordinates (values in the range of [0, 1])."); static readonly GUIContent depthContent = EditorGUIUtility.TrTextContent("Depth"); + static readonly GUIContent xrRenderingContent = EditorGUIUtility.TrTextContent("XR Rendering"); #if ENABLE_MULTIPLE_DISPLAYS static readonly GUIContent targetDisplayContent = EditorGUIUtility.TrTextContent("Target Display"); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/SerializedHDCamera.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/SerializedHDCamera.cs index 0834014153d..ca5efef5bbe 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/SerializedHDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/SerializedHDCamera.cs @@ -26,6 +26,7 @@ class SerializedHDCamera public SerializedProperty stopNaNs; public SerializedProperty clearColorMode; public SerializedProperty backgroundColorHDR; + public SerializedProperty xrRendering; public SerializedProperty passThrough; public SerializedProperty customRenderingSettings; public SerializedProperty clearDepth; @@ -71,6 +72,7 @@ public SerializedHDCamera(SerializedObject serializedObject) stopNaNs = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.stopNaNs); clearColorMode = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.clearColorMode); backgroundColorHDR = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.backgroundColorHDR); + xrRendering = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.xrRendering); passThrough = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.fullscreenPassthrough); customRenderingSettings = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.customRenderingSettings); clearDepth = serializedAdditionalDataObject.Find((HDAdditionalCameraData d) => d.clearDepth); diff --git a/com.unity.render-pipelines.high-definition/Editor/Unity.RenderPipelines.HighDefinition.Editor.asmdef b/com.unity.render-pipelines.high-definition/Editor/Unity.RenderPipelines.HighDefinition.Editor.asmdef index a60b36808c5..a2955e88f11 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Unity.RenderPipelines.HighDefinition.Editor.asmdef +++ b/com.unity.render-pipelines.high-definition/Editor/Unity.RenderPipelines.HighDefinition.Editor.asmdef @@ -25,6 +25,11 @@ "name": "com.unity.render-pipelines.high-definition", "expression": "0.0.0", "define": "HDRP_1_OR_NEWER" + }, + { + "name": "com.unity.xr.management", + "expression": "1.0.0", + "define": "ENABLE_XR_MANAGEMENT" } ] -} \ No newline at end of file +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs index d3aef0f64c8..9445ff5509d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs @@ -270,6 +270,9 @@ public enum SMAAQualityLevel /// Vertical flip mode. public FlipYMode flipYMode; + /// Enable XR rendering. + public bool xrRendering = true; + /// Skips rendering settings to directly render in fullscreen (Useful for video). [Tooltip("Skips rendering settings to directly render in fullscreen (Useful for video).")] public bool fullscreenPassthrough = false; @@ -470,6 +473,7 @@ public void CopyTo(HDAdditionalCameraData data) data.volumeAnchorOverride = volumeAnchorOverride; data.antialiasing = antialiasing; data.dithering = dithering; + data.xrRendering = xrRendering; physicalParameters.CopyTo(data.physicalParameters); data.renderingPathCustomFrameSettings = renderingPathCustomFrameSettings; 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 f3ece248b2e..9aac85a718d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1787,7 +1787,11 @@ ref _cullingResults // Render XR mirror view once all render requests have been completed if (i == 0 && renderRequest.hdCamera.camera.cameraType == CameraType.Game && renderRequest.hdCamera.camera.targetTexture == null) { - m_XRSystem.RenderMirrorView(cmd); + HDAdditionalCameraData acd; + if (renderRequest.hdCamera.camera.TryGetComponent(out acd) && acd.xrRendering) + { + m_XRSystem.RenderMirrorView(cmd); + } } // Now that all cameras have been rendered, let's propagate the data required for screen space shadows diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index 4b89ae1d46c..e7d5d48222d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -123,7 +123,7 @@ internal int GetMaxViews() continue; // Enable XR layout only for gameview camera - bool xrSupported = camera.cameraType == CameraType.Game && camera.targetTexture == null; + bool xrSupported = camera.cameraType == CameraType.Game && camera.targetTexture == null && HDUtils.TryGetAdditionalCameraDataOrDefault(camera).xrRendering; if (customLayout != null && customLayout(new XRLayout() { camera = camera, xrSystem = this })) { From aa12bc47e725c6413bda9e246086b50ce9bb8a62 Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Tue, 31 Mar 2020 10:23:14 +0200 Subject: [PATCH 066/200] Move scene view camera settings to camera settings window #6390 --- .../CHANGELOG.md | 1 + .../Documentation~/TableOfContents.md | 1 + .../Upgrading-from-2019.3-to-2020.1.md | 7 +++ .../PostProcessing/PostProcessSystem.cs | 2 +- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 2 +- .../HDAdditionalSceneViewSettings.cs | 51 +++++++++++++++++++ .../HDAdditionalSceneViewSettings.cs.meta | 11 ++++ .../Utilities/HDRenderPipelinePreferences.cs | 33 ------------ 8 files changed, 73 insertions(+), 35 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md create mode 100644 com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs create mode 100644 com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs.meta diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b8f7d2b419b..9e5a3cb3307 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -88,6 +88,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - All custom pass volumes are now executed for one injection point instead of the first one. - Optimized PrepareLightsForGPU (cost reduced by over 25%) and PrepareGPULightData (around twice as fast now). - Changed the diffusion profile warning on the material to an info and changed the message to be more precise. +- Moved scene view camera settings for HDRP from the preferences window to the scene view camera settings window. ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index ef71b2f9e67..96ac363bab4 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -14,6 +14,7 @@ * [Material Upgrade](Material-Upgrade) * [2019.1 to 2019.2](Upgrading-from-2019.1-to-2019.2) * [2019.2 to 2019.3](Upgrading-from-2019.2-to-2019.3) + * [2019.3 to 2020.1](Upgrading-from-2019.3-to-2020.1) * Volume Framework * [Volumes](Volumes) * [Volume Profiles](Volume-Profile) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md new file mode 100644 index 00000000000..8742701deb8 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md @@ -0,0 +1,7 @@ +# Upgrading HDRP from Unity 2019.3 to Unity 2020.1 + +In the High Definition Render Pipeline (HDRP), some features work differently between major versions of Unity. This document helps you upgrade HDRP from Unity 2019.3 to 2020.1. + +## Scene View Camera Settings + +From Unity 2020.1, the HDRP-specific settings of the scene view camera (anti-aliasing mode and stop NaNs) can be found in the same pop-up window as the standard scene camera settings, which are accessible by clicking the scene camera button on the toolbar of the scene window. These settings were previously in the HDRP preferences window (Edit > Preferences). diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs index 615d2af76bd..75bef7a57a5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs @@ -415,7 +415,7 @@ void PoolSource(ref RTHandle src, RTHandle dst) #if UNITY_EDITOR if (isSceneView) - stopNaNs = HDRenderPipelinePreferences.sceneViewStopNaNs; + stopNaNs = HDAdditionalSceneViewSettings.sceneViewStopNaNs; #endif if (stopNaNs) 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 6dad9dea362..f935ef4e77a 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 @@ -839,7 +839,7 @@ void UpdateAntialiasing() #if UNITY_EDITOR else if (camera.cameraType == CameraType.SceneView) { - var mode = HDRenderPipelinePreferences.sceneViewAntialiasing; + var mode = HDAdditionalSceneViewSettings.sceneViewAntialiasing; if (mode == AntialiasingMode.TemporalAntialiasing && !animateMaterials) antialiasing = AntialiasingMode.None; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs new file mode 100644 index 00000000000..f70ffb78d71 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs @@ -0,0 +1,51 @@ +namespace UnityEngine.Rendering.HighDefinition +{ +#if UNITY_EDITOR + using UnityEditor; + using AntialiasingMode = HDAdditionalCameraData.AntialiasingMode; + + [InitializeOnLoad] + static class HDAdditionalSceneViewSettings + { + static class Styles + { + public static readonly GUIContent AAMode = EditorGUIUtility.TrTextContent("Camera Anti-aliasing", "The anti-alising mode that will be used in the scene view camera."); + public static readonly GUIContent StopNaNs = EditorGUIUtility.TrTextContent("Camera Stop NaNs", "When enabled, any NaNs in the color buffer of the scene view camera will be suppressed."); + public static readonly string HelpBox = "Temporal Anti - aliasing in the Scene View is only supported when Animated Materials are enabled."; + } + + static AntialiasingMode s_SceneViewAntialiasing = AntialiasingMode.None; + + public static AntialiasingMode sceneViewAntialiasing + { + get => s_SceneViewAntialiasing; + set => s_SceneViewAntialiasing = value; + } + + static bool s_SceneViewStopNaNs = false; + + public static bool sceneViewStopNaNs + { + get => s_SceneViewStopNaNs; + set => s_SceneViewStopNaNs = value; + } + + static HDAdditionalSceneViewSettings() + { + SceneViewCameraWindow.additionalSettingsGui += DoAdditionalSettings; + } + + static void DoAdditionalSettings(SceneView sceneView) + { + EditorGUILayout.Space(); + EditorGUILayout.LabelField("HD Render Pipeline", EditorStyles.boldLabel); + + s_SceneViewAntialiasing = (AntialiasingMode)EditorGUILayout.EnumPopup(Styles.AAMode, s_SceneViewAntialiasing); + if (s_SceneViewAntialiasing == AntialiasingMode.TemporalAntialiasing) + EditorGUILayout.HelpBox(Styles.HelpBox, MessageType.Info); + + s_SceneViewStopNaNs = EditorGUILayout.Toggle(Styles.StopNaNs, s_SceneViewStopNaNs); + } + } +#endif +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs.meta b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs.meta new file mode 100644 index 00000000000..27faf403248 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6b35404f0872b6444b8669bb00132cfa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDRenderPipelinePreferences.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDRenderPipelinePreferences.cs index 0310736c51a..8670fb07bab 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDRenderPipelinePreferences.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDRenderPipelinePreferences.cs @@ -12,30 +12,6 @@ static class HDRenderPipelinePreferences { static bool m_Loaded = false; - static AntialiasingMode s_SceneViewAntialiasing; - public static AntialiasingMode sceneViewAntialiasing - { - get => s_SceneViewAntialiasing; - set - { - if (s_SceneViewAntialiasing == value) return; - s_SceneViewAntialiasing = value; - EditorPrefs.SetInt(Keys.sceneViewAntialiasing, (int)s_SceneViewAntialiasing); - } - } - - static bool s_SceneViewStopNaNs; - public static bool sceneViewStopNaNs - { - get => s_SceneViewStopNaNs; - set - { - if (s_SceneViewStopNaNs == value) return; - s_SceneViewStopNaNs = value; - EditorPrefs.SetBool(Keys.sceneViewStopNaNs, s_SceneViewStopNaNs); - } - } - static bool s_MatcapMixAlbedo; public static bool matcapViewMixAlbedo { @@ -105,13 +81,6 @@ static SettingsProvider PreferenceGUI() if (!m_Loaded) Load(); - sceneViewAntialiasing = (AntialiasingMode)EditorGUILayout.EnumPopup("Scene View Anti-aliasing", sceneViewAntialiasing); - - if (sceneViewAntialiasing == AntialiasingMode.TemporalAntialiasing) - EditorGUILayout.HelpBox("Temporal Anti-aliasing in the Scene View is only supported when Animated Materials are enabled.", MessageType.Info); - - sceneViewStopNaNs = EditorGUILayout.Toggle("Scene View Stop NaNs", sceneViewStopNaNs); - matcapViewMixAlbedo = EditorGUILayout.Toggle("Mix Albedo in the Matcap", matcapViewMixAlbedo); if(matcapViewMixAlbedo) matcapViewScale = EditorGUILayout.FloatField("Matcap intensity scale", matcapViewScale); @@ -134,8 +103,6 @@ static HDRenderPipelinePreferences() static void Load() { - s_SceneViewAntialiasing = (AntialiasingMode)EditorPrefs.GetInt(Keys.sceneViewAntialiasing, (int)AntialiasingMode.None); - s_SceneViewStopNaNs = EditorPrefs.GetBool(Keys.sceneViewStopNaNs, false); s_MatcapMixAlbedo = EditorPrefs.GetBool(Keys.matcapViewMixAlbedo, true); s_MatcapScale = EditorPrefs.GetFloat(Keys.matcapViewScale, 1.0f); s_LightColorNormalization = EditorPrefs.GetBool(Keys.lightColorNormalization, false); From 7801cf01ef9fe4daeda3c15d3448fe985529f754 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Tue, 31 Mar 2020 18:35:54 +0100 Subject: [PATCH 067/200] Corrected typo and changed links to .md (#6414) * Corrected typo and changed links to .md * Update Master-Node-Fabric.md --- .../Documentation~/Master-Node-Fabric.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Fabric.md b/com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Fabric.md index 02be38b022d..52ec484c2af 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Fabric.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Fabric.md @@ -6,7 +6,7 @@ You can use the Fabric Material to render various types of fabric in the High De ## Creating and editing a Fabric Material -Fabric Materials use a Shader Graph Master Node which means you cannot edit any of its properties in the Inspector. Fabric Materials use a Shader Graph Master Node, so you need to use a specific process to create and edit a Material that uses it. For information on how to do this, see [Customizing HDRP materials with Shader Graph](Customizing-HDRP-materials-with-Shader-Graph.html). +Fabric Materials use a Shader Graph Master Node which means you cannot edit any of its properties in the Inspector. Fabric Materials use a Shader Graph Master Node, so you need to use a specific process to create and edit a Material that uses it. For information on how to do this, see [Customizing HDRP materials with Shader Graph](Customizing-HDRP-materials-with-Shader-Graph.md). When you apply the node to a Material, the **Surface Options** and **Exposed Properties** become available to edit in the Material’s Inspector. @@ -27,7 +27,7 @@ There are properties on the Master Node, and properties on each Material. Master -The following table describes the input ports on a Fabric Master Node, including the property type and Shader stage used for each port. For more information on Shader stages, see [Shader Stage]([https://docs.unity3d.com/Packages/com.unity.shadergraph@latest/index.html?subfolder=/manual/Shader-Stage.html](https://docs.unity3d.com/Packages/com.unity.shadergraph@6.9/manual/Shader-Stage.html)). +The following table describes the input ports on a Fabric Master Node, including the property type and Shader stage used for each port. For more information on Shader stages, see [Shader Stage](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest/index.html?subfolder=/manual/Shader-Stage.html). | **Property** | **Type** | **Stage** | **Description** | | ---------------------- | ----------------- | --------- | ------------------------------------------------------------ | @@ -37,11 +37,11 @@ The following table describes the input ports on a Fabric Master Node, including | **BaseColor** | Vector 3 | Fragment | The color of the Material. To assign an image, connect a sampled Texture2D to this Master Node. | | **SpecularOcclusion** | Vector 1 | Fragment | A multiplier for the intensity of specular global illumination. This port only appears when you set **Specular Occlusion Mode** to **Custom**. | | **Normal** | Vector 3 | Fragment | The normal of the point in tangent space. To handle this property, you should use multiple maps. One map for the base and one map for the fabric thread that adds the additional details. | -| **BentNormal** | Vector 3 | Fragment | The [bent normal](Glossary.html#BentNormalMap) of the point. | +| **BentNormal** | Vector 3 | Fragment | The [bent normal](Glossary.md#BentNormalMap) of the point. | | **Smoothness** | Vector 1 | Fragment | The appearance of the primary specular highlight. Every light ray that hits a smooth surface bounces off at predictable and consistent angles. For a perfectly smooth surface that reflects light like a mirror, set this to a value of 1. For a rougher surface, set this to a lower value. | | **AmbientOcclusion** | Vector1 | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to **0** to remove all global illumination. | | **SpecularColor** | Vector3 | Fragment | The color of the specular highlight. To assign an image, connect a sampled Texture2D to this Master Node. | -| **Diffusion Profile** | Diffusion Profile | Fragment | Specifies which [Diffusion Profile](Diffusion-Profile.html) the Material uses for subsurface scattering and/or transmission. This port only appears when you enable **Subsurface Scattering** or **Transmission**. | +| **Diffusion Profile** | Diffusion Profile | Fragment | Specifies which [Diffusion Profile](Diffusion-Profile.md) the Material uses for subsurface scattering and/or transmission. This port only appears when you enable **Subsurface Scattering** or **Transmission**. | | **SubsurfaceMask** | Vector1 | Fragment | Indicates whether subsurface scattering should affect the shaded point. This port only appears when you enable the **Subsurface Scattering** setting. | | **Thickness** | Vector1 | Fragment | The thickness of the surface that HDRP uses to evaluate transmission. This port only appears when you enable the **Transmission** setting. | | **Tangent** | Vector3 | Fragment | The tangent of the point in tangent space. This is useful when the surface has a non-null anisotropy value. This port only appears when you set **Material Type** to **Silk**. | @@ -49,8 +49,8 @@ The following table describes the input ports on a Fabric Master Node, including | **Emission** | Vector 3 | Fragment | The Material's emission color value. The RGB values you assign should be between 0-255. The Intensity value should be within the range **-10** and **10**. | | **Alpha** | Vector 1 | Fragment | The Material's alpha value. The Material uses this for transparency and/or alpha clip. HDRP expects a range from **0** to **1**. This port only appears when you set **Material Type** to **Silk**. | | **AlphaClipThreshold** | Vector 1 | Fragment | The alpha value limit that HDRP uses to determine whether it should render each pixel of the Material. If the alpha value of the pixel is equal to or higher than this threshold then HDRP renders the pixel. If the value is lower than this threshold then HDRP does not render the pixel. This port only appears when you enable the **Alpha Clipping** setting. | -| **BakedGI** | Vector 3 | Fragment | Replaces the built-in diffuse global illumination (GI) solution with a value that you can set. This is for the front [face](Glossary.html#Face) of the Mesh only.This port only appears when you enable the **Override Baked GI** setting. | -| **BakedBackGI** | Vector3 | Fragment | Replaces the built-in diffuse GI solution with a value that you can set. This is for the back [face](Glossary.html#Face) of the Mesh only.This port only appears when you enable the **Override Baked GI** setting. | +| **BakedGI** | Vector 3 | Fragment | Replaces the built-in diffuse global illumination (GI) solution with a value that you can set. This is for the front [face](Glossary.md#Face) of the Mesh only.This port only appears when you enable the **Override Baked GI** setting. | +| **BakedBackGI** | Vector3 | Fragment | Replaces the built-in diffuse GI solution with a value that you can set. This is for the back [face](Glossary.md#Face) of the Mesh only.This port only appears when you enable the **Override Baked GI** setting. | | **DepthOffset** | Vector 1 | Fragment | The value that the Shader uses to increase the depth of the fragment by.. This port only appears when you enable the **Depth Offset setting**. | @@ -73,7 +73,7 @@ To view these properties, click the **Cog** in the top right of the Master Node. | **Alpha Clipping** | Enable or disable Alpha Clipping. This controls whether your Shader acts as a Cutout Shader or not. Cutout Shader is a Shader type that has both Opaque and Transparent parts. | | **Double-Sided** | Specifies whether HDRP renders both faces of the polygons in your geometry. You can also specify how HDRP interprets the normals for the back face. The options are:
• **Enabled**: HDRP renders both faces of polygons in your geometry.
• **Disabled**: HDRP does not render both faces of polygons in your geometry.
• **Flipped Normals**: The normal of the back face is 180° of the front facing normal. This also applies to the Material which means that it looks the same on both sides of the geometry.
• **Mirrored Normals**: The normal of the back face mirrors the front facing normal. This also applies to the Material which means that it inverts on the back face. This is useful when you want to keep the same shapes on both sides of the geometry, for example, for leaves. | | **Energy Conserving Specular** | Enable the checkbox to make HDRP reduce the diffuse color of the Material if the specular effect is more intense. This makes the lighting of the Material more consistent, which makes the Material look more physically accurate. | -| **Material Type** | Specifies the type of Material the fabric Shader represents. The options are:
• **Cotton Wool**: A variant inspired by the Imageworks’s cloth model.
• **Silk**: A fabric variant based on an anisotropic DinseyGGX BRDF Model. | +| **Material Type** | Specifies the type of Material the fabric Shader represents. The options are:
• **Cotton Wool**: A variant inspired by the Imageworks’s cloth model.
• **Silk**: A fabric variant based on an anisotropic GGX BRDF Model. | | **Subsurface Scattering** | Indicates whether the Material supports subsurface scattering. To disable subsurface scattering in specific regions of the Material, use the **Subsurface Mask**. | | **Transmission** | Indicates whether the Material supports transmission. | | **Receive Decals** | Indicates whether HDRP can draw decals on this Material’s surface. | From c5209000f24c6c0b0889c7cbd555b9e4805bf7e0 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Wed, 1 Apr 2020 12:46:38 +0200 Subject: [PATCH 068/200] Hdrp /fix reset of HDAdditionalLightData #6453 --- .../CHANGELOG.md | 1 + .../Light/HDAdditionalLightData.Migration.cs | 22 +------------- .../Lighting/Light/HDAdditionalLightData.cs | 29 ++++++++++++++++++- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9e5a3cb3307..720d0c68c8e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -73,6 +73,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix when rescale probe all direction below zero (1219246) - Fixed how the area light influence volume is computed to match rasterization. - Fixed usage of light size data that are not available at runtime. +- Fixed light type resolution when performing a reset on HDAdditionalLightData (case 1220931) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs index 254fc7ac9a7..5901520b37c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs @@ -8,7 +8,7 @@ namespace UnityEngine.Rendering.HighDefinition { - public partial class HDAdditionalLightData : ISerializationCallbackReceiver, IVersionable + public partial class HDAdditionalLightData : IVersionable { enum Version { @@ -167,26 +167,6 @@ private static readonly MigrationDescription k_H ); #pragma warning restore 0618, 0612 - /// - /// Deserialization callback - /// - void ISerializationCallbackReceiver.OnAfterDeserialize() {} - - /// - /// Serialization callback - /// - void ISerializationCallbackReceiver.OnBeforeSerialize() - { - UpdateBounds(); - } - - void OnEnable() - { - if (shadowUpdateMode == ShadowUpdateMode.OnEnable) - m_ShadowMapRenderedSinceLastRequest = false; - SetEmissiveMeshRendererEnabled(true); - } - void Migrate() { k_HDLightMigrationSteps.Migrate(this); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index 5cfdcca69e6..13a317b27d4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -32,7 +32,7 @@ struct TimelineWorkaround [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "Light-Component" + Documentation.endURL)] [RequireComponent(typeof(Light))] [ExecuteAlways] - public partial class HDAdditionalLightData : MonoBehaviour + public partial class HDAdditionalLightData : MonoBehaviour, ISerializationCallbackReceiver { internal static class ScalableSettings { @@ -2919,5 +2919,32 @@ ShadowMapType shadowMapType : type != HDLightType.Directional ? ShadowMapType.PunctualAtlas : ShadowMapType.CascadedDirectional; + + void OnEnable() + { + if (shadowUpdateMode == ShadowUpdateMode.OnEnable) + m_ShadowMapRenderedSinceLastRequest = false; + SetEmissiveMeshRendererEnabled(true); + } + + /// + /// Deserialization callback + /// + void ISerializationCallbackReceiver.OnAfterDeserialize() { } + + /// + /// Serialization callback + /// + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + // When reseting, Light component can be not available (will be called later in Reset) + if (m_Light == null || m_Light.Equals(null)) + return; + + UpdateBounds(); + } + + void Reset() + => UpdateBounds(); } } From f251095d7b228a8e4606aa84c1b3835e592b5c83 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Tue, 31 Mar 2020 14:01:21 +0200 Subject: [PATCH 069/200] Fix null error when leaving debug menu #6467 --- .../Runtime/Debug/DebugDisplay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 20d469a4084..303100ca701 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -1056,7 +1056,7 @@ void RegisterDecalsDebug() m_DebugDecalsAffectingTransparentItems = new DebugUI.Widget[] { new DebugUI.BoolField { displayName = "Display Atlas", getter = () => data.decalsDebugSettings.displayAtlas, setter = value => data.decalsDebugSettings.displayAtlas = value}, - new DebugUI.UIntField { displayName = "Mip Level", getter = () => data.decalsDebugSettings.mipLevel, setter = value => data.decalsDebugSettings.mipLevel = value, min = () => 0u, max = () => (uint)(RenderPipelineManager.currentPipeline as HDRenderPipeline).GetDecalAtlasMipCount() } + new DebugUI.UIntField { displayName = "Mip Level", getter = () => data.decalsDebugSettings.mipLevel, setter = value => data.decalsDebugSettings.mipLevel = value, min = () => 0u, max = () => (uint)(RenderPipelineManager.currentPipeline as HDRenderPipeline)?.GetDecalAtlasMipCount() } }; var panel = DebugManager.instance.GetPanel(k_PanelDecals, true); From 581d6db3976bf657ae4998e4883295ce83421565 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Wed, 1 Apr 2020 12:38:45 +0200 Subject: [PATCH 070/200] Hdrp /fix drag area width at left of light intensity #6471 --- .../CHANGELOG.md | 1 + .../Editor/Lighting/HDLightUI.Skin.cs | 3 +++ .../Editor/Lighting/HDLightUI.cs | 10 +++++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 720d0c68c8e..637d94cf140 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -74,6 +74,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed how the area light influence volume is computed to match rasterization. - Fixed usage of light size data that are not available at runtime. - Fixed light type resolution when performing a reset on HDAdditionalLightData (case 1220931) +- Fixed drag area width at left of Light's intensity field in Inspector. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs index c7911055978..791fbe90800 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs @@ -50,6 +50,9 @@ sealed class Styles public readonly GUIContent areaIntensity = new GUIContent("Intensity (Lumen)", "Luminous power of the Light in Lumen."); public readonly GUIContent lightIntensity = new GUIContent("Intensity", "Sets the strength of the Light. Use the drop-down to select the light units to use."); + // in casse that you want to keep the indentation but have nothing to write + public readonly GUIContent empty = EditorGUIUtility.TrTextContent(" "); + public readonly GUIContent lightRadius = new GUIContent("Radius", "Sets the radius of the light source. This affects the falloff of diffuse lighting, the spread of the specular highlight, and the softness of Ray Traced shadows."); public readonly GUIContent affectDiffuse = new GUIContent("Affect Diffuse", "When disabled, HDRP does not calculate diffuse lighting for this Light. Does not increase performance as HDRP still calculates the diffuse lighting."); public readonly GUIContent affectSpecular = new GUIContent("Affect Specular", "When disabled, HDRP does not calculate specular lighting for this Light. Does not increase performance as HDRP still calculates the specular lighting."); diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index 9f427379e68..e6e52bf3678 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -606,10 +606,10 @@ static void DrawLightIntensityGUILayout(SerializedHDLight serialized, Editor own Rect valueRect = lineRect; Rect labelRect = lineRect; labelRect.width = EditorGUIUtility.labelWidth; - valueRect.x += labelRect.width - indent + k_PrefixPaddingRight; + // We use PropertyField to draw the value to keep the handle at left of the field - // This will apply the indent again thus we need to remove it two time for alignment - valueRect.width -= labelRect.width + k_UnitWidth - indent - indent + k_PrefixPaddingRight + k_ValueUnitSeparator; + // This will apply the indent again thus we need to remove it time for alignment + valueRect.width += indent - k_ValueUnitSeparator - k_UnitWidth; Rect unitRect = valueRect; unitRect.x += valueRect.width - indent + k_ValueUnitSeparator; unitRect.width = k_UnitWidth + .5f; @@ -623,8 +623,8 @@ static void DrawLightIntensityGUILayout(SerializedHDLight serialized, Editor own } EditorGUI.EndProperty(); EditorGUI.EndProperty(); - - EditorGUI.PropertyField(valueRect, serialized.intensity, GUIContent.none); + + EditorGUI.PropertyField(valueRect, serialized.intensity, s_Styles.empty); DrawLightIntensityUnitPopup(unitRect, serialized, owner); if (EditorGUI.EndChangeCheck()) From 3246b8e51e048c1340e02758c6be6f25006cf2ac Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:37:08 +0100 Subject: [PATCH 071/200] Fix issue with baked reflection probes constantly marked as dirty with auto-bake on #6473 --- .../CHANGELOG.md | 1 + .../Runtime/Utilities/CameraSettings.cs | 33 +++++++++++++++++++ .../Runtime/Utilities/ProbeSettings.cs | 3 +- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 637d94cf140..b4f1cc2f252 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -75,6 +75,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed usage of light size data that are not available at runtime. - Fixed light type resolution when performing a reset on HDAdditionalLightData (case 1220931) - Fixed drag area width at left of Light's intensity field in Inspector. +- Fix for issue that prevented scene from being completely saved when baked reflection probes are present and lighting is set to auto generate. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraSettings.cs index 606dbe3112e..742170e8ec3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraSettings.cs @@ -356,5 +356,38 @@ public static CameraSettings From(HDCamera hdCamera) [SerializeField][FormerlySerializedAs("frameSettings")][Obsolete("For data migration")] internal ObsoleteFrameSettings m_ObsoleteFrameSettings; #pragma warning restore 618 + + internal Hash128 GetHash() + { + var h = new Hash128(); + var h2 = new Hash128(); + + HashUtilities.ComputeHash128(ref bufferClearing, ref h); + HashUtilities.ComputeHash128(ref culling, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref customRenderingSettings, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref defaultFrameSettings, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref flipYMode, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref frustum, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref invertFaceCulling, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref probeLayerMask, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref probeRangeCompressionFactor, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref renderingPathCustomFrameSettings, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + HashUtilities.ComputeHash128(ref renderingPathCustomFrameSettingsOverrideMask, ref h2); + HashUtilities.AppendHash(ref h2, ref h); + int volumeHash = volumes.GetHashCode(); + h2 = new Hash128((ulong)volumeHash, 0); + HashUtilities.AppendHash(ref h2, ref h); + + return h; + } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs index faa360006dd..23499318e19 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs @@ -276,8 +276,9 @@ public Hash128 ComputeHash() HashUtilities.AppendHash(ref h2, ref h); HashUtilities.ComputeHash128(ref proxySettings, ref h2); HashUtilities.AppendHash(ref h2, ref h); - HashUtilities.ComputeHash128(ref cameraSettings, ref h2); + h2 = cameraSettings.GetHash(); HashUtilities.AppendHash(ref h2, ref h); + if (influence != null) { h2 = influence.ComputeHash(); From b445a2fac0b661c15806ff4ecf0d47556ad7a87e Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Wed, 1 Apr 2020 12:19:55 +0200 Subject: [PATCH 072/200] Fix custom pass depth copy #6484 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b4f1cc2f252..53633597a2f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -76,6 +76,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed light type resolution when performing a reset on HDAdditionalLightData (case 1220931) - Fixed drag area width at left of Light's intensity field in Inspector. - Fix for issue that prevented scene from being completely saved when baked reflection probes are present and lighting is set to auto generate. +- Fixed the depth buffer copy made before custom pass after opaque and normal injection point. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. 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 9aac85a718d..be8af6df0b4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2012,7 +2012,11 @@ AOVRequestData aovRequest m_SharedRTManager.BindNormalBuffer(cmd); // After Depth and Normals/roughness including decals - RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.AfterOpaqueDepthAndNormal); + bool depthBufferModified = RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.AfterOpaqueDepthAndNormal); + + // If the depth was already copied in RenderDBuffer, we force the copy again because the custom pass modified the depth. + if (depthBufferModified) + m_IsDepthBufferCopyValid = false; // In both forward and deferred, everything opaque should have been rendered at this point so we can safely copy the depth buffer for later processing. GenerateDepthPyramid(hdCamera, cmd, FullScreenDebugMode.DepthPyramid); From 0d576eaf425b7f319c19309867cb68724c811b94 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:57:33 +0200 Subject: [PATCH 073/200] Hdrp /lookdev ui fixes #6491 --- com.unity.render-pipelines.core/CHANGELOG.md | 5 +++ .../Editor/LookDev/DisplayWindow.cs | 34 +++++++++++++++---- .../Editor/LookDev/DisplayWindow.uss | 3 +- .../Editor/LookDev/ToolbarRadio.cs | 20 ++++++++++- 4 files changed, 53 insertions(+), 9 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 1a05224fc0e..e3311fe474f 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -6,9 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added +- Add tooltips in LookDev's toolbar. + ### Fixed - Fixed issue when LookDev window is opened and the CoreRP Package is updated to a newer version. - Fixed copy/pasting of Volume Components when loading a new scene +- Fix LookDev's camera button layout. +- Fix LookDev's layout vanishing on domain reload. ## [8.0.0] - 2020-05-25 diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs index 043b61a7aca..a616701a681 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs @@ -51,11 +51,21 @@ static partial class Style internal static readonly GUIContent k_WindowTitleAndIcon = EditorGUIUtility.TrTextContentWithIcon("Look Dev", CoreEditorUtils.LoadIcon(k_IconFolder, "LookDev", forceLowRes: true)); - internal static readonly Texture2D k_Layout1Icon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Layout1", forceLowRes: true); - internal static readonly Texture2D k_Layout2Icon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Layout2", forceLowRes: true); - internal static readonly Texture2D k_LayoutVerticalIcon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "LayoutVertical", forceLowRes: true); - internal static readonly Texture2D k_LayoutHorizontalIcon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "LayoutHorizontal", forceLowRes: true); - internal static readonly Texture2D k_LayoutStackIcon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "LayoutCustom", forceLowRes: true); + internal static readonly (Texture2D icon, string tooltip) k_Layout1Icon = + (CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Layout1", forceLowRes: true), + "First view"); + internal static readonly (Texture2D icon, string tooltip) k_Layout2Icon = + (CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Layout2", forceLowRes: true), + "Second view"); + internal static readonly (Texture2D icon, string tooltip) k_LayoutVerticalIcon = + (CoreEditorUtils.LoadIcon(Style.k_IconFolder, "LayoutVertical", forceLowRes: true), + "Both views split vertically"); + internal static readonly (Texture2D icon, string tooltip) k_LayoutHorizontalIcon = + (CoreEditorUtils.LoadIcon(Style.k_IconFolder, "LayoutHorizontal", forceLowRes: true), + "Both views split horizontally"); + internal static readonly (Texture2D icon, string tooltip) k_LayoutStackIcon = + (CoreEditorUtils.LoadIcon(Style.k_IconFolder, "LayoutCustom", forceLowRes: true), + "Both views stacked"); internal static readonly Texture2D k_Camera1Icon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Camera1", forceLowRes: true); internal static readonly Texture2D k_Camera2Icon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "Camera2", forceLowRes: true); @@ -66,6 +76,7 @@ static partial class Style internal static readonly Texture2D k_RenderdocIcon = CoreEditorUtils.LoadIcon(Style.k_IconFolder, "RenderDoc", forceLowRes: true); internal const string k_RenderDocLabel = " Content"; + internal const string k_CameraSyncTooltip = "Synchronize camera movement amongst views"; internal const string k_CameraMenuSync1On2 = "Align Camera 1 with Camera 2"; internal const string k_CameraMenuSync2On1 = "Align Camera 2 with Camera 1"; internal const string k_CameraMenuReset = "Reset Cameras"; @@ -269,6 +280,7 @@ void CreateToolbar() cameraMenu.variant = ToolbarMenu.Variant.Popup; var cameraToggle = new ToolbarToggle() { name = Style.k_CameraButtonName }; cameraToggle.value = LookDev.currentContext.cameraSynced; + cameraToggle.tooltip = Style.k_CameraSyncTooltip; //Note: when having Image on top of the Toggle nested in the Menu, RegisterValueChangedCallback is not called //cameraToggle.RegisterValueChangedCallback(evt => LookDev.currentContext.cameraSynced = evt.newValue); @@ -282,8 +294,8 @@ void CreateToolbar() cameraToggle.Add(new Image() { image = Style.k_Camera1Icon }); cameraToggle.Add(new Image() { image = Style.k_LinkIcon }); cameraToggle.Add(new Image() { image = Style.k_Camera2Icon }); - cameraMenu.Add(cameraToggle); cameraMenu.Add(cameraSeparator); + cameraMenu.Add(cameraToggle); cameraMenu.menu.AppendAction(Style.k_CameraMenuSync1On2, (DropdownMenuAction a) => LookDev.currentContext.SynchronizeCameraStates(ViewIndex.Second), DropdownMenuAction.AlwaysEnabled); @@ -386,9 +398,11 @@ void CreateViews() m_NoEnvironment1 = new Label(Style.k_DragAndDropEnvironment); m_NoEnvironment1.style.flexGrow = 1; m_NoEnvironment1.style.unityTextAlign = TextAnchor.MiddleCenter; + m_NoEnvironment1.style.whiteSpace = WhiteSpace.Normal; m_NoEnvironment2 = new Label(Style.k_DragAndDropEnvironment); m_NoEnvironment2.style.flexGrow = 1; m_NoEnvironment2.style.unityTextAlign = TextAnchor.MiddleCenter; + m_NoEnvironment2.style.whiteSpace = WhiteSpace.Normal; m_Views[(int)ViewIndex.First].Add(m_NoObject1); m_Views[(int)ViewIndex.First].Add(m_NoEnvironment1); m_Views[(int)ViewIndex.Second].Add(m_NoObject2); @@ -657,6 +671,14 @@ void OnGUI() // rootVisualElement.styleSheets.Add(styleSheetLight); //} } + else + { + //deal with missing style when domain reload... + if (!rootVisualElement.styleSheets.Contains(styleSheet)) + rootVisualElement.styleSheets.Add(styleSheet); + if (!EditorGUIUtility.isProSkin && !rootVisualElement.styleSheets.Contains(styleSheetLight)) + rootVisualElement.styleSheets.Add(styleSheetLight); + } OnUpdateRequestedInternal?.Invoke(); } diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.uss b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.uss index 6131c3cfdb5..2dd183f21ac 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.uss +++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.uss @@ -378,9 +378,8 @@ MultipleSourcePopupField > MultipleDifferentValue:hover #cameraMenu { - flex-direction: row; + flex-direction: row-reverse; padding: 0px; - padding-right: 16px; } #cameraButton diff --git a/com.unity.render-pipelines.core/Editor/LookDev/ToolbarRadio.cs b/com.unity.render-pipelines.core/Editor/LookDev/ToolbarRadio.cs index e9911623932..0d985d18e7d 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/ToolbarRadio.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/ToolbarRadio.cs @@ -57,11 +57,12 @@ public ToolbarRadio(string label = null, bool canDeselectAll = false) Add(new Label() { text = label }); } - public void AddRadio(string text = null, Texture2D icon = null) + public void AddRadio(string text = null, Texture2D icon = null, string tooltip = null) { var toggle = new ToolbarToggle(); toggle.RegisterValueChangedCallback(InnerValueChanged(radioLength)); toggle.SetValueWithoutNotify(radioLength == (m_CanDeselectAll ? -1 : 0)); + toggle.tooltip = tooltip; radios.Add(toggle); if (icon != null) { @@ -83,6 +84,11 @@ public void AddRadios(string[] labels) foreach (var label in labels) AddRadio(label); } + public void AddRadios((string text, string tooltip)[] labels) + { + foreach (var label in labels) + AddRadio(label.text, null, label.tooltip); + } public void AddRadios(Texture2D[] icons) { @@ -95,6 +101,18 @@ public void AddRadios((string text, Texture2D icon)[] labels) foreach (var label in labels) AddRadio(label.text, label.icon); } + + public void AddRadios((Texture2D icon, string tooltip)[] labels) + { + foreach (var label in labels) + AddRadio(null, label.icon, label.tooltip); + } + + public void AddRadios((string text, Texture2D icon, string tooltip)[] labels) + { + foreach (var label in labels) + AddRadio(label.text, label.icon, label.tooltip); + } EventCallback> InnerValueChanged(int radioIndex) { From c3df4e1c34631893c8577b26e785903f11956320 Mon Sep 17 00:00:00 2001 From: Jussi Knuuttila Date: Wed, 1 Apr 2020 13:11:04 +0300 Subject: [PATCH 074/200] Expose a debug constant in ShaderLab to make HDRP/Unlit SRP Batcher compatible again. #6496 --- .../Runtime/Material/Unlit/Unlit.shader | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader index 79e956e8c66..379370346b4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader @@ -87,6 +87,10 @@ Shader "HDRP/Unlit" _MainTex("Albedo", 2D) = "white" {} _Color("Color", Color) = (1,1,1,1) _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 + + // Debug constants must be exposed as properties so the shader is compatible + // with the SRP batcher + [HideInInspector] _UnlitColorMap_MipInfo("_UnlitColorMap_MipInfo", Vector) = (0, 0, 0, 0) } HLSLINCLUDE From 5c7d949e871bb8a396096d663904c3081ac2003a Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Wed, 1 Apr 2020 13:54:09 +0200 Subject: [PATCH 075/200] fix unused leftover (#6497) --- .../Editor/Lighting/HDLightUI.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index e6e52bf3678..af3526dd800 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -595,7 +595,6 @@ static void DrawLightIntensityGUILayout(SerializedHDLight serialized, Editor own { // Match const defined in EditorGUI.cs const int k_IndentPerLevel = 15; - const int k_PrefixPaddingRight = 2; const int k_ValueUnitSeparator = 2; const int k_UnitWidth = 100; From f6a0d334b1d3c64454a97cab807e1906350ad4a8 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Wed, 1 Apr 2020 19:01:50 +0200 Subject: [PATCH 076/200] Fix custom pass test reference images (#6512) --- .../BeforeOpaqueDepthAndNormal.shader | 2 +- .../OSXEditor/Metal/9700_CustomPass_FullScreen.png | 4 ++-- .../Metal/9700_CustomPass_FullScreen.png.meta | 13 +++++++------ .../Direct3D11/9700_CustomPass_FullScreen.png | 4 ++-- .../Direct3D11/9700_CustomPass_FullScreen.png.meta | 5 +++-- .../Vulkan/9700_CustomPass_FullScreen.png | 4 ++-- .../Vulkan/9700_CustomPass_FullScreen.png.meta | 13 +++++++------ .../Direct3D11/9700_CustomPass_FullScreen.png | 4 ++-- .../Direct3D11/9700_CustomPass_FullScreen.png.meta | 13 +++++++------ 9 files changed, 33 insertions(+), 29 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader index a6ddd102650..b4dc422945b 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9700_CustomPass_FullScreen/BeforeOpaqueDepthAndNormal.shader @@ -44,7 +44,7 @@ color = float4(CustomPassLoadCameraColor(varyings.positionCS.xy, 0), 1); // Add your custom pass code here - outputDepth = 0.06; + outputDepth = 0.063; // Fade value allow you to increase the strength of the effect while the camera gets closer to the custom pass volume float f = 1 - abs(_FadeValue * 2 - 1); diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png index 2d829f01b1d..bbfd7276b30 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7398b678981fdba10377301cfaf9e11a34cd1bb0904e9850ee64a3b04906c95 -size 18565 +oid sha256:51c8ae37b0675a74e1b9a64d0b01ced866952cd3c5ef6b7c12987023b38c26f3 +size 16594 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png.meta index c231d247732..497612f1b4a 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png.meta +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/9700_CustomPass_FullScreen.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 4face8f6dc8ae1744b78b25e71dba914 +guid: ade29300eb1fff74cb3071356242afc8 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 11 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -20,7 +20,7 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 - isReadable: 1 + isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 @@ -38,7 +38,7 @@ TextureImporter: wrapU: -1 wrapV: -1 wrapW: -1 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 @@ -59,13 +59,14 @@ TextureImporter: compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 + applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 0 + textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png index 2d829f01b1d..bbfd7276b30 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7398b678981fdba10377301cfaf9e11a34cd1bb0904e9850ee64a3b04906c95 -size 18565 +oid sha256:51c8ae37b0675a74e1b9a64d0b01ced866952cd3c5ef6b7c12987023b38c26f3 +size 16594 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png.meta index 607ce5a0a03..97c808c1e95 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png.meta +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/9700_CustomPass_FullScreen.png.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 090fdc9a5453ec645919a8e0e82d6434 +guid: 4e0f3f4bc856f0a4184170131a47322a TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 11 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -59,6 +59,7 @@ TextureImporter: compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 + applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png index 2d829f01b1d..bbfd7276b30 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7398b678981fdba10377301cfaf9e11a34cd1bb0904e9850ee64a3b04906c95 -size 18565 +oid sha256:51c8ae37b0675a74e1b9a64d0b01ced866952cd3c5ef6b7c12987023b38c26f3 +size 16594 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png.meta index ffe191f70a2..23d3ffc78e1 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png.meta +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/9700_CustomPass_FullScreen.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 5dbfa273c689bd844a354cc9d4418a7b +guid: bbb17d8228d33684696b75d51fff9eab TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 11 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -20,7 +20,7 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 - isReadable: 1 + isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 @@ -38,7 +38,7 @@ TextureImporter: wrapU: -1 wrapV: -1 wrapW: -1 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 @@ -59,13 +59,14 @@ TextureImporter: compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 + applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 0 + textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png index 2d829f01b1d..bbfd7276b30 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7398b678981fdba10377301cfaf9e11a34cd1bb0904e9850ee64a3b04906c95 -size 18565 +oid sha256:51c8ae37b0675a74e1b9a64d0b01ced866952cd3c5ef6b7c12987023b38c26f3 +size 16594 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png.meta index 8b63d93c0c0..db68a4c9f4a 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png.meta +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/9700_CustomPass_FullScreen.png.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 -guid: 38d2d82097255de479d7ab5f7d6be4b4 +guid: ca3eb713c936b8e44a799df4fb53b553 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 11 mipmaps: mipMapMode: 0 - enableMipMap: 0 + enableMipMap: 1 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -20,7 +20,7 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 - isReadable: 1 + isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 @@ -38,7 +38,7 @@ TextureImporter: wrapU: -1 wrapV: -1 wrapW: -1 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 @@ -59,13 +59,14 @@ TextureImporter: compressionQualitySet: 0 textureFormatSet: 0 ignorePngGamma: 0 + applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 0 + textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 From f09e664d1e1f77d1fdc863d6c1c3106a80729d1b Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Fri, 3 Apr 2020 12:21:51 +0200 Subject: [PATCH 077/200] [8.x.x Backport] Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). (#6506) * - Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). * Small fix to avoid text overlapping Co-authored-by: Remi Chapelain --- .../CHANGELOG.md | 1 + .../Settings/SerializedScalableSetting.cs | 60 +++++++++++++------ 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 53633597a2f..d06da5c7d93 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -77,6 +77,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed drag area width at left of Light's intensity field in Inspector. - Fix for issue that prevented scene from being completely saved when baked reflection probes are present and lighting is set to auto generate. - Fixed the depth buffer copy made before custom pass after opaque and normal injection point. +- Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedScalableSetting.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedScalableSetting.cs index 29ffffe21c3..ddf918b1a6a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedScalableSetting.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedScalableSetting.cs @@ -136,29 +136,55 @@ ScalableSettingSchema schema static void MultiField(Rect position, GUIContent[] subLabels, T[] values) where T: struct { + // The number of slots we need to fit into this rectangle var length = values.Length; - var num = (position.width - (float) (length - 1) * 3f) / (float) length; - var position1 = new Rect(position) - { - width = num - }; - var labelWidth = EditorGUIUtility.labelWidth; + + // Let's compute the space allocated for every field including the label + var num = position.width / (float) length; + + // Reset the indentation var indentLevel = EditorGUI.indentLevel; EditorGUI.indentLevel = 0; + + // Variable to keep track of the current pixel shift in the rectangle we were assigned for this whole section. + float pixelShift = 0; + + // Loop through the levels for (var index = 0; index < values.Length; ++index) { - EditorGUIUtility.labelWidth = CalcPrefixLabelWidth(subLabels[index], (GUIStyle) null); - if (typeof(T) == typeof(int)) - values[index] = (T)(object)EditorGUI.DelayedIntField(position1, subLabels[index], (int)(object)values[index]); - else if (typeof(T) == typeof(bool)) - values[index] = (T)(object)EditorGUI.Toggle(position1, subLabels[index], (bool)(object)values[index]); - else if (typeof(T) == typeof(float)) - values[index] = (T)(object)EditorGUI.FloatField(position1, subLabels[index], (float)(object)values[index]); - else - throw new ArgumentOutOfRangeException($"<{typeof(T)}> is not a supported type for multi field"); - position1.x += num + 4f; + // Let's first compute what is the width of the label of this scalable setting level + // We make sure that the label doesn't go beyond the space available for this scalable setting level + var labelWidth = Mathf.Clamp(CalcPrefixLabelWidth(subLabels[index], (GUIStyle)null), 0, num); + + // Draw the Label at the expected position + EditorGUI.LabelField(new Rect(position.x + pixelShift, position.y, labelWidth, position.height), subLabels[index]); + + // We need to remove from the position the label size that we've just drawn and shift by it's length + pixelShift += labelWidth; + + // The amount of space left for the field + float spaceLeft = num - labelWidth; + + // If at least two pixels are left to draw this field, draw it, otherwise, skip + if (spaceLeft > 2) + { + // Define the rectangle for the field + var fieldSlot = new Rect(position.x + pixelShift, position.y, num - labelWidth, position.height); + + // Draw the right field depending on its type. + if (typeof(T) == typeof(int)) + values[index] = (T)(object)EditorGUI.DelayedIntField(fieldSlot, (int)(object)values[index]); + else if (typeof(T) == typeof(bool)) + values[index] = (T)(object)EditorGUI.Toggle(fieldSlot, (bool)(object)values[index]); + else if (typeof(T) == typeof(float)) + values[index] = (T)(object)EditorGUI.FloatField(fieldSlot, (float)(object)values[index]); + else + throw new ArgumentOutOfRangeException($"<{typeof(T)}> is not a supported type for multi field"); + } + + // Shift by the slot that was left for the field + pixelShift += spaceLeft; } - EditorGUIUtility.labelWidth = labelWidth; EditorGUI.indentLevel = indentLevel; } From 182e74eddcbce4d7e3b8be947d151166c0df7113 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Tue, 7 Apr 2020 11:03:13 +0200 Subject: [PATCH 078/200] Fixed an usage of a a compute buffer not bound (1229964) (#27) Co-authored-by: Anis --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Lighting/LightLoop/LightLoop.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d06da5c7d93..869f138b6c1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -78,6 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix for issue that prevented scene from being completely saved when baked reflection probes are present and lighting is set to auto generate. - Fixed the depth buffer copy made before custom pass after opaque and normal injection point. - Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). +- Fixed an usage of a a compute buffer not bound (1229964) ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index e00440045ef..253b45ecd8a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -3150,7 +3150,8 @@ void BuildGPULightListsCommon(HDCamera hdCamera, CommandBuffer cmd) // Note we clear the whole content and not just the header since it is fast enough, happens only in one frame and is a bit more robust // to changes to the inner workings of the lists. // Also, we clear all the lists and to be resilient to changes in pipeline. - ClearLightList(hdCamera, cmd, resources.tileAndClusterData.bigTileLightList); + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.BigTilePrepass)) + ClearLightList(hdCamera, cmd, resources.tileAndClusterData.bigTileLightList); ClearLightList(hdCamera, cmd, resources.tileAndClusterData.lightList); ClearLightList(hdCamera, cmd, resources.tileAndClusterData.perVoxelOffset); From 69d5bee37112fbbf51f33b69515256838516edd2 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Fri, 3 Apr 2020 12:16:21 +0200 Subject: [PATCH 079/200] Removed wrongly serialized fields in StaticLightingSky (#6441) --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Sky/StaticLightingSky.cs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 869f138b6c1..b6630eab7a1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -79,6 +79,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the depth buffer copy made before custom pass after opaque and normal injection point. - Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). - Fixed an usage of a a compute buffer not bound (1229964) +- Fixed an issue where unncessarily serialized members in StaticLightingSky component would change each time the scene is changed. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs index b8505b5cd66..d3aa6bb1293 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using UnityEngine.Serialization; @@ -15,8 +16,9 @@ class StaticLightingSky : MonoBehaviour int m_LastComputedHash; bool m_NeedUpdateStaticLightingSky; - // This one contain only property values from overridden properties in the original profile component - public SkySettings m_SkySettings; + [NonSerialized] + public SkySettings m_SkySettings; // This one contain only property values from overridden properties in the original profile component + [NonSerialized] public SkySettings m_SkySettingsFromProfile; public SkySettings skySettings From 7a231fc09a78c0774ed98a718b20c6a484167b33 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Fri, 3 Apr 2020 12:15:39 +0200 Subject: [PATCH 080/200] Fix issues in the post process system with RenderTexture being invalid in some cases. Causing rendering problems. #6480 --- .../CHANGELOG.md | 1 + .../PostProcessing/PostProcessSystem.cs | 40 ++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b6630eab7a1..dd9378288d0 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -503,6 +503,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed alpha clipping test (comparison was '>', now '>=') - Fixed preview camera (eg. shader graph preview) when path tracing is on - Fixed issue with unclear naming of debug menu for decals. +- Fix issues in the post process system with RenderTexture being invalid in some cases, causing rendering problems. ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs index 75bef7a57a5..4629f347a0e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs @@ -133,6 +133,15 @@ private enum SMAAStage HDRenderPipeline m_HDInstance; + void FillEmptyExposureTexture() + { + var tex = new Texture2D(1, 1, TextureFormat.RGHalf, false, true); + tex.SetPixel(0, 0, new Color(1f, ColorUtils.ConvertExposureToEV100(1f), 0f, 0f)); + tex.Apply(); + Graphics.Blit(tex, m_EmptyExposureTexture); + CoreUtils.Destroy(tex); + } + public PostProcessSystem(HDRenderPipelineAsset hdAsset, RenderPipelineResources defaultResources) { m_Resources = defaultResources; @@ -206,11 +215,7 @@ public PostProcessSystem(HDRenderPipelineAsset hdAsset, RenderPipelineResources // TODO: Write a version that uses structured buffer instead of texture to do atomic as Metal doesn't support atomics on textures. m_MotionBlurSupportsScattering = m_MotionBlurSupportsScattering && (SystemInfo.graphicsDeviceType != GraphicsDeviceType.Metal); - var tex = new Texture2D(1, 1, TextureFormat.RGHalf, false, true); - tex.SetPixel(0, 0, new Color(1f, ColorUtils.ConvertExposureToEV100(1f), 0f, 0f)); - tex.Apply(); - Graphics.Blit(tex, m_EmptyExposureTexture); - CoreUtils.Destroy(tex); + FillEmptyExposureTexture(); // Initialize our target pool to ease RT management m_Pool = new TargetPool(); @@ -287,6 +292,23 @@ public void Cleanup() m_FarBokehTileList = null; } + // In some cases, the internal buffer of render textures might be invalid. + // Usually when using these textures with API such as SetRenderTarget, they are recreated internally. + // This is not the case when these textures are used exclusively with Compute Shaders. So to make sure they work in this case, we recreate them here. + void CheckRenderTexturesValidity() + { + if (!m_EmptyExposureTexture.rt.IsCreated()) + FillEmptyExposureTexture(); + + HDUtils.CheckRTCreated(m_InternalLogLut.rt); + HDUtils.CheckRTCreated(m_TempTexture1024.rt); + HDUtils.CheckRTCreated(m_TempTexture32.rt); + if (m_KeepAlpha) + { + HDUtils.CheckRTCreated(m_AlphaTexture.rt); + } + } + public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdInstance) { m_HDInstance = hdInstance; @@ -336,6 +358,8 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn m_DitheringFS = frameSettings.IsEnabled(FrameSettingsField.Dithering); m_AntialiasingFS = frameSettings.IsEnabled(FrameSettingsField.Antialiasing); + CheckRenderTexturesValidity(); + // Handle fixed exposure & disabled pre-exposure by forcing an exposure multiplier of 1 if (!m_ExposureControlFS) { @@ -2644,7 +2668,11 @@ public RTHandle Get(in Vector2 scaleFactor, GraphicsFormat format, bool mipmap = var hashCode = ComputeHashCode(scaleFactor.x, scaleFactor.y, (int)format, mipmap); if (m_Targets.TryGetValue(hashCode, out var stack) && stack.Count > 0) - return stack.Pop(); + { + var tex = stack.Pop(); + HDUtils.CheckRTCreated(tex.rt); + return tex; + } var rt = RTHandles.Alloc( scaleFactor, TextureXR.slices, DepthBits.None, colorFormat: format, dimension: TextureXR.dimension, From 1a7ff0a2a290b47d8d14cfcde008c0233029a66d Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Fri, 3 Apr 2020 12:14:50 +0200 Subject: [PATCH 081/200] Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. #6493 --- .../Editor/Volume/VolumeComponentListEditor.cs | 15 ++++++++++----- .../Runtime/Volume/VolumeProfile.cs | 18 ++++++++++++++++++ .../CHANGELOG.md | 1 + .../Settings/DefaultSettingsPanel.cs | 14 +++++++++++--- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs index f487281dc3c..21a110079a0 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs @@ -16,24 +16,24 @@ namespace UnityEditor.Rendering /// in the inspector: /// /// using UnityEngine.Rendering; - /// + /// /// [CustomEditor(typeof(VolumeProfile))] /// public class CustomVolumeProfileEditor : Editor /// { /// VolumeComponentListEditor m_ComponentList; - /// + /// /// void OnEnable() /// { /// m_ComponentList = new VolumeComponentListEditor(this); /// m_ComponentList.Init(target as VolumeProfile, serializedObject); /// } - /// + /// /// void OnDisable() /// { /// if (m_ComponentList != null) /// m_ComponentList.Clear(); /// } - /// + /// /// public override void OnInspectorGUI() /// { /// serializedObject.Update(); @@ -58,6 +58,8 @@ public sealed class VolumeComponentListEditor Dictionary m_EditorTypes; // Component type => Editor type List m_Editors; + int m_CurrentHashCode; + /// /// Creates a new instance of to use in an /// existing editor. @@ -195,9 +197,12 @@ public void OnGUI() if (asset == null) return; - if (asset.isDirty) + // Even if the asset is not dirty, the list of component may have been changed by another inspector. + // In this case, only the hash will tell us that we need to refresh. + if (asset.isDirty || asset.GetHashCode() != m_CurrentHashCode) { RefreshEditors(); + m_CurrentHashCode = asset.GetHashCode(); asset.isDirty = false; } diff --git a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs index 9b354b47598..198a44af7ac 100644 --- a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs +++ b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs @@ -279,5 +279,23 @@ public bool TryGetAllSubclassOf(Type type, List result) return count != result.Count; } + + + /// + /// A custom hashing function that Unity uses to compare the state of parameters. + /// + /// A computed hash code for the current instance. + public override int GetHashCode() + { + unchecked + { + int hash = 17; + + for (int i = 0; i < components.Count; i++) + hash = hash * 23 + components[i].GetHashCode(); + + return hash; + } + } } } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index dd9378288d0..4c4d44fe37a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -80,6 +80,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). - Fixed an usage of a a compute buffer not bound (1229964) - Fixed an issue where unncessarily serialized members in StaticLightingSky component would change each time the scene is changed. +- Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs index 1018c140941..b244d14d284 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs @@ -45,6 +45,7 @@ public class Styles ReorderableList m_BeforeTransparentCustomPostProcesses; ReorderableList m_BeforePostProcessCustomPostProcesses; ReorderableList m_AfterPostProcessCustomPostProcesses; + int m_CurrentVolumeProfileHash; public void OnGUI(string searchContext) { @@ -207,6 +208,13 @@ void Draw_VolumeInspector() } EditorGUILayout.EndHorizontal(); + // The state of the profile can change without the asset reference changing so in this case we need to reset the editor. + if (m_CurrentVolumeProfileHash != asset.GetHashCode() && m_CachedDefaultVolumeProfileEditor != null) + { + m_CurrentVolumeProfileHash = asset.GetHashCode(); + m_CachedDefaultVolumeProfileEditor = null; + } + Editor.CreateCachedEditor(asset, Type.GetType("UnityEditor.Rendering.VolumeProfileEditor"), ref m_CachedDefaultVolumeProfileEditor); EditorGUIUtility.labelWidth -= 18; bool oldEnabled = GUI.enabled; @@ -230,13 +238,13 @@ void Draw_VolumeInspector() hdrpAsset.defaultLookDevProfile = newLookDevAsset; EditorUtility.SetDirty(hdrpAsset); } - + if (GUILayout.Button(EditorGUIUtility.TrTextContent("New", "Create a new Volume Profile for default in your default resource folder (defined in Wizard)"), GUILayout.Width(38), GUILayout.Height(18))) { DefaultVolumeProfileCreator.CreateAndAssign(DefaultVolumeProfileCreator.Kind.LookDev); } EditorGUILayout.EndHorizontal(); - + Editor.CreateCachedEditor(lookDevAsset, Type.GetType("UnityEditor.Rendering.VolumeProfileEditor"), ref m_CachedLookDevVolumeProfileEditor); EditorGUIUtility.labelWidth -= 18; oldEnabled = GUI.enabled; @@ -311,7 +319,7 @@ static string GetDefaultName(Kind kind) } return defaultName; } - + public static void CreateAndAssign(Kind kind) { var assetCreator = ScriptableObject.CreateInstance(); From 65d0145670b73cb78b7ada01d30f9a3f8493e7a0 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 2 Apr 2020 11:15:43 +0100 Subject: [PATCH 082/200] Hdrp/docs/glossary f number (#6523) * Update Glossary.md * Update Glossary.md --- .../Documentation~/Glossary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md b/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md index 93c340fad87..65bbdd53b8e 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md @@ -40,7 +40,7 @@ A face refers to one side of a piece of geometry. The front face is the side of #### f-number: -The ratio of the focal length to the diameter of the camera lens. +The ratio of the focal length to the diameter of the camera lens. HDRP technically uses [t-number](https://en.wikipedia.org/wiki/F-number#T-stop), but since Cameras in Unity are optically perfect, f-number and t-number are identical. From 942b3198b09b881c56a0c9141e39304373114533 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Wed, 8 Apr 2020 00:15:55 +0200 Subject: [PATCH 083/200] path validation when creating new volume profile (#36) --- .../Editor/Volume/VolumeProfileFactory.cs | 16 +- .../CHANGELOG.md | 724 ++++++++++-------- 2 files changed, 403 insertions(+), 337 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs index c9eba822995..cf00102a263 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs @@ -56,12 +56,22 @@ public static VolumeProfile CreateVolumeProfile(Scene scene, string targetName) { var scenePath = Path.GetDirectoryName(scene.path); var extPath = scene.name; - var profilePath = scenePath + "/" + extPath; + var profilePath = scenePath + Path.DirectorySeparatorChar + extPath; if (!AssetDatabase.IsValidFolder(profilePath)) - AssetDatabase.CreateFolder(scenePath, extPath); + { + var directories = profilePath.Split(Path.DirectorySeparatorChar); + string rootPath = ""; + foreach (var directory in directories) + { + var newPath = rootPath + directory; + if (!AssetDatabase.IsValidFolder(newPath)) + AssetDatabase.CreateFolder(rootPath.TrimEnd(Path.DirectorySeparatorChar), directory); + rootPath = newPath + Path.DirectorySeparatorChar; + } + } - path = profilePath + "/"; + path = profilePath + Path.DirectorySeparatorChar; } path += targetName + " Profile.asset"; diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 4c4d44fe37a..d3abf8be222 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -6,18 +6,58 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added +- Add XR setting to control camera jitter for temporal effects #6259 +- Added an error message in the DrawRenderers custom pass when rendering opaque objects with an HDRP asset in DeferredOnly mode. + +### Fixed +- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. +- Fixed an issue where default volume would not update when switching profile. +- Fixed an issue where AO override would not override specular occlusion. +- Fixed an issue where Volume inspector might not refresh correctly in some cases. +- Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. +- Fixed issue with uncached reflection probe cameras reseting the debug mode (case 1224601) +- Fixed issue with atmospheric fog turning black if a planar reflection probe is placed below ground level. (case 1226588) +- Fix when rescale probe all direction below zero (1219246) +- Fixed issue with resources being accessed before initialization process has been performed completely. +- Fixed render texture with XR +- Fixed sRGB mismatch with XR SDK +- Fixed XR single-pass with Mock HMD plugin +- Fixed XR culling with multiple cameras +- Fixed shadow cascade tooltip when using the metric mode (case 1229232) +- Focus on Decal uses the extends of the projectors +- Fixed how the area light influence volume is computed to match rasterization. +- Fixed usage of light size data that are not available at runtime. +- Fixed light type resolution when performing a reset on HDAdditionalLightData (case 1220931) +- Fixed drag area width at left of Light's intensity field in Inspector. +- Fix for issue that prevented scene from being completely saved when baked reflection probes are present and lighting is set to auto generate. +- Fixed the depth buffer copy made before custom pass after opaque and normal injection point. +- Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). +- Fixed an usage of a a compute buffer not bound (1229964) +- Fixed an issue where unncessarily serialized members in StaticLightingSky component would change each time the scene is changed. +- Fix issues in the post process system with RenderTexture being invalid in some cases, causing rendering problems. +- Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. +- Fixed path validation when creating new volume profile (case 1229933) + +### Changed +- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. +- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. +- Utilities namespace is obsolete, moved its content to UnityEngine.Rendering (case 1204677) +- All custom pass volumes are now executed for one injection point instead of the first one. +- Optimized PrepareLightsForGPU (cost reduced by over 25%) and PrepareGPULightData (around twice as fast now). +- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. +- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. + +## [7.3.0] - 2020-03-11 + ### Added - Added the exposure sliders to the planar reflection probe preview - Added a warning and workaround instructions that appear when you enable XR single-pass after the first frame with the XR SDK. - Added an "enable" toggle to the SSR volume component. -- Added support of cookie baking and add support on Disc light. -- Added XR setting to control camera jitter for temporal effects -- Added an error message in the DrawRenderers custom pass when rendering opaque objects with an HDRP asset in DeferredOnly mode. -- Added option to disable XR rendering on the camera settings. ### Fixed -- Fix Changelog - Fixed issue with AssetPostprocessors dependencies causing models to be imported twice when upgrading the package version. +- Fix player build DX12 - Fix issue with AO being misaligned when multiple view are visible. - Fix issue that caused the clamp of camera rotation motion for motion blur to be ineffective. - Fixed culling of lights with XR SDK @@ -41,100 +81,36 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed invalid game view rendering when disabling all cameras in the scene (case 1105163) - Fixed infinite reload loop while displaying Light's Shadow's Link Light Layer in Inspector of Prefab Asset. - Fixed the cookie atlas size and planar atlas size being too big after an upgrade of the HDRP asset. -- Fix player build DX12 +- Fixed alpha clipping test (comparison was '>', now '>=') +- Fixed preview camera (eg. shader graph preview) when path tracing is on +- Fixed DXR player build - Fixed compilation issue with linux vulkan and raytrace shader - Fixed the HDRP asset migration code not being called after an upgrade of the package - Fixed draw renderers custom pass out of bound exception - Fixed an issue with emissive light meshes not being in the RAS. - Fixed a warning due to StaticLightingSky when reloading domain in some cases. - Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. +- Fix an exception in case two LOD levels are using the same mesh renderer. - Fixed error in the console when switching shader to decal in the material UI. - Fixed z-fighting in scene view when scene lighting is off (case 1203927) -- Fixed issue that prevented cubemap thumbnails from rendering. -- Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. -- Fix some typos in the debug menu. +- Fixed some typos in debug menu (case 1224594) - Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). -- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. - Fixed cubemap thumbnail generation at project load time. -- Fixed an issue where default volume would not update when switching profile. -- Fixed an issue where AO override would not override specular occlusion. -- Fixed an issue where Volume inspector might not refresh correctly in some cases. - Half fixed shuriken particle light that cast shadows (only the first one will be correct) -- Fixed issue with uncached reflection probe cameras reseting the debug mode (case 1224601) -- Fixed issue with atmospheric fog turning black if a planar reflection probe is placed below ground level. (case 1226588) -- Fix when rescale probe all direction below zero (1219246) -- Fixed issue with resources being accessed before initialization process has been performed completely. -- Fixed render texture with XR -- Fixed sRGB mismatch with XR SDK -- Fixed XR single-pass with Mock HMD plugin -- Fixed XR culling with multiple cameras -- Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. -- Fixed shadow cascade tooltip when using the metric mode (case 1229232) -- Fix when rescale probe all direction below zero (1219246) -- Fixed how the area light influence volume is computed to match rasterization. -- Fixed usage of light size data that are not available at runtime. -- Fixed light type resolution when performing a reset on HDAdditionalLightData (case 1220931) -- Fixed drag area width at left of Light's intensity field in Inspector. -- Fix for issue that prevented scene from being completely saved when baked reflection probes are present and lighting is set to auto generate. -- Fixed the depth buffer copy made before custom pass after opaque and normal injection point. -- Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). -- Fixed an usage of a a compute buffer not bound (1229964) -- Fixed an issue where unncessarily serialized members in StaticLightingSky component would change each time the scene is changed. -- Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. - Light dimmer can now get values higher than one and was renamed to multiplier in the UI. - Removed info box requesting volume component for Visual Environment and updated the documentation with the relevant information. -- Removed legacy VR code - Add range-based clipping to box lights (case 1178780) - Improve area light culling (case 1085873) -- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. -- Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. - Light Hierarchy debug mode can now adjust Debug Exposure for visualizing high exposure scenes. -- Hidden unsupported choice in emission in Materials -- All custom pass volumes are now executed for one injection point instead of the first one. -- Optimized PrepareLightsForGPU (cost reduced by over 25%) and PrepareGPULightData (around twice as fast now). - Changed the diffusion profile warning on the material to an info and changed the message to be more precise. -- Moved scene view camera settings for HDRP from the preferences window to the scene view camera settings window. -## [8.0.0] - 2020-05-25 +## [7.2.0] - 2020-02-10 ### Added -- Ray tracing support for VR single-pass -- Added sharpen filter shader parameter and UI for TemporalAA to control image quality instead of hardcoded value -- Added frame settings option for custom post process and custom passes as well as custom color buffer format option. -- Add check in wizard on SRP Batcher enabled. -- Added default implementations of OnPreprocessMaterialDescription for FBX, Obj, Sketchup and 3DS file formats. -- Added custom pass fade radius -- Added after post process injection point for custom passes -- Added basic alpha compositing support - Alpha is available afterpostprocess when using FP16 buffer format. -- Added falloff distance on Reflection Probe and Planar Reflection Probe -- Added Backplate projection from the HDRISky -- Added Shadow Matte in UnlitMasterNode, which only received shadow without lighting -- Added hability to name LightLayers in HDRenderPipelineAsset -- Added a range compression factor for Reflection Probe and Planar Reflection Probe to avoid saturation of colors. -- Added path tracing support for directional, point and spot lights, as well as emission from Lit and Unlit. -- Added non temporal version of SSAO. -- Added more detailed ray tracing stats in the debug window -- Added Disc area light (bake only) -- Added a warning in the material UI to prevent transparent + subsurface-scattering combination. -- Added XR single-pass setting into HDRP asset -- Added a penumbra tint option for lights -- Added support for depth copy with XR SDK -- Added debug setting to Render Pipeline Debug Window to list the active XR views -- Added an option to filter the result of the volumetric lighting (off by default). -- Added a transmission multiplier for directional lights -- Added XR single-pass test mode to Render Pipeline Debug Window -- Added debug setting to Render Pipeline Window to list the active XR views -- Added a new refraction mode for the Lit shader (thin). Which is a box refraction with small thickness values -- Added the code to support Barn Doors for Area Lights based on a shaderconfig option. -- Added HDRPCameraBinder property binder for Visual Effect Graph -- Added "Celestial Body" controls to the Directional Light -- Added new parameters to the Physically Based Sky -- Added Reflections to the DXR Wizard - Added the possibility to have ray traced colored and semi-transparent shadows on directional lights. -- Added a check in the custom post process template to throw an error if the default shader is not found. - Exposed the debug overlay ratio in the debug menu. - Added a separate frame settings for tonemapping alongside color grading. - Added the receive fog option in the material UI for ShaderGraphs. @@ -143,7 +119,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added Contrast Adaptive Sharpen (CAS) Upscaling effect. - Added APIs to update probe settings at runtime. - Added documentation for the rayTracingSupported method in HDRP -- Added user-selectable format for the post processing passes. +- Added user-selectable format for the post processing passes. - Added support for alpha channel in some post-processing passes (DoF, TAA, Uber). - Added warnings in FrameSettings inspector when using DXR and atempting to use Asynchronous Execution. - Exposed Stencil bits that can be used by the user. @@ -156,7 +132,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added the alpha clip enabled toggle to the material UI for all HDRP shader graphs. - Added Material Samples to explain how to use the lit shader features - Added an initial implementation of ray traced sub surface scattering -- Added AssetPostprocessors and Shadergraphs to handle Arnold Standard Surface and 3DsMax Physical material import from FBX. +- Added AssetPostprocessors and Shadergraphs to handle Arnold Standard Surface and 3DsMax Physical material import from FBX. - Added support for Smoothness Fade start work when enabling ray traced reflections. - Added Contact shadow, Micro shadows and Screen space refraction API documentation. - Added script documentation for SSR, SSAO (ray tracing), GI, Light Cluster, RayTracingSettings, Ray Counters, etc. @@ -166,223 +142,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Update documentation of HDRISky-Backplate, precise how to have Ambient Occlusion on the Backplate -- Sorting, undo, labels, layout in the Lighting Explorer. -- Fixed sky settings and materials in Shader Graph Samples package -- Fix/workaround a probable graphics driver bug in the GTAO shader. -- Fixed Hair and PBR shader graphs double sided modes -- Fixed an issue where updating an HDRP asset in the Quality setting panel would not recreate the pipeline. -- Fixed issue with point lights being considered even when occupying less than a pixel on screen (case 1183196) -- Fix a potential NaN source with iridescence (case 1183216) -- Fixed issue of spotlight breaking when minimizing the cone angle via the gizmo (case 1178279) -- Fixed issue that caused decals not to modify the roughness in the normal buffer, causing SSR to not behave correctly (case 1178336) -- Fixed lit transparent refraction with XR single-pass rendering -- Removed extra jitter for TemporalAA in VR -- Fixed ShaderGraph time in main preview -- Fixed issue on some UI elements in HDRP asset not expanding when clicking the arrow (case 1178369) -- Fixed alpha blending in custom post process -- Fixed the modification of the _AlphaCutoff property in the material UI when exposed with a ShaderGraph parameter. -- Fixed HDRP test `1218_Lit_DiffusionProfiles` on Vulkan. -- Fixed an issue where building a player in non-dev mode would generate render target error logs every frame -- Fixed crash when upgrading version of HDRP -- Fixed rendering issues with material previews -- Fixed NPE when using light module in Shuriken particle systems (1173348). -- Refresh cached shadow on editor changes -- Fixed light supported units caching (1182266) -- Fixed an issue where SSAO (that needs temporal reprojection) was still being rendered when Motion Vectors were not available (case 1184998) -- Fixed a nullref when modifying the height parameters inside the layered lit shader UI. -- Fixed Decal gizmo that become white after exiting play mode -- Fixed Decal pivot position to behave like a spotlight -- Fixed an issue where using the LightingOverrideMask would break sky reflection for regular cameras -- Fix DebugMenu FrameSettingsHistory persistency on close -- Fix DensityVolume, ReflectionProbe aned PlanarReflectionProbe advancedControl display -- Fix DXR scene serialization in wizard -- Fixed an issue where Previews would reallocate History Buffers every frame -- Fixed the SetLightLayer function in HDAdditionalLightData setting the wrong light layer -- Fix error first time a preview is created for planar -- Fixed an issue where SSR would use an incorrect roughness value on ForwardOnly (StackLit, AxF, Fabric, etc.) materials when the pipeline is configured to also allow deferred Lit. -- Fixed issues with light explorer (cases 1183468, 1183269) -- Fix dot colors in LayeredLit material inspector -- Fix undo not resetting all value when undoing the material affectation in LayerLit material -- Fix for issue that caused gizmos to render in render textures (case 1174395) -- Fixed the light emissive mesh not updated when the light was disabled/enabled -- Fixed light and shadow layer sync when setting the HDAdditionalLightData.lightlayersMask property -- Fixed a nullref when a custom post process component that was in the HDRP PP list is removed from the project -- Fixed issue that prevented decals from modifying specular occlusion (case 1178272). -- Fixed exposure of volumetric reprojection -- Fixed multi selection support for Scalable Settings in lights -- Fixed font shaders in test projects for VR by using a Shader Graph version -- Fixed refresh of baked cubemap by incrementing updateCount at the end of the bake (case 1158677). -- Fixed issue with rectangular area light when seen from the back -- Fixed decals not affecting lightmap/lightprobe -- Fixed zBufferParams with XR single-pass rendering -- Fixed moving objects not rendered in custom passes -- Fixed abstract classes listed in the + menu of the custom pass list -- Fixed custom pass that was rendered in previews -- Fixed precision error in zero value normals when applying decals (case 1181639) -- Fixed issue that triggered No Scene Lighting view in game view as well (case 1156102) -- Assign default volume profile when creating a new HDRP Asset -- Fixed fov to 0 in planar probe breaking the projection matrix (case 1182014) -- Fixed bugs with shadow caching -- Reassign the same camera for a realtime probe face render request to have appropriate history buffer during realtime probe rendering. -- Fixed issue causing wrong shading when normal map mode is Object space, no normal map is set, but a detail map is present (case 1143352) -- Fixed issue with decal and htile optimization -- Fixed TerrainLit shader compilation error regarding `_Control0_TexelSize` redefinition (case 1178480). -- Fixed warning about duplicate HDRuntimeReflectionSystem when configuring play mode without domain reload. -- Fixed an editor crash when multiple decal projectors were selected and some had null material -- Added all relevant fix actions to FixAll button in Wizard -- Moved FixAll button on top of the Wizard -- Fixed an issue where fog color was not pre-exposed correctly -- Fix priority order when custom passes are overlapping -- Fix cleanup not called when the custom pass GameObject is destroyed -- Replaced most instances of GraphicsSettings.renderPipelineAsset by GraphicsSettings.currentRenderPipeline. This should fix some parameters not working on Quality Settings overrides. -- Fixed an issue with Realtime GI not working on upgraded projects. -- Fixed issue with screen space shadows fallback texture was not set as a texture array. -- Fixed Pyramid Lights bounding box -- Fixed terrain heightmap default/null values and epsilons -- Fixed custom post-processing effects breaking when an abstract class inherited from `CustomPostProcessVolumeComponent` -- Fixed XR single-pass rendering in Editor by using ShaderConfig.s_XrMaxViews to allocate matrix array -- Multiple different skies rendered at the same time by different cameras are now handled correctly without flickering -- Fixed flickering issue happening when different volumes have shadow settings and multiple cameras are present. -- Fixed issue causing planar probes to disappear if there is no light in the scene. -- Fixed a number of issues with the prefab isolation mode (Volumes leaking from the main scene and reflection not working properly) -- Fixed an issue with fog volume component upgrade not working properly -- Fixed Spot light Pyramid Shape has shadow artifacts on aspect ratio values lower than 1 -- Fixed issue with AO upsampling in XR -- Fixed camera without HDAdditionalCameraData component not rendering -- Removed the macro ENABLE_RAYTRACING for most of the ray tracing code -- Fixed prefab containing camera reloading in loop while selected in the Project view -- Fixed issue causing NaN wheh the Z scale of an object is set to 0. -- Fixed DXR shader passes attempting to render before pipeline loaded -- Fixed black ambient sky issue when importing a project after deleting Library. -- Fixed issue when upgrading a Standard transparent material (case 1186874) -- Fixed area light cookies not working properly with stack lit -- Fixed material render queue not updated when the shader is changed in the material inspector. -- Fixed a number of issues with full screen debug modes not reseting correctly when setting another mutually exclusive mode -- Fixed compile errors for platforms with no VR support -- Fixed an issue with volumetrics and RTHandle scaling (case 1155236) -- Fixed an issue where sky lighting might be updated uselessly -- Fixed issue preventing to allow setting decal material to none (case 1196129) -- Fixed XR multi-pass decals rendering -- Fixed several fields on Light Inspector that not supported Prefab overrides -- Fixed EOL for some files -- Fixed scene view rendering with volumetrics and XR enabled -- Fixed decals to work with multiple cameras -- Fixed optional clear of GBuffer (Was always on) -- Fixed render target clears with XR single-pass rendering -- Fixed HDRP samples file hierarchy -- Fixed Light units not matching light type -- Fixed QualitySettings panel not displaying HDRP Asset -- Fixed black reflection probes the first time loading a project -- Fixed y-flip in scene view with XR SDK -- Fixed Decal projectors do not immediately respond when parent object layer mask is changed in editor. -- Fixed y-flip in scene view with XR SDK -- Fixed a number of issues with Material Quality setting -- Fixed the transparent Cull Mode option in HD unlit master node settings only visible if double sided is ticked. -- Fixed an issue causing shadowed areas by contact shadows at the edge of far clip plane if contact shadow length is very close to far clip plane. -- Fixed editing a scalable settings will edit all loaded asset in memory instead of targetted asset. -- Fixed Planar reflection default viewer FOV -- Fixed flickering issues when moving the mouse in the editor with ray tracing on. -- Fixed the ShaderGraph main preview being black after switching to SSS in the master node settings -- Fixed custom fullscreen passes in VR -- Fixed camera culling masks not taken in account in custom pass volumes -- Fixed object not drawn in custom pass when using a DrawRenderers with an HDRP shader in a build. -- Fixed injection points for Custom Passes (AfterDepthAndNormal and BeforePreRefraction were missing) -- Fixed a enum to choose shader tags used for drawing objects (DepthPrepass or Forward) when there is no override material. -- Fixed lit objects in the BeforePreRefraction, BeforeTransparent and BeforePostProcess. -- Fixed the None option when binding custom pass render targets to allow binding only depth or color. -- Fixed custom pass buffers allocation so they are not allocated if they're not used. -- Fixed the Custom Pass entry in the volume create asset menu items. -- Fixed Prefab Overrides workflow on Camera. -- Fixed alignment issue in Preset for Camera. -- Fixed alignment issue in Physical part for Camera. -- Fixed FrameSettings multi-edition. -- Fixed a bug happening when denoising multiple ray traced light shadows -- Fixed minor naming issues in ShaderGraph settings -- VFX: Removed z-fight glitches that could appear when using deferred depth prepass and lit quad primitives -- VFX: Preserve specular option for lit outputs (matches HDRP lit shader) -- Fixed an issue with Metal Shader Compiler and GTAO shader for metal -- Fixed resources load issue while upgrading HDRP package. -- Fix LOD fade mask by accounting for field of view -- Fixed spot light missing from ray tracing indirect effects. -- Fixed a UI bug in the diffusion profile list after fixing them from the wizard. -- Fixed the hash collision when creating new diffusion profile assets. -- Fixed a light leaking issue with box light casting shadows (case 1184475) -- Fixed Cookie texture type in the cookie slot of lights (Now displays a warning because it is not supported). -- Fixed a nullref that happens when using the Shuriken particle light module -- Fixed alignment in Wizard -- Fixed text overflow in Wizard's helpbox -- Fixed Wizard button fix all that was not automatically grab all required fixes -- Fixed VR tab for MacOS in Wizard -- Fixed local config package workflow in Wizard -- Fixed issue with contact shadows shifting when MSAA is enabled. -- Fixed EV100 in the PBR sky -- Fixed an issue In URP where sometime the camera is not passed to the volume system and causes a null ref exception (case 1199388) -- Fixed nullref when releasing HDRP with custom pass disabled -- Fixed performance issue derived from copying stencil buffer. -- Fixed an editor freeze when importing a diffusion profile asset from a unity package. -- Fixed an exception when trying to reload a builtin resource. -- Fixed the light type intensity unit reset when switching the light type. -- Fixed compilation error related to define guards and CreateLayoutFromXrSdk() -- Fixed documentation link on CustomPassVolume. -- Fixed player build when HDRP is in the project but not assigned in the graphic settings. -- Fixed an issue where ambient probe would be black for the first face of a baked reflection probe -- VFX: Fixed Missing Reference to Visual Effect Graph Runtime Assembly -- Fixed an issue where rendering done by users in EndCameraRendering would be executed before the main render loop. -- Fixed Prefab Override in main scope of Volume. -- Fixed alignment issue in Presset of main scope of Volume. -- Fixed persistence of ShowChromeGizmo and moved it to toolbar for coherency in ReflectionProbe and PlanarReflectionProbe. -- Fixed Alignement issue in ReflectionProbe and PlanarReflectionProbe. -- Fixed Prefab override workflow issue in ReflectionProbe and PlanarReflectionProbe. -- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in ReflectionProbe and PlanarReflectionProbe. -- Fixed Prefab override workflow issue in DensityVolume. -- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in DensityVolume. -- Fix light limit counts specified on the HDRP asset -- Fixed Quality Settings for SSR, Contact Shadows and Ambient Occlusion volume components -- Fixed decalui deriving from hdshaderui instead of just shaderui -- Use DelayedIntField instead of IntField for scalable settings -- Fixed init of debug for FrameSettingsHistory on SceneView camera -- Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' -- Fix Wizard load when none selected for RenderPipelineAsset - Fixed TerrainLitGUI when per-pixel normal property is not present. -- Fixed rendering errors when enabling debug modes with custom passes -- Fix an issue that made PCSS dependent on Atlas resolution (not shadow map res) -- Fixing a bug whith histories when n>4 for ray traced shadows -- Fixing wrong behavior in ray traced shadows for mesh renderers if their cast shadow is shadow only or double sided -- Only tracing rays for shadow if the point is inside the code for spotlight shadows -- Only tracing rays if the point is inside the range for point lights -- Fixing ghosting issues when the screen space shadow indexes change for a light with ray traced shadows -- Fixed an issue with stencil management and Xbox One build that caused corrupted output in deferred mode. -- Fixed a mismatch in behavior between the culling of shadow maps and ray traced point and spot light shadows -- Fixed recursive ray tracing not working anymore after intermediate buffer refactor. -- Fixed ray traced shadow denoising not working (history rejected all the time). -- Fixed shader warning on xbox one -- Fixed cookies not working for spot lights in ray traced reflections, ray traced GI and recursive rendering -- Fixed an inverted handling of CoatSmoothness for SSR in StackLit. -- Fixed missing distortion inputs in Lit and Unlit material UI. -- Fixed issue that propagated NaNs across multiple frames through the exposure texture. -- Fixed issue with Exclude from TAA stencil ignored. -- Fixed ray traced reflection exposure issue. -- Fixed issue with TAA history not initialising corretly scale factor for first frame -- Fixed issue with stencil test of material classification not using the correct Mask (causing false positive and bad performance with forward material in deferred) -- Fixed issue with History not reset when chaning antialiasing mode on camera -- Fixed issue with volumetric data not being initialized if default settings have volumetric and reprojection off. -- Fixed ray tracing reflection denoiser not applied in tier 1 -- Fixed the vibility of ray tracing related methods. -- Fixed the diffusion profile list not saved when clicking the fix button in the material UI. -- Fixed crash when pushing bounce count higher than 1 for ray traced GI or reflections -- Fixed PCSS softness scale so that it better match ray traced reference for punctual lights. -- Fixed exposure management for the path tracer -- Fixed AxF material UI containing two advanced options settings. -- Fixed an issue where cached sky contexts were being destroyed wrongly, breaking lighting in the LookDev -- Fixed issue that clamped PCSS softness too early and not after distance scale. -- Fixed fog affect transparent on HD unlit master node -- Fixed custom post processes re-ordering not saved. -- Fixed NPE when using scalable settings -- Fixed an issue where PBR sky precomputation was reset incorrectly in some cases causing bad performance. - Fixed a bug due to depth history begin overriden too soon -- Fixed CustomPassSampleCameraColor scale issue when called from Before Transparent injection point. -- Fixed corruption of AO in baked probes. -- Fixed issue with upgrade of projects that still had Very High as shadow filtering quality. - Fixed issue that caused Distortion UI to appear in Lit. - Fixed several issues with decal duplicating when editing them. - Fixed initialization of volumetric buffer params (1204159) @@ -418,7 +179,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shader warning in AO code. - Fixed a warning in simpledenoiser.compute - Fixed tube and rectangle light culling to use their shape instead of their range as a bounding box. -- Fixed caused by using gather on a UINT texture in motion blur. +- Fixed caused by using gather on a UINT texture in motion blur. - Fix issue with ambient occlusion breaking when dynamic resolution is active. - Fixed some possible NaN causes in Depth of Field. - Fixed Custom Pass nullref due to the new Profiling Sample API changes @@ -501,49 +262,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with MipRatio debug mode showing _DebugMatCapTexture not being set. - Fixed missing initialization of input params in Blit for VR. - Fix Inf source in LTC for area lights. -- Fixed alpha clipping test (comparison was '>', now '>=') -- Fixed preview camera (eg. shader graph preview) when path tracing is on -- Fixed issue with unclear naming of debug menu for decals. -- Fix issues in the post process system with RenderTexture being invalid in some cases, causing rendering problems. ### Changed -- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled -- Rename Emission Radius to Radius in UI in Point, Spot -- Angular Diameter parameter for directional light is no longuer an advanced property -- DXR: Remove Light Radius and Angular Diamater of Raytrace shadow. Angular Diameter and Radius are used instead. -- Remove MaxSmoothness parameters from UI for point, spot and directional light. The MaxSmoothness is now deduce from Radius Parameters -- DXR: Remove the Ray Tracing Environement Component. Add a Layer Mask to the ray Tracing volume components to define which objects are taken into account for each effect. -- Removed second cubemaps used for shadowing in lookdev -- Disable Physically Based Sky below ground -- Increase max limit of area light and reflection probe to 128 -- Change default texture for detailmap to grey -- Optimize Shadow RT load on Tile based architecture platforms. -- Improved quality of SSAO. -- Moved RequestShadowMapRendering() back to public API. -- Update HDRP DXR Wizard with an option to automatically clone the hdrp config package and setup raytracing to 1 in shaders file. -- Added SceneSelection pass for TerrainLit shader. -- Simplified Light's type API regrouping the logic in one place (Check type in HDAdditionalLightData) -- The support of LOD CrossFade (Dithering transition) in master nodes now required to enable it in the master node settings (Save variant) -- Improved shadow bias, by removing constant depth bias and substituting it with slope-scale bias. -- Fix the default stencil values when a material is created from a SSS ShaderGraph. -- Tweak test asset to be compatible with XR: unlit SG material for canvas and double-side font material -- Slightly tweaked the behaviour of bloom when resolution is low to reduce artifacts. -- Hidden fields in Light Inspector that is not relevant while in BakingOnly mode. -- Changed parametrization of PCSS, now softness is derived from angular diameter (for directional lights) or shape radius (for point/spot lights) and min filter size is now in the [0..1] range. -- Moved the copy of the geometry history buffers to right after the depth mip chain generation. -- Rename "Luminance" to "Nits" in UX for physical light unit -- Rename FrameSettings "SkyLighting" to "SkyReflection" -- Reworked XR automated tests -- The ray traced screen space shadow history for directional, spot and point lights is discarded if the light transform has changed. -- Changed the behavior for ray tracing in case a mesh renderer has both transparent and opaque submeshes. -- Improve history buffer management -- Replaced PlayerSettings.virtualRealitySupported with XRGraphics.tryEnable. -- Remove redundant FrameSettings RealTimePlanarReflection -- Improved a bit the GC calls generated during the rendering. -- Material update is now only triggered when the relevant settings are touched in the shader graph master nodes -- Changed the way Sky Intensity (on Sky volume components) is handled. It's now a combo box where users can choose between Exposure, Multiplier or Lux (for HDRI sky only) instead of both multiplier and exposure being applied all the time. Added a new menu item to convert old profiles. -- Change how method for specular occlusions is decided on inspector shader (Lit, LitTesselation, LayeredLit, LayeredLitTessellation) -- Unlocked SSS, SSR, Motion Vectors and Distortion frame settings for reflections probes. - Hide unused LOD settings in Quality Settings legacy window. - Reduced the constrained distance for temporal reprojection of ray tracing denoising - Removed shadow near plane from the Directional Light Shadow UI. @@ -591,6 +311,342 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Moved BeginCameraRendering callback right before culling. - Changed the visibility of the Indirect Lighting Controller component to public. +## [7.1.8] - 2020-01-20 + +### Fixed +- Fixed white and dark flashes on scenes with very high or very low exposure when Automatic Exposure is being used. +- Fixed memory leak in Sky when in matcap mode. + +### Changed +- On Xbox and PS4 you will also need to download the com.unity.render-pipeline.platform (ps4 or xboxone) package from the appropriate platform developer forum + +## [7.1.7] - 2019-12-11 + +### Added +- Added a check in the custom post process template to throw an error if the default shader is not found. + +### Fixed +- Fixed rendering errors when enabling debug modes with custom passes +- Fix an issue that made PCSS dependent on Atlas resolution (not shadow map res) +- Fixing a bug whith histories when n>4 for ray traced shadows +- Fixing wrong behavior in ray traced shadows for mesh renderers if their cast shadow is shadow only or double sided +- Only tracing rays for shadow if the point is inside the code for spotlight shadows +- Only tracing rays if the point is inside the range for point lights +- Fixing ghosting issues when the screen space shadow indexes change for a light with ray traced shadows +- Fixed an issue with stencil management and Xbox One build that caused corrupted output in deferred mode. +- Fixed a mismatch in behavior between the culling of shadow maps and ray traced point and spot light shadows +- Fixed recursive ray tracing not working anymore after intermediate buffer refactor. +- Fixed ray traced shadow denoising not working (history rejected all the time). +- Fixed shader warning on xbox one +- Fixed cookies not working for spot lights in ray traced reflections, ray traced GI and recursive rendering +- Fixed an inverted handling of CoatSmoothness for SSR in StackLit. +- Fixed missing distortion inputs in Lit and Unlit material UI. +- Fixed issue that propagated NaNs across multiple frames through the exposure texture. +- Fixed issue with Exclude from TAA stencil ignored. +- Fixed ray traced reflection exposure issue. +- Fixed issue with TAA history not initialising corretly scale factor for first frame +- Fixed issue with stencil test of material classification not using the correct Mask (causing false positive and bad performance with forward material in deferred) +- Fixed issue with History not reset when chaning antialiasing mode on camera +- Fixed issue with volumetric data not being initialized if default settings have volumetric and reprojection off. +- Fixed ray tracing reflection denoiser not applied in tier 1 +- Fixed the vibility of ray tracing related methods. +- Fixed the diffusion profile list not saved when clicking the fix button in the material UI. +- Fixed crash when pushing bounce count higher than 1 for ray traced GI or reflections +- Fixed PCSS softness scale so that it better match ray traced reference for punctual lights. +- Fixed exposure management for the path tracer +- Fixed AxF material UI containing two advanced options settings. +- Fixed an issue where cached sky contexts were being destroyed wrongly, breaking lighting in the LookDev +- Fixed issue that clamped PCSS softness too early and not after distance scale. +- Fixed fog affect transparent on HD unlit master node +- Fixed custom post processes re-ordering not saved. +- Fixed NPE when using scalable settings +- Fixed an issue where PBR sky precomputation was reset incorrectly in some cases causing bad performance. +- Fixed a bug in dxr due to depth history begin overriden too soon +- Fixed CustomPassSampleCameraColor scale issue when called from Before Transparent injection point. +- Fixed corruption of AO in baked probes. +- Fixed issue with upgrade of projects that still had Very High as shadow filtering quality. +- Removed shadow near plane from the Directional Light Shadow UI. +- Fixed performance issue with performances of custom pass culling. + +## [7.1.6] - 2019-11-22 + +### Added +- Added Backplate projection from the HDRISky +- Added Shadow Matte in UnlitMasterNode, which only received shadow without lighting +- Added support for depth copy with XR SDK +- Added debug setting to Render Pipeline Debug Window to list the active XR views +- Added an option to filter the result of the volumetric lighting (off by default). +- Added a transmission multiplier for directional lights +- Added XR single-pass test mode to Render Pipeline Debug Window +- Added debug setting to Render Pipeline Window to list the active XR views +- Added a new refraction mode for the Lit shader (thin). Which is a box refraction with small thickness values +- Added the code to support Barn Doors for Area Lights based on a shaderconfig option. +- Added HDRPCameraBinder property binder for Visual Effect Graph +- Added "Celestial Body" controls to the Directional Light +- Added new parameters to the Physically Based Sky +- Added Reflections to the DXR Wizard + +### Fixed +- Fixed y-flip in scene view with XR SDK +- Fixed Decal projectors do not immediately respond when parent object layer mask is changed in editor. +- Fixed y-flip in scene view with XR SDK +- Fixed a number of issues with Material Quality setting +- Fixed the transparent Cull Mode option in HD unlit master node settings only visible if double sided is ticked. +- Fixed an issue causing shadowed areas by contact shadows at the edge of far clip plane if contact shadow length is very close to far clip plane. +- Fixed editing a scalable settings will edit all loaded asset in memory instead of targetted asset. +- Fixed Planar reflection default viewer FOV +- Fixed flickering issues when moving the mouse in the editor with ray tracing on. +- Fixed the ShaderGraph main preview being black after switching to SSS in the master node settings +- Fixed custom fullscreen passes in VR +- Fixed camera culling masks not taken in account in custom pass volumes +- Fixed object not drawn in custom pass when using a DrawRenderers with an HDRP shader in a build. +- Fixed injection points for Custom Passes (AfterDepthAndNormal and BeforePreRefraction were missing) +- Fixed a enum to choose shader tags used for drawing objects (DepthPrepass or Forward) when there is no override material. +- Fixed lit objects in the BeforePreRefraction, BeforeTransparent and BeforePostProcess. +- Fixed the None option when binding custom pass render targets to allow binding only depth or color. +- Fixed custom pass buffers allocation so they are not allocated if they're not used. +- Fixed the Custom Pass entry in the volume create asset menu items. +- Fixed Prefab Overrides workflow on Camera. +- Fixed alignment issue in Preset for Camera. +- Fixed alignment issue in Physical part for Camera. +- Fixed FrameSettings multi-edition. +- Fixed a bug happening when denoising multiple ray traced light shadows +- Fixed minor naming issues in ShaderGraph settings +- Fixed an issue with Metal Shader Compiler and GTAO shader for metal +- Fixed resources load issue while upgrading HDRP package. +- Fixed LOD fade mask by accounting for field of view +- Fixed spot light missing from ray tracing indirect effects. +- Fixed a UI bug in the diffusion profile list after fixing them from the wizard. +- Fixed the hash collision when creating new diffusion profile assets. +- Fixed a light leaking issue with box light casting shadows (case 1184475) +- Fixed Cookie texture type in the cookie slot of lights (Now displays a warning because it is not supported). +- Fixed a nullref that happens when using the Shuriken particle light module +- Fixed alignment in Wizard +- Fixed text overflow in Wizard's helpbox +- Fixed Wizard button fix all that was not automatically grab all required fixes +- Fixed VR tab for MacOS in Wizard +- Fixed local config package workflow in Wizard +- Fixed issue with contact shadows shifting when MSAA is enabled. +- Fixed EV100 in the PBR sky +- Fixed an issue In URP where sometime the camera is not passed to the volume system and causes a null ref exception (case 1199388) +- Fixed nullref when releasing HDRP with custom pass disabled +- Fixed performance issue derived from copying stencil buffer. +- Fixed an editor freeze when importing a diffusion profile asset from a unity package. +- Fixed an exception when trying to reload a builtin resource. +- Fixed the light type intensity unit reset when switching the light type. +- Fixed compilation error related to define guards and CreateLayoutFromXrSdk() +- Fixed documentation link on CustomPassVolume. +- Fixed player build when HDRP is in the project but not assigned in the graphic settings. +- Fixed an issue where ambient probe would be black for the first face of a baked reflection probe +- VFX: Fixed Missing Reference to Visual Effect Graph Runtime Assembly +- Fixed an issue where rendering done by users in EndCameraRendering would be executed before the main render loop. +- Fixed Prefab Override in main scope of Volume. +- Fixed alignment issue in Presset of main scope of Volume. +- Fixed persistence of ShowChromeGizmo and moved it to toolbar for coherency in ReflectionProbe and PlanarReflectionProbe. +- Fixed Alignement issue in ReflectionProbe and PlanarReflectionProbe. +- Fixed Prefab override workflow issue in ReflectionProbe and PlanarReflectionProbe. +- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in ReflectionProbe and PlanarReflectionProbe. +- Fixed Prefab override workflow issue in DensityVolume. +- Fixed empty MoreOptions and moved AdvancedManipulation in a dedicated location for coherency in DensityVolume. +- Fix light limit counts specified on the HDRP asset +- Fixed Quality Settings for SSR, Contact Shadows and Ambient Occlusion volume components +- Fixed decalui deriving from hdshaderui instead of just shaderui +- Use DelayedIntField instead of IntField for scalable settings + +### Changed +- Reworked XR automated tests +- The ray traced screen space shadow history for directional, spot and point lights is discarded if the light transform has changed. +- Changed the behavior for ray tracing in case a mesh renderer has both transparent and opaque submeshes. +- Improve history buffer management +- Replaced PlayerSettings.virtualRealitySupported with XRGraphics.tryEnable. +- Remove redundant FrameSettings RealTimePlanarReflection +- Improved a bit the GC calls generated during the rendering. +- Material update is now only triggered when the relevant settings are touched in the shader graph master nodes +- Changed the way Sky Intensity (on Sky volume components) is handled. It's now a combo box where users can choose between Exposure, Multiplier or Lux (for HDRI sky only) instead of both multiplier and exposure being applied all the time. Added a new menu item to convert old profiles. +- Change how method for specular occlusions is decided on inspector shader (Lit, LitTesselation, LayeredLit, LayeredLitTessellation) +- Unlocked SSS, SSR, Motion Vectors and Distortion frame settings for reflections probes. + +## [7.1.5] - 2019-11-15 + +### Fixed +- Fixed black reflection probes the first time loading a project + +## [7.1.4] - 2019-11-13 + +### Added +- Added XR single-pass setting into HDRP asset +- Added a penumbra tint option for lights + +### Fixed +- Fixed EOL for some files +- Fixed scene view rendering with volumetrics and XR enabled +- Fixed decals to work with multiple cameras +- Fixed optional clear of GBuffer (Was always on) +- Fixed render target clears with XR single-pass rendering +- Fixed HDRP samples file hierarchy +- Fixed Light units not matching light type +- Fixed QualitySettings panel not displaying HDRP Asset + +### Changed +- Changed parametrization of PCSS, now softness is derived from angular diameter (for directional lights) or shape radius (for point/spot lights) and min filter size is now in the [0..1] range. +- Moved the copy of the geometry history buffers to right after the depth mip chain generation. +- Rename "Luminance" to "Nits" in UX for physical light unit +- Rename FrameSettings "SkyLighting" to "SkyReflection" + +## [7.1.3] - 2019-11-04 + +### Added +- Ray tracing support for VR single-pass +- Added sharpen filter shader parameter and UI for TemporalAA to control image quality instead of hardcoded value +- Added frame settings option for custom post process and custom passes as well as custom color buffer format option. +- Add check in wizard on SRP Batcher enabled. +- Added default implementations of OnPreprocessMaterialDescription for FBX, Obj, Sketchup and 3DS file formats. +- Added custom pass fade radius +- Added after post process injection point for custom passes +- Added basic alpha compositing support - Alpha is available afterpostprocess when using FP16 buffer format. +- Added falloff distance on Reflection Probe and Planar Reflection Probe +- Added hability to name LightLayers in HDRenderPipelineAsset +- Added a range compression factor for Reflection Probe and Planar Reflection Probe to avoid saturation of colors. +- Added path tracing support for directional, point and spot lights, as well as emission from Lit and Unlit. +- Added non temporal version of SSAO. +- Added more detailed ray tracing stats in the debug window +- Added Disc area light (bake only) +- Added a warning in the material UI to prevent transparent + subsurface-scattering combination. + +### Fixed +- Sorting, undo, labels, layout in the Lighting Explorer. +- Fixed sky settings and materials in Shader Graph Samples package +- Fixed light supported units caching (1182266) +- Fixed an issue where SSAO (that needs temporal reprojection) was still being rendered when Motion Vectors were not available (case 1184998) +- Fixed a nullref when modifying the height parameters inside the layered lit shader UI. +- Fixed Decal gizmo that become white after exiting play mode +- Fixed Decal pivot position to behave like a spotlight +- Fixed an issue where using the LightingOverrideMask would break sky reflection for regular cameras +- Fix DebugMenu FrameSettingsHistory persistency on close +- Fix DensityVolume, ReflectionProbe aned PlanarReflectionProbe advancedControl display +- Fix DXR scene serialization in wizard +- Fixed an issue where Previews would reallocate History Buffers every frame +- Fixed the SetLightLayer function in HDAdditionalLightData setting the wrong light layer +- Fix error first time a preview is created for planar +- Fixed an issue where SSR would use an incorrect roughness value on ForwardOnly (StackLit, AxF, Fabric, etc.) materials when the pipeline is configured to also allow deferred Lit. +- Fixed issues with light explorer (cases 1183468, 1183269) +- Fix dot colors in LayeredLit material inspector +- Fix undo not resetting all value when undoing the material affectation in LayerLit material +- Fix for issue that caused gizmos to render in render textures (case 1174395) +- Fixed the light emissive mesh not updated when the light was disabled/enabled +- Fixed light and shadow layer sync when setting the HDAdditionalLightData.lightlayersMask property +- Fixed a nullref when a custom post process component that was in the HDRP PP list is removed from the project +- Fixed issue that prevented decals from modifying specular occlusion (case 1178272). +- Fixed exposure of volumetric reprojection +- Fixed multi selection support for Scalable Settings in lights +- Fixed font shaders in test projects for VR by using a Shader Graph version +- Fixed refresh of baked cubemap by incrementing updateCount at the end of the bake (case 1158677). +- Fixed issue with rectangular area light when seen from the back +- Fixed decals not affecting lightmap/lightprobe +- Fixed zBufferParams with XR single-pass rendering +- Fixed moving objects not rendered in custom passes +- Fixed abstract classes listed in the + menu of the custom pass list +- Fixed custom pass that was rendered in previews +- Fixed precision error in zero value normals when applying decals (case 1181639) +- Fixed issue that triggered No Scene Lighting view in game view as well (case 1156102) +- Assign default volume profile when creating a new HDRP Asset +- Fixed fov to 0 in planar probe breaking the projection matrix (case 1182014) +- Fixed bugs with shadow caching +- Reassign the same camera for a realtime probe face render request to have appropriate history buffer during realtime probe rendering. +- Fixed issue causing wrong shading when normal map mode is Object space, no normal map is set, but a detail map is present (case 1143352) +- Fixed issue with decal and htile optimization +- Fixed TerrainLit shader compilation error regarding `_Control0_TexelSize` redefinition (case 1178480). +- Fixed warning about duplicate HDRuntimeReflectionSystem when configuring play mode without domain reload. +- Fixed an editor crash when multiple decal projectors were selected and some had null material +- Added all relevant fix actions to FixAll button in Wizard +- Moved FixAll button on top of the Wizard +- Fixed an issue where fog color was not pre-exposed correctly +- Fix priority order when custom passes are overlapping +- Fix cleanup not called when the custom pass GameObject is destroyed +- Replaced most instances of GraphicsSettings.renderPipelineAsset by GraphicsSettings.currentRenderPipeline. This should fix some parameters not working on Quality Settings overrides. +- Fixed an issue with Realtime GI not working on upgraded projects. +- Fixed issue with screen space shadows fallback texture was not set as a texture array. +- Fixed Pyramid Lights bounding box +- Fixed terrain heightmap default/null values and epsilons +- Fixed custom post-processing effects breaking when an abstract class inherited from `CustomPostProcessVolumeComponent` +- Fixed XR single-pass rendering in Editor by using ShaderConfig.s_XrMaxViews to allocate matrix array +- Multiple different skies rendered at the same time by different cameras are now handled correctly without flickering +- Fixed flickering issue happening when different volumes have shadow settings and multiple cameras are present. +- Fixed issue causing planar probes to disappear if there is no light in the scene. +- Fixed a number of issues with the prefab isolation mode (Volumes leaking from the main scene and reflection not working properly) +- Fixed an issue with fog volume component upgrade not working properly +- Fixed Spot light Pyramid Shape has shadow artifacts on aspect ratio values lower than 1 +- Fixed issue with AO upsampling in XR +- Fixed camera without HDAdditionalCameraData component not rendering +- Removed the macro ENABLE_RAYTRACING for most of the ray tracing code +- Fixed prefab containing camera reloading in loop while selected in the Project view +- Fixed issue causing NaN wheh the Z scale of an object is set to 0. +- Fixed DXR shader passes attempting to render before pipeline loaded +- Fixed black ambient sky issue when importing a project after deleting Library. +- Fixed issue when upgrading a Standard transparent material (case 1186874) +- Fixed area light cookies not working properly with stack lit +- Fixed material render queue not updated when the shader is changed in the material inspector. +- Fixed a number of issues with full screen debug modes not reseting correctly when setting another mutually exclusive mode +- Fixed compile errors for platforms with no VR support +- Fixed an issue with volumetrics and RTHandle scaling (case 1155236) +- Fixed an issue where sky lighting might be updated uselessly +- Fixed issue preventing to allow setting decal material to none (case 1196129) +- Fixed XR multi-pass decals rendering +- Fixed several fields on Light Inspector that not supported Prefab overrides +- VFX: Removed z-fight glitches that could appear when using deferred depth prepass and lit quad primitives +- VFX: Preserve specular option for lit outputs (matches HDRP lit shader) +- Fixed init of debug for FrameSettingsHistory on SceneView camera +- Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' +- Fix Wizard load when none selected for RenderPipelineAsset +- Fixed issue with unclear naming of debug menu for decals. + +### Changed +- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled +- Rename Emission Radius to Radius in UI in Point, Spot +- Angular Diameter parameter for directional light is no longuer an advanced property +- DXR: Remove Light Radius and Angular Diamater of Raytrace shadow. Angular Diameter and Radius are used instead. +- Remove MaxSmoothness parameters from UI for point, spot and directional light. The MaxSmoothness is now deduce from Radius Parameters +- DXR: Remove the Ray Tracing Environement Component. Add a Layer Mask to the ray Tracing volume components to define which objects are taken into account for each effect. +- Removed second cubemaps used for shadowing in lookdev +- Disable Physically Based Sky below ground +- Increase max limit of area light and reflection probe to 128 +- Change default texture for detailmap to grey +- Optimize Shadow RT load on Tile based architecture platforms. +- Improved quality of SSAO. +- Moved RequestShadowMapRendering() back to public API. +- Update HDRP DXR Wizard with an option to automatically clone the hdrp config package and setup raytracing to 1 in shaders file. +- Added SceneSelection pass for TerrainLit shader. +- Simplified Light's type API regrouping the logic in one place (Check type in HDAdditionalLightData) +- The support of LOD CrossFade (Dithering transition) in master nodes now required to enable it in the master node settings (Save variant) +- Improved shadow bias, by removing constant depth bias and substituting it with slope-scale bias. +- Fix the default stencil values when a material is created from a SSS ShaderGraph. +- Tweak test asset to be compatible with XR: unlit SG material for canvas and double-side font material +- Slightly tweaked the behaviour of bloom when resolution is low to reduce artifacts. +- Hidden fields in Light Inspector that is not relevant while in BakingOnly mode. + +## [7.1.2] - 2019-09-19 + +### Fixed +- Fix/workaround a probable graphics driver bug in the GTAO shader. +- Fixed Hair and PBR shader graphs double sided modes +- Fixed an issue where updating an HDRP asset in the Quality setting panel would not recreate the pipeline. +- Fixed issue with point lights being considered even when occupying less than a pixel on screen (case 1183196) +- Fix a potential NaN source with iridescence (case 1183216) +- Fixed issue of spotlight breaking when minimizing the cone angle via the gizmo (case 1178279) +- Fixed issue that caused decals not to modify the roughness in the normal buffer, causing SSR to not behave correctly (case 1178336) +- Fixed lit transparent refraction with XR single-pass rendering +- Removed extra jitter for TemporalAA in VR +- Fixed ShaderGraph time in main preview +- Fixed issue on some UI elements in HDRP asset not expanding when clicking the arrow (case 1178369) +- Fixed alpha blending in custom post process +- Fixed the modification of the _AlphaCutoff property in the material UI when exposed with a ShaderGraph parameter. +- Fixed HDRP test `1218_Lit_DiffusionProfiles` on Vulkan. +- Fixed an issue where building a player in non-dev mode would generate render target error logs every frame +- Fixed crash when upgrading version of HDRP +- Fixed rendering issues with material previews +- Fixed NPE when using light module in Shuriken particle systems (1173348). +- Refresh cached shadow on editor changes + ## [7.1.1] - 2019-09-05 ### Added From d15725c9274ce79b12268496fcbb9f1280100c24 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 7 Apr 2020 19:32:29 +0200 Subject: [PATCH 084/200] Clamp probes compression factor to 0 #19 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Utilities/ProbeSettings.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d3abf8be222..95651cd1f71 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix issues in the post process system with RenderTexture being invalid in some cases, causing rendering problems. - Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. - Fixed path validation when creating new volume profile (case 1229933) +- Fix for range compression factor for probes going negative (now clamped to positive values). ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs index 23499318e19..23360c346f5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/ProbeSettings.cs @@ -137,6 +137,7 @@ public struct Lighting public float fadeDistance; /// The result of the rendering of the probe will be divided by this factor. When the probe is read, this factor is undone as the probe data is read. /// This is to simply avoid issues with values clamping due to precision of the storing format. + [Min(1e-6f)] public float rangeCompressionFactor; } From 04bdb772984ad79ebabc4f50d2b6225f5e6f6ed2 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 15 Apr 2020 12:50:18 +0200 Subject: [PATCH 085/200] [Backport 8.x.x] Fix various leaks in HDRP (#119) * Fixed a number of leak in HDRP # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs * Update changelog --- .../Runtime/Common/ComponentSingleton.cs | 15 ++++++++++++++- .../CHANGELOG.md | 1 + .../Runtime/Core/Textures/TextureCacheCubemap.cs | 4 +++- .../Runtime/Lighting/Shadow/HDShadowManager.cs | 12 ++++++++---- .../Runtime/PostProcessing/PostProcessSystem.cs | 4 ++++ .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 ++ .../RenderPipeline/RenderPass/MipGenerator.cs | 4 +++- .../Runtime/RenderPipeline/Utility/HDUtils.cs | 11 +++++++++-- .../PhysicallyBasedSkyRenderer.cs | 7 ++++--- 9 files changed, 48 insertions(+), 12 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/Common/ComponentSingleton.cs b/com.unity.render-pipelines.core/Runtime/Common/ComponentSingleton.cs index fb02eab90cb..993c1283d03 100644 --- a/com.unity.render-pipelines.core/Runtime/Common/ComponentSingleton.cs +++ b/com.unity.render-pipelines.core/Runtime/Common/ComponentSingleton.cs @@ -20,7 +20,7 @@ public static TType instance { if (s_Instance == null) { - GameObject go = new GameObject("Default " + typeof(TType)) { hideFlags = HideFlags.HideAndDontSave }; + GameObject go = new GameObject("Default " + typeof(TType).Name) { hideFlags = HideFlags.HideAndDontSave }; go.SetActive(false); s_Instance = go.AddComponent(); } @@ -28,5 +28,18 @@ public static TType instance return s_Instance; } } + + /// + /// Release the component singleton. + /// + public static void Release() + { + if (s_Instance != null) + { + var go = s_Instance.gameObject; + CoreUtils.Destroy(go); + s_Instance = null; + } + } } } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 95651cd1f71..6d6d3c7528b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. - Fixed path validation when creating new volume profile (case 1229933) - Fix for range compression factor for probes going negative (now clamped to positive values). +- Fixed various object leaks in HDRP. ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Core/Textures/TextureCacheCubemap.cs b/com.unity.render-pipelines.high-definition/Runtime/Core/Textures/TextureCacheCubemap.cs index bb2ca768c52..82c52aec49a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Core/Textures/TextureCacheCubemap.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Core/Textures/TextureCacheCubemap.cs @@ -189,7 +189,9 @@ public void Release() CoreUtils.Destroy(m_CubeBlitMaterial); } - m_Cache.Release(); + CoreUtils.Destroy(m_BlitCubemapFaceMaterial); + + CoreUtils.Destroy(m_Cache); } private bool TransferToPanoCache(CommandBuffer cmd, int sliceIndex, Texture[] textureArray) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs index 159ac9e7d04..345b8f95eda 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs @@ -257,6 +257,8 @@ partial class HDShadowManager : IDisposable int m_CascadeCount; int m_ShadowResolutionRequestCounter; + Material m_ClearShadowMaterial; + private static HDShadowManager s_Instance = new HDShadowManager(); public static HDShadowManager instance { get { return s_Instance; } } @@ -268,7 +270,7 @@ private HDShadowManager() public void InitShadowManager(RenderPipelineResources renderPipelineResources, DepthBits directionalShadowDepthBits, HDShadowInitParameters.HDShadowAtlasInitParams punctualLightAtlasInfo, HDShadowInitParameters.HDShadowAtlasInitParams areaLightAtlasInfo, int maxShadowRequests, Shader clearShader) { - Material clearMaterial = CoreUtils.CreateEngineMaterial(clearShader); + m_ClearShadowMaterial = CoreUtils.CreateEngineMaterial(clearShader); // Prevent the list from resizing their internal container when we add shadow requests m_ShadowDatas.Capacity = Math.Max(maxShadowRequests, m_ShadowDatas.Capacity); @@ -282,13 +284,13 @@ public void InitShadowManager(RenderPipelineResources renderPipelineResources, D } // The cascade atlas will be allocated only if there is a directional light - m_Atlas = new HDShadowAtlas(renderPipelineResources, punctualLightAtlasInfo.shadowAtlasResolution, punctualLightAtlasInfo.shadowAtlasResolution, HDShaderIDs._ShadowmapAtlas, HDShaderIDs._ShadowAtlasSize, clearMaterial, maxShadowRequests, depthBufferBits: punctualLightAtlasInfo.shadowAtlasDepthBits, name: "Shadow Map Atlas"); + m_Atlas = new HDShadowAtlas(renderPipelineResources, punctualLightAtlasInfo.shadowAtlasResolution, punctualLightAtlasInfo.shadowAtlasResolution, HDShaderIDs._ShadowmapAtlas, HDShaderIDs._ShadowAtlasSize, m_ClearShadowMaterial, maxShadowRequests, depthBufferBits: punctualLightAtlasInfo.shadowAtlasDepthBits, name: "Shadow Map Atlas"); // Cascade atlas render texture will only be allocated if there is a shadow casting directional light HDShadowAtlas.BlurAlgorithm cascadeBlur = GetDirectionalShadowAlgorithm() == DirectionalShadowAlgorithm.IMS ? HDShadowAtlas.BlurAlgorithm.IM : HDShadowAtlas.BlurAlgorithm.None; - m_CascadeAtlas = new HDShadowAtlas(renderPipelineResources, 1, 1, HDShaderIDs._ShadowmapCascadeAtlas, HDShaderIDs._CascadeShadowAtlasSize, clearMaterial, maxShadowRequests, cascadeBlur, depthBufferBits: directionalShadowDepthBits, name: "Cascade Shadow Map Atlas"); + m_CascadeAtlas = new HDShadowAtlas(renderPipelineResources, 1, 1, HDShaderIDs._ShadowmapCascadeAtlas, HDShaderIDs._CascadeShadowAtlasSize, m_ClearShadowMaterial, maxShadowRequests, cascadeBlur, depthBufferBits: directionalShadowDepthBits, name: "Cascade Shadow Map Atlas"); if (ShaderConfig.s_AreaLights == 1) - m_AreaLightShadowAtlas = new HDShadowAtlas(renderPipelineResources, areaLightAtlasInfo.shadowAtlasResolution, areaLightAtlasInfo.shadowAtlasResolution, HDShaderIDs._AreaLightShadowmapAtlas, HDShaderIDs._AreaShadowAtlasSize, clearMaterial, maxShadowRequests, HDShadowAtlas.BlurAlgorithm.EVSM, depthBufferBits: areaLightAtlasInfo.shadowAtlasDepthBits, name: "Area Light Shadow Map Atlas", momentAtlasShaderID: HDShaderIDs._AreaShadowmapMomentAtlas); + m_AreaLightShadowAtlas = new HDShadowAtlas(renderPipelineResources, areaLightAtlasInfo.shadowAtlasResolution, areaLightAtlasInfo.shadowAtlasResolution, HDShaderIDs._AreaLightShadowmapAtlas, HDShaderIDs._AreaShadowAtlasSize, m_ClearShadowMaterial, maxShadowRequests, HDShadowAtlas.BlurAlgorithm.EVSM, depthBufferBits: areaLightAtlasInfo.shadowAtlasDepthBits, name: "Area Light Shadow Map Atlas", momentAtlasShaderID: HDShaderIDs._AreaShadowmapMomentAtlas); m_ShadowDataBuffer = new ComputeBuffer(maxShadowRequests, System.Runtime.InteropServices.Marshal.SizeOf(typeof(HDShadowData))); m_DirectionalShadowDataBuffer = new ComputeBuffer(1, System.Runtime.InteropServices.Marshal.SizeOf(typeof(HDDirectionalShadowData))); @@ -822,6 +824,8 @@ public void Dispose() if (ShaderConfig.s_AreaLights == 1) m_AreaLightShadowAtlas.Release(); m_CascadeAtlas.Release(); + + CoreUtils.Destroy(m_ClearShadowMaterial); } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs index 4629f347a0e..0d1e26a9a19 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs @@ -269,6 +269,8 @@ public void Cleanup() RTHandles.Release(m_InternalLogLut); CoreUtils.Destroy(m_FinalPassMaterial); CoreUtils.Destroy(m_ClearBlackMaterial); + CoreUtils.Destroy(m_SMAAMaterial); + CoreUtils.Destroy(m_TemporalAAMaterial); CoreUtils.SafeRelease(m_BokehNearKernel); CoreUtils.SafeRelease(m_BokehFarKernel); CoreUtils.SafeRelease(m_BokehIndirectCmd); @@ -285,6 +287,8 @@ public void Cleanup() m_InternalLogLut = null; m_FinalPassMaterial = null; m_ClearBlackMaterial = null; + m_SMAAMaterial = null; + m_TemporalAAMaterial = null; m_BokehNearKernel = null; m_BokehFarKernel = null; m_BokehIndirectCmd = null; 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 be8af6df0b4..78298e02afe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -940,6 +940,8 @@ void DisposeProbeCameraPool() } CameraCaptureBridge.enabled = false; + + HDUtils.ReleaseComponentSingletons(); } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs index d16186a2d52..f413e1df6ad 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MipGenerator.cs @@ -39,6 +39,8 @@ public void Release() RTHandles.Release(m_TempDownsamplePyramid[i]); m_TempDownsamplePyramid[i] = null; } + + CoreUtils.Destroy(m_ColorPyramidPSMat); } private int tmpTargetCount @@ -222,4 +224,4 @@ public int RenderColorGaussianPyramid(CommandBuffer cmd, Vector2Int size, Textur return srcMipLevel + 1; } } -} \ No newline at end of file +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs index b4b6796ad28..0560b4eaebb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs @@ -24,7 +24,7 @@ public class HDUtils static internal HDAdditionalLightData s_DefaultHDAdditionalLightData { get { return ComponentSingleton.instance; } } /// Default HDAdditionalCameraData static internal HDAdditionalCameraData s_DefaultHDAdditionalCameraData { get { return ComponentSingleton.instance; } } - + static List m_TempCustomPassVolumeList = new List(); static Texture3D m_ClearTexture3D; @@ -473,7 +473,7 @@ internal static RenderPipelineAsset SwitchToBuiltinRenderPipeline(out bool asset } // Set the renderPipelineAsset, either on the quality settings if it was unset from there or in GraphicsSettings. - // IMPORTANT: RenderPipelineManager.currentPipeline won't be HDRP until a camera.Render() call is made. + // IMPORTANT: RenderPipelineManager.currentPipeline won't be HDRP until a camera.Render() call is made. internal static void RestoreRenderPipelineAsset(bool wasUnsetFromQuality, RenderPipelineAsset renderPipelineAsset) { if(wasUnsetFromQuality) @@ -1001,5 +1001,12 @@ internal static void DisplayUnsupportedAPIMessage(string graphicAPI = null) string msg = "Platform " + currentPlatform + " with device " + graphicAPI + " is not supported with High Definition Render Pipeline, no rendering will occur"; DisplayUnsupportedMessage(msg); } + + internal static void ReleaseComponentSingletons() + { + ComponentSingleton.Release(); + ComponentSingleton.Release(); + ComponentSingleton.Release(); + } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs index a9f1a4b69e7..6c206f55888 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs @@ -32,7 +32,7 @@ public enum PbrSkyConfig static ComputeShader s_GroundIrradiancePrecomputationCS; static ComputeShader s_InScatteredRadiancePrecomputationCS; - static Material s_PbrSkyMaterial; + Material s_PbrSkyMaterial; static MaterialPropertyBlock s_PbrSkyMaterialProperties; static GraphicsFormat s_ColorFormat = GraphicsFormat.R16G16B16A16_SFloat; @@ -80,8 +80,7 @@ public override void Build() s_InScatteredRadiancePrecomputationCS = hdrpResources.shaders.inScatteredRadiancePrecomputationCS; s_PbrSkyMaterialProperties = new MaterialPropertyBlock(); - if (s_PbrSkyMaterial == null) // Material instance is static. - s_PbrSkyMaterial = CoreUtils.CreateEngineMaterial(hdrpResources.shaders.physicallyBasedSkyPS); + s_PbrSkyMaterial = CoreUtils.CreateEngineMaterial(hdrpResources.shaders.physicallyBasedSkyPS); Debug.Assert(s_GroundIrradiancePrecomputationCS != null); Debug.Assert(s_InScatteredRadiancePrecomputationCS != null); @@ -126,6 +125,8 @@ public override void Cleanup() RTHandles.Release(m_InScatteredRadianceTables[3]); m_InScatteredRadianceTables[3] = null; RTHandles.Release(m_InScatteredRadianceTables[4]); m_InScatteredRadianceTables[4] = null; + CoreUtils.Destroy(s_PbrSkyMaterial); + m_LastPrecomputedBounce = 0; } From 855d6443f3f33c67d8101fb6b643c4107795fe9b Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 15 Apr 2020 12:54:43 +0200 Subject: [PATCH 086/200] [8.x.x backport] Follow references when deleting unloading unused assets on shader graph save (case 1230996) (#115) * Follow references when unloading unneeded assets * Changelog Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/AssetProcessors/ShaderGraphMaterialsUpdater.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 6d6d3c7528b..96bdac36a3b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed path validation when creating new volume profile (case 1229933) - Fix for range compression factor for probes going negative (now clamped to positive values). - Fixed various object leaks in HDRP. +- Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996) ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/ShaderGraphMaterialsUpdater.cs b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/ShaderGraphMaterialsUpdater.cs index 3a3f94a9084..770e36cd1ef 100644 --- a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/ShaderGraphMaterialsUpdater.cs +++ b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/ShaderGraphMaterialsUpdater.cs @@ -55,13 +55,13 @@ static void OnShaderGraphSaved(Shader shader, object saveContext) // Free the materials every 200 iterations, on big project loading all materials in memory can lead to a crash if ((i % 200 == 0) && i != 0) - EditorUtility.UnloadUnusedAssetsImmediate(false); + EditorUtility.UnloadUnusedAssetsImmediate(true); } } finally { EditorUtility.ClearProgressBar(); - EditorUtility.UnloadUnusedAssetsImmediate(false); + EditorUtility.UnloadUnusedAssetsImmediate(true); } } } From 4d8fe2a37920d98124fad394bea2711da1147ab7 Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Tue, 14 Apr 2020 12:57:05 +0200 Subject: [PATCH 087/200] Fix MSAA resolve when there is no motion vectors --- .../CHANGELOG.md | 1 + .../Runtime/Material/SharedRTManager.cs | 32 +++++++++++++------ .../RenderPass/MSAA/DepthValues.shader | 14 ++++++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 96bdac36a3b..fcefd30700e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix for range compression factor for probes going negative (now clamped to positive values). - Fixed various object leaks in HDRP. - Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996) +- Fixed MSAA depth resolve when there is no motion vectors ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs index f9b4a7f732b..4c261ced47d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs @@ -94,6 +94,8 @@ public void InitSharedBuffers(GBufferManager gbufferManager, RenderPipelineSetti // Create the required resolve materials m_DepthResolveMaterial = CoreUtils.CreateEngineMaterial(resources.shaders.depthValuesPS); m_ColorResolveMaterial = CoreUtils.CreateEngineMaterial(resources.shaders.colorResolvePS); + + CoreUtils.SetKeyword(m_DepthResolveMaterial, "_HAS_MOTION_VECTORS", m_MotionVectorsSupport); } AllocateCoarseStencilBuffer(RTHandles.maxWidth, RTHandles.maxHeight, TextureXR.slices); @@ -342,18 +344,30 @@ public void ResolveSharedRT(CommandBuffer cmd, HDCamera hdCamera) Debug.Assert(m_MSAASupported); using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ResolveMSAADepth))) { - // Grab the RTIs and set the output render targets - m_RTIDs3[0] = m_CameraDepthValuesBuffer.nameID; - m_RTIDs3[1] = m_NormalRT.nameID; - m_RTIDs3[2] = m_MotionVectorsRT.nameID; - CoreUtils.SetRenderTarget(cmd, m_RTIDs3, m_CameraDepthStencilBuffer); - - // Set the input textures + if (m_MotionVectorsSupport) + { + // Grab the RTIs and set the output render targets + m_RTIDs3[0] = m_CameraDepthValuesBuffer.nameID; + m_RTIDs3[1] = m_NormalRT.nameID; + m_RTIDs3[2] = m_MotionVectorsRT.nameID; + CoreUtils.SetRenderTarget(cmd, m_RTIDs3, m_CameraDepthStencilBuffer); + + // Set the motion vector input texture + Shader.SetGlobalTexture(HDShaderIDs._MotionVectorTextureMS, m_MotionVectorsMSAART); + } + else + { + // Grab the RTIs and set the output render targets + m_RTIDs2[0] = m_CameraDepthValuesBuffer.nameID; + m_RTIDs2[1] = m_NormalRT.nameID; + CoreUtils.SetRenderTarget(cmd, m_RTIDs2, m_CameraDepthStencilBuffer); + } + + // Set the depth and normal input textures Shader.SetGlobalTexture(HDShaderIDs._NormalTextureMS, m_NormalMSAART); Shader.SetGlobalTexture(HDShaderIDs._DepthTextureMS, m_DepthAsColorMSAART); - Shader.SetGlobalTexture(HDShaderIDs._MotionVectorTextureMS, m_MotionVectorsMSAART); - // Resolve the depth and normal buffers + // Resolve the buffers cmd.DrawProcedural(Matrix4x4.identity, m_DepthResolveMaterial, SampleCountToPassIndex(m_MSAASamples), MeshTopology.Triangles, 3, 1); } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader index e3d3c2f7bba..bdb882276dd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/DepthValues.shader @@ -3,6 +3,8 @@ Shader "Hidden/HDRP/DepthValues" HLSLINCLUDE #pragma target 4.5 #pragma only_renderers d3d11 playstation xboxone vulkan metal switch + #pragma multi_compile _ _HAS_MOTION_VECTORS + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" // #pragma enable_d3d11_debug_symbols @@ -10,7 +12,9 @@ Shader "Hidden/HDRP/DepthValues" // Target multisampling textures TEXTURE2D_X_MSAA(float, _DepthTextureMS); TEXTURE2D_X_MSAA(float4, _NormalTextureMS); + #ifdef _HAS_MOTION_VECTORS TEXTURE2D_X_MSAA(float2, _MotionVectorTextureMS); + #endif struct Attributes { @@ -29,7 +33,9 @@ Shader "Hidden/HDRP/DepthValues" { float4 depthValues : SV_Target0; float4 normal : SV_Target1; + #ifdef _HAS_MOTION_VECTORS float2 motionVectors : SV_Target2; + #endif float actualDepth : SV_Depth; }; @@ -51,7 +57,9 @@ Shader "Hidden/HDRP/DepthValues" float depthVal = LOAD_TEXTURE2D_X_MSAA(_DepthTextureMS, pixelCoords, 0).x; fragO.depthValues = float4(depthVal, depthVal, depthVal, 0.0f); fragO.normal = LOAD_TEXTURE2D_X_MSAA(_NormalTextureMS, pixelCoords, 0); + #ifdef _HAS_MOTION_VECTORS fragO.motionVectors = LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, 0); + #endif fragO.actualDepth = fragO.depthValues.x; return fragO; } @@ -77,8 +85,10 @@ Shader "Hidden/HDRP/DepthValues" fragO.depthValues.z *= 0.5; fragO.actualDepth = fragO.depthValues.x; fragO.normal = LOAD_TEXTURE2D_X_MSAA(_NormalTextureMS, pixelCoords, 0); + #ifdef _HAS_MOTION_VECTORS // We pick the closest sample to camera, not really a great solution, but resolving motion vectors is ill defined. fragO.motionVectors = LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, closestSample); + #endif return fragO; } @@ -103,8 +113,10 @@ Shader "Hidden/HDRP/DepthValues" fragO.depthValues.z *= 0.25; fragO.actualDepth = fragO.depthValues.x; fragO.normal = LOAD_TEXTURE2D_X_MSAA(_NormalTextureMS, pixelCoords, 0); + #ifdef _HAS_MOTION_VECTORS // We pick the closest sample to camera, not really a great solution, but resolving motion vectors is ill defined. fragO.motionVectors = LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, closestSample); + #endif return fragO; } @@ -129,8 +141,10 @@ Shader "Hidden/HDRP/DepthValues" fragO.depthValues.z *= 0.125; fragO.actualDepth = fragO.depthValues.x; fragO.normal = LOAD_TEXTURE2D_X_MSAA(_NormalTextureMS, pixelCoords, 0); + #ifdef _HAS_MOTION_VECTORS // We pick the closest sample to camera, not really a great solution, but resolving motion vectors is ill defined. fragO.motionVectors = LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, closestSample); + #endif return fragO; } ENDHLSL From 66ab3adf9c6b06965223c28c4505bf8359f8d5b8 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 15 Apr 2020 17:08:38 +0200 Subject: [PATCH 088/200] Fix issues causing planar probes to be broken with multiple cameras in the scene --- .../CHANGELOG.md | 93 +++++++++++++++++++ .../Runtime/Lighting/Reflection/HDProbe.cs | 11 ++- .../RenderPipeline/HDRenderPipeline.cs | 52 +++++++++-- 3 files changed, 144 insertions(+), 12 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fcefd30700e..b650828b55e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed various object leaks in HDRP. - Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996) - Fixed MSAA depth resolve when there is no motion vectors +- Fix issue causing wrong planar reflection rendering when more than one camera is present. ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. @@ -266,6 +267,98 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with MipRatio debug mode showing _DebugMatCapTexture not being set. - Fixed missing initialization of input params in Blit for VR. - Fix Inf source in LTC for area lights. +<<<<<<< HEAD +======= +- Fix issue with AO being misaligned when multiple view are visible. +- Fix issue that caused the clamp of camera rotation motion for motion blur to be ineffective. +- Fixed issue with AssetPostprocessors dependencies causing models to be imported twice when upgrading the package version. +- Fixed culling of lights with XR SDK +- Fixed memory stomp in shadow caching code, leading to overflow of Shadow request array and runtime errors. +- Fixed an issue related to transparent objects reading the ray traced indirect diffuse buffer +- Fixed an issue with filtering ray traced area lights when the intensity is high or there is an exposure. +- Fixed ill-formed include path in Depth Of Field shader. +- Fixed shader graph and ray tracing after the shader target PR. +- Fixed a bug in semi-transparent shadows (object further than the light casting shadows) +- Fix state enabled of default volume profile when in package. +- Fixed removal of MeshRenderer and MeshFilter on adding Light component. +- Fixed Ray Traced SubSurface Scattering not working with ray traced area lights +- Fixed Ray Traced SubSurface Scattering not working in forward mode. +- Fixed a bug in debug light volumes. +- Fixed a bug related to ray traced area light shadow history. +- Fixed an issue where fog sky color mode could sample NaNs in the sky cubemap. +- Fixed a leak in the PBR sky renderer. +- Added a tooltip to the Ambient Mode parameter in the Visual Envionment volume component. +- Static lighting sky now takes the default volume into account (this fixes discrepancies between baked and realtime lighting). +- Fixed a leak in the sky system. +- Removed MSAA Buffers allocation when lit shader mode is set to "deferred only". +- Fixed invalid cast for realtime reflection probes (case 1220504) +- Fixed invalid game view rendering when disabling all cameras in the scene (case 1105163) +- Hide reflection probes in the renderer components. +- Fixed infinite reload loop while displaying Light's Shadow's Link Light Layer in Inspector of Prefab Asset. +- Fixed the culling was not disposed error in build log. +- Fixed the cookie atlas size and planar atlas size being too big after an upgrade of the HDRP asset. +- Fixed transparent SSR for shader graph. +- Fixed an issue with emissive light meshes not being in the RAS. +- Fixed DXR player build +- Fixed the HDRP asset migration code not being called after an upgrade of the package +- Fixed draw renderers custom pass out of bound exception +- Fixed the PBR shader rendering in deferred +- Fixed some typos in debug menu (case 1224594) +- Fixed ray traced point and spot lights shadows not rejecting istory when semi-transparent or colored. +- Fixed a warning due to StaticLightingSky when reloading domain in some cases. +- Fixed the MaxLightCount being displayed when the light volume debug menu is on ColorAndEdge. +- Fixed issue with unclear naming of debug menu for decals. +- Fixed z-fighting in scene view when scene lighting is off (case 1203927) +- Fixed issue that prevented cubemap thumbnails from rendering. +- Fixed ray tracing with VR single-pass +- Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. +- Fixed error in the console when switching shader to decal in the material UI. +- Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). +- Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. +- Fixed cubemap thumbnail generation at project load time. +- Fixed cubemap thumbnail generation at project load time. +- Fixed XR culling with multiple cameras +- Fixed XR single-pass with Mock HMD plugin +- Fixed sRGB mismatch with XR SDK +- Fixed an issue where default volume would not update when switching profile. +- Fixed issue with uncached reflection probe cameras reseting the debug mode (case 1224601) +- Fixed an issue where AO override would not override specular occlusion. +- Fixed an issue where Volume inspector might not refresh correctly in some cases. +- Fixed render texture with XR +- Fixed issue with resources being accessed before initialization process has been performed completely. +- Half fixed shuriken particle light that cast shadows (only the first one will be correct) +- Fixed issue with atmospheric fog turning black if a planar reflection probe is placed below ground level. (case 1226588) +- Fixed custom pass GC alloc issue in CustomPassVolume.GetActiveVolumes(). +- Fixed a bug where instanced shadergraph shaders wouldn't compile on PS4. +- Fixed an issue related to the envlightdatasrt not being bound in recursive rendering. +- Fixed shadow cascade tooltip when using the metric mode (case 1229232) +- Fixed how the area light influence volume is computed to match rasterization. +- Focus on Decal uses the extends of the projectors +- Fixed usage of light size data that are not available at runtime. +- Fixed the depth buffer copy made before custom pass after opaque and normal injection point. +- Fix for issue that prevented scene from being completely saved when baked reflection probes are present and lighting is set to auto generate. +- Fixed drag area width at left of Light's intensity field in Inspector. +- Fixed light type resolution when performing a reset on HDAdditionalLightData (case 1220931) +- Fixed reliance on atan2 undefined behavior in motion vector debug shader. +- Fixed an usage of a a compute buffer not bound (1229964) +- Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. +- Fix issues in the post process system with RenderTexture being invalid in some cases, causing rendering problems. +- Fixed an issue where unncessarily serialized members in StaticLightingSky component would change each time the scene is changed. +- Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). +- Fixed a regression in the ray traced indirect diffuse due to the new probe system. +- Fix for range compression factor for probes going negative (now clamped to positive values). +- Fixed path validation when creating new volume profile (case 1229933) +- Fix reflection hierarchy for CARPAINT in AxF. +- Fix precise fresnel for delta lights for SVBRDF in AxF. +- Fixed the debug exposure mode for display sky reflection and debug view baked lighting +- Fixed MSAA depth resolve when there is no motion vectors +- Fixed various object leaks in HDRP. +- Fixed compile error with XR SubsystemManager. +- Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996) +- Fixed culling of planar reflection probes that change position (case 1218651) +- Fixed null reference when processing lightprobe (case 1235285) +- Fix issue causing wrong planar reflection rendering when more than one camera is present. +>>>>>>> 5dea391dea... Fix issues causing planar probes to be broken with multiple cameras in the scene (#4) ### Changed - Hide unused LOD settings in Quality Settings legacy window. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs index 9704c75d253..d7acda444b7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs @@ -248,7 +248,11 @@ public Texture SetTexture(ProbeSettings.Mode targetMode, Texture texture) /// public RenderData renderData => GetRenderData(mode); /// - /// Get the render data of a specific mode + /// Get the render data of a specific mode. + /// + /// Note: The HDProbe stores only one RenderData per mode, even for view dependent probes with multiple viewers. + /// In that case, make sure that you have set the RenderData relative to the expected viewer before rendering. + /// Otherwise the data retrieved by this function will be wrong. /// /// The mode to query /// The requested render data @@ -264,7 +268,10 @@ public RenderData GetRenderData(ProbeSettings.Mode targetMode) } } /// - /// Set the render data for a specific mode + /// Set the render data for a specific mode. + /// + /// Note: The HDProbe stores only one RenderData per mode, even for view dependent probes with multiple viewers. + /// In that case, make sure that you have set the RenderData relative to the expected viewer before rendering. /// /// The mode to update /// The data to set 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 78298e02afe..ab4468b6cad 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1149,6 +1149,7 @@ public struct Target // Indices of render request to render before this one public List dependsOnRenderRequestIndices; public CameraSettings cameraSettings; + public List<(HDProbe.RenderData, HDProbe)> viewDependentProbesData; } struct HDCullingResults { @@ -1368,7 +1369,8 @@ protected override void Render(ScriptableRenderContext renderContext, Camera[] c }, dependsOnRenderRequestIndices = ListPool.Get(), index = renderRequests.Count, - cameraSettings = CameraSettings.From(hdCamera) + cameraSettings = CameraSettings.From(hdCamera), + viewDependentProbesData = ListPool<(HDProbe.RenderData, HDProbe)>.Get() // TODO: store DecalCullResult }; renderRequests.Add(request); @@ -1452,6 +1454,8 @@ float ComputeVisibility(int visibleInIndex, HDProbe visibleProbe) parentCamera = visibleInRenderRequest.hdCamera.camera; + var renderDatas = ListPool.Get(); + AddHDProbeRenderRequests( visibleProbe, viewerTransform, @@ -1459,8 +1463,16 @@ float ComputeVisibility(int visibleInIndex, HDProbe visibleProbe) HDUtils.GetSceneCullingMaskFromCamera(visibleInRenderRequest.hdCamera.camera), parentCamera, visibleInRenderRequest.hdCamera.camera.fieldOfView, - visibleInRenderRequest.hdCamera.camera.aspect + visibleInRenderRequest.hdCamera.camera.aspect, + ref renderDatas ); + + foreach (var renderData in renderDatas) + { + visibleInRenderRequest.viewDependentProbesData.Add((renderData, visibleProbe)); + } + + ListPool.Release(renderDatas); } } else @@ -1475,7 +1487,11 @@ float ComputeVisibility(int visibleInIndex, HDProbe visibleProbe) visibleInOneViewer = true; } if (visibleInOneViewer) - AddHDProbeRenderRequests(visibleProbe, null, visibilities, 0, parentCamera); + { + var renderDatas = ListPool.Get(); + AddHDProbeRenderRequests(visibleProbe, null, visibilities, 0, parentCamera, referenceFieldOfView: 90, referenceAspect: 1, ref renderDatas); + ListPool.Release(renderDatas); + } } } foreach (var pair in renderRequestIndicesWhereTheProbeIsVisible) @@ -1489,8 +1505,9 @@ void AddHDProbeRenderRequests( List<(int index, float weight)> visibilities, ulong overrideSceneCullingMask, Camera parentCamera, - float referenceFieldOfView = 90, - float referenceAspect = 1 + float referenceFieldOfView, + float referenceAspect, + ref List renderDatas ) { var position = ProbeCapturePositionSettings.ComputeFrom( @@ -1589,16 +1606,20 @@ ref _cullingResults if (!visibleProbe.realtimeTexture.IsCreated()) visibleProbe.realtimeTexture.Create(); - visibleProbe.SetRenderData( - ProbeSettings.Mode.Realtime, - new HDProbe.RenderData( + var renderData = new HDProbe.RenderData( camera.worldToCameraMatrix, camera.projectionMatrix, camera.transform.position, camera.transform.rotation, cameraSettings[j].frustum.fieldOfView, cameraSettings[j].frustum.aspect - ) + ); + + renderDatas.Add(renderData); + + visibleProbe.SetRenderData( + ProbeSettings.Mode.Realtime, + renderData ); // TODO: Assign the actual final target to render to. @@ -1615,7 +1636,8 @@ ref _cullingResults clearCameraSettings = true, dependsOnRenderRequestIndices = ListPool.Get(), index = renderRequests.Count, - cameraSettings = cameraSettings[j] + cameraSettings = cameraSettings[j], + viewDependentProbesData = ListPool<(HDProbe.RenderData, HDProbe)>.Get() // TODO: store DecalCullResult }; @@ -1738,6 +1760,15 @@ ref _cullingResults target.id = m_TemporaryTargetForCubemaps; } + // The HDProbe store only one RenderData per probe, however RenderData can be view dependent (e.g. planar probes). + // To avoid that the render data for the wrong view is used, we previously store a copy of the render data + // for each viewer and we are going to set it on the probe right before said viewer is rendered. + foreach (var probeDataPair in renderRequest.viewDependentProbesData) + { + var probe = probeDataPair.Item2; + var probeRenderData = probeDataPair.Item1; + probe.SetRenderData(ProbeSettings.Mode.Realtime, probeRenderData); + } // var aovRequestIndex = 0; foreach (var aovRequest in renderRequest.hdCamera.aovRequests) @@ -1777,6 +1808,7 @@ ref _cullingResults renderRequest.hdCamera.camera.targetTexture = null; ListPool.Release(renderRequest.dependsOnRenderRequestIndices); + ListPool<(HDProbe.RenderData, HDProbe)>.Release(renderRequest.viewDependentProbesData); // Culling results can be shared between render requests: clear only when required if (!skipClearCullingResults.Contains(renderRequest.index)) From 145dcc43c4d3cd48993543abcf2acac83ff80401 Mon Sep 17 00:00:00 2001 From: slunity <37302815+slunity@users.noreply.github.com> Date: Thu, 9 Apr 2020 04:06:53 -0400 Subject: [PATCH 089/200] Axf - Add specaa, add baked ao, fix reflection hierarchy for carpaint. --- .../CHANGELOG.md | 2 + .../Editor/Material/AxF/AxFGUI.cs | 10 +- .../Runtime/Material/AxF/AxF.cs | 14 +- .../Runtime/Material/AxF/AxF.cs.hlsl | 92 +++++--- .../Runtime/Material/AxF/AxF.hlsl | 206 +++++++++++------- .../Runtime/Material/AxF/AxF.shader | 11 + .../Runtime/Material/AxF/AxFData.hlsl | 38 +++- .../Runtime/Material/AxF/AxFProperties.hlsl | 5 + 8 files changed, 260 insertions(+), 118 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b650828b55e..d3d1f5e61d3 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Add XR setting to control camera jitter for temporal effects #6259 - Added an error message in the DrawRenderers custom pass when rendering opaque objects with an HDRP asset in DeferredOnly mode. +- Added support for specular AA from geometric curvature in AxF +- Added support for baked AO (no input for now) in AxF ### Fixed - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/AxF/AxFGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/AxF/AxFGUI.cs index b18aceccd86..51c0ab3c4a5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/AxF/AxFGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/AxF/AxFGUI.cs @@ -26,7 +26,7 @@ class AxFGUI : ShaderGUI { new SurfaceOptionUIBlock(MaterialUIBlock.Expandable.Base, features: SurfaceOptionUIBlock.Features.Unlit | SurfaceOptionUIBlock.Features.ReceiveSSR), new AxfSurfaceInputsUIBlock(MaterialUIBlock.Expandable.Input), - new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Instancing | AdvancedOptionsUIBlock.Features.AddPrecomputedVelocity), + new AdvancedOptionsUIBlock(MaterialUIBlock.Expandable.Advance, AdvancedOptionsUIBlock.Features.Instancing | AdvancedOptionsUIBlock.Features.SpecularOcclusion | AdvancedOptionsUIBlock.Features.AddPrecomputedVelocity), }; public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) @@ -46,7 +46,9 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro ///////////////////////////////////////////////////////////////////////////////////////////////// // AxF material keywords - static string m_AxF_BRDFTypeText = "_AxF_BRDFType"; + const string kAxF_BRDFType = "_AxF_BRDFType"; + const string kEnableGeometricSpecularAA = "_EnableGeometricSpecularAA"; + const string kSpecularOcclusionMode = "_SpecularOcclusionMode"; // match AdvancedOptionsUIBlock.kSpecularOcclusionMode : TODO move both to HDStringConstants. // All Setup Keyword functions must be static. It allow to create script to automatically update the shaders with a script if code change static public void SetupMaterialKeywordsAndPass(Material material) @@ -54,7 +56,7 @@ static public void SetupMaterialKeywordsAndPass(Material material) material.SetupBaseUnlitKeywords(); material.SetupBaseUnlitPass(); - AxfBrdfType BRDFType = (AxfBrdfType)material.GetFloat(m_AxF_BRDFTypeText); + AxfBrdfType BRDFType = (AxfBrdfType)material.GetFloat(kAxF_BRDFType); CoreUtils.SetKeyword(material, "_AXF_BRDF_TYPE_SVBRDF", BRDFType == AxfBrdfType.SVBRDF); CoreUtils.SetKeyword(material, "_AXF_BRDF_TYPE_CAR_PAINT", BRDFType == AxfBrdfType.CAR_PAINT); @@ -65,6 +67,8 @@ static public void SetupMaterialKeywordsAndPass(Material material) CoreUtils.SetKeyword(material, "_DISABLE_DECALS", decalsEnabled == false); bool ssrEnabled = material.HasProperty(kEnableSSR) && material.GetFloat(kEnableSSR) > 0.0f; CoreUtils.SetKeyword(material, "_DISABLE_SSR", ssrEnabled == false); + CoreUtils.SetKeyword(material, "_ENABLE_GEOMETRIC_SPECULAR_AA", material.HasProperty(kEnableGeometricSpecularAA) && material.GetFloat(kEnableGeometricSpecularAA) > 0.0f); + CoreUtils.SetKeyword(material, "_SPECULAR_OCCLUSION_NONE", material.HasProperty(kSpecularOcclusionMode) && material.GetFloat(kSpecularOcclusionMode) == 0.0f); BaseLitGUI.SetupStencil(material, receivesSSR: ssrEnabled, useSplitLighting: false); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs index b0fc37dadc1..2d161eea64e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs @@ -44,6 +44,13 @@ public enum FeatureFlags [GenerateHLSL(PackingRules.Exact, false, false, true, 1200)] public struct SurfaceData { + [MaterialSharedPropertyMapping(MaterialSharedProperty.AmbientOcclusion)] + [SurfaceDataAttributes("Ambient Occlusion")] + public float ambientOcclusion; + + [SurfaceDataAttributes("Specular Occlusion")] + public float specularOcclusion; + [MaterialSharedPropertyMapping(MaterialSharedProperty.Normal)] [SurfaceDataAttributes(new string[] {"Normal", "Normal View Space"}, true)] public Vector3 normalWS; @@ -64,7 +71,7 @@ public struct SurfaceData public Vector3 fresnelF0; [SurfaceDataAttributes("Specular Lobe")] - public Vector2 specularLobe; + public Vector3 specularLobe; // .xy for SVBRDF, .xyz for CARPAINT2, for _CarPaint2_CTSpreads per lobe roughnesses [SurfaceDataAttributes("Height")] public float height_mm; @@ -102,6 +109,9 @@ public struct SurfaceData [GenerateHLSL(PackingRules.Exact, false, false, true, 1250)] public struct BSDFData { + public float ambientOcclusion; + public float specularOcclusion; + [SurfaceDataAttributes(new string[] { "Normal WS", "Normal View Space" }, true)] public Vector3 normalWS; [SurfaceDataAttributes("", true)] @@ -113,7 +123,7 @@ public struct BSDFData public Vector3 diffuseColor; public Vector3 specularColor; public Vector3 fresnelF0; - public Vector2 roughness; + public Vector3 roughness; // .xy for SVBRDF, .xyz for CARPAINT2, for _CarPaint2_CTSpreads per lobe roughnesses public float height_mm; // Car Paint Variables diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs.hlsl index 12b8d46ab0b..7362aefc55d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.cs.hlsl @@ -18,53 +18,59 @@ // // UnityEngine.Rendering.HighDefinition.AxF+SurfaceData: static fields // -#define DEBUGVIEW_AXF_SURFACEDATA_NORMAL (1200) -#define DEBUGVIEW_AXF_SURFACEDATA_NORMAL_VIEW_SPACE (1201) -#define DEBUGVIEW_AXF_SURFACEDATA_TANGENT (1202) -#define DEBUGVIEW_AXF_SURFACEDATA_DIFFUSE_COLOR (1203) -#define DEBUGVIEW_AXF_SURFACEDATA_SPECULAR_COLOR (1204) -#define DEBUGVIEW_AXF_SURFACEDATA_FRESNEL_F0 (1205) -#define DEBUGVIEW_AXF_SURFACEDATA_SPECULAR_LOBE (1206) -#define DEBUGVIEW_AXF_SURFACEDATA_HEIGHT (1207) -#define DEBUGVIEW_AXF_SURFACEDATA_ANISOTROPIC_ANGLE (1208) -#define DEBUGVIEW_AXF_SURFACEDATA_FLAKES_UV (1209) -#define DEBUGVIEW_AXF_SURFACEDATA_FLAKES_MIP (1210) -#define DEBUGVIEW_AXF_SURFACEDATA_CLEARCOAT_COLOR (1211) -#define DEBUGVIEW_AXF_SURFACEDATA_CLEARCOAT_NORMAL (1212) -#define DEBUGVIEW_AXF_SURFACEDATA_CLEARCOAT_IOR (1213) -#define DEBUGVIEW_AXF_SURFACEDATA_GEOMETRIC_NORMAL (1214) -#define DEBUGVIEW_AXF_SURFACEDATA_GEOMETRIC_NORMAL_VIEW_SPACE (1215) +#define DEBUGVIEW_AXF_SURFACEDATA_AMBIENT_OCCLUSION (1200) +#define DEBUGVIEW_AXF_SURFACEDATA_SPECULAR_OCCLUSION (1201) +#define DEBUGVIEW_AXF_SURFACEDATA_NORMAL (1202) +#define DEBUGVIEW_AXF_SURFACEDATA_NORMAL_VIEW_SPACE (1203) +#define DEBUGVIEW_AXF_SURFACEDATA_TANGENT (1204) +#define DEBUGVIEW_AXF_SURFACEDATA_DIFFUSE_COLOR (1205) +#define DEBUGVIEW_AXF_SURFACEDATA_SPECULAR_COLOR (1206) +#define DEBUGVIEW_AXF_SURFACEDATA_FRESNEL_F0 (1207) +#define DEBUGVIEW_AXF_SURFACEDATA_SPECULAR_LOBE (1208) +#define DEBUGVIEW_AXF_SURFACEDATA_HEIGHT (1209) +#define DEBUGVIEW_AXF_SURFACEDATA_ANISOTROPIC_ANGLE (1210) +#define DEBUGVIEW_AXF_SURFACEDATA_FLAKES_UV (1211) +#define DEBUGVIEW_AXF_SURFACEDATA_FLAKES_MIP (1212) +#define DEBUGVIEW_AXF_SURFACEDATA_CLEARCOAT_COLOR (1213) +#define DEBUGVIEW_AXF_SURFACEDATA_CLEARCOAT_NORMAL (1214) +#define DEBUGVIEW_AXF_SURFACEDATA_CLEARCOAT_IOR (1215) +#define DEBUGVIEW_AXF_SURFACEDATA_GEOMETRIC_NORMAL (1216) +#define DEBUGVIEW_AXF_SURFACEDATA_GEOMETRIC_NORMAL_VIEW_SPACE (1217) // // UnityEngine.Rendering.HighDefinition.AxF+BSDFData: static fields // -#define DEBUGVIEW_AXF_BSDFDATA_NORMAL_WS (1250) -#define DEBUGVIEW_AXF_BSDFDATA_NORMAL_VIEW_SPACE (1251) -#define DEBUGVIEW_AXF_BSDFDATA_TANGENT_WS (1252) -#define DEBUGVIEW_AXF_BSDFDATA_BI_TANGENT_WS (1253) -#define DEBUGVIEW_AXF_BSDFDATA_DIFFUSE_COLOR (1254) -#define DEBUGVIEW_AXF_BSDFDATA_SPECULAR_COLOR (1255) -#define DEBUGVIEW_AXF_BSDFDATA_FRESNEL_F0 (1256) -#define DEBUGVIEW_AXF_BSDFDATA_ROUGHNESS (1257) -#define DEBUGVIEW_AXF_BSDFDATA_HEIGHT_MM (1258) -#define DEBUGVIEW_AXF_BSDFDATA_FLAKES_UV (1259) -#define DEBUGVIEW_AXF_BSDFDATA_FLAKES_MIP (1260) -#define DEBUGVIEW_AXF_BSDFDATA_CLEARCOAT_COLOR (1261) -#define DEBUGVIEW_AXF_BSDFDATA_CLEARCOAT_NORMAL_WS (1262) -#define DEBUGVIEW_AXF_BSDFDATA_CLEARCOAT_IOR (1263) -#define DEBUGVIEW_AXF_BSDFDATA_GEOMETRIC_NORMAL (1264) -#define DEBUGVIEW_AXF_BSDFDATA_GEOMETRIC_NORMAL_VIEW_SPACE (1265) +#define DEBUGVIEW_AXF_BSDFDATA_AMBIENT_OCCLUSION (1250) +#define DEBUGVIEW_AXF_BSDFDATA_SPECULAR_OCCLUSION (1251) +#define DEBUGVIEW_AXF_BSDFDATA_NORMAL_WS (1252) +#define DEBUGVIEW_AXF_BSDFDATA_NORMAL_VIEW_SPACE (1253) +#define DEBUGVIEW_AXF_BSDFDATA_TANGENT_WS (1254) +#define DEBUGVIEW_AXF_BSDFDATA_BI_TANGENT_WS (1255) +#define DEBUGVIEW_AXF_BSDFDATA_DIFFUSE_COLOR (1256) +#define DEBUGVIEW_AXF_BSDFDATA_SPECULAR_COLOR (1257) +#define DEBUGVIEW_AXF_BSDFDATA_FRESNEL_F0 (1258) +#define DEBUGVIEW_AXF_BSDFDATA_ROUGHNESS (1259) +#define DEBUGVIEW_AXF_BSDFDATA_HEIGHT_MM (1260) +#define DEBUGVIEW_AXF_BSDFDATA_FLAKES_UV (1261) +#define DEBUGVIEW_AXF_BSDFDATA_FLAKES_MIP (1262) +#define DEBUGVIEW_AXF_BSDFDATA_CLEARCOAT_COLOR (1263) +#define DEBUGVIEW_AXF_BSDFDATA_CLEARCOAT_NORMAL_WS (1264) +#define DEBUGVIEW_AXF_BSDFDATA_CLEARCOAT_IOR (1265) +#define DEBUGVIEW_AXF_BSDFDATA_GEOMETRIC_NORMAL (1266) +#define DEBUGVIEW_AXF_BSDFDATA_GEOMETRIC_NORMAL_VIEW_SPACE (1267) // Generated from UnityEngine.Rendering.HighDefinition.AxF+SurfaceData // PackingRules = Exact struct SurfaceData { + float ambientOcclusion; + float specularOcclusion; float3 normalWS; float3 tangentWS; float3 diffuseColor; float3 specularColor; float3 fresnelF0; - float2 specularLobe; + float3 specularLobe; float height_mm; float anisotropyAngle; float2 flakesUV; @@ -79,13 +85,15 @@ struct SurfaceData // PackingRules = Exact struct BSDFData { + float ambientOcclusion; + float specularOcclusion; float3 normalWS; float3 tangentWS; float3 biTangentWS; float3 diffuseColor; float3 specularColor; float3 fresnelF0; - float2 roughness; + float3 roughness; float height_mm; float2 flakesUV; float flakesMipLevel; @@ -102,6 +110,12 @@ void GetGeneratedSurfaceDataDebug(uint paramId, SurfaceData surfacedata, inout f { switch (paramId) { + case DEBUGVIEW_AXF_SURFACEDATA_AMBIENT_OCCLUSION: + result = surfacedata.ambientOcclusion.xxx; + break; + case DEBUGVIEW_AXF_SURFACEDATA_SPECULAR_OCCLUSION: + result = surfacedata.specularOcclusion.xxx; + break; case DEBUGVIEW_AXF_SURFACEDATA_NORMAL: result = surfacedata.normalWS * 0.5 + 0.5; break; @@ -123,7 +137,7 @@ void GetGeneratedSurfaceDataDebug(uint paramId, SurfaceData surfacedata, inout f result = surfacedata.fresnelF0; break; case DEBUGVIEW_AXF_SURFACEDATA_SPECULAR_LOBE: - result = float3(surfacedata.specularLobe, 0.0); + result = surfacedata.specularLobe; break; case DEBUGVIEW_AXF_SURFACEDATA_HEIGHT: result = surfacedata.height_mm.xxx; @@ -162,6 +176,12 @@ void GetGeneratedBSDFDataDebug(uint paramId, BSDFData bsdfdata, inout float3 res { switch (paramId) { + case DEBUGVIEW_AXF_BSDFDATA_AMBIENT_OCCLUSION: + result = bsdfdata.ambientOcclusion.xxx; + break; + case DEBUGVIEW_AXF_BSDFDATA_SPECULAR_OCCLUSION: + result = bsdfdata.specularOcclusion.xxx; + break; case DEBUGVIEW_AXF_BSDFDATA_NORMAL_WS: result = bsdfdata.normalWS * 0.5 + 0.5; break; @@ -184,7 +204,7 @@ void GetGeneratedBSDFDataDebug(uint paramId, BSDFData bsdfdata, inout float3 res result = bsdfdata.fresnelF0; break; case DEBUGVIEW_AXF_BSDFDATA_ROUGHNESS: - result = float3(bsdfdata.roughness, 0.0); + result = bsdfdata.roughness; break; case DEBUGVIEW_AXF_BSDFDATA_HEIGHT_MM: result = bsdfdata.height_mm.xxx; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.hlsl index 7709d6c8176..96dd992632d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.hlsl @@ -375,6 +375,31 @@ float GetScalarRoughnessFromAnisoRoughness(float roughnessT, float roughnessB) return 0.5 * (roughnessT + roughnessB); } +float GetScalarRoughness(float3 roughness) +{ + float singleRoughness = 0.5; + +#if defined(_AXF_BRDF_TYPE_SVBRDF) + + singleRoughness = (HasAnisotropy()) ? GetScalarRoughnessFromAnisoRoughness(roughness.x, roughness.y) : roughness.x; + +#elif defined(_AXF_BRDF_TYPE_CAR_PAINT) + float sumCoeffXRoughness = 0.0; + float sumCoeff = 0.0; + UNITY_UNROLL + for (uint lobeIndex = 0; lobeIndex < CARPAINT2_LOBE_COUNT; lobeIndex++) // TODO remove all variable lobecnt code + { + float coeff = _CarPaint2_CTCoeffs[lobeIndex]; + float spread = roughness[lobeIndex]; + sumCoeff += coeff; + sumCoeffXRoughness += spread * coeff; + } + singleRoughness = min(1.0, SafeDiv(sumCoeffXRoughness,sumCoeff)); +#endif + + return singleRoughness; +} + NormalData ConvertSurfaceDataToNormalData(SurfaceData surfaceData) { NormalData normalData; @@ -389,31 +414,9 @@ NormalData ConvertSurfaceDataToNormalData(SurfaceData surfaceData) { normalData.normalWS = surfaceData.normalWS; -#if defined(_AXF_BRDF_TYPE_SVBRDF) - float roughness = (HasAnisotropy()) ? GetScalarRoughnessFromAnisoRoughness(surfaceData.specularLobe.x, surfaceData.specularLobe.y) : surfaceData.specularLobe.x; - normalData.perceptualRoughness = RoughnessToPerceptualRoughness(roughness); - -#elif defined(_AXF_BRDF_TYPE_CAR_PAINT) // Hack: try to get a "single equivalent" roughness - normalData.perceptualRoughness = 0.0; - - float sumCoeffXRoughness = 0.0; - float sumCoeff = 0.0; - - UNITY_UNROLL - for (uint lobeIndex = 0; lobeIndex < CARPAINT2_LOBE_COUNT; lobeIndex++) - { - float coeff = _CarPaint2_CTCoeffs[lobeIndex]; - float spread = _CarPaint2_CTSpreads[lobeIndex]; - - sumCoeff += coeff; - sumCoeffXRoughness += spread * coeff; - } - normalData.perceptualRoughness = RoughnessToPerceptualRoughness(min(1.0, SafeDiv(sumCoeffXRoughness,sumCoeff))); -#else - // This is only possible if the AxF is a BTF type. However, there is a bunch of ifdefs do not support this third case - normalData.perceptualRoughness = 0.0; -#endif + float roughness = GetScalarRoughness(surfaceData.specularLobe); + normalData.perceptualRoughness = RoughnessToPerceptualRoughness(roughness); } return normalData; @@ -487,6 +490,7 @@ float3 RefractSaturateToTIR(float3 incoming, float3 normal, float eta, out floa float sinThetaCrit = saturate(rcp(eta)); float cosThetaCrit = sqrt(1 - Sq(sinThetaCrit)); float3 incOrthoN = (incoming - c * normal) * /*normalize the ortho component:*/rcp(sqrt(sinIncSq)); + // Note: sqrt(sinIncSq) shouldn't be close to 0, since b < 0 <=> (sinIncSq) > 1/Sq(eta) and eta shouldn't be close to 1/sqrt(eps)! criticalDir = sinThetaCrit * incOrthoN + cosThetaCrit * normal; @@ -543,7 +547,7 @@ float CT_F(float H_V, float F0) return F0 + (1.0 - F0) * f_1_sub_cos_fifth; } -float MultiLobesCookTorrance(float NdotL, float NdotV, float NdotH, float VdotH) +float MultiLobesCookTorrance(BSDFData bsdfData, float NdotL, float NdotV, float NdotH, float VdotH) { // Ensure numerical stability if (NdotV < 0.00174532836589830883577820272085 || NdotL < 0.00174532836589830883577820272085) //sin(0.1 deg ) @@ -554,7 +558,7 @@ float MultiLobesCookTorrance(float NdotL, float NdotV, float NdotH, float VdotH { float F0 = _CarPaint2_CTF0s[lobeIndex]; float coeff = _CarPaint2_CTCoeffs[lobeIndex]; - float spread = _CarPaint2_CTSpreads[lobeIndex]; + float spread = bsdfData.roughness[lobeIndex]; // _CarPaint2_CTSpreads[lobeIndex]; specularIntensity += coeff * CT_D(NdotH, spread) * CT_F(VdotH, F0); } @@ -684,10 +688,14 @@ BSDFData ConvertSurfaceDataToBSDFData(uint2 positionSS, SurfaceData surfaceData) BSDFData bsdfData; // ZERO_INITIALIZE(BSDFData, data); + bsdfData.ambientOcclusion = surfaceData.ambientOcclusion; + bsdfData.specularOcclusion = surfaceData.specularOcclusion; + bsdfData.normalWS = surfaceData.normalWS; bsdfData.tangentWS = surfaceData.tangentWS; bsdfData.biTangentWS = cross(bsdfData.normalWS, bsdfData.tangentWS); + bsdfData.roughness = 0; //----------------------------------------------------------------------------- #ifdef _AXF_BRDF_TYPE_SVBRDF bsdfData.diffuseColor = surfaceData.diffuseColor; @@ -696,7 +704,7 @@ BSDFData ConvertSurfaceDataToBSDFData(uint2 positionSS, SurfaceData surfaceData) bsdfData.fresnelF0 = surfaceData.fresnelF0; // See AxfData.hlsl: the actual sampled texture is always 1 channel, if we ever find otherwise, we will use the others. bsdfData.height_mm = surfaceData.height_mm; - bsdfData.roughness = HasAnisotropy() ? surfaceData.specularLobe : surfaceData.specularLobe.xx; + bsdfData.roughness.xy = HasAnisotropy() ? surfaceData.specularLobe.xy : surfaceData.specularLobe.xx; bsdfData.clearcoatColor = surfaceData.clearcoatColor; bsdfData.clearcoatNormalWS = HasClearcoat() ? surfaceData.clearcoatNormalWS : surfaceData.normalWS; @@ -717,7 +725,7 @@ BSDFData ConvertSurfaceDataToBSDFData(uint2 positionSS, SurfaceData surfaceData) bsdfData.specularColor = GetCarPaintSpecularColor(); bsdfData.fresnelF0 = GetCarPaintFresnelF0(); - bsdfData.roughness = 0; + bsdfData.roughness.xyz = surfaceData.specularLobe.xyz; // the later stores per lobe possibly modified (for geometric specular AA) _CarPaint2_CTSpreads bsdfData.height_mm = 0; #endif @@ -744,8 +752,8 @@ struct PreLightData float3 viewWS_UnderCoat; // View vector after optional clear-coat refraction. // IBL - float3 iblDominantDirectionWS_UnderCoat; // Dominant specular direction, used for IBL in EvaluateBSDF_Env() - float3 iblDominantDirectionWS_Clearcoat; // Dominant specular direction, used for IBL in EvaluateBSDF_Env() and also in area lights when clearcoat is enabled + float3 iblDominantDirectionWS_BottomLobeOnTop; // Dominant specular direction, for bottom lobe but as it exit on top, used for IBL in EvaluateBSDF_Env() + float3 iblDominantDirectionWS_Clearcoat; // Dominant specular direction, used for IBL in EvaluateBSDF_Env() and also in area lights when clearcoat is enabled #ifdef _AXF_BRDF_TYPE_SVBRDF float iblPerceptualRoughness; float3 specularFGD; @@ -983,7 +991,7 @@ float3 CarPaint_BTF(float thetaH, float thetaD, BSDFData bsdfData) } #endif //...#if defined(_AXF_BRDF_TYPE_CAR_PAINT) -float3 FindAverageBaseLobeDirOnTop(BSDFData bsdfData, PreLightData preLightData) +float3 FindAverageBaseLobeDirOnTop(BSDFData bsdfData, PreLightData preLightData, out float3 lobeDirUndercoat) { float3 outDir; @@ -1010,7 +1018,8 @@ float3 FindAverageBaseLobeDirOnTop(BSDFData bsdfData, PreLightData preLightData) float3 incomingSaturated; float rayIntensity; outDir = RefractSaturateToTIR(-vRefractedBottomReflected, -bsdfData.clearcoatNormalWS, bsdfData.clearcoatIOR, rayIntensity, incomingSaturated); -#endif + lobeDirUndercoat = -incomingSaturated; // incoming is away from the top interface from under the surface so *-1 to reverse quadrant. +#endif return outDir; } @@ -1045,13 +1054,19 @@ PreLightData GetPreLightData(float3 viewWS_Clearcoat, PositionInputs posInput // Handle IBL + multiscattering // todo_dir: // todo_dir todo_modes todo_pseudorefract: cant use undercoat like that, but better than to lose the bottom normal effect for now... - preLightData.iblDominantDirectionWS_UnderCoat = reflect(-preLightData.viewWS_UnderCoat, bsdfData.normalWS); + float3 reflectedLobeDirUndercoat = reflect(-preLightData.viewWS_UnderCoat, bsdfData.normalWS); + preLightData.iblDominantDirectionWS_BottomLobeOnTop = reflectedLobeDirUndercoat; if (HasClearcoatAndRefraction()) { - preLightData.iblDominantDirectionWS_UnderCoat = FindAverageBaseLobeDirOnTop(bsdfData, preLightData); // much better + preLightData.iblDominantDirectionWS_BottomLobeOnTop = FindAverageBaseLobeDirOnTop(bsdfData, preLightData, reflectedLobeDirUndercoat); // much better + // reflectedLobeDirUndercoat is now adjusted to correspond to the refracted-back on top direction returned by FindAverageBaseLobeDirOnTop() + + //sanity check: If both normals are equal, then this shouldn't change the output: + //preLightData.iblDominantDirectionWS_BottomLobeOnTop = reflect(-viewWS_Clearcoat, bsdfData.clearcoatNormalWS); + //reflectedLobeDirUndercoat = reflect(-preLightData.viewWS_UnderCoat, bsdfData.normalWS); } preLightData.iblDominantDirectionWS_Clearcoat = reflect(-viewWS_Clearcoat, bsdfData.clearcoatNormalWS); - //preLightData.iblDominantDirectionWS_UnderCoat = preLightData.iblDominantDirectionWS_Clearcoat; + //preLightData.iblDominantDirectionWS_BottomLobeOnTop = preLightData.iblDominantDirectionWS_Clearcoat; #ifdef _AXF_BRDF_TYPE_SVBRDF // @TODO => Anisotropic IBL? @@ -1103,11 +1118,32 @@ PreLightData GetPreLightData(float3 viewWS_Clearcoat, PositionInputs posInput preLightData.specularCTFGDReflectivity = 0; preLightData.ltcTransformSpecularCT = (float3x3[MAX_CT_LOBE_COUNT])0; - // TODO_diffuseFGDColor: better one, averaged maybe... + // TODO_diffuseFGDColor: better one, averaged maybe: ie depending on roughness also preLightData.singleBRDFColor = 1.0; float thetaH = 0; //acos(clamp(NdotH, 0, 1)); float thetaD = acos(clamp(preLightData.NdotV_UnderCoat, 0, 1)); - + // The above is the same as + //float3 lightDir = reflect(-preLightData.viewWS_UnderCoat, bsdfData.normalWS); + //float3 H = normalize(preLightData.viewWS_UnderCoat + lightDir); + //float NdotH = dot(bsdfData.normalWS, H); + //float LdotH = dot(H, lightDir); + //thetaH = acos(clamp(NdotH, 0, 1)); + //thetaD = acos(clamp(LdotH, 0, 1)); + + // Also, could use reflectedLobeDirUndercoat here (and see TODO_diffuseFGDColor: if we make it depends on roughness, one per lobe) + // This is relevant only if both normals aren't the same obviously. + // In the case of CARPAINT, this means a clearcoat normal map. + // (ie orange peel) + if (false) + { + float3 H = normalize(preLightData.viewWS_UnderCoat + reflectedLobeDirUndercoat); + float NdotH = dot(bsdfData.normalWS, H); + + float LdotH = dot(H, reflectedLobeDirUndercoat); + thetaH = acos(clamp(NdotH, 0, 1)); + thetaD = acos(clamp(LdotH, 0, 1)); + } + preLightData.singleBRDFColor *= GetBRDFColor(thetaH, thetaD); preLightData.singleFlakesComponent = CarPaint_BTF(thetaH, thetaD, bsdfData); @@ -1116,7 +1152,7 @@ PreLightData GetPreLightData(float3 viewWS_Clearcoat, PositionInputs posInput { float F0 = _CarPaint2_CTF0s[lobeIndex]; float coeff = _CarPaint2_CTCoeffs[lobeIndex]; - float spread = _CarPaint2_CTSpreads[lobeIndex]; + float spread = bsdfData.roughness[lobeIndex]; // _CarPaint2_CTSpreads[lobeIndex]; #if !USE_COOK_TORRANCE_MULTI_LOBES // Computes weighted average of roughness values sumCoeff += coeff; @@ -1161,8 +1197,9 @@ PreLightData GetPreLightData(float3 viewWS_Clearcoat, PositionInputs posInput float oneOverLobeCnt = rcp(CARPAINT2_LOBE_COUNT); preLightData.iblPerceptualRoughness = RoughnessToPerceptualRoughness(sumRoughness * oneOverLobeCnt); tempF0 = sumF0 * oneOverLobeCnt; - // todo_BeckmannToGGX + // todo_BeckmannToGGX GetPreIntegratedFGDCookTorranceAndLambert(NdotV_UnderCoat, preLightData.iblPerceptualRoughness, tempF0 * preLightData.singleBRDFColor, specularFGD, diffuseFGD, reflectivity); + preLightData.iblPerceptualRoughness = PerceptualRoughnessBeckmannToGGX(preLightData.iblPerceptualRoughness); specularFGD *= GetPreIntegratedFGDCookTorranceSampleMutiplier(); preLightData.specularCTFGDSingleLobe = specularFGD * sumCoeff; #endif @@ -1419,7 +1456,7 @@ float3 ComputeWard(float3 H, float LdotH, float NdotL, float NdotV, PreLightData float F = 1.0; switch (_SVBRDF_BRDFVariants & 3) { - case 1: F_FresnelDieletricSafe(Fresnel0ToIorSafe(bsdfData.fresnelF0.r), LdotH); break; + case 1: F = F_FresnelDieletricSafe(Fresnel0ToIorSafe(bsdfData.fresnelF0.r), LdotH); break; case 2: F = F_Schlick(bsdfData.fresnelF0.r, LdotH); break; } @@ -1427,8 +1464,8 @@ float3 ComputeWard(float3 H, float LdotH, float NdotL, float NdotV, PreLightData float3 tsH = float3(dot(H, bsdfData.tangentWS), dot(H, bsdfData.biTangentWS), dot(H, bsdfData.normalWS)); //float2 rotH = tsH.xy / tsH.z; float2 rotH = tsH.xy / max(0.00001, tsH.z); - //float2 roughness = bsdfData.roughness; - float2 roughness = max(0.0001, bsdfData.roughness); + //float2 roughness = bsdfData.roughness.xy; + float2 roughness = max(0.0001, bsdfData.roughness.xy); //if (bsdfData.roughness.y == 0.0) bsdfData.specularColor = float3(1,0,0); if (roughness.x * roughness.y <= 0.0001 && tsH.z < 1.0) @@ -1452,7 +1489,7 @@ float3 ComputeWard(float3 H, float LdotH, float NdotL, float NdotV, PreLightData float3 ComputeBlinnPhong(float3 H, float LdotH, float NdotL, float NdotV, PreLightData preLightData, BSDFData bsdfData) { - float2 exponents = exp2(bsdfData.roughness); + float2 exponents = exp2(bsdfData.roughness.xy); // Evaluate normal distribution function float3 tsH = float3(dot(H, bsdfData.tangentWS), dot(H, bsdfData.biTangentWS), dot(H, bsdfData.normalWS)); @@ -1623,6 +1660,7 @@ CBSDF EvaluateBSDF(float3 viewWS_Clearcoat, float3 lightWS_Clearcoat, PreLightDa float3 GetCarPaintSpecularFGDForLobe(PreLightData preLightData, uint lobeIndex) { return lerp(preLightData.specularCTFGDAtZeroF0[lobeIndex], preLightData.specularCTFGDReflectivity[lobeIndex], _CarPaint2_CTF0s[lobeIndex]*preLightData.singleBRDFColor); + //return lerp(preLightData.specularCTFGDAtZeroF0[lobeIndex], preLightData.specularCTFGDReflectivity[lobeIndex], _CarPaint2_CTF0s[lobeIndex])*preLightData.singleBRDFColor; } @@ -1689,7 +1727,7 @@ CBSDF EvaluateBSDF(float3 viewWS_Clearcoat, float3 lightWS_Clearcoat, PreLightDa float3 diffuseTerm = Lambert(); // Apply multi-lobes Cook-Torrance - float3 specularTerm = MultiLobesCookTorrance(NdotL, NdotV, NdotH, VdotH); + float3 specularTerm = MultiLobesCookTorrance(bsdfData, NdotL, NdotV, NdotH, VdotH); // Apply BRDF color float3 BRDFColor = GetBRDFColor(thetaH, thetaD); @@ -1963,7 +2001,7 @@ DirectLighting EvaluateBSDF_Line( LightLoopContext lightLoopContext, // We project the point onto the area light's plane using the reflected view direction and recompute the light direction from this position // todo_dir: #if 0 - float3 bestLightWS_Specular = ComputeBestLightDirection_Line(lightPositionRWS, preLightData.iblDominantDirectionWS_UnderCoat, lightData); + float3 bestLightWS_Specular = ComputeBestLightDirection_Line(lightPositionRWS, preLightData.iblDominantDirectionWS_BottomLobeOnTop, lightData); // todo_dir todo_pseudorefract // refract light dir here for GetBRDFColor since it is a fresnel-like effect, but @@ -2182,7 +2220,7 @@ DirectLighting EvaluateBSDF_Rect(LightLoopContext lightLoopContext, // We project the point onto the area light's plane using the reflected view direction and recompute the light direction from this position // TODO_dir: #if 0 - float3 bestLightWS_Specular = ComputeBestLightDirection_Rectangle(lightPositionRWS, preLightData.iblDominantDirectionWS_UnderCoat, lightData); + float3 bestLightWS_Specular = ComputeBestLightDirection_Rectangle(lightPositionRWS, preLightData.iblDominantDirectionWS_BottomLobeOnTop, lightData); // TODO_dir: refract light dir for GetBRDFColor here since it is a fresnel-like effect, but // compute LTC / env fetching using *non refracted dir* @@ -2402,24 +2440,43 @@ IndirectLighting EvaluateBSDF_Env( LightLoopContext lightLoopContext, float weight = 1.0; // TODO_dir: this shouldn't be undercoat. - float3 environmentSamplingDirectionWS_UnderCoat = preLightData.iblDominantDirectionWS_UnderCoat; + float3 envSamplingDirForBottomLayer = preLightData.iblDominantDirectionWS_BottomLobeOnTop; #if defined(_AXF_BRDF_TYPE_SVBRDF) float3 envLighting = 0.0; float NdotV = ClampNdotV(preLightData.NdotV_UnderCoat); - - environmentSamplingDirectionWS_UnderCoat = GetModifiedEnvSamplingDir(lightData, bsdfData.normalWS, preLightData.iblDominantDirectionWS_UnderCoat, preLightData.iblPerceptualRoughness, NdotV); - - // Note: using _influenceShapeType and projectionShapeType instead of (lightData|proxyData).shapeType allow to make compiler optimization in case the type is know (like for sky) - EvaluateLight_EnvIntersection(positionWS, bsdfData.normalWS, lightData, _influenceShapeType, environmentSamplingDirectionWS_UnderCoat, weight); + // Here we use bsdfData.clearcoatNormalWS: if there's no coat, bsdfData.clearcoatNormalWS == bsdfData.normalWS anyway. + // The reason is that, normally, since GetModifiedEnvSamplingDir (off-specular effect) is roughness dependent, + // we would have to store another direction (lightData is only used to escape the modification in case of planar probe) + // and in case of carpaint, one for each lobe. However, if we would like to "correctly" take into account the effect, we would have + // to calculate the effect on the bottom layer where directions are different, and then use FindAverageBaseLobeDirOnTop(). + // We decide to just apply the effect on top instead. + // (FindAverageBaseLobeDirOnTop is alreayd an approximation ignoring under-horizon or TIR. If we saturated to the critical angle undercoat + // and thus grazing when exiting on top, a tilt back for off-specular effect might in fact have no effect since the lobe could still + // be under horizon. On the other hand, if we didn't have to saturate, a little tilt-back toward normal (from GetModifiedEnvSamplingDir) + // should have translated into a bigger one on top because of angle range decompression.) + envSamplingDirForBottomLayer = GetModifiedEnvSamplingDir(lightData, bsdfData.clearcoatNormalWS, preLightData.iblDominantDirectionWS_BottomLobeOnTop, preLightData.iblPerceptualRoughness, NdotV); + + // Note: using _influenceShapeType and projectionShapeType instead of (lightData|proxyData).shapeType allow to make compiler optimization in case the type is know (like for sky) + EvaluateLight_EnvIntersection(positionWS, bsdfData.clearcoatNormalWS, lightData, _influenceShapeType, envSamplingDirForBottomLayer, weight); + // ...here the normal is only used for normal fading mode of the influence volume. + + // Another problem with having even two fetch directions is the reflection hierarchy that only supports one weight. + // (TODO: We could have a vector tracking multiplied weights already applied per lobe that we update and that is + // passed back by the light loop but otherwise opaque to it, with the single hierarchyWeight tracked alongside. + // That way no "overlighting" would be done and by returning the hierarchyWeight = min(all weights) up to now, + // we could potentially avoid artifacts in having eg the clearcoat reflection not available from one influence volume + // while the base has full weight reflection. This ends up always preventing a blend for the coat reflection when the + // bottom reflection is full. Lit doesn't have this problem too much in practice since only GetModifiedEnvSamplingDir + // changes the direction vs the coat.) float IBLMipLevel; IBLMipLevel = GetEnvMipLevel(lightData, preLightData.iblPerceptualRoughness); // Sample the pre-integrated environment lighting - float4 preLD = SampleEnv(lightLoopContext, lightData.envIndex, environmentSamplingDirectionWS_UnderCoat, IBLMipLevel, lightData.rangeCompressionFactorCompensation); + float4 preLD = SampleEnv(lightLoopContext, lightData.envIndex, envSamplingDirForBottomLayer, IBLMipLevel, lightData.rangeCompressionFactorCompensation); weight *= preLD.w; // Used by planar reflection to discard pixel envLighting = GetSpecularIndirectDimmer() * preLightData.specularFGD * preLD.xyz; @@ -2429,39 +2486,37 @@ IndirectLighting EvaluateBSDF_Env( LightLoopContext lightLoopContext, float3 envLighting = 0.0; - float NdotV = ClampNdotV(preLightData.NdotV_UnderCoat); - // A part of this BRDF depends on thetaH and thetaD and should thus have entered // the split sum pre-integration. We do a further approximation by pulling those // terms out and evaluating them in the specular dominant direction, - // for BRDFColor and flakes. - float3 viewWS_UnderCoat = preLightData.viewWS_UnderCoat; - float3 lightWS_UnderCoat = environmentSamplingDirectionWS_UnderCoat; + // for BRDFColor and flakes, see GetPreLightData. - float3 H = normalize(viewWS_UnderCoat + lightWS_UnderCoat); - float NdotH = dot(bsdfData.normalWS, H); - float VdotH = dot(viewWS_UnderCoat, H); - - // TODO_dir: so this is just thetaH = 0, etc. CHECK and remove. - float thetaH = acos(clamp(NdotH, 0, 1)); - float thetaD = acos(clamp(VdotH, 0, 1)); + // Note: we don't use GetModifiedEnvSamplingDir() per lobe here, and see comment above about reflection hierarchy. + EvaluateLight_EnvIntersection(positionWS, bsdfData.clearcoatNormalWS, lightData, _influenceShapeType, envSamplingDirForBottomLayer, weight); #if USE_COOK_TORRANCE_MULTI_LOBES // Multi-lobes approach // Each CT lobe samples the environment with the appropriate roughness - float sumWeights = 0.0; + float probeSkipFactor = 1; for (uint lobeIndex = 0; lobeIndex < CARPAINT2_LOBE_COUNT; lobeIndex++) { float coeff = _CarPaint2_CTCoeffs[lobeIndex]; float lobeMipLevel = PerceptualRoughnessToMipmapLevel(preLightData.iblPerceptualRoughness[lobeIndex]); - float4 preLD = SampleEnv(lightLoopContext, lightData.envIndex, lightWS_UnderCoat, lobeMipLevel, lightData.rangeCompressionFactorCompensation); + float4 preLD = SampleEnv(lightLoopContext, lightData.envIndex, envSamplingDirForBottomLayer, lobeMipLevel, lightData.rangeCompressionFactorCompensation); //todotodo: try removing coeff envLighting += coeff * GetCarPaintSpecularFGDForLobe(preLightData, lobeIndex) * preLD.xyz; - sumWeights += preLD.w; + // Note: preLD.w is only used by planar probes, returning 0 if outside captured direction or 1 otherwise (the influence volume weight fades, not this). + // Since this is only used for planar probes, even if we had used GetModifiedEnvSamplingDir() above, all directions would be the same in that case anyway + // since GetModifiedEnvSamplingDir() doesn't do anything for planar probes. + // For that reason, only one preLD.w needs to be used, no need to average them, they should all be the same. + // sumWeights += preLD.w; + probeSkipFactor = preLD.w; } + // See discussion about reflection hierarchy above for SVBRDF, same thing here: When we will evaluate the coat, we will ignore its weight. + weight *= probeSkipFactor; envLighting *= GetSpecularIndirectDimmer(); //now already in rebuilt specularFGD: envLighting *= GetBRDFColor(thetaH, thetaD); @@ -2469,8 +2524,7 @@ IndirectLighting EvaluateBSDF_Env( LightLoopContext lightLoopContext, //TODO_FLAKES float flakesMipLevel = 0; // Flakes are supposed to be perfect mirrors //envLighting += preLightData.flakesFGD * CarPaint_BTF(thetaH, thetaD, bsdfData) * SampleEnv(lightLoopContext, lightData.envIndex, lightWS_UnderCoat, flakesMipLevel, lightData.rangeCompressionFactorCompensation).xyz; - envLighting += preLightData.singleFlakesComponent * SampleEnv(lightLoopContext, lightData.envIndex, lightWS_UnderCoat, flakesMipLevel, lightData.rangeCompressionFactorCompensation).xyz; - weight *= sumWeights / CARPAINT2_LOBE_COUNT; + envLighting += preLightData.singleFlakesComponent * SampleEnv(lightLoopContext, lightData.envIndex, envSamplingDirForBottomLayer, flakesMipLevel, lightData.rangeCompressionFactorCompensation).xyz; #else // USE_COOK_TORRANCE_MULTI_LOBES @@ -2480,10 +2534,10 @@ IndirectLighting EvaluateBSDF_Env( LightLoopContext lightLoopContext, IBLMipLevel = GetEnvMipLevel(lightData, preLightData.iblPerceptualRoughness); // Sample the actual environment lighting - float4 preLD = SampleEnv(lightLoopContext, lightData.envIndex, lightWS_UnderCoat, IBLMipLevel, lightData.rangeCompressionFactorCompensation); + float4 preLD = SampleEnv(lightLoopContext, lightData.envIndex, envSamplingDirForBottomLayer, IBLMipLevel, lightData.rangeCompressionFactorCompensation); float3 envLighting; - envLighting = preLightData.specularCTFGDSingleLobe * GetSpecularIndirectDimmer() * GetBRDFColor(thetaH, thetaD); + envLighting = preLightData.specularCTFGDSingleLobe * GetSpecularIndirectDimmer(); //TODO_FLAKES //envLighting += preLightData.flakesFGD * CarPaint_BTF(thetaH, thetaD, bsdfData); envLighting += preLightData.singleFlakesComponent; @@ -2538,9 +2592,11 @@ void PostEvaluateBSDF( LightLoopContext lightLoopContext, { // There is no AmbientOcclusion from data with AxF, but let's apply our SSAO AmbientOcclusionFactor aoFactor; - GetScreenSpaceAmbientOcclusionMultibounce( posInput.positionSS, preLightData.NdotV_UnderCoat, - RoughnessToPerceptualRoughness(GetScalarRoughnessFromAnisoRoughness(bsdfData.roughness.x, bsdfData.roughness.y)), - 1.0, 1.0, GetColorBaseDiffuse(bsdfData), GetColorBaseFresnelF0(bsdfData), aoFactor); + GetScreenSpaceAmbientOcclusionMultibounce(posInput.positionSS, preLightData.NdotV_UnderCoat, + RoughnessToPerceptualRoughness(GetScalarRoughness(bsdfData.roughness)), + bsdfData.ambientOcclusion, bsdfData.specularOcclusion, + GetColorBaseDiffuse(bsdfData), GetColorBaseFresnelF0(bsdfData), aoFactor); + ApplyAmbientOcclusionFactor(aoFactor, builtinData, lighting); diffuseLighting = bsdfData.diffuseColor * lighting.direct.diffuse + builtinData.bakeDiffuseLighting; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader index 802760a38b9..c125cc62582 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader @@ -63,6 +63,10 @@ Shader "HDRP/AxF" _CarPaint2_CTCoeffs("_CarPaint2_CTCoeffs", Vector) = (1,1,1,1) _CarPaint2_CTSpreads("_CarPaint2_CTSpreads", Vector) = (1,1,1,1) + // GUI inspector only - saves state in material meta, read back from SetupMaterialKeywordsAndPass + //[Enum(Off, 0, From Ambient Occlusion, 1, From Bent Normals, 2)] _SpecularOcclusionMode("Specular Occlusion Mode", Int) = 1 + [Enum(Off, 0, From Ambient Occlusion, 1)] _SpecularOcclusionMode("Specular Occlusion Mode", Int) = 1 + [ToggleUI] _UseShadowThreshold("_UseShadowThreshold", Float) = 0.0 [ToggleUI] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 _AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 @@ -101,6 +105,10 @@ Shader "HDRP/AxF" [Enum(Flip, 0, Mirror, 1, None, 2)] _DoubleSidedNormalMode("Double sided normal mode", Float) = 1 // This is for the editor only, see BaseLitUI.cs: _DoubleSidedConstants will be set based on the mode. [HideInInspector] _DoubleSidedConstants("_DoubleSidedConstants", Vector) = (1, 1, -1, 0) + [ToggleUI] _EnableGeometricSpecularAA("EnableGeometricSpecularAA", Float) = 0.0 + _SpecularAAScreenSpaceVariance("SpecularAAScreenSpaceVariance", Range(0.0, 1.0)) = 0.1 + _SpecularAAThreshold("SpecularAAThreshold", Range(0.0, 1.0)) = 0.2 + // Caution: C# code in BaseLitUI.cs call LightmapEmissionFlagsProperty() which assume that there is an existing "_EmissionColor" // value that exist to identify if the GI emission need to be enabled. // In our case we don't use such a mechanism but need to keep the code quiet. We declare the value and always enable it. @@ -129,11 +137,14 @@ Shader "HDRP/AxF" //------------------------------------------------------------------------------------- #pragma shader_feature_local _AXF_BRDF_TYPE_SVBRDF _AXF_BRDF_TYPE_CAR_PAINT _AXF_BRDF_TYPE_BTF + #pragma shader_feature_local _ _SPECULAR_OCCLUSION_NONE //_SPECULAR_OCCLUSION_FROM_BENT_NORMAL_MAP + #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _DOUBLESIDED_ON #pragma shader_feature_local _DISABLE_DECALS #pragma shader_feature_local _DISABLE_SSR + #pragma shader_feature_local _ENABLE_GEOMETRIC_SPECULAR_AA #pragma shader_feature_local _ADD_PRECOMPUTED_VELOCITY diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl index 2a9e98df610..8e919f6ddfe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl @@ -38,6 +38,9 @@ void ApplyDecalToSurfaceData(DecalSurfaceData decalSurfaceData, inout SurfaceDat surfaceData.specularLobe.x = PerceptualSmoothnessToRoughness(RoughnessToPerceptualSmoothness(surfaceData.specularLobe.x) * decalSurfaceData.mask.w + decalSurfaceData.mask.z); surfaceData.specularLobe.y = PerceptualSmoothnessToRoughness(RoughnessToPerceptualSmoothness(surfaceData.specularLobe.y) * decalSurfaceData.mask.w + decalSurfaceData.mask.z); +#ifdef _AXF_BRDF_TYPE_CAR_PAINT + surfaceData.specularLobe.z = PerceptualSmoothnessToRoughness(RoughnessToPerceptualSmoothness(surfaceData.specularLobe.z) * decalSurfaceData.mask.w + decalSurfaceData.mask.z); +#endif } #endif } @@ -60,11 +63,15 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p float alpha = 1.0; + surfaceData.ambientOcclusion = 1.0; + surfaceData.specularOcclusion = 1.0; + surfaceData.specularLobe = 0; + #ifdef _AXF_BRDF_TYPE_SVBRDF surfaceData.diffuseColor = SAMPLE_TEXTURE2D(_SVBRDF_DiffuseColorMap, sampler_SVBRDF_DiffuseColorMap, UV0).xyz; surfaceData.specularColor = SAMPLE_TEXTURE2D(_SVBRDF_SpecularColorMap, sampler_SVBRDF_SpecularColorMap, UV0).xyz; - surfaceData.specularLobe = _SVBRDF_SpecularLobeMapScale * SAMPLE_TEXTURE2D(_SVBRDF_SpecularLobeMap, sampler_SVBRDF_SpecularLobeMap, UV0).xy; + surfaceData.specularLobe.xy = _SVBRDF_SpecularLobeMapScale * SAMPLE_TEXTURE2D(_SVBRDF_SpecularLobeMap, sampler_SVBRDF_SpecularLobeMap, UV0).xy; // The AxF models include both a general coloring term that they call "specular color" while the f0 is actually another term, // seemingly always scalar: @@ -98,6 +105,8 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p surfaceData.diffuseColor = _CarPaint2_CTDiffuse; surfaceData.clearcoatIOR = max(1.001, _CarPaint2_ClearcoatIOR); // Can't be exactly 1 otherwise the precise fresnel divides by 0! + surfaceData.specularLobe = _CarPaint2_CTSpreads.xyz; // We may want to modify these (eg for Specular AA) + surfaceData.normalWS = input.tangentToWorld[2].xyz; GetNormalWS(input, 2.0 * SAMPLE_TEXTURE2D(_ClearcoatNormalMap, sampler_ClearcoatNormalMap, UV0).xyz - 1.0, surfaceData.clearcoatNormalWS, doubleSidedConstants); @@ -116,13 +125,29 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p // Useless for car paint BSDF surfaceData.specularColor = 0; - surfaceData.specularLobe = 0; surfaceData.fresnelF0 = 0; surfaceData.height_mm = 0; surfaceData.anisotropyAngle = 0; surfaceData.clearcoatColor = 0; #endif + // TODO + // Assume same xyz encoding for AxF bent normal as other normal maps. + //float3 bentNormalWS; + //GetNormalWS(input, 2.0 * SAMPLE_TEXTURE2D(_BentNormalMap, sampler_BentNormalMap, UV0).xyz - 1.0, bentNormalWS, doubleSidedConstants); + + float perceptualRoughness = RoughnessToPerceptualRoughness(GetScalarRoughness(surfaceData.specularLobe)); + + //TODO +//#if defined(_SPECULAR_OCCLUSION_FROM_BENT_NORMAL_MAP) + // Note: we use normalWS as it will always exist and be equal to clearcoatNormalWS if there's no coat + // (otherwise we do SO with the base lobe, might be wrong depending on way AO is computed, will be wrong either way with a single non-lobe specific value) + //surfaceData.specularOcclusion = GetSpecularOcclusionFromBentAO(V, bentNormalWS, surfaceData.normalWS, surfaceData.ambientOcclusion, perceptualRoughness); +//#endif +#if !defined(_SPECULAR_OCCLUSION_NONE) + surfaceData.specularOcclusion = GetSpecularOcclusionFromAmbientOcclusion(ClampNdotV(dot(surfaceData.normalWS, V)), surfaceData.ambientOcclusion, perceptualRoughness); +#endif + // Propagate the geometry normal surfaceData.geomNormalWS = input.tangentToWorld[2]; @@ -166,6 +191,15 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p #endif #endif +#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA) + // Specular AA for geometric curvature + + surfaceData.specularLobe.x = PerceptualSmoothnessToRoughness(GeometricNormalFiltering(RoughnessToPerceptualSmoothness(surfaceData.specularLobe.x), input.tangentToWorld[2], _SpecularAAScreenSpaceVariance, _SpecularAAThreshold)); + surfaceData.specularLobe.y = PerceptualSmoothnessToRoughness(GeometricNormalFiltering(RoughnessToPerceptualSmoothness(surfaceData.specularLobe.y), input.tangentToWorld[2], _SpecularAAScreenSpaceVariance, _SpecularAAThreshold)); +#if defined(_AXF_BRDF_TYPE_CAR_PAINT) + surfaceData.specularLobe.z = PerceptualSmoothnessToRoughness(GeometricNormalFiltering(RoughnessToPerceptualSmoothness(surfaceData.specularLobe.z), input.tangentToWorld[2], _SpecularAAScreenSpaceVariance, _SpecularAAThreshold)); +#endif +#endif #if defined(DEBUG_DISPLAY) if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl index 6f7a6527e3f..9c3383f73da 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl @@ -107,6 +107,11 @@ float _UseShadowThreshold; float _AlphaCutoffShadow; float4 _DoubleSidedConstants; +// Specular AA +float _EnableGeometricSpecularAA; +float _SpecularAAScreenSpaceVariance; +float _SpecularAAThreshold; + // Caution: C# code in BaseLitUI.cs call LightmapEmissionFlagsProperty() which assume that there is an existing "_EmissionColor" // value that exist to identify if the GI emission need to be enabled. // In our case we don't use such a mechanism but need to keep the code quiet. We declare the value and always enable it. From a09764382a8a23c28982537b0e9dfe9ba4eeedc8 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Thu, 9 Apr 2020 11:36:20 +0200 Subject: [PATCH 090/200] Hdrp/fix/custom pass msaa rendering info --- .../CHANGELOG.md | 1 + .../DrawRenderersCustomPassDrawer.cs | 33 +++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d3d1f5e61d3..ed4fbf73412 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996) - Fixed MSAA depth resolve when there is no motion vectors - Fix issue causing wrong planar reflection rendering when more than one camera is present. +- Added an info box to warn about depth test artifacts when rendering object twice in custom passes with MSAA. ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs index 63d835a7615..0d28dd585c9 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs @@ -56,10 +56,11 @@ private class Styles public static string unlitShaderMessage = "HDRP Unlit shaders will force the shader passes to \"ForwardOnly\""; public static string hdrpLitShaderMessage = "HDRP Lit shaders are not supported in a custom pass"; public static string opaqueObjectWithDeferred = "Your HDRP settings does not support ForwardOnly, some object might not render."; + public static string objectRendererTwiceWithMSAA = "MSAA is enabled, re-rendering same object twice will cause depth test artifacts in Before/After Post Process injection points"; } //Headers and layout - private int m_FilterLines = 3; + private int m_FilterLines = 2; private int m_MaterialLines = 2; // Foldouts @@ -86,6 +87,8 @@ private class Styles ReorderableList m_ShaderPassesList; + CustomPassVolume m_Volume; + bool customDepthIsNone => (CustomPass.TargetBuffer)m_TargetDepthBuffer.intValue == CustomPass.TargetBuffer.None; protected override void Initialize(SerializedProperty customPass) @@ -112,6 +115,8 @@ protected override void Initialize(SerializedProperty customPass) m_DepthCompareFunction = customPass.FindPropertyRelative("depthCompareFunction"); m_DepthWrite = customPass.FindPropertyRelative("depthWrite"); + m_Volume = customPass.serializedObject.targetObject as CustomPassVolume; + m_ShaderPassesList = new ReorderableList(null, m_ShaderPasses, true, true, true, true); m_ShaderPassesList.drawElementCallback = @@ -132,6 +137,14 @@ protected override void Initialize(SerializedProperty customPass) protected override void DoPassGUI(SerializedProperty customPass, Rect rect) { + if (ShowMsaaObjectInfo()) + { + Rect helpBoxRect = rect; + helpBoxRect.height = Styles.helpBoxHeight; + EditorGUI.HelpBox(helpBoxRect, Styles.objectRendererTwiceWithMSAA, MessageType.Info); + rect.y += Styles.helpBoxHeight; + } + DoFilters(ref rect); m_RendererFoldout.boolValue = EditorGUI.Foldout(rect, m_RendererFoldout.boolValue, Styles.renderHeader, true); @@ -156,7 +169,7 @@ protected override void DoPassGUI(SerializedProperty customPass, Rect rect) } } - // Tel if we need to show a warning for rendering opaque object and we're in deferred. + // Tell if we need to show a warning for rendering opaque object and we're in deferred. bool ShowOpaqueObjectWarning() { // Only opaque objects are concerned @@ -173,6 +186,18 @@ bool ShowOpaqueObjectWarning() return true; } + // Tell if we need to show the MSAA message info + bool ShowMsaaObjectInfo() + { + if (!HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.supportMSAA) + return false; + + if (m_Volume.injectionPoint != CustomPassInjectionPoint.AfterPostProcess && m_Volume.injectionPoint != CustomPassInjectionPoint.BeforePostProcess) + return false; + + return true; + } + void DoFilters(ref Rect rect) { m_FilterFoldout.boolValue = EditorGUI.Foldout(rect, m_FilterFoldout.boolValue, Styles.filtersHeader, true); @@ -296,9 +321,11 @@ protected override float GetPassHeight(SerializedProperty customPass) { float height = Styles.defaultLineSpace; + height += ShowMsaaObjectInfo() ? Styles.helpBoxHeight : 0; + if (m_FilterFoldout.boolValue) { - height *= m_FilterLines; + height += Styles.defaultLineSpace * m_FilterLines; height += ShowOpaqueObjectWarning() ? Styles.helpBoxHeight : 0; } From 79dab8cf51dae39c9d888016ca3c1687c423a938 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 9 Apr 2020 11:33:43 +0100 Subject: [PATCH 091/200] Added disocclusion and ghosting to the glossary (#75) --- .../Documentation~/Glossary.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md b/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md index 65bbdd53b8e..698fd6ac263 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md @@ -137,3 +137,12 @@ A function that describes a wave that represents the human eye’s relative sens #### punctual lights: A light is considered to be punctual if it emits light from a single point. HDRPs Spot and Point Lights are punctual. +## Rendering Artifacts + + +#### disocclusion +A rendering artifact that describes the situation where a GameObject that was previously occluded becomes visible. + + +#### ghosting +A rendering artifact that describes the situation where a moving GameObject leaves a trail of pixels behind it. \ No newline at end of file From 90c473bc4d0ac97bc8d65af80c41a20db2f4e9aa Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Tue, 14 Apr 2020 15:46:51 +0200 Subject: [PATCH 092/200] fix switch shader compilation (#111) --- .../Material/GGXConvolution/ComputeGgxIblSampleData.compute | 6 +++--- .../Runtime/Material/GGXConvolution/IBLFilterGGX.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute index de02fb64dcf..d8445386ed7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute @@ -11,7 +11,7 @@ #define MAX_IBL_SAMPLE_CNT 89 #endif -RWTexture2D output; // [MAX_SAMPLE_CNT x UNITY_SPECCUBE_LOD_STEPS] +RWTexture2D outputResult; // [MAX_SAMPLE_CNT x UNITY_SPECCUBE_LOD_STEPS] #pragma kernel ComputeGgxIblSampleData @@ -33,7 +33,7 @@ void ComputeGgxIblSampleData(uint3 groupThreadId : SV_GroupThreadID) if (sampleIndex >= sampleCount) { - output[texCoord] = float4(0, 0, 0, 0); + outputResult[texCoord] = float4(0, 0, 0, 0); return; } @@ -82,6 +82,6 @@ void ComputeGgxIblSampleData(uint3 groupThreadId : SV_GroupThreadID) float pdf = 0.25 * D_GGX(NdotH, roughness); float omegaS = rcp(sampleCount) * rcp(pdf); - output[texCoord] = float4(localL, omegaS); + outputResult[texCoord] = float4(localL, omegaS); } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs index 1f3df886b42..5ef402930e4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs @@ -67,7 +67,7 @@ public override void Initialize(CommandBuffer cmd) void InitializeGgxIblSampleData(CommandBuffer cmd) { - m_ComputeGgxIblSampleDataCS.SetTexture(m_ComputeGgxIblSampleDataKernel, "output", m_GgxIblSampleData); + m_ComputeGgxIblSampleDataCS.SetTexture(m_ComputeGgxIblSampleDataKernel, "outputResult", m_GgxIblSampleData); cmd.DispatchCompute(m_ComputeGgxIblSampleDataCS, m_ComputeGgxIblSampleDataKernel, 1, 1, 1); } From bed4007c70efec452cb088ea615567e09c82e24d Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Tue, 14 Apr 2020 17:59:03 +0200 Subject: [PATCH 093/200] Update SceneViewDrawMode.cs (#118) --- .../Runtime/RenderPipeline/SceneViewDrawMode.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/SceneViewDrawMode.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/SceneViewDrawMode.cs index 507732895d6..72613d64978 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/SceneViewDrawMode.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/SceneViewDrawMode.cs @@ -19,8 +19,7 @@ static private bool RejectDrawMode(SceneView.CameraMode cameraMode) cameraMode.drawMode == DrawCameraMode.DeferredSmoothness || cameraMode.drawMode == DrawCameraMode.DeferredNormal || cameraMode.drawMode == DrawCameraMode.ValidateAlbedo || - cameraMode.drawMode == DrawCameraMode.ValidateMetalSpecular || - cameraMode.drawMode == DrawCameraMode.LightOverlap + cameraMode.drawMode == DrawCameraMode.ValidateMetalSpecular ) return false; From e111a3c6d6fe77850097014115bca1cedf6574b7 Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Wed, 15 Apr 2020 12:51:53 +0200 Subject: [PATCH 094/200] Fix culling of reflection probes that change position --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 3 ++- .../Runtime/Lighting/Reflection/HDProbeSystem.cs | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ed4fbf73412..5773c6c3770 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added an error message in the DrawRenderers custom pass when rendering opaque objects with an HDRP asset in DeferredOnly mode. - Added support for specular AA from geometric curvature in AxF - Added support for baked AO (no input for now) in AxF +- Added an info box to warn about depth test artifacts when rendering object twice in custom passes with MSAA. ### Fixed - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. @@ -45,7 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix for assertion triggering sometimes when saving a newly created lit shader graph (case 1230996) - Fixed MSAA depth resolve when there is no motion vectors - Fix issue causing wrong planar reflection rendering when more than one camera is present. -- Added an info box to warn about depth test artifacts when rendering object twice in custom passes with MSAA. +- Fixed culling of planar reflection probes that change position (case 1218651) ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs index 4dab12b248a..5a2bcc6dac5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs @@ -246,7 +246,7 @@ internal HDProbeCullState PrepareCull(Camera camera) if (m_PlanarProbeCullingGroup == null) return default; - RemoveDestroyedProbes(m_PlanarProbes, m_PlanarProbeBounds, ref m_PlanarProbeCount); + UpdateBoundsAndRemoveDestroyedProbes(m_PlanarProbes, m_PlanarProbeBounds, ref m_PlanarProbeCount); m_PlanarProbeCullingGroup.targetCamera = camera; m_PlanarProbeCullingGroup.SetBoundingSpheres(m_PlanarProbeBounds); @@ -286,7 +286,7 @@ static void RemoveDestroyedProbes(List probes) } } - static void RemoveDestroyedProbes(PlanarReflectionProbe[] probes, BoundingSphere[] bounds, ref int count) + static void UpdateBoundsAndRemoveDestroyedProbes(PlanarReflectionProbe[] probes, BoundingSphere[] bounds, ref int count) { for (int i = 0; i < count; ++i) { @@ -297,6 +297,11 @@ static void RemoveDestroyedProbes(PlanarReflectionProbe[] probes, BoundingSphere probes[count - 1] = null; --count; } + + if (probes[i]) + { + bounds[i] = probes[i].boundingSphere; + } } } From 2847da15e2017521c4132c0504c9bfdd8621dfca Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Wed, 15 Apr 2020 14:48:44 +0200 Subject: [PATCH 095/200] Fix null reference when processing light probe --- .../CHANGELOG.md | 1 + .../Runtime/Lighting/LightLoop/LightLoop.cs | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 5773c6c3770..d911a7c6ea1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed MSAA depth resolve when there is no motion vectors - Fix issue causing wrong planar reflection rendering when more than one camera is present. - Fixed culling of planar reflection probes that change position (case 1218651) +- Fixed null reference when processing lightprobe (case 1235285) ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 253b45ecd8a..a1b12726020 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -2409,17 +2409,17 @@ int PreprocessVisibleProbes(HDCamera hdCamera, CullingResults cullResults, HDPro { var probe = cullResults.visibleReflectionProbes[probeIndex]; + if (probe.reflectionProbe == null + || probe.reflectionProbe.Equals(null) || !probe.reflectionProbe.isActiveAndEnabled + || !aovRequest.IsLightEnabled(probe.reflectionProbe.gameObject)) + continue; + ref ProcessedProbeData processedData = ref m_ProcessedReflectionProbeData[probeIndex]; PreprocessReflectionProbeData(ref processedData, probe, hdCamera); if (TrivialRejectProbe(processedData, hdCamera)) continue; - if (probe.reflectionProbe == null - || probe.reflectionProbe.Equals(null) || !probe.reflectionProbe.isActiveAndEnabled - || !aovRequest.IsLightEnabled(probe.reflectionProbe.gameObject)) - continue; - // Work around the data issues. if (probe.localToWorldMatrix.determinant == 0) { From 91adc7d23f74b19d9e80c1f558463abb5a6bd244 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com> Date: Wed, 15 Apr 2020 12:05:56 -0400 Subject: [PATCH 096/200] Fix black screen in XR when HDRP package is present but not used --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/XR/XRSystem.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d911a7c6ea1..c62c56aede8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix issue causing wrong planar reflection rendering when more than one camera is present. - Fixed culling of planar reflection probes that change position (case 1218651) - Fixed null reference when processing lightprobe (case 1235285) +- Fix black screen in XR when HDRP package is present but not used. ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index e7d5d48222d..bb117be26be 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -73,6 +73,9 @@ internal XRSystem(RenderPipelineResources.ShaderResources shaders) [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] internal static void XRSystemInit() { + if (GraphicsSettings.currentRenderPipeline == null) + return; + SubsystemManager.GetInstances(displayList); for (int i = 0; i < displayList.Count; i++) From edae0c2c413add8f5c5eae805434bbf6f10db0d1 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Thu, 16 Apr 2020 10:18:11 +0200 Subject: [PATCH 097/200] [8.x.x Backport] Fixed an issue with the specularFGD term being used when the material has a clear coat (lit shader). (#20) * Fixed an issue with the specularFGD term being used when the material has a clear coat (lit shader). * update ssr screenshot Co-authored-by: Sebastien Lagarde --- .../Linear/WindowsEditor/Direct3D11/None/2551_SSR.png | 4 ++-- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Material/Lit/Lit.hlsl | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2551_SSR.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2551_SSR.png index 5072855f828..11d290bcef7 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2551_SSR.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2551_SSR.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8683fa5746afb3e8639585cc601c1911884aa5cbdcea098428c36872a2046640 -size 147475 +oid sha256:235f591a18ba1f53e0144f5996fcfb91b3a2704ae65459618ece20bafcffd284 +size 146936 diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c62c56aede8..54c1a6973ac 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -108,6 +108,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). - Fixed cubemap thumbnail generation at project load time. - Half fixed shuriken particle light that cast shadows (only the first one will be correct) +- Fixed an issue with the specularFGD term being used when the material has a clear coat (lit shader). ### Changed - Renamed the cubemap used for diffuse convolution to a more explicit name for the memory profiler. 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 d4dcfc77194..7da9be1d3ed 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 @@ -1710,7 +1710,12 @@ IndirectLighting EvaluateBSDF_ScreenSpaceReflection(PositionInputs posInput, ApplyScreenSpaceReflectionWeight(ssrLighting); // TODO: we should multiply all indirect lighting by the FGD value only ONCE. - lighting.specularReflected = ssrLighting.rgb * preLightData.specularFGD; + // In case this material has a clear coat, we shou not be using the specularFGD. The condition for it is a combination + // of a materia feature and the coat mask. + float clampedNdotV = ClampNdotV(preLightData.NdotV); + lighting.specularReflected = ssrLighting.rgb * (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_LIT_CLEAR_COAT) ? + lerp(preLightData.specularFGD, F_Schlick(CLEAR_COAT_F0, clampedNdotV), bsdfData.coatMask) + : preLightData.specularFGD); reflectionHierarchyWeight = ssrLighting.a; return lighting; From 448183d7f3d994ecdd47ef3f7fce2b5106013d9f Mon Sep 17 00:00:00 2001 From: slunity <37302815+slunity@users.noreply.github.com> Date: Thu, 16 Apr 2020 04:20:20 -0400 Subject: [PATCH 098/200] Added support for rasterized area light shadows in StackLit + slight refactor --- .../CHANGELOG.md | 1 + .../Documentation~/Light-Component.md | 2 +- .../Runtime/Material/StackLit/StackLit.hlsl | 674 ++++++++++-------- 3 files changed, 368 insertions(+), 309 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 54c1a6973ac..40d167030e9 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added support for specular AA from geometric curvature in AxF - Added support for baked AO (no input for now) in AxF - Added an info box to warn about depth test artifacts when rendering object twice in custom passes with MSAA. +- Added support for rasterized area light shadows in StackLit ### Fixed - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md index f5029e94aaa..fd537c504a4 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md @@ -184,7 +184,7 @@ These settings define the volumetric behavior of this Light. Alter these setting ### **Shadows** -Use this section to adjust the Shadows cast by this Light. Note that Area Lights can't currently cast shadows for GameObjects that use a **StackLit** Material. +Use this section to adjust the Shadows cast by this Light. Unity exposes extra properties in this section depending on the **Mode** you set in the [General](#GeneralProperties) section. Unity also exposes extra properties depending on the **Filtering Quality** set in your Unity Project’s [HDRP Asset](HDRP-Asset.html). diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl index d6d064d5f95..d306f3691c1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl @@ -31,6 +31,12 @@ // #define STACK_LIT_DISPLAY_REFERENCE_IBL #endif +#ifndef SKIP_RASTERIZED_SHADOWS +#define RASTERIZED_AREA_LIGHT_SHADOWS 1 +#else +#define RASTERIZED_AREA_LIGHT_SHADOWS 0 +#endif + //----------------------------------------------------------------------------- // Texture and constant buffer declaration //----------------------------------------------------------------------------- @@ -3743,147 +3749,154 @@ DirectLighting EvaluateBSDF_Line( LightLoopContext lightLoopContext, // Terminate if the shaded point is too far away. if (intensity == 0.0) - return lighting; - - lightData.diffuseDimmer *= intensity; - lightData.specularDimmer *= intensity; - - // Translate the light s.t. the shaded point is at the origin of the coordinate system. - lightData.positionRWS -= positionWS; + { + lightData.diffuseDimmer *= intensity; + lightData.specularDimmer *= intensity; - // TODO: some of this could be precomputed. - float3 P1 = lightData.positionRWS - T * (0.5 * len); - float3 P2 = lightData.positionRWS + T * (0.5 * len); + // Translate the light s.t. the shaded point is at the origin of the coordinate system. + lightData.positionRWS -= positionWS; - // Setup the default local canonical frame with X-Y aligned to the reflection plane - // using orthoBasisViewNormal: without the anisotropic hack, this is only dependent on - // if we have dual normal maps or not: + // TODO: some of this could be precomputed. + float3 P1 = lightData.positionRWS - T * (0.5 * len); + float3 P2 = lightData.positionRWS + T * (0.5 * len); - // Rotate the endpoints into the local coordinate system. - float3 localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); - float3 localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); - // Compute the binormal in the local coordinate system. - float3 B = normalize(cross(localP1, localP2)); + // Setup the default local canonical frame with X-Y aligned to the reflection plane + // using orthoBasisViewNormal: without the anisotropic hack, this is only dependent on + // if we have dual normal maps or not: - if (AREA_LIGHTS_ANISOTROPY_ENABLED) // statically known, so no need for if else, just overwrite the above - { - // Since we proceed with calculating diffuse and transmission irradiance, we setup - // the points for the diffuse frame. - // There's no anisotropy on the diffuse component and this is oriented considering - // the proper base layer normal: - localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormalDiffuse)); - localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormalDiffuse)); - B = normalize(cross(localP1, localP2)); - } + // Rotate the endpoints into the local coordinate system. + float3 localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); + float3 localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); + // Compute the binormal in the local coordinate system. + float3 B = normalize(cross(localP1, localP2)); - // Calculate the L irradiance (ltcValue) first for the diffuse part and transmission, - // then for the specular base layer and finishing with the coat. - float ltcValue; + if (AREA_LIGHTS_ANISOTROPY_ENABLED) // statically known, so no need for if else, just overwrite the above + { + // Since we proceed with calculating diffuse and transmission irradiance, we setup + // the points for the diffuse frame. + // There's no anisotropy on the diffuse component and this is oriented considering + // the proper base layer normal: + localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormalDiffuse)); + localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormalDiffuse)); + B = normalize(cross(localP1, localP2)); + } - // Evaluate the diffuse part - ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformDiffuse); - ltcValue *= lightData.diffuseDimmer; - // We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). - lighting.diffuse = preLightData.diffuseFGD * preLightData.diffuseEnergy * ltcValue; + // Calculate the L irradiance (ltcValue) first for the diffuse part and transmission, + // then for the specular base layer and finishing with the coat. + float ltcValue; - UNITY_BRANCH if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_TRANSMISSION)) - { - // Flip the view vector and the normal. The bitangent stays the same. - float3x3 flipMatrix = float3x3(-1, 0, 0, - 0, 1, 0, - 0, 0, -1); - - // Use the Lambertian approximation for performance reasons. - // The matrix multiplication should not generate any extra ALU on GCN. - // TODO: double evaluation is very inefficient! This is a temporary solution. - ltcValue = LTCEvaluate(localP1, localP2, B, mul(flipMatrix, k_identity3x3)); + // Evaluate the diffuse part + ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformDiffuse); ltcValue *= lightData.diffuseDimmer; - - // VLAYERED_DIFFUSE_ENERGY_HACKED_TERM: - // In Lit with Lambert, there's no diffuseFGD, it is one. In our case, we also - // need a diffuse energy term when vlayered. - - // We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass. // We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). - lighting.diffuse += bsdfData.transmittance * ltcValue * preLightData.diffuseEnergy; - } + lighting.diffuse = preLightData.diffuseFGD * preLightData.diffuseEnergy * ltcValue; - // Evaluate the specular lobes for the stack - IF_DEBUG( if ( _DebugLobeMask.y != 0.0) ) - { - if (AREA_LIGHTS_ANISOTROPY_ENABLED) + UNITY_BRANCH if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_TRANSMISSION)) { - // In that case, instead of only considering possibly dual normal maps and thus two - // local canonical frames we have lobe specific frames because of the anisotropic hack: - localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEA_IDX])); - localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEA_IDX])); - B = normalize(cross(localP1, localP2)); + // Flip the view vector and the normal. The bitangent stays the same. + float3x3 flipMatrix = float3x3(-1, 0, 0, + 0, 1, 0, + 0, 0, -1); + + // Use the Lambertian approximation for performance reasons. + // The matrix multiplication should not generate any extra ALU on GCN. + // TODO: double evaluation is very inefficient! This is a temporary solution. + ltcValue = LTCEvaluate(localP1, localP2, B, mul(flipMatrix, k_identity3x3)); + ltcValue *= lightData.diffuseDimmer; + + // VLAYERED_DIFFUSE_ENERGY_HACKED_TERM: + // In Lit with Lambert, there's no diffuseFGD, it is one. In our case, we also + // need a diffuse energy term when vlayered. + + // We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass. + // We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). + lighting.diffuse += bsdfData.transmittance * ltcValue * preLightData.diffuseEnergy; } - ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformSpecular[BASE_LOBEA_IDX]); - // See EvaluateBSDF_Env TODOENERGY: - lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEA_IDX] * preLightData.specularFGD[BASE_LOBEA_IDX] * ltcValue; - } - IF_DEBUG( if ( _DebugLobeMask.z != 0.0) ) - { - if (AREA_LIGHTS_ANISOTROPY_ENABLED) - { - // In that case, instead of only considering possibly dual normal maps and thus two - // local canonical frames we have lobe specific frames because of the anisotropic hack: - localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEB_IDX])); - localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEB_IDX])); - B = normalize(cross(localP1, localP2)); - } - ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformSpecular[BASE_LOBEB_IDX]); - lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEB_IDX] * preLightData.specularFGD[BASE_LOBEB_IDX] * ltcValue; - } - if (IsVLayeredEnabled(bsdfData)) - { - IF_DEBUG( if ( _DebugLobeMask.x != 0.0) ) + // Evaluate the specular lobes for the stack + IF_DEBUG( if ( _DebugLobeMask.y != 0.0) ) { - if (IsCoatNormalMapEnabled(bsdfData)) + if (AREA_LIGHTS_ANISOTROPY_ENABLED) { - localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[COAT_NORMAL_IDX])); - localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[COAT_NORMAL_IDX])); - B = normalize(cross(localP1, localP2)); + // In that case, instead of only considering possibly dual normal maps and thus two + // local canonical frames we have lobe specific frames because of the anisotropic hack: + localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEA_IDX])); + localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEA_IDX])); + B = normalize(cross(localP1, localP2)); } - if (AREA_LIGHTS_ANISOTROPY_ENABLED) // statically known, so no need for if else, just overwrite the above + ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformSpecular[BASE_LOBEA_IDX]); + // See EvaluateBSDF_Env TODOENERGY: + lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEA_IDX] * preLightData.specularFGD[BASE_LOBEA_IDX] * ltcValue; + } + IF_DEBUG( if ( _DebugLobeMask.z != 0.0) ) + { + if (AREA_LIGHTS_ANISOTROPY_ENABLED) { - // No need to check if we have dual normal maps here: alread taken care via iblN[COAT_LOBE_IDX] - // in GetPreLightData and setup in preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX]. - - // we have lobe specific frames because of the anisotropic hack (there's no anisotropy for the - // coat, but the index of the ortho basis is lobe-based still because of the base layer lobes which - // can have anisotropy). - localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX])); - localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX])); + // In that case, instead of only considering possibly dual normal maps and thus two + // local canonical frames we have lobe specific frames because of the anisotropic hack: + localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEB_IDX])); + localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEB_IDX])); B = normalize(cross(localP1, localP2)); } - ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformSpecular[COAT_LOBE_IDX]); - lighting.specular += preLightData.energyCompensationFactor[COAT_LOBE_IDX] * preLightData.specularFGD[COAT_LOBE_IDX] * ltcValue; + ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformSpecular[BASE_LOBEB_IDX]); + lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEB_IDX] * preLightData.specularFGD[BASE_LOBEB_IDX] * ltcValue; } - } - lighting.specular *= lightData.specularDimmer; + if (IsVLayeredEnabled(bsdfData)) + { + IF_DEBUG( if ( _DebugLobeMask.x != 0.0) ) + { + if (IsCoatNormalMapEnabled(bsdfData)) + { + localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[COAT_NORMAL_IDX])); + localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[COAT_NORMAL_IDX])); + B = normalize(cross(localP1, localP2)); + } + if (AREA_LIGHTS_ANISOTROPY_ENABLED) // statically known, so no need for if else, just overwrite the above + { + // No need to check if we have dual normal maps here: alread taken care via iblN[COAT_LOBE_IDX] + // in GetPreLightData and setup in preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX]. + + // we have lobe specific frames because of the anisotropic hack (there's no anisotropy for the + // coat, but the index of the ortho basis is lobe-based still because of the base layer lobes which + // can have anisotropy). + localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX])); + localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX])); + B = normalize(cross(localP1, localP2)); + } + ltcValue = LTCEvaluate(localP1, localP2, B, preLightData.ltcTransformSpecular[COAT_LOBE_IDX]); + lighting.specular += preLightData.energyCompensationFactor[COAT_LOBE_IDX] * preLightData.specularFGD[COAT_LOBE_IDX] * ltcValue; + } + } + lighting.specular *= lightData.specularDimmer; - // Save ALU by applying 'lightData.color' only once. - lighting.diffuse *= lightData.color; - lighting.specular *= lightData.color; -#ifdef DEBUG_DISPLAY - if (_DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER) - { - // Make sure we're using the base layer frame: - localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); - localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); - B = normalize(cross(localP1, localP2)); - - // Only lighting, not BSDF - // Apply area light on lambert then multiply by PI to cancel Lambert - lighting.diffuse = LTCEvaluate(localP1, localP2, B, k_identity3x3); - lighting.diffuse *= PI * lightData.diffuseDimmer; + // Save ALU by applying 'lightData.color' only once. + lighting.diffuse *= lightData.color; + lighting.specular *= lightData.color; + + #ifdef DEBUG_DISPLAY + if (_DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER) + { + // Make sure we're using the base layer frame: + localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); + localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); + if (AREA_LIGHTS_ANISOTROPY_ENABLED) + { + // In that case orthoBasisViewNormal[] is per lobe due to anistropic hack, + // use orthoBasisViewNormalDiffuse: + localP1 = mul(P1, transpose(preLightData.orthoBasisViewNormalDiffuse)); + localP2 = mul(P2, transpose(preLightData.orthoBasisViewNormalDiffuse)); + } + B = normalize(cross(localP1, localP2)); + + // Only lighting, not BSDF + // Apply area light on lambert then multiply by PI to cancel Lambert + lighting.diffuse = LTCEvaluate(localP1, localP2, B, k_identity3x3); + lighting.diffuse *= PI * lightData.diffuseDimmer; + } + #endif } -#endif #endif // STACK_LIT_DISPLAY_REFERENCE_AREA @@ -3916,211 +3929,256 @@ DirectLighting EvaluateBSDF_Rect( LightLoopContext lightLoopContext, #else float3 unL = lightData.positionRWS - positionWS; - if (dot(lightData.forward, unL) >= 0.0001) + // if (dot(lightData.forward, unL) >= eps), all points on the light are back-facing: + // (Dont early return to guard against compiler bug for if / quick early return constructs) + if (dot(lightData.forward, unL) < FLT_EPS) { - // The light is back-facing. - return lighting; - } - - // Rotate the light direction into the light space. - float3x3 lightToWorld = float3x3(lightData.right, lightData.up, -lightData.forward); - unL = mul(unL, transpose(lightToWorld)); - - // TODO: This could be precomputed. - float halfWidth = lightData.size.x * 0.5; - float halfHeight = lightData.size.y * 0.5; - - // Define the dimensions of the attenuation volume. - // TODO: This could be precomputed. - float range = lightData.range; - float3 invHalfDim = rcp(float3(range + halfWidth, - range + halfHeight, - range)); - - // Compute the light attenuation. -#ifdef ELLIPSOIDAL_ATTENUATION - // The attenuation volume is an axis-aligned ellipsoid s.t. - // r1 = (r + w / 2), r2 = (r + h / 2), r3 = r. - float intensity = EllipsoidalDistanceAttenuation(unL, invHalfDim, - lightData.rangeAttenuationScale, - lightData.rangeAttenuationBias); -#else - // The attenuation volume is an axis-aligned box s.t. - // hX = (r + w / 2), hY = (r + h / 2), hZ = r. - float intensity = BoxDistanceAttenuation(unL, invHalfDim, - lightData.rangeAttenuationScale, - lightData.rangeAttenuationBias); -#endif - - // Terminate if the shaded point is too far away. - if (intensity == 0.0) - return lighting; - - lightData.diffuseDimmer *= intensity; - lightData.specularDimmer *= intensity; - - // Translate the light s.t. the shaded point is at the origin of the coordinate system. - lightData.positionRWS -= positionWS; - - float4x3 lightVerts; - // TODO: some of this could be precomputed. - lightVerts[0] = lightData.positionRWS + lightData.right * -halfWidth + lightData.up * -halfHeight; // LL - lightVerts[1] = lightData.positionRWS + lightData.right * -halfWidth + lightData.up * halfHeight; // UL - lightVerts[2] = lightData.positionRWS + lightData.right * halfWidth + lightData.up * halfHeight; // UR - lightVerts[3] = lightData.positionRWS + lightData.right * halfWidth + lightData.up * -halfHeight; // LR + // Rotate the light direction into the light space. + float3x3 lightToWorld = float3x3(lightData.right, lightData.up, -lightData.forward); + unL = mul(unL, transpose(lightToWorld)); + + // TODO: This could be precomputed. + float halfWidth = lightData.size.x * 0.5; + float halfHeight = lightData.size.y * 0.5; + + // Define the dimensions of the attenuation volume. + // TODO: This could be precomputed. + float range = lightData.range; + float3 invHalfDim = rcp(float3(range + halfWidth, + range + halfHeight, + range)); + + // Compute the light attenuation. + #ifdef ELLIPSOIDAL_ATTENUATION + // The attenuation volume is an axis-aligned ellipsoid s.t. + // r1 = (r + w / 2), r2 = (r + h / 2), r3 = r. + float intensity = EllipsoidalDistanceAttenuation(unL, invHalfDim, + lightData.rangeAttenuationScale, + lightData.rangeAttenuationBias); + #else + // The attenuation volume is an axis-aligned box s.t. + // hX = (r + w / 2), hY = (r + h / 2), hZ = r. + float intensity = BoxDistanceAttenuation(unL, invHalfDim, + lightData.rangeAttenuationScale, + lightData.rangeAttenuationBias); + #endif + + // If the shaded point is too far away we avoid shading. + // (guard against compiler bug for if / quick early return constructs) + if (intensity != 0.0) + { + lightData.diffuseDimmer *= intensity; + lightData.specularDimmer *= intensity; + + // Translate the light s.t. the shaded point is at the origin of the coordinate system. + lightData.positionRWS -= positionWS; + + float4x3 lightVerts; + + // TODO: some of this could be precomputed. + lightVerts[0] = lightData.positionRWS + lightData.right * -halfWidth + lightData.up * -halfHeight; // LL + lightVerts[1] = lightData.positionRWS + lightData.right * -halfWidth + lightData.up * halfHeight; // UL + lightVerts[2] = lightData.positionRWS + lightData.right * halfWidth + lightData.up * halfHeight; // UR + lightVerts[3] = lightData.positionRWS + lightData.right * halfWidth + lightData.up * -halfHeight; // LR + + // Rotate the endpoints into the local coordinate system. + float4x3 localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); + + if (AREA_LIGHTS_ANISOTROPY_ENABLED) // statically known, so no need for if else, just overwrite the above + { + // Since we proceed with calculating diffuse and transmission irradiance, we setup + // the points for the diffuse frame. + // There's no anisotropy on the diffuse component and this is oriented considering + // the proper base layer normal: + localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormalDiffuse)); + } + + // Calculate the L irradiance (ltcValue) first for the diffuse part and transmission, + // then for the specular base layer and finishing with the coat. + float3 ltcValue; + + // Evaluate the diffuse part + // Polygon irradiance in the transformed configuration. + float4x3 LD = mul(localLightVerts, preLightData.ltcTransformDiffuse); + ltcValue = PolygonIrradiance(LD); + ltcValue *= lightData.diffuseDimmer; + // Only apply cookie if there is one + if ( lightData.cookieMode != COOKIEMODE_NONE ) + { + // Compute the cookie data for the diffuse term + float3 formFactorD = PolygonFormFactor(LD); + ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LD, formFactorD); + } + // We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). + lighting.diffuse = preLightData.diffuseFGD * preLightData.diffuseEnergy * ltcValue; + + UNITY_BRANCH if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_TRANSMISSION)) + { + // Flip the view vector and the normal. The bitangent stays the same. + float3x3 flipMatrix = float3x3(-1, 0, 0, + 0, 1, 0, + 0, 0, -1); + + // Use the Lambertian approximation for performance reasons. + // The matrix multiplication should not generate any extra ALU on GCN. + float3x3 ltcTransform = mul(flipMatrix, k_identity3x3); + + // Polygon irradiance in the transformed configuration. + // TODO: double evaluation is very inefficient! This is a temporary solution. + float4x3 LTD = mul(localLightVerts, ltcTransform); + ltcValue = PolygonIrradiance(LTD); + ltcValue *= lightData.diffuseDimmer; + // Only apply cookie if there is one + if ( lightData.cookieMode != COOKIEMODE_NONE ) + { + // Compute the cookie data for the transmission diffuse term + float3 formFactorTD = PolygonFormFactor(LTD); + ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LTD, formFactorTD); + } + // VLAYERED_DIFFUSE_ENERGY_HACKED_TERM: + // In Lit with Lambert, there's no diffuseFGD, it is one. In our case, we also + // need a diffuse energy term when vlayered. + + // We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass. + // We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). + lighting.diffuse += bsdfData.transmittance * ltcValue * preLightData.diffuseEnergy; + } + + // Evaluate the specular lobes for the stack + IF_DEBUG( if ( _DebugLobeMask.y != 0.0) ) + { + if (AREA_LIGHTS_ANISOTROPY_ENABLED) + { + // In that case, instead of only considering possibly dual normal maps and thus two + // local canonical frames we have lobe specific frames because of the anisotropic hack: + localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEA_IDX])); + } + // Polygon irradiance in the transformed configuration. + float4x3 LAS = mul(localLightVerts, preLightData.ltcTransformSpecular[BASE_LOBEA_IDX]); + ltcValue = PolygonIrradiance(LAS); + // Only apply cookie if there is one + if ( lightData.cookieMode != COOKIEMODE_NONE ) + { + // Compute the cookie data for the specular term + float3 formFactorAS = PolygonFormFactor(LAS); + ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LAS, formFactorAS); + } + + // See EvaluateBSDF_Env TODOENERGY: + lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEA_IDX] * preLightData.specularFGD[BASE_LOBEA_IDX] * ltcValue; + } + IF_DEBUG( if ( _DebugLobeMask.z != 0.0) ) + { + if (AREA_LIGHTS_ANISOTROPY_ENABLED) + { + // In that case, instead of only considering possibly dual normal maps and thus two + // local canonical frames we have lobe specific frames because of the anisotropic hack: + localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEB_IDX])); + } + float4x3 LS = mul(localLightVerts, preLightData.ltcTransformSpecular[BASE_LOBEB_IDX]); + ltcValue = PolygonIrradiance(LS); + // Only apply cookie if there is one + if ( lightData.cookieMode != COOKIEMODE_NONE ) + { + // Compute the cookie data for the specular term + float3 formFactorS = PolygonFormFactor(LS); + ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LS, formFactorS); + } + + lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEB_IDX] * preLightData.specularFGD[BASE_LOBEB_IDX] * ltcValue; + } + + if (IsVLayeredEnabled(bsdfData)) + { + if (IsCoatNormalMapEnabled(bsdfData)) + { + localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[COAT_NORMAL_IDX])); + } + if (AREA_LIGHTS_ANISOTROPY_ENABLED) + { + // In that case, instead of only considering possibly dual normal maps and thus two + // local canonical frames we have lobe specific frames because of the anisotropic hack: + localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX])); + } + IF_DEBUG( if ( _DebugLobeMask.x != 0.0) ) + { + float4x3 LSCC = mul(localLightVerts, preLightData.ltcTransformSpecular[COAT_LOBE_IDX]); + ltcValue = PolygonIrradiance(LSCC); + // Only apply cookie if there is one + if ( lightData.cookieMode != COOKIEMODE_NONE ) + { + // Compute the cookie data for the specular term + float3 formFactorS = PolygonFormFactor(LSCC); + ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LSCC, formFactorS); + } + lighting.specular += preLightData.energyCompensationFactor[COAT_LOBE_IDX] * preLightData.specularFGD[COAT_LOBE_IDX] * ltcValue; + } + } + lighting.specular *= lightData.specularDimmer; + + + // Save ALU by applying 'lightData.color' only once. + lighting.diffuse *= lightData.color; + lighting.specular *= lightData.color; - // Rotate the endpoints into the local coordinate system. - float4x3 localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); + #ifdef DEBUG_DISPLAY + if (_DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER) + { + // Make sure we're using the base layer frame: + localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); + if (AREA_LIGHTS_ANISOTROPY_ENABLED) + { + // In that case orthoBasisViewNormal[] is per lobe due to anistropic hack, + // use orthoBasisViewNormalDiffuse: + localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormalDiffuse)); + } - if (AREA_LIGHTS_ANISOTROPY_ENABLED) // statically known, so no need for if else, just overwrite the above - { - // Since we proceed with calculating diffuse and transmission irradiance, we setup - // the points for the diffuse frame. - // There's no anisotropy on the diffuse component and this is oriented considering - // the proper base layer normal: - localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormalDiffuse)); - } + // Only lighting, not BSDF + // Apply area light on lambert then multiply by PI to cancel Lambert + lighting.diffuse = PolygonIrradiance(mul(localLightVerts, k_identity3x3)); + lighting.diffuse *= PI * lightData.diffuseDimmer; + } + #endif - // Calculate the L irradiance (ltcValue) first for the diffuse part and transmission, - // then for the specular base layer and finishing with the coat. - float3 ltcValue; - - // Evaluate the diffuse part - // Polygon irradiance in the transformed configuration. - float4x3 LD = mul(localLightVerts, preLightData.ltcTransformDiffuse); - ltcValue = PolygonIrradiance(LD); - ltcValue *= lightData.diffuseDimmer; - // Only apply cookie if there is one - if ( lightData.cookieMode != COOKIEMODE_NONE ) - { - // Compute the cookie data for the diffuse term - float3 formFactorD = PolygonFormFactor(LD); - ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LD, formFactorD); - } - // We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). - lighting.diffuse = preLightData.diffuseFGD * preLightData.diffuseEnergy * ltcValue; + } // if light not too far - UNITY_BRANCH if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_TRANSMISSION)) - { - // Flip the view vector and the normal. The bitangent stays the same. - float3x3 flipMatrix = float3x3(-1, 0, 0, - 0, 1, 0, - 0, 0, -1); - - // Use the Lambertian approximation for performance reasons. - // The matrix multiplication should not generate any extra ALU on GCN. - float3x3 ltcTransform = mul(flipMatrix, k_identity3x3); - - // Polygon irradiance in the transformed configuration. - // TODO: double evaluation is very inefficient! This is a temporary solution. - float4x3 LTD = mul(localLightVerts, ltcTransform); - ltcValue = PolygonIrradiance(LTD); - ltcValue *= lightData.diffuseDimmer; - // Only apply cookie if there is one - if ( lightData.cookieMode != COOKIEMODE_NONE ) - { - // Compute the cookie data for the transmission diffuse term - float3 formFactorTD = PolygonFormFactor(LTD); - ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LTD, formFactorTD); - } - // VLAYERED_DIFFUSE_ENERGY_HACKED_TERM: - // In Lit with Lambert, there's no diffuseFGD, it is one. In our case, we also - // need a diffuse energy term when vlayered. + } // if light not back-facing - // We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass. - // We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). - lighting.diffuse += bsdfData.transmittance * ltcValue * preLightData.diffuseEnergy; - } + float shadow = 1.0; + float shadowMask = 1.0; +#ifdef SHADOWS_SHADOWMASK + // shadowMaskSelector.x is -1 if there is no shadow mask + // Note that we override shadow value (in case we don't have any dynamic shadow) + shadow = shadowMask = (lightData.shadowMaskSelector.x >= 0.0) ? dot(BUILTIN_DATA_SHADOW_MASK, lightData.shadowMaskSelector) : 1.0; +#endif - // Evaluate the specular lobes for the stack - IF_DEBUG( if ( _DebugLobeMask.y != 0.0) ) +#if defined(SCREEN_SPACE_SHADOWS) && !defined(_SURFACE_TYPE_TRANSPARENT) + float shadow = 1.0; + if ((lightData.screenSpaceShadowIndex & SCREEN_SPACE_SHADOW_INDEX_MASK) != INVALID_SCREEN_SPACE_SHADOW) { - if (AREA_LIGHTS_ANISOTROPY_ENABLED) - { - // In that case, instead of only considering possibly dual normal maps and thus two - // local canonical frames we have lobe specific frames because of the anisotropic hack: - localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEA_IDX])); - } - // Polygon irradiance in the transformed configuration. - float4x3 LAS = mul(localLightVerts, preLightData.ltcTransformSpecular[BASE_LOBEA_IDX]); - ltcValue = PolygonIrradiance(LAS); - // Only apply cookie if there is one - if ( lightData.cookieMode != COOKIEMODE_NONE ) - { - // Compute the cookie data for the specular term - float3 formFactorAS = PolygonFormFactor(LAS); - ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LAS, formFactorAS); - } - - // See EvaluateBSDF_Env TODOENERGY: - lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEA_IDX] * preLightData.specularFGD[BASE_LOBEA_IDX] * ltcValue; + shadow = GetScreenSpaceShadow(posInput, lightData.screenSpaceShadowIndex); } - IF_DEBUG( if ( _DebugLobeMask.z != 0.0) ) + else +#endif // ENABLE_RAYTRACING + if (lightData.shadowIndex != -1) { - if (AREA_LIGHTS_ANISOTROPY_ENABLED) - { - // In that case, instead of only considering possibly dual normal maps and thus two - // local canonical frames we have lobe specific frames because of the anisotropic hack: - localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_BASE_LOBEB_IDX])); - } - float4x3 LS = mul(localLightVerts, preLightData.ltcTransformSpecular[BASE_LOBEB_IDX]); - ltcValue = PolygonIrradiance(LS); - // Only apply cookie if there is one - if ( lightData.cookieMode != COOKIEMODE_NONE ) - { - // Compute the cookie data for the specular term - float3 formFactorS = PolygonFormFactor(LS); - ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LS, formFactorS); - } - - lighting.specular += preLightData.energyCompensationFactor[BASE_LOBEB_IDX] * preLightData.specularFGD[BASE_LOBEB_IDX] * ltcValue; - } +#if RASTERIZED_AREA_LIGHT_SHADOWS + // lightData.positionRWS now contains the Light vector. + shadow = GetAreaLightAttenuation(lightLoopContext.shadowContext, posInput.positionSS, posInput.positionWS, bsdfData.normalWS, lightData.shadowIndex, normalize(lightData.positionRWS), length(lightData.positionRWS)); +#ifdef SHADOWS_SHADOWMASK + // See comment for punctual light shadow mask + shadow = lightData.nonLightMappedOnly ? min(shadowMask, shadow) : shadow; +#endif + shadow = lerp(shadowMask, shadow, lightData.shadowDimmer); - if (IsVLayeredEnabled(bsdfData)) - { - if (IsCoatNormalMapEnabled(bsdfData)) - { - localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[COAT_NORMAL_IDX])); - } - if (AREA_LIGHTS_ANISOTROPY_ENABLED) - { - // In that case, instead of only considering possibly dual normal maps and thus two - // local canonical frames we have lobe specific frames because of the anisotropic hack: - localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[ORTHOBASIS_VN_COAT_LOBE_IDX])); - } - IF_DEBUG( if ( _DebugLobeMask.x != 0.0) ) - { - float4x3 LSCC = mul(localLightVerts, preLightData.ltcTransformSpecular[COAT_LOBE_IDX]); - ltcValue = PolygonIrradiance(LSCC); - // Only apply cookie if there is one - if ( lightData.cookieMode != COOKIEMODE_NONE ) - { - // Compute the cookie data for the specular term - float3 formFactorS = PolygonFormFactor(LSCC); - ltcValue *= SampleAreaLightCookie(lightData.cookieScaleOffset, LSCC, formFactorS); - } - lighting.specular += preLightData.energyCompensationFactor[COAT_LOBE_IDX] * preLightData.specularFGD[COAT_LOBE_IDX] * ltcValue; - } +#endif } - lighting.specular *= lightData.specularDimmer; - - // Save ALU by applying 'lightData.color' only once. - lighting.diffuse *= lightData.color; - lighting.specular *= lightData.color; - -#ifdef DEBUG_DISPLAY - if (_DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER) - { - // Make sure we're using the base layer frame: - localLightVerts = mul(lightVerts, transpose(preLightData.orthoBasisViewNormal[BASE_NORMAL_IDX])); - - // Only lighting, not BSDF - // Apply area light on lambert then multiply by PI to cancel Lambert - lighting.diffuse = PolygonIrradiance(mul(localLightVerts, k_identity3x3)); - lighting.diffuse *= PI * lightData.diffuseDimmer; - } +#if RASTERIZED_AREA_LIGHT_SHADOWS || SUPPORTS_RAYTRACED_AREA_SHADOWS + float3 shadowColor = ComputeShadowColor(shadow, lightData.shadowTint, lightData.penumbraTint); + lighting.diffuse *= shadowColor; + lighting.specular *= shadowColor; #endif #endif // STACK_LIT_DISPLAY_REFERENCE_AREA From 7894820a82da42ade0341b46738e928289fd243e Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Thu, 16 Apr 2020 10:30:55 +0200 Subject: [PATCH 099/200] fix Stacklit.hlsl after merge --- .../Runtime/Material/StackLit/StackLit.hlsl | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl index d306f3691c1..80a53b76a8a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/StackLit/StackLit.hlsl @@ -184,7 +184,7 @@ void GetAmbientOcclusionFactor(float3 indirectAmbientOcclusion, float3 indirectS #define TOP_DIR_IDX 0 #define BOTTOM_DIR_IDX (NB_LV_DIR-1) -// BASE_NB_LOBES will never be 1, we let the compiler optimize +// BASE_NB_LOBES will never be 1, we let the compiler optimize // everything out from bsdfData.lobeMix = 0; #define BASE_NB_LOBES 2 // use numeric indices for these arrays #define TOTAL_NB_LOBES (BASE_NB_LOBES+COAT_NB_LOBES) // use *_LOBE?_IDX for these arrays. @@ -258,9 +258,9 @@ bool IsCoatNormalMapEnabled(BSDFData bsdfData) // based on Fresnel terms (hack to reduce pre-integrated FGD fetches TODOENERGY). // // Normally when shading with normal maps, we clamp / saturate diverse values -// (eg see here BSDF_SetupNormalsAndAngles or CommonLighting's GetBSDFAngle) to avoid +// (eg see here BSDF_SetupNormalsAndAngles or CommonLighting's GetBSDFAngle) to avoid // special casing the BSDF evaluation but still shade according to the normal maps. -// Fresnel is normally evaluated with the LdotH angle, but this normally never "clips" +// Fresnel is normally evaluated with the LdotH angle, but this normally never "clips" // to the hemisphere (oriented on the normal) the complete BSDF evaluation as LdotH is // never negative (H is at most 90 degrees away from L and V). // @@ -277,9 +277,9 @@ bool IsCoatNormalMapEnabled(BSDFData bsdfData) // Obviously this is still a hack as stated but is more pleasing and is roughly akin to // having the top layer "folds" as dual-faced. // -// When no recompute per light is done or we are doing ComputeAdding in the first call in +// When no recompute per light is done or we are doing ComputeAdding in the first call in // GetPreLightData for split-sum type of lights (non dirac), we don't have a particular L -// to use and use clamped NdotV. In that case, the normal is taken as the H vector, and +// to use and use clamped NdotV. In that case, the normal is taken as the H vector, and // there will be regions where NdotV can be negative so is clamped near zero. In that case, // being in the "grazing angle region", integrated FGD or Fresnel would yeld reflectance // operators that yield zero energy transmitted to the bottom layer, and everything reflected @@ -291,15 +291,15 @@ bool IsCoatNormalMapEnabled(BSDFData bsdfData) // the geometric normal on the top since it should not be back facing to begin the // computations - in that case, we lose the Fresnel variations induced by the top normal map // and it only affects other parts of BSDF evaluations later for all types of lights. -// +// // This is VLAYERED_DUAL_NORMALS_TOP_FIX_GEOM_NORMAL. // // Otherwise, we also provide a behavior similar to flipping of the normal, and we even // saturate a bit less close to zero (than ClampNdotV) to remove the effect of the grazing -// angle. +// angle. // // This is VLAYERED_DUAL_NORMALS_TOP_FIX_FLIP_NORMAL -// +// #define VLAYERED_DUAL_NORMALS_TOP_FIX_DEFAULT 0 // do nothing #define VLAYERED_DUAL_NORMALS_TOP_FIX_GEOM_NORMAL 1 #define VLAYERED_DUAL_NORMALS_TOP_FIX_FLIP_NORMAL 2 @@ -571,7 +571,7 @@ void ApplyDebugToSurfaceData(float3x3 tangentToWorld, inout SurfaceData surfaceD // There is no metallic with SSS and specular color mode float metallic = HasFlag(surfaceData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_SPECULAR_COLOR | MATERIALFEATUREFLAGS_STACK_LIT_SUBSURFACE_SCATTERING | MATERIALFEATUREFLAGS_STACK_LIT_TRANSMISSION) ? 0.0 : surfaceData.metallic; - + float3 diffuseColor = ComputeDiffuseColor(surfaceData.baseColor, metallic); bool specularWorkflow = HasFlag(surfaceData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_SPECULAR_COLOR); float3 specularColor = specularWorkflow ? surfaceData.specularColor : ComputeFresnel0(surfaceData.baseColor, surfaceData.metallic, IorToFresnel0(surfaceData.dielectricIor)); @@ -641,7 +641,7 @@ NormalData ConvertSurfaceDataToNormalData(SurfaceData surfaceData) { // In HazyGloss mode. ConvertSurfaceDataToNormalData() would need positionSS and to call // ConvertSurfaceDataToBSDFData, might be too heavy for a prepass, maybe find a lightweight approximation - // of HazeMapping. + // of HazeMapping. // This is a moot point though: mixing two roughnesses directly in one is already a hack, the // resulting lobe isn't representative of this. But for what ConvertSurfaceDataToNormalData() influences // (like SSR and shadows), it might be sufficient. @@ -678,7 +678,7 @@ NormalData ConvertSurfaceDataToNormalData(SurfaceData surfaceData) void HazeMapping(float3 fresnel0, float roughnessAT, float roughnessAB, float haziness, float hazeExtent, float hazeExtentAnisotropy, float3 hazyGlossMaxf0, inout BSDFData bsdfData) { float w = 10.0; // interpolation steepness weight (Bezier weight of central point) - bool useBezierToMapKh = true; + bool useBezierToMapKh = true; float3 r_c = fresnel0; // We can use clamping of roughnessA here to avoid a "p == 0/0" case if roughnessA == 0. @@ -711,7 +711,7 @@ void HazeMapping(float3 fresnel0, float roughnessAT, float roughnessAB, float ha // maximum core roughness and since this primary roughness (of lobe A) can be textured, we // don't know it). float p = alpha_n_xy/alpha_w_xy; // peak ratio formula at theta_d = 0 (ie p is in the paper := P(0)) - + float r_c_max = Max3(r_c.r, r_c.g, r_c.b); float k_h_max = 0.0; @@ -720,13 +720,13 @@ void HazeMapping(float3 fresnel0, float roughnessAT, float roughnessAB, float ha bsdfData.lobeMix = 0.0; } //else if (alpha_w_xy <= FLT_EPS) { bsdfData.lobeMix = beta_h; } - else + else { if (useBezierToMapKh) { // Smooth out C1 discontinuity at k_h = p with a Bezier curve // (loose some hazeExtent in the process). - + float b = 2*(r_c_max*(1-w)+w*p); float u; // parametric coordinate for rational Bezier curve if (abs(2*(b-1)) <= FLT_EPS) @@ -746,18 +746,18 @@ void HazeMapping(float3 fresnel0, float roughnessAT, float roughnessAB, float ha // Interpolation between 0 and positivity and energy constraints: these are lines // but form a triangle so there's a discontinuity at k_h := K_h(0) = p, hence the // branch here: - k_h_max = (r_c_max > p) ? beta_h*(1-r_c_max)/(1-p) : beta_h*r_c_max/p; + k_h_max = (r_c_max > p) ? beta_h*(1-r_c_max)/(1-p) : beta_h*r_c_max/p; } - + float r_max = r_c_max + (1-p)*k_h_max; // compound reflectivity (max color channel) float3 chromaVec = r_c/r_c_max; - + bsdfData.fresnel0 = r_max*chromaVec; bsdfData.fresnel0 = min(bsdfData.fresnel0, hazyGlossMaxf0); bsdfData.lobeMix = k_h_max / r_max; //bsdfData.lobeMix = 0.5; - // For IBL, convert back to the scalar roughness + anisotropy parametrization for the + // For IBL, convert back to the scalar roughness + anisotropy parametrization for the // secondary lobe: float anisotropyB; float roughnessB; @@ -835,7 +835,7 @@ BSDFData ConvertSurfaceDataToBSDFData(uint2 positionSS, SurfaceData surfaceData) // It is important to deal with the hazy gloss parametrization after we have fresnel0 for the base but // before the effect of the coat is applied on it. When hazy gloss is used, the current fresnel0 at this // point is reinterpreted as a pseudo-f0 ("core lobe reflectivity" or Fc(0) or r_c in the paper) - // + // if (HasFlag(surfaceData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_HAZY_GLOSS)) { // reminder: ComputeFresnel0 lerps from last param to first param using middle param as lerp factor. @@ -1076,7 +1076,7 @@ struct PreLightData float screenSpaceAmbientOcclusion; // Keep a copy of the screen space occlusion texture fetch between // PreLightData and PostEvaluateBSDF. float3 hemiSpecularOcclusion[TOTAL_NB_LOBES]; // Specular occlusion calculated from roughness and for an unknown - // (the less sparse / more uniform the better) light structure + // (the less sparse / more uniform the better) light structure // potentially covering the whole hemisphere. }; @@ -1102,7 +1102,7 @@ struct PreLightData // 1b) Clamp input roughnesses before the stack computations, so that the new top roughness also impacts the bottom. // // 2) For 1b), we also could interpret the minRoughness as clamping the coat only: since the bottom will get the -// impact of the clamp indirectly, this could suffice. +// impact of the clamp indirectly, this could suffice. // // As the light.minRoughness is a hack that can be used to simulate a sphere light from a point light, all options // can be valid, it depends on what appearance the user wants. @@ -1152,7 +1152,7 @@ void ClampRoughness(inout PreLightData preLightData, inout BSDFData bsdfData, fl // we don't update this, no need to: bsdfData.coatPerceptualRoughness = RoughnessToPerceptualRoughness(bsdfData.coatRoughness); } } - + if (!GetRecomputeStackPerLightOption()) { preLightData.layeredRoughnessT[0] = max(minRoughness, preLightData.layeredRoughnessT[0]); @@ -1170,7 +1170,7 @@ void ClampRoughness(inout PreLightData preLightData, inout BSDFData bsdfData, fl { preLightData.layeredCoatRoughness = max(minRoughness, preLightData.layeredCoatRoughness); } - + preLightData.layeredRoughnessT[0] = max(minRoughness, preLightData.layeredRoughnessT[0]); preLightData.layeredRoughnessT[1] = max(minRoughness, preLightData.layeredRoughnessT[1]); preLightData.layeredRoughnessB[0] = max(minRoughness, preLightData.layeredRoughnessB[0]); @@ -1267,7 +1267,7 @@ float3 GetOrthogonalComponent(float3 V, float3 N, bool testSingularity = false) if (testSingularity && (abs(1.0 - VdotN) <= FLT_EPS)) { // In this case N == V, and azimuth orientation around N shouldn't matter for the caller, - // we can use any quaternion-based method, like Frisvad or Reynold's (Pixar): + // we can use any quaternion-based method, like Frisvad or Reynold's (Pixar): float3x3 orthoBasis = GetLocalFrame(N); unitVOrtho = orthoBasis[0]; // we pick any axis, compiler should optimize out calculation of [1] } @@ -1528,7 +1528,7 @@ void ComputeStatistics(in float cti, in float3 V, in float3 vOrthoGeomN, in bo if( stt <= 1.0f ) { // See p5 fig5 a) vs b) : using a refraction as a peak mean is the dotted line, while the ref is the solid line. - // The scale is a hack to reproduce this effect: + // The scale is a hack to reproduce this effect: // As roughness -> 1, remove the effect of changing angle of entry. // Note that we never track complete means per se because of symmetry, we have no azimuth, so the "space" of the // means sin(theta) (here sti and stt) is just a line perpendicular to the normal in the plane of incidence. @@ -1710,9 +1710,9 @@ void ComputeAdding(float _cti, float3 V, in BSDFData bsdfData, inout PreLightDat { // Just a precaution minRoughness = 0.0; - // ie We will only take it into account if called per light. + // ie We will only take it into account if called per light. // If GetHonorPerLightMinRoughness(), we will still escape the default clamp of ClampRoughnessForDiracLightsByDefault() though. - // The net result if we're never recomputing the stack per light but signal we honor the per-light minRoughness is that we + // The net result if we're never recomputing the stack per light but signal we honor the per-light minRoughness is that we // won't clamp anything in ComputeAdding and just late clamp the resulting roughnesses at each light evaluation via ClampRoughness(). // The change in coat roughness will obviously not affect the bottom roughness in that case and the results will be wrong, but // depending on the scene setup, could be acceptable. @@ -1882,7 +1882,7 @@ void ComputeAdding(float _cti, float3 V, in BSDFData bsdfData, inout PreLightDat // Update mean - // Avoid grazing angle black artefacts and instead of + // Avoid grazing angle black artefacts and instead of // cti = ctt; cti = ClampNdotV(ctt); @@ -2482,10 +2482,10 @@ void PreLightData_SetupOcclusion(PositionInputs posInput, BSDFData bsdfData, flo // -We have 3 lobes with different roughnesses, and these have been placed unclamped and modified by vlayering in // iblPerceptualRoughness[]. // -We might have 2 different shading normals to consider. - // -Bentnormal is always considered if the algorithm permits it, but it might trivially be the normal if no bent + // -Bentnormal is always considered if the algorithm permits it, but it might trivially be the normal if no bent // normals were given by the user. // - // -Finally, our pre-calculated specular occlusion will serve for IBL for now, which have unknown structure so the + // -Finally, our pre-calculated specular occlusion will serve for IBL for now, which have unknown structure so the // whole hemisphere around the normal is taken as potential light visibility region, that's why the pre-calculated // values are identified as "hemiSpecularOcclusion". This would potentially need to be different per light type, // or even per light: @@ -2685,7 +2685,7 @@ PreLightData GetPreLightData(float3 V, PositionInputs posInput, inout BSDFData b float diffuseFGDTmp; // unused, for coat layer FGD fetch - // We will do the coat specific FGD fetch here: + // We will do the coat specific FGD fetch here: // (FGD fetches used for IBL + area light + multiscattering) GetPreIntegratedFGDGGXAndDisneyDiffuse(NdotV[COAT_NORMAL_IDX], preLightData.iblPerceptualRoughness[COAT_LOBE_IDX], @@ -2694,7 +2694,7 @@ PreLightData GetPreLightData(float3 V, PositionInputs posInput, inout BSDFData b diffuseFGDTmp, specularReflectivity[COAT_LOBE_IDX]); - // We apply the coatMask here since even an f0 of 0 in the fetch above will give a + // We apply the coatMask here since even an f0 of 0 in the fetch above will give a // directional albedo (aka specular reflectivity) that is non zero: preLightData.specularFGD[COAT_LOBE_IDX] *= bsdfData.coatMask; // This is for the base FGD fetches factored out of "if vlayering or not": @@ -2781,7 +2781,7 @@ PreLightData GetPreLightData(float3 V, PositionInputs posInput, inout BSDFData b if (AREA_LIGHTS_ANISOTROPY_ENABLED == false) { // If area lights don't support anisotropy, we can setup area lights here and occlusion after, as the former - // don't need the anisotropic modified normal and roughness (IBL anisotropy hack) and the later can use + // don't need the anisotropic modified normal and roughness (IBL anisotropy hack) and the later can use // the area lights preLightData.orthoBasisViewNormal: PreLightData_SetupAreaLights(bsdfData, V, N, NdotV, preLightData); @@ -2809,7 +2809,7 @@ PreLightData GetPreLightData(float3 V, PositionInputs posInput, inout BSDFData b // isn't really needed, as if no vlayering, COAT_LOBE_IDX will be == to one of the BASE_LOBE?_IDX // and the following line will be pruned out by the compiler: preLightData.partLambdaV[COAT_LOBE_IDX] = GetSmithJointGGXPartLambdaV(NdotV[COAT_NORMAL_IDX], preLightData.layeredCoatRoughness); - + preLightData.partLambdaV[BASE_LOBEA_IDX] = GetSmithJointGGXAnisoPartLambdaV(TdotV, BdotV, NdotV[BASE_NORMAL_IDX], preLightData.layeredRoughnessT[0], preLightData.layeredRoughnessB[0]); preLightData.partLambdaV[BASE_LOBEB_IDX] = GetSmithJointGGXAnisoPartLambdaV(TdotV, BdotV, NdotV[BASE_NORMAL_IDX], @@ -2947,7 +2947,7 @@ void ModifyBakedDiffuseLighting(float3 V, PositionInputs posInput, SurfaceData s builtinData.bakeDiffuseLighting += builtinData.backBakeDiffuseLighting * bsdfData.transmittance; } - // For SSS we need to take into account the state of diffuseColor + // For SSS we need to take into account the state of diffuseColor if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_STACK_LIT_SUBSURFACE_SCATTERING)) { bsdfData.diffuseColor = GetModifiedDiffuseColorForSSS(bsdfData); @@ -2959,7 +2959,7 @@ void ModifyBakedDiffuseLighting(float3 V, PositionInputs posInput, SurfaceData s // Note: When baking reflection probes, we approximate the diffuse with the fresnel0 builtinData.bakeDiffuseLighting *= preLightData.diffuseFGD * preLightData.diffuseEnergy * GetDiffuseOrDefaultColor(bsdfData, _ReplaceDiffuseForIndirect).rgb; - // The lobe specific specular occlusion data, along with the result of the screen space occlusion sampling + // The lobe specific specular occlusion data, along with the result of the screen space occlusion sampling // will be computed in PreLightData. } @@ -2985,7 +2985,7 @@ float GetInferredMetallic(float dielectricF0, float3 inDiffuseColor, float3 inFr if (dielectricF0 <= 0.0001) { // The baseColor + metallic parameterization gives (note that this is used to build - // a possible conversion, but the given fresnel0, diffuseColor and dielectricF0 might not + // a possible conversion, but the given fresnel0, diffuseColor and dielectricF0 might not // be possible with a baseColor + metallic parameterization): // // (A) fresnel0 = metallic * basecolor + (1.0 - metallic) * dielectricF0; @@ -3011,7 +3011,7 @@ float GetInferredMetallic(float dielectricF0, float3 inDiffuseColor, float3 inFr // metallic = 1/(diffuseColor/fresnel0 + 1); // metallic = fresnel0/(diffuseColor + fresnel0); // - // So we will use that formula when dielectricF0 == 0 since it outputs plausible values: + // So we will use that formula when dielectricF0 == 0 since it outputs plausible values: // // -When fresnel0 is 0, it will always output a desired (for the reasons discussed above) value of metallic = 0. // -When input values are possible for (A) and (B), the formula is correct (for when dielectricF0 == 0 of course). @@ -3416,9 +3416,9 @@ void GetNLForDirectionalPunctualLights(BSDFData bsdfData, PreLightData preLightD // For the rest, we will use the N which produces the biggest NdotL, as we don't want // to early out eg from the bottom layer when the top should have a highlight, // while the final BSDF evaluation will take care of applying the proper NdotL in any - // case. + // case. // We could increase the cost and complexity of all this and actually - // commit fully to making all these diract-light evaluations local to this file and + // commit fully to making all these diract-light evaluations local to this file and // pass to BSDF the L[], V[], etc. arrays instead of hacking our way around just here. float maxNdotL = max(NdotL[COAT_NORMAL_IDX], NdotL[BASE_NORMAL_IDX]); @@ -3575,7 +3575,7 @@ CBSDF EvaluateBSDF(float3 inV, float3 inL, PreLightData preLightData, BSDFData b // NO VLAYERING: // -------------------------------------------------------------------- - // Note: See GetPreLightData(), in that case, + // Note: See GetPreLightData(), in that case, // preLightData.layeredRoughnessT[0] = bsdfData.roughnessAT; // preLightData.layeredRoughnessB[0] = bsdfData.roughnessAB; // preLightData.layeredRoughnessT[1] = bsdfData.roughnessBT; @@ -4154,7 +4154,6 @@ DirectLighting EvaluateBSDF_Rect( LightLoopContext lightLoopContext, #endif #if defined(SCREEN_SPACE_SHADOWS) && !defined(_SURFACE_TYPE_TRANSPARENT) - float shadow = 1.0; if ((lightData.screenSpaceShadowIndex & SCREEN_SPACE_SHADOW_INDEX_MASK) != INVALID_SCREEN_SPACE_SHADOW) { shadow = GetScreenSpaceShadow(posInput, lightData.screenSpaceShadowIndex); @@ -4221,7 +4220,7 @@ IndirectLighting EvaluateBSDF_ScreenSpaceReflection(PositionInputs posInput, ApplyScreenSpaceReflectionWeight(ssrLighting); // For performance reasons, SSR doesn't allow us to be discriminating per lobe, ie wrt direction, roughness, - // anisotropy, etc. + // anisotropy, etc. // At least the vlayered BSDF stack model already represents the stack with a single interface with multiple // effective/equivalent lobes. @@ -4231,7 +4230,7 @@ IndirectLighting EvaluateBSDF_ScreenSpaceReflection(PositionInputs posInput, // This is the approach we take since roughnesses between coat and base lobes can be very different, while // if the coat exist, ConvertSurfaceDataToNormalData will output the roughness of the coat and we don't need // a boost of sharp reflections from a potentially rough bottom layer. - + float3 reflectanceFactor = (float3)0.0; if (IsVLayeredEnabled(bsdfData)) @@ -4447,7 +4446,7 @@ void PostEvaluateBSDF( LightLoopContext lightLoopContext, // bsdfData.diffuseColor is not appropriate to use when vlayered when doing GTAOMultiBounce here, but we can // try something with (bsdfData.diffuseColor * bsdfData.coatExtinction) (for specular occlusion with f0, it's // even worse but both are a hack anyway) We could also try "renormalizing diffuseEnergy" to the luminance of - // diffuseColor. + // diffuseColor. // For now, we use (bsdfData.diffuseColor * preLightData.diffuseEnergy) directly: float3 GTAOMultiBounceTintBase = (bsdfData.diffuseColor * preLightData.diffuseEnergy); GetApplyScreenSpaceDiffuseOcclusionForDirect(GTAOMultiBounceTintBase, preLightData.screenSpaceAmbientOcclusion, directAmbientOcclusion, lighting); From 6173e4d6f664d70186a0752af0888bfc0f5d5808 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Thu, 16 Apr 2020 10:40:10 +0200 Subject: [PATCH 100/200] Update the scripting API for FrameSettings, FrameSettingsOverrideMask and IBitArray (#110) --- .../Runtime/Utilities/BitArray.cs | 20 ++++---- .../RenderPipeline/Settings/FrameSettings.cs | 47 +++++++++---------- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/Utilities/BitArray.cs b/com.unity.render-pipelines.core/Runtime/Utilities/BitArray.cs index 252c36efed9..ad773481f85 100644 --- a/com.unity.render-pipelines.core/Runtime/Utilities/BitArray.cs +++ b/com.unity.render-pipelines.core/Runtime/Utilities/BitArray.cs @@ -9,35 +9,35 @@ namespace UnityEngine.Rendering ///
public interface IBitArray { - /// Number of elements in the bit array. + /// Gets the capacity of this BitArray. This is the number of bits that are usable. uint capacity { get; } - /// True if all bits are 0. + /// Return `true` if all the bits of this BitArray are set to 0. Returns `false` otherwise. bool allFalse { get; } - /// True if all bits are 1. + /// Return `true` if all the bits of this BitArray are set to 1. Returns `false` otherwise. bool allTrue { get; } /// - /// Returns the state of the bit at a specific index. + /// An indexer that allows access to the bit at a given index. This provides both read and write access. /// /// Index of the bit. /// State of the bit at the provided index. bool this[uint index] { get; set; } - /// Returns the bit array in a human readable form. + /// Writes the bits in the array in a human-readable form. This is as a string of 0s and 1s packed by 8 bits. This is useful for debugging. string humanizedData { get; } /// - /// Bit-wise And operation. + /// Perform an AND bitwise operation between this BitArray and the one you pass into the function and return the result. Both BitArrays must have the same capacity. This will not change current BitArray values. /// - /// Bit array with which to the And operation. + /// BitArray with which to the And operation. /// The resulting bit array. IBitArray BitAnd(IBitArray other); /// - /// Bit-wise Or operation. + /// Perform an OR bitwise operation between this BitArray and the one you pass into the function and return the result. Both BitArrays must have the same capacity. This will not change current BitArray values. /// - /// Bit array with which to the Or operation. + /// BitArray with which to the Or operation. /// The resulting bit array. IBitArray BitOr(IBitArray other); /// - /// Invert the bit array. + /// Return the BitArray with every bit inverted. /// /// IBitArray BitNot(); 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 1bad98da64e..b0757bcbf66 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 @@ -318,7 +318,9 @@ public enum FrameSettingsField [DebuggerDisplay("{mask.humanizedData}")] public struct FrameSettingsOverrideMask { - /// Mask of overridden values. + /// Gets the underlying BitArray HDRP uses to store the override mask and thus specific which field is overridden or not. + /// Note: BitArray128 is implements IBitArray and therefore has the scripting API described below. It is recomended to use the interface as the exact BitArray con evolve from one version of the package to another as the we need more capacity here. + /// [SerializeField] public BitArray128 mask; } @@ -501,59 +503,54 @@ partial struct FrameSettings BitArray128 bitDatas; /// - /// if lodBiasMode == LODBiasMode.Fixed, then this value will overwrite QualitySettings.lodBias - /// if lodBiasMode == LODBiasMode.ScaleQualitySettings, then this value will scale QualitySettings.lodBias + /// If lodBiasMode is LODBiasMode.Fixed, then this value overwrites QualitySettings.lodBias. + /// If lodBiasMode is LODBiasMode.ScaleQualitySettings, then this value scales QualitySettings.lodBias. /// [SerializeField] public float lodBias; - /// Define how the QualitySettings.lodBias value is set. + /// Specifies how HDRP calculates QualitySettings.lodBias. [SerializeField] public LODBiasMode lodBiasMode; - /// The quality level to use when fetching the quality setting value. + /// The quality level the rendering component uses when it fetches the quality setting value. [SerializeField] public int lodBiasQualityLevel; /// - /// if maximumLODLevelMode == MaximumLODLevelMode.FromQualitySettings, then this value will overwrite QualitySettings.maximumLODLevel - /// if maximumLODLevelMode == MaximumLODLevelMode.OffsetQualitySettings, then this value will offset QualitySettings.maximumLODLevel + /// If maximumLODLevelMode is MaximumLODLevelMode.FromQualitySettings, then this value overwrites QualitySettings.maximumLODLevel + /// If maximumLODLevelMode is MaximumLODLevelMode.OffsetQualitySettings, then this value offsets QualitySettings.maximumLODLevel /// [SerializeField] public int maximumLODLevel; - /// Define how the QualitySettings.maximumLODLevel value is set. + /// Specifies how HDRP calculates QualitySettings.maximumLODLevel. [SerializeField] public MaximumLODLevelMode maximumLODLevelMode; - /// The quality level to use when fetching the quality setting value. + /// The maximum quality level the rendering component uses when it fetches the quality setting value. [SerializeField] public int maximumLODLevelQualityLevel; /// - /// The material quality level to use for this rendering. - /// if materialQuality == 0, then the material quality from the current quality settings - /// (in HDRP Asset) will be used. + /// The material quality level this rendering component uses. + /// If materialQuality == 0, the rendering component uses the material quality from the current quality settings in the HDRP Asset. /// public MaterialQuality materialQuality; - /// Helper to see binary saved data on LitShaderMode as a LitShaderMode enum. + /// Specifies the rendering path this rendering component uses. Here you can use the LitShaderMode enum to specify whether the rendering component uses forward or deferred rendering. public LitShaderMode litShaderMode { get => bitDatas[(uint)FrameSettingsField.LitShaderMode] ? LitShaderMode.Deferred : LitShaderMode.Forward; set => bitDatas[(uint)FrameSettingsField.LitShaderMode] = value == LitShaderMode.Deferred; } - /// - /// Get stored data for this field. - /// + /// Gets the stored override value for the passed in Frame Setting. Use this to access boolean values. /// Requested field. /// True if the field is enabled. public bool IsEnabled(FrameSettingsField field) => bitDatas[(uint)field]; - /// - /// Set stored data for this field. - /// + /// Sets the stored override value for the passed in Frame Setting. Use this to access boolean values. /// Requested field. /// State to set to the field. public void SetEnabled(FrameSettingsField field, bool value) => bitDatas[(uint)field] = value; /// - /// Compute the LOD bias value to use + /// Calculates the LOD bias value to use. /// /// The HDRP Assets to use /// The LOD Bias to use @@ -570,7 +567,7 @@ public float GetResolvedLODBias(HDRenderPipelineAsset hdrp) } /// - /// Compute the Maximum LOD level to use + /// Calculates the Maximum LOD level to use. /// /// The HDRP Asset to use /// The Maximum LOD level to use. @@ -732,7 +729,7 @@ internal static void AggregateFrameSettings(ref FrameSettings aggregatedFrameSet } /// - /// Equality operator. + /// Equality operator between two FrameSettings. Return `true` if equivalent. (comparison of content). /// /// First frame settings. /// Second frame settings. @@ -748,7 +745,7 @@ internal static void AggregateFrameSettings(ref FrameSettings aggregatedFrameSet && a.materialQuality == b.materialQuality; /// - /// Inequality operator. + /// Inequality operator between two FrameSettings. Return `true` if different. (comparison of content). /// /// First frame settings. /// Second frame settings. @@ -764,7 +761,7 @@ internal static void AggregateFrameSettings(ref FrameSettings aggregatedFrameSet || a.materialQuality != b.materialQuality; /// - /// Equality operator. + /// Equality operator between two FrameSettings. Return `true` if equivalent. (comparison of content). /// /// Frame Settings to compare to. /// True if both settings are equal. @@ -780,7 +777,7 @@ public override bool Equals(object obj) && materialQuality.Equals(((FrameSettings)obj).materialQuality); /// - /// Returns the hash code of the frame settings. + /// Returns the hash code of this object. /// /// Hash code of the frame settings. public override int GetHashCode() From a41f7a5ed99fdb8f820fbd6fe5c72ce43fe8922b Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Tue, 14 Apr 2020 20:15:04 +0100 Subject: [PATCH 101/200] Vfx/docs/bulk review continued (#78) * Reviewed Contexts and terminology. * Began reviewing Events * Added sticky notes doc and reviewed Events * Update Contexts.md * Formatted documentation. * Update Contexts.md Co-authored-by: Lewis Jordan Co-authored-by: Tristan Genevet --- .../Documentation~/ComponentAPI.md | 2 - .../Documentation~/Contexts.md | 157 +++++++++--------- .../Documentation~/Events.md | 58 +++---- .../Documentation~/GettingStarted.md | 2 +- .../Documentation~/GraphLogicAndPhilosophy.md | 12 +- .../Documentation~/Properties.md | 2 +- .../Documentation~/StickyNotes.md | 46 +++++ .../Documentation~/TableOfContents.md | 1 + .../Documentation~/VisualEffectGraphWindow.md | 2 +- 9 files changed, 167 insertions(+), 115 deletions(-) create mode 100644 com.unity.visualeffectgraph/Documentation~/StickyNotes.md diff --git a/com.unity.visualeffectgraph/Documentation~/ComponentAPI.md b/com.unity.visualeffectgraph/Documentation~/ComponentAPI.md index a819e258e83..f9da96d6bce 100644 --- a/com.unity.visualeffectgraph/Documentation~/ComponentAPI.md +++ b/com.unity.visualeffectgraph/Documentation~/ComponentAPI.md @@ -1,5 +1,3 @@ -
Draft: The content on this page is complete, but it has not been reviewed yet.
- # Visual Effect component API To create an instance of a [Visual Effect Graph](VisualEffectGraphAsset.md) in a Scene, Unity uses the [Visual Effect component](VisualEffectComponent.md). The Visual Effect component attaches to GameObjects in your Scene and references a Visual Effect Graph which defines the visual effect. This allows you to create different instances of effects at various positions and orientations, and control each effect independently. To control an effect at runtime, Unity provides C# API that you can use to modify the Visual Effect component and set [Property](Properties.md) overrides. diff --git a/com.unity.visualeffectgraph/Documentation~/Contexts.md b/com.unity.visualeffectgraph/Documentation~/Contexts.md index 6cef77728e7..b88f7430276 100644 --- a/com.unity.visualeffectgraph/Documentation~/Contexts.md +++ b/com.unity.visualeffectgraph/Documentation~/Contexts.md @@ -1,137 +1,142 @@ -
Draft: The content on this page is complete, but it has not been reviewed yet.
# Contexts -Contexts are the main elements of the Graph Workflow logic (vertical) and define the succession and the relationships of operations and simulations. Every context defines one stage of computing, for example computing how many particles need to be spawned, creating new particles or updating all living particles. +Contexts are the main element of the Visual Effect Graph's **processing** (vertical) workflow and determine how particles spawn and simulate. The way you organize Contexts on the graph defines order of operation for the processing workflow. For information on the processing workflow, see [Visual Effect Graph Logic](GraphLogicAndPhilosophy.md). Every Context defines one stage of computation. For example a Context can: -Context connect to each other when there is meaning : After creating new particles, an Initialize context can connect to a Update Particle context, or directly to a Output Particle Context to render the particles without simulating them. +* Calculate how many particles the effect should spawn. +* Create new particles. +* Update all living particles. -## Creating and Connecting Contexts +Contexts connect to one another sequentially to define the lifecycle of particles. After a graph creates new particles, the **Initialize** Context can connect to an **Update Particle** Context to simulate each particle. Also, the **Initialize** Context can instead connect directly to an **Output Particle** Context to render the particles without simulating any behavior. -Contexts are Graph elements, so they can be created using the Right Click > Add Node Menu, Spacebar Menu or by making a workflow (vertical) connection from another context (providing only compatible contexts) +## Creating and connecting Contexts -Contexts connect to each other using the Ports at the top and the bottom. +A Context is a type of [graph element](GraphLogicAndPhilosophy.md#graph-elements) so to create one, see [Adding graph elements](VisualEffectGraphWindow.md#adding-graph-elements). + +Contexts connect to one another in a vertical, linear order. To achieve this, they use [flow slots](). Depending on which part of the particle lifecycle a Context defines, it may have flow slots on its top, its bottom, or both. ## Configuring Contexts -Adjusting Context [Settings](GraphLogicAndPhilosophy.md#settings) in the Node UI or the Inspector can change the way the Operator looks and behaves. +To change the behavior of the Context, adjust its [settings](GraphLogicAndPhilosophy.md#settings) in the Node UI or the Inspector. -> For instance, Changing the UV Mode of a `Quad Output` Context, from *Simple* to *FlipbookMotionBlend* will add Extra *Flipbook Size*, *Motion Vector Map* and *Motion Vector Scale* Properties to the Context Header. +Some settings also change how the Context looks. For example in a **Quad Output** Context, if you set the UV Mode to **FlipbookMotionBlend**, Unity adds the following extra properties to the Context header: **Flipbook Size**, **Motion Vector Map**, and **Motion Vector Scale**. -## Flow Compatibility +## Flow compatibility -Not all contexts can be connected altogether, in any order. Some rules apply to keep a consistent workflow: +Not all Contexts can connect to one another. To keep a consistent workflow, the following rules apply: -* Contexts connect by compatible input/output data type. -* Events can connect to one or many events / initialize contexts. -* Initialize contexts can have one or many SpawnEvent source or one or many GPUSpawnEvent source, but these data type are mutually exclusive. -* Only One Initialize can be connected to one Update Context -* You can connect any Output Contexts to a Initialize / Update context. +* Contexts only connect to compatible input/output data types. +* [Events](Events.md) can connect to one or many Events or **Initialize** Contexts. +* **Initialize** Contexts can have one or many **SpawnEvent** sources or one or many **GPUSpawnEvent** sources, but these data type are mutually exclusive. +* Only one **Initialize** Context can connect to one **Update** Context. +* You can connect an **Output** Context to an **Initialize** or **Update** Context. - Here is a recap table of the context compatibility: +For a breakdown of context compatibility, see the table below. | Context | Input Data Type | Output Data Type | Specific Comments | -| ------------------ | ------------------------------------ | ---------------- | ------------------------------------------------------------ | -| Event | None | SpawnEvent (1+) | | -| Spawn | SpawnEvent (1+) | SpawnEvent (1+) | Two input pins, start and stop the spawn context | -| GPU Event | None | SpawnEvent | Outputs to Initialize Context | -| Initialize | SpawnEvent (1+) / GPUSpawnEvent (1+) | Particle (1) | Can output to Particle Update or Particle Output. Input types SpawnEvent/GPUSpawnEvent are mutually exclusive. | -| Update | Particle (1) | Particle (1+) | Can output to a Particle Update or Particle Output | -| Particle Output | Particle (1) | None | Can either have input from an Initialize or Update | -| Static Mesh Output | None | None | Standalone Context | +| ---------------------- | --------------------------------------------- | ------------------- | ------------------------------------------------------------ | +| **Event** | **None** | **SpawnEvent** (1+) | **None** | +| **Spawn** | **SpawnEvent** (1+) | **SpawnEvent** (1+) | Has two input flow slots which start and stop the **Spawn** context respectively. | +| **GPU Event** | **None** | **SpawnEvent** | Outputs to **Initialize** Context | +| **Initialize** | **SpawnEvent** (1+) or **GPUSpawnEvent** (1+) | **Particle** (1) | Input types are either **SpawnEvent** or **GPUSpawnEvent**. These input types are mutually exclusive.
Can output to **Particle Update** or **Particle Output**. | +| **Update** | **Particle** (1) | **Particle** (1+) | Can output to a **Particle Update** or **Particle Output**. | +| **Particle Output** | **Particle** (1) | **None** | Can either have input from an **Initialize** or **Update** Context.
No output. | +| **Static Mesh Output** | **None** | **None** | Standalone Context. | -# Context Type Overview +# Context type overview -This section covers all the common settings of every kind of context. For more details about specific contexts, see [Context Library]() +This section covers all the common settings for every kind of Context. ## Event -Event Contexts only display a Name as a string that need to be called on the Component API in order to Send this event to the graph and activate a workflow from this Node. +Event Contexts only display their name, which is a string. To trigger an Event Context and activate a workflow from it, use the Event Context's name in the [component API](ComponentApi.md). For information on how to do this, see [Sending Events](ComponentApi.md#sending-events). ## Spawn -Spawn Contexts are standalone systems that have three States : Playing, Stopped and Delayed. - -* **Looping** (Running) state means that the Blocks are computed and will perform spawn of new particles -* **Finished** (Idle) state means that the spawn machine is off and will not spawn particles -* **DelayingBeforeLoop/DelayingAfterLoop** (Waiting) state stops spawning particles until the end of a user-set delay, then restarts spawning particles. +Spawn Contexts are standalone systems that have three States: Running, Idle, and Waiting. -Spawn contexts can be customized using compatible **Blocks**. +* **Looping** (Running): This state means that Unity computes the Blocks in the Context and spawns new particles. +* **Finished** (Idle): This state means that the spawn machine is off and does not compute Blocks in the Context or spawn particles. +* **DelayingBeforeLoop/DelayingAfterLoop** (Waiting): This state pauses the Context for the duration of a delay time which you can specify. After the delay, the Context resumes, computes Blocks in the Context, and spawns particles. -You can find Spawn Context API Reference [here](https://docs.unity3d.com/2019.3/Documentation/ScriptReference/VFX.VFXSpawnerLoopState.html). +To customize **Spawn** Contexts, you can add compatible **Blocks** to them. For information on the Spawn Context API, see the [Script Reference](https://docs.unity3d.com/2019.3/Documentation/ScriptReference/VFX.VFXSpawnerLoopState.html). -### Turning On and Off +### Enabling and disabling -Spawn Contexts expose two [Flow Input Slots](GraphLogicAndPhilosophy.md#processing-workflow-vertical-logic): Start and Stop: +Spawn Contexts expose two [flow slots](GraphLogicAndPhilosophy.md#processing-workflow-vertical-logic): **Start** and **Stop**: -- Start input **Resets** and/or **Start** the Spawn System : if not connected, it is implicitly bound to the `OnPlay` [Event](Events.md) . Hitting Start many times has the same effect as pushing it once. -- Stop input **Stops** the Spawn System : if not connected, it is implicitly bound to the `OnStop` [Event](Events.md) +- The **Start** input resets/starts the Spawn Context. If you do not connect anything to this flow slot, it implicitly uses the **OnPlay** [Event](Events.md). Using **Start** many times has the same effect as using it once. +- The **Stop** input stops the Spawn System. If you do not connect anything to this flow slot, it implicitly uses the **OnStop** [Event](Events.md). -### Looping and Delaying +### Looping and delaying -Spawn contexts contains a state and will perform spawning particles based on a looping system. +Each Spawn Context contains a state to determine when the Context spawns particles. -* The spawn context can emit during **loops of defined duration** (meaning the internal spawn time will reset at each loop's beginning) . By default the duration is **infinite**. - * In order to set the loop mode, select the context in the graph and change the loop duration popup in the Inspector. (Possible Values : Infinite, Constant, Random) -* Spawn contexts can perform **one**, **many** or an **infinity** of **loops**. - * In order to set this setting, select the spawn context in the graph and change the Loop count popup in the Inspector (Possible Values : Infinite, Constant, Random) -* Spawn contexts can perform a **delay** **before** and/or a**delay after** each loop. During a delay, the spawn time elapses normally but no spawn is performed. - * In order to set these setting, select the spawn context in the graph and change the Delay Before Loop and Delay After Loop popups in the Inspector (Possible Values: None, Constant, Random) +* The Spawn Context emits particles during loops of a particular duration. This means the internal spawn time resets when each loop starts. By default, the duration is **infinite**, but you can change this.
To set the loop mode: + 1. Select the Spawn Context in the graph. + 2. In the Inspector, click the **Loop Duration** drop-down. + 3. From the list, click either **Infinite**, **Constant**, or **Random**. +* Spawn Contexts can perform one, many, or an infinite number of loops.
To set the number of loops: + 1. Select the Spawn Context in the graph. + 2. In the Inspector, click the **Loop** drop-down. + 3. From the list, click either **Infinite**, **Constant**, or **Random**. +* Spawn Contexts can perform a delay before and after each loop. During a delay, the spawn time elapses normally but the Spawn Context does not spawn any particles.
To set the delay duration: + 1. Select the Spawn Context in the graph. + 2. In the Inspector, click either the **Delay Before Loop** or **Delay After Loop** drop-down. + 3. From the list, click either **None**, **Constant**, or **Random**. -Here is a visual illustration of the Looping and Delay System. +If you set **Loop Duration**, **Loop**, **Delay Before Loop**, or **Delay After Loop** to either **Constant** or **Random**, the Spawn Context displays extra properties in its header to control each behavior. To evaluates the values you set, Unity uses the following rules: -![Figure explaining the Loop/Delay System](Images/LoopDelaySystem.png) +- If set, Unity evaluates **Loop Count** when the **Start** flow input of the Context triggers. +- If set, Unity evaluates **Loop Duration** every time a loop starts. +- If set, Unity evaluates **Loop Before/After Delay** every time a delay starts. -Setting a loop count, loop duration and / or delays will display new connectable properties on the context's header. Evaluation of these values will follow these rules: +For a visualization of the looping and delay system, see the following illustration: -* If set : **Loop Count** is evaluated when the Start workflow input of the context is hit. -* If set : **Loop Duration** is evaluated every time a loop starts -* If set : **Loop Delay** (Before/After) is evaluated every time a delay starts. +![Figure explaining the Loop/Delay System](Images/LoopDelaySystem.png) ## GPU Event -GPU Event contexts are experimental contexts that connect inputs to output GPU Events from other systems. They differ from Traditional Spawn as they are computed by the GPU. Only one kind of Spawn can be connected to an Initialize Context (GPU Event and Spawn/Events are mutually Exclusive) +GPU Event Contexts are experimental Contexts that connect inputs to output GPU Events from other systems. They differ from the normal Event Contexts in two ways: -> GPU Event contexts cannot be customized with Blocks. -> +* The GPU computes GPU Events and the CPU computes normal Events. +* You can't customize GPU Event Contexts with Blocks. + +**Note**: When you connect Spawn Events to an Initialize Context, be aware that GPU Spawn Events and normal Spawn Events are mutually Exclusive. You can only connect one type of Spawn Event to an **Initialize** Context at the same time. ## Initialize -Initialize Contexts will generate new particles based on **SpawnEvent** Data, computed from Events, Spawn or GPU Event contexts. +Initialize Contexts generate new particles based on **SpawnEvent** Data, which Unity computes from Events, Spawn Contexts, or GPU Event Contexts. -> For example: upon receiving an order of creation of 200 new particles from a spawn context, the context will be processed and will result in executing the context's Blocks for all 200 new particles. +For example: If a Spawn Context states that the effect should create 200 new particles, the Initialize Context processes its Blocks for all 200 new particles. -Initialize contexts can be customized using compatible **Blocks**. +To customize **Initialize **Contexts, you can add compatible **Blocks** to them. -Initialize contexts are the entry point of new systems. As such, they display information and configuration in their header: +Initialize contexts are the entry point of new systems. As such, they display the following information and configuration details in their header: | Property/Setting | Description | -| ------------------ | ------------------------------------------- | -| Bounds (Property) | Controls the Bounding box of the System | -| Capacity (Setting) | Controls the allocation count of the System | - - +| ---------------------- | -------------------------------------------- | +| **Bounds** (Property) | Controls the Bounding box of the System. | +| **Capacity** (Setting) | Controls the allocation count of the System. | ## Update -Update contexts update all living particles based on **Particle** Data computed from Initialize and Update Contexts. These contexts are executed every frame and will update every particle. +Update Contexts update all living particles in the system based on **Particle** Data, which Unity computes from Initialize and Update Contexts. Unity executes Update Contexts, and thus updates every particle, every frame. -Particle Update Contexts also process automatically some computations for particles in order to simplify common editing tasks. +Particle Update Contexts also automatically process some computations for particles in order to simplify common editing tasks. -Update contexts can be customized using compatible **Blocks**. +To customize **Update** Contexts, you can add compatible **Blocks** to them. | Setting | Description | -| ------------------- | ------------------------------------------------------------ | -| Integration | None : No velocity Integration
Euler : Applies simple Euler velocity integration to the particles positions every frame. | -| Angular Integration | None : No velocity Integration
Euler : Applies simple Euler angular velocity integration to the particles angles every frame. | -| Age Particles | If Age attribute is used, Controls whether update will make particles age over time | -| Reap Particles | If Age and Lifetime attributes are used, Control whether update will kill all particles which age is greater than its lifetime. | +| ----------------------- | ------------------------------------------------------------ | +| **Update Position** | Specifies whether Unity applies velocity integration to the particles. When enabled, Unity applies simple Euler velocity integration to each particle's position every frame. When disabled, Unity does not apply any velocity integration. | +| **Update Rotation** | Specifies whether Unity applies angular integration to the particles. When enabled, Unity applies simple Euler integration to each particle's rotation every frame. When disabled, Unity does not apply any angular integration. | +| **Age Particles** | If the Context uses the Age attribute, this controls whether the Update Context makes particles age over time. | +| **Reap Particles** | If the Context uses the Age and Lifetime attributes, this control whether the Update Context removes a particles if the particle's age is greater than its lifetime. | ## Output -Output Contexts renders a system with different modes and settings depending on Particle Data incoming from an **Initialize** or **Update** context. Every element will be rendered using a specific configuration as a specific primitive. - -Output contexts can be customized using compatible **Blocks**. +Output Contexts render the particles in a system. They render the particles with different modes and settings depending on the particle Data from the **Initialize** and **Update** Contexts in the same system. It then renders the configuration as a particular primitive shape. -For more information, and a comprehensive list of all output contexts and their settings, see [Output Contexts Reference]() +To customize **Output** Contexts, you can add compatible **Blocks** to them. diff --git a/com.unity.visualeffectgraph/Documentation~/Events.md b/com.unity.visualeffectgraph/Documentation~/Events.md index 863e7c084dc..9778fa82eaa 100644 --- a/com.unity.visualeffectgraph/Documentation~/Events.md +++ b/com.unity.visualeffectgraph/Documentation~/Events.md @@ -1,60 +1,62 @@ -
Draft: The content on this page is complete, but it has not been reviewed yet.
# Events -Events are the Processing Workflow inputs of a Visual Effect Graph. Through Events, a Visual Effect can : +Events define the inputs for a Visual Effect Graph's [**processing** workflow](GraphLogicAndPhilosophy.md#processing-workflow-(vertical-logic)). The Spawn and Initialize [Contexts](Contexts.md) use Events as their inputs. Through Events, a Visual Effect Graph can : -* Start and stop spawning particles, -* Read Attribute payloads sent from C# - -Events are used in the graph as inputs for Spawn Contexts and Initialize +* Start and stop spawning particles. +* Read [Event Attribute payloads](#eventattribute-payloads) sent from C# scripts. ## Creating Events ![](Images/EventContexts.png) -You can Create Events using Event Contexts. These contexts have no Flow input and connect to Spawn or Initialize Contexts. +In general, an Event is just a string that represents the Event's name. To receive an Event in the Visual Effect Graph, create an Event [Context](Contexts.md) and type the name of the Event you want to receive in the **Event Name** property. Event Contexts have no input flow slots and can only connect their output flow slot to Spawn or Initialize Contexts. + +To create an Event Context: -In order to Create an Event Context, right click in an empty space of the Workspace and select Create Node, then Select **Event (Context)** from the Node Creation menu. +1. In the [Visual Effect Graph window](VisualEffectGraphWindow.md), right-click in an empty space. +2. From the menu, click **Create Node**. +3. In the Node Creation menu, click **Contexts > Event (Context)**. +4. In the **Event Name** input field, type the name of your Event. ## Default Events -Visual Effect Graphs provide two Default Events that are implicitly bound to the Start and Stop Flow Inputs of the Spawn Contexts: +The Visual Effect Graph provide two default Events: -* `OnPlay` for the intent *Enabling the Spawn of Particles*, is implicitly bound to the Start Flow input of any Spawn Context. -* `OnStop` for the intent of *Stopping the Spawn of Particles*, is implicitly bound to the Stop Flow input of any Spawn Context. +* **OnPlay**: To enable the spawning of particles. If you do not assign an Event to a Spawn Context's **Start** input flow slot, the Visual Effect Graph implicitly binds this Event to that input flow slot instead. +* **OnStop**: To disable the spawning of particles. If you do not assign an Event to a Spawn Context's **Stop** input flow slot, the Visual Effect Graph implicitly binds this Event to that input flow slot instead. -Connecting Event Contexts on the Start and Stop Flow inputs of a Spawn Contexts will remove the implicit binding to the `OnPlay` and `OnStop` Events +If you connect an Event Context to a Spawn Context's **Start** or **Stop** input flow slot, this removes the implicit binding to the **OnPlay** and **OnStop** Events respectively. ## Custom Events -Custom Events can be created inside Visual Effect Graphs using Event Contexts. +If you do not want to use the default Events, you can use an Event Context to create your own custom Event. -In order to create a custom event, create an event using the **Create Node** menu, then change its name in the **Event Name** field +To do this, first [create an Event Context](#creating-events), then type the name of your custom Event in the **Event Name** property. -## EventAttribute Payloads +## Event Attribute Payloads -Event Attribute payloads are attributes attached on one event. You can set these attributes in Visual Effect Graph using the **Set [Attribute] Event Attribute>** Blocks in Spawn Contexts, but you can also attach them to events sent from the scene using the [Component API](ComponentAPI.md#event-attributes) . +Event Attribute payloads are attributes that you can attach to an Event. To set these attributes in a Visual Effect Graph, you can use the **Set [Attribute]** Blocks in Spawn Contexts, but you can also attach them to Events you send from C# scripts. For information on how to do that latter, see [Component API](ComponentAPI.md#event-attributes) . -EventAttribute Payloads are attributes that will implicitly travel through the graph from Events, through Spawn Systems, and that can be caught in Initialize Contexts using **Get Source Attribute Operators** and **Inherit [Attribute] Blocks** +Event Attribute Payloads are attributes that implicitly travel through the graph from Events, through Spawn Contexts, and eventually to an Initialize Context. To catch a payload in an Initialize Context, use **Get Source Attribute** Operators or **Inherit [Attribute]** Blocks. -## Default VisualEffect Event +## Default Visual Effect Event -The default Visual Effect Event defines the name of the event that is implicitly sent when a `Reset` is performed on a [Visual Effect](VisualEffectComponent.md) instance (this can happen at first start or any restart of the effect). +The default Visual Effect Event defines the name of the Event that the Visual Effect Graph implicitly sends when a [Visual Effect](VisualEffectComponent.md) instance **Resets**. This happens when the effect first starts, or when the effect restarts. -Default VisualEffect Event is defined in the [Visual Effect Graph Asset Inspector](VisualEffectGraphAsset.md) but can be overridden in any [Visual Effect Inspector](VisualEffectComponent.md) for any instance in the scene. +You can define the default Visual Effect Event for each [Visual Effect Graph Asset](VisualEffectGraphAsset.md) independently. You can also override this value for every instance of the Visual Effect Graph Asset. To override the default Visual Effect Event for an instance, see **Initial Event Name** in the [Visual Effect Inspector](VisualEffectComponent.md). ## GPU Events -GPU Events is an **Experimental feature** of Visual Effect Graph : It enables particle spawn based on other Particles. You can enable this option in [Visual Effect Preferences](VisualEffectPreferences.md) . +GPU Events are an **Experimental feature** of the Visual Effect Graph. They allow you to spawn particles based on other particles. To enable this option, enable the **Experimental Operators/Blocks** checkbox in the [Visual Effect Preferences](VisualEffectPreferences.md) . -![](Images/GPUEvent.png) +GPU Events are Event Contexts that rely on data sent from other systems, for example, when a particle dies. The following Update Blocks can send GPU Event Data: -GPU Events are Event Contexts that relies on Data sent from other Systems, for instance when a particle dies, or other conditions. The following Update Blocks can send GPU Event Data: +* **Trigger Event On Die**: Spawns N Particles on another system when a particle dies. +* **Trigger Event Rate**: Spawn N Particles per second (or per distance travelled), based on a particle from a system. +* **Trigger Event Always**: Spawns N Particles every frame. -* **Trigger Event On Die** : Spawns N Particles on another system when a particle dies -* **Trigger Event Rate** : Spawn N Particles per second (or per distance travelled), based on a particle from a system -* **Trigger Event Always** : Spawns N Particles every Frame. +These Blocks connect to a **GPUEvent** Context. This Context does not handle any Blocks, but instead connects to an Initialize Context of a child system. -These Blocks connect to a **GPUEvent** Context. This context does not handle any Blocks but instead connects to a Initialize Context of a child system. +To gather data from the parent particle, a child system must refer to [Source Attributes](Attributes.md) in its Initialize Context. To do this, a child system can use a **Get Source Attribute** Operator, or an **Inherit Attribute** Block. For a visual example, see the image below. -In order to gather data from the parent particle, the child system must refer to [Source Attributes](Attributes.md) in its Initialize Context, by using **Get Source Attribute Operator**, or **Inherit Attribute Block**,as shown as in the example above : The child System inherits the source position of the particle that created it, and inherits roughly 50% of its speed. +![](Images/GPUEvent.png)*In this example, the child System inherits the source position of the particle that creates it. It also inherit roughly 50% of the parent particle's speed.* diff --git a/com.unity.visualeffectgraph/Documentation~/GettingStarted.md b/com.unity.visualeffectgraph/Documentation~/GettingStarted.md index 6e026959837..887e79b30e2 100644 --- a/com.unity.visualeffectgraph/Documentation~/GettingStarted.md +++ b/com.unity.visualeffectgraph/Documentation~/GettingStarted.md @@ -69,7 +69,7 @@ To preview an effect, you can: This lets you edit parameters directly in the Scene, see the lighting on your effect, and use the [Target GameObject Panel](VisualEffectGraphWindow.md#target-visual-effect-gameobject) features for the specific target instance of your effect. -## Manipulating Graph Elements +## Manipulating graph elements When you open an Asset inside the Visual Effect Graph window, you can see and edit the graph for that specific Asset. A Visual Effect Graph contains [Operator Nodes](Operators.md) and [Blocks](Blocks.md). Each Node is in charge of processing its input properties. You can link Nodes together to perform a series of calculations. All Nodes end up connecting into a Block (or a context) : A Block defines an operation on an effect, based on its input properties. diff --git a/com.unity.visualeffectgraph/Documentation~/GraphLogicAndPhilosophy.md b/com.unity.visualeffectgraph/Documentation~/GraphLogicAndPhilosophy.md index 9eccb1e57c6..ba09cc4c79c 100644 --- a/com.unity.visualeffectgraph/Documentation~/GraphLogicAndPhilosophy.md +++ b/com.unity.visualeffectgraph/Documentation~/GraphLogicAndPhilosophy.md @@ -9,7 +9,7 @@ The Visual Effect Graph uses two distinct workflows: ## Processing workflow (vertical logic) The processing workflow links together a succession of customizable stages to define the complete system logic. This is where you can determine when the spawn, initialization, updating, and rendering of the particles happen during the effect. -The processing workflow connects Contexts using their **Flow Slots** located at the top and the bottom of the Context Node. +The processing workflow connects Contexts using their **flow slots** located at the top and the bottom of the Context Node. The processing logic defines the different stages of processing of a visual effect. Each stage consists of a large colored container called a [Contexts](Contexts.md). Each Context connects to another compatible Context, which defines how the next stage of processing uses the current Context. @@ -23,13 +23,13 @@ The Visual Effect Graph comes with a large Block and Node library that you can t To customize how particles behave, you can connect horizontal Nodes to a Block to create a custom a mathematical expression. To do this, use the **Create Node** context menu to add Nodes, change their values, then connect the Nodes to Block properties. -## Graph Elements +## Graph elements -A Visual Effect Graph provides a workspace where you can create Graph Elements and connect them together to define effect behaviors. The Visual Effect Graph comes with many different types of Graph Elements that fit into the workspace. +A Visual Effect Graph provides a workspace where you can create graph elements and connect them together to define effect behaviors. The Visual Effect Graph comes with many different types of graph elements that fit into the workspace. ### Workspace -A Visual Effect Graph provides a **Workspace** where you can create Graph Elements and connect them together to define effect behaviors. +A Visual Effect Graph provides a **Workspace** where you can create graph elements and connect them together to define effect behaviors. ![The vertical workflow contains Systems, which then contain Contexts, which then contain Blocks. Together, they determine when something happens during the “lifecycle” of the visual effect.](Images/SystemVisual.png) @@ -74,7 +74,7 @@ While the graph elements are different, their contents and behavior tend to be t #### Settings -Settings are Fields that you cannot connect to using the property workflow. Every Graph Element displays settings: +Settings are Fields that you cannot connect to using the property workflow. Every graph element displays settings: * In the **Graph** : Between the Title and the property container in the Graph. * In the **Inspector** : When you select a Node, the Inspector displays additional, advanced settings. @@ -85,7 +85,7 @@ If you change the value of a setting, you need to recompile the Graph to see the [Properties](Properties.md) are Fields that you can edit and connect to using the property workflow. You can connect them to other properties contained in other graph elements. -## Other Graph Elements +## Other graph elements ### Groups diff --git a/com.unity.visualeffectgraph/Documentation~/Properties.md b/com.unity.visualeffectgraph/Documentation~/Properties.md index 3d8f1168ad6..631d286a367 100644 --- a/com.unity.visualeffectgraph/Documentation~/Properties.md +++ b/com.unity.visualeffectgraph/Documentation~/Properties.md @@ -1,7 +1,7 @@
Draft: The content on this page is complete, but it has not been reviewed yet.
# Properties -Properties are editable fields that you can connect to graph elements using [Property workflow](GraphLogicAndPhilosophy.md). They can be found on Graph Elements such as [Contexts](Contexts.md), [Blocks](Blocks.md) and [Operators](Operators.md). +Properties are editable fields that you can connect to graph elements using [Property workflow](GraphLogicAndPhilosophy.md). They can be found on graph elements such as [Contexts](Contexts.md), [Blocks](Blocks.md) and [Operators](Operators.md). ## Using Properties diff --git a/com.unity.visualeffectgraph/Documentation~/StickyNotes.md b/com.unity.visualeffectgraph/Documentation~/StickyNotes.md new file mode 100644 index 00000000000..b354091c749 --- /dev/null +++ b/com.unity.visualeffectgraph/Documentation~/StickyNotes.md @@ -0,0 +1,46 @@ +# Sticky Notes + +Sticky Notes are objects in a graph view that you can write in. They are the graph view equivalent of a comment in code, and consist of a title and body. You can create as many as you want in the graph, and use them for a variety of purposes, for example: + +- To describe how a section of your graph works. +- To leave notes for yourself or others collaborating in your Unity Project. +- As a to-do list that includes tasks to complete at a later date. + +## Using Sticky Notes + +To create a Sticky Note, right-click an empty space in the graph view and, in the context menu, click **Create Sticky note**. You can now customize and add content to the new Sticky Note. There are two text areas that you can write to: + +- **Title**: The text area at the top of the Sticky Note is the title. Here you can concisely describe what the Sticky Note contains in its body text area. For example, this could be the name of the graph section the Sticky Note describes. +- **Body**: The larger text area below the title area is the body. You can write the full contents of the note here. + +### Controls + +This section describes how to edit text, move and resize the Sticky Note, and perform other actions. + +#### Editing text + +To edit text on a Sticky Note, double-click on a text area. This also selects all of the text in the area so be sure to move the text cursor before you edit the text. + +#### Moving and resizing + +You can move Sticky Notes anywhere on the graph. For information on how to do this, see [manipulating graph elements](VisualEffectGraphWindow.md#moving-elements). + +You can also resize Sticky Notes. You can resize the Sticky Note manually or the Sticky Note can resize itself automatically to fit its contents. For information on how to make the Sticky Note resize itself, see the **Fit To Text** option in the [Context menu](#context-menu). For information on how to resize the Sticky Note manually, see [manipulating graph elements](VisualEffectGraphWindow.md#moving-elements). + +#### Duplicating + +You can also cut, copy, paste, and duplicate Sticky Notes. For information on how to perform these actions, see [duplicating elements](VisualEffectGraphWindow.md#copy-cut-and-paste-and-duplicate-elements). + +#### Context menu + +To open the context menu for the Sticky Note, right-click anywhere on the Sticky Note. The options in the context menu are as follows. + +| **Option** | **Description** | +| -------------------------- | ------------------------------------------------------------ | +| **Dark Theme/Light Theme** | Toggles the color theme of the Sticky Note between light theme and dark theme. | +| **Text Size** | Resizes the font in the text areas to the following values: | +| Small | Title: 20
Body: 11 | +| Medium | Title: 40
Body: 24 | +| Large | Title: 60
Body: 36 | +| Huge | Title: 80
Body: 56 | +| **Fit To Text** | Resizes the Sticky Note so that it precisely fits the text areas.
**Note**: If your title spreads over more than a single line, this horizontally resizes the Sticky Note to the smallest size where the title text fits on a single line. | diff --git a/com.unity.visualeffectgraph/Documentation~/TableOfContents.md b/com.unity.visualeffectgraph/Documentation~/TableOfContents.md index 01a144e55e7..46e0417c594 100644 --- a/com.unity.visualeffectgraph/Documentation~/TableOfContents.md +++ b/com.unity.visualeffectgraph/Documentation~/TableOfContents.md @@ -12,6 +12,7 @@ * [Attributes](Attributes.md) * [Subgraph](Subgraph.md) * [Blackboard](Blackboard.md) + * [Sticky Notes](StickyNotes.md) * [Project Settings](VisualEffectProjectSettings.md) * [Preferences](VisualEffectPreferences.md) * [The Visual Effect Component](VisualEffectComponent.md) diff --git a/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md b/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md index 01162247281..3bc325ed149 100644 --- a/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md +++ b/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md @@ -100,7 +100,7 @@ The navigation controls for the Node Workspace are similar to those that other g * **Duplicate**: Ctrl+D. * **Duplicate with edges**: Ctrl+Alt+D. -### Adding Graph Elements +### Adding graph elements To add graph elements, you can use any of the following methods: From 9bfbc94327e27a519022b3f08feccb33d887f3ac Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 16 Apr 2020 11:57:47 +0100 Subject: [PATCH 102/200] Added baked GI rp support caveat and made setting shadow filter quality clearer for deferred high. (#145) --- .../Documentation~/Shadows-in-HDRP.md | 5 +++-- com.unity.shadergraph/Documentation~/Baked-GI-Node.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md b/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md index 4ecd5cdca8b..2dede000014 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md @@ -53,9 +53,10 @@ Using high shadow bias values may result in light "leaking" through Meshes. This After HDRP captures a shadow map, it processes filtering on the map in order to decrease the aliasing effect that occurs on low resolution shadow maps. Different filters affect the perceived sharpness of shadows. -To change which filter HDRP uses, change the **Filtering Quality** property in your Unity Project’s [HDRP Asset](HDRP-Asset.html). There are currently four filter quality presets for directional and punctual lights. For information on the available filter qualities, see the [Filtering Qualities table](HDRP-Asset.html#FilteringQualities). +To change which filter HDRP uses, the method depends on which filter quality you want to use and whether your HDRP Project uses [forward or deferred rendering](Forward-And-Deferred-Rendering.md). -Currently, if you want to use **High** quality (PCSS) filtering in [deferred](Forward-And-Deferred-Rendering.html) mode, you need to enable it in the [HDRP Config package](HDRP-Config-Package.html). For information on how to do this, see the [Example section](HDRP-Config-Package.html#Example) of the Config package documentation. +* **Forward rendering**: Change the **Filtering Quality** property in your Unity Project’s [HDRP Asset](HDRP-Asset.html). This method works for every filter quality. There are currently three filter quality presets for directional and punctual lights. For information on the available filter qualities, see the [Filtering Qualities table](HDRP-Asset.html#FilteringQualities). +* **Deferred rendering**: For **Low** and **Medium** filter qualities, use the same method as forward rendering. If you want to use **High** quality (PCSS) filtering, you need to enable it in the [HDRP Config package](HDRP-Config-Package.html). For information on how to do this, see the [Example section](HDRP-Config-Package.html#Example) of the Config package documentation. ## Shadowmasks diff --git a/com.unity.shadergraph/Documentation~/Baked-GI-Node.md b/com.unity.shadergraph/Documentation~/Baked-GI-Node.md index 1b29650f742..e4c27f44dfa 100644 --- a/com.unity.shadergraph/Documentation~/Baked-GI-Node.md +++ b/com.unity.shadergraph/Documentation~/Baked-GI-Node.md @@ -9,7 +9,7 @@ Note: The behavior of this [Node](Node.md) is undefined globally. Shader Graph d Different Render Pipelines may produce different results. If you're building a shader in one Render Pipeline that you want to use in both, try checking it in both pipelines before production. A [Node](Node.md) might be defined in one Render Pipeline and undefined in the other. If this [Node](Node.md) is undefined, it returns 0 (black). #### Unity Render Pipelines Support -- High Definition Render Pipeline +- High Definition Render Pipeline. Although, this Node does not work in a Shader Graph that targets HDRP's [Unlit Master Node](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/Master-Node-Unlit.html). - Universal Render Pipeline ## Ports From 0a0c4777b60db635b7ff2ad9549c0c0d855a25d2 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Thu, 16 Apr 2020 14:22:11 +0200 Subject: [PATCH 103/200] Fix for white flash happening when changing lighting condition (like teleport) --- .../CHANGELOG.md | 2 ++ .../Lighting/LightLoop/LightLoopDef.hlsl | 3 +++ .../Lighting/Shadow/ScreenSpaceShadows.shader | 1 + .../PostProcessing/PostProcessSystem.cs | 23 ++++++++++++++----- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 40d167030e9..9054a5ba6c2 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -50,6 +50,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed culling of planar reflection probes that change position (case 1218651) - Fixed null reference when processing lightprobe (case 1235285) - Fix black screen in XR when HDRP package is present but not used. +- Fixed white flash happening with auto-exposure in some cases (case 1223774) +- Fixed NaN which can appear with real time reflection and inf value ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl index db345b63d26..873dbb2195f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl @@ -130,6 +130,9 @@ float4 SampleEnv(LightLoopContext lightLoopContext, int index, float3 texCoord, color.rgb = SampleSkyTexture(texCoord, lod, sliceIdx).rgb; } + // Planar, Reflection Probes and Sky aren't pre-expose, so best to clamp to max16 here in case of inf + color.rgb = ClampToFloat16Max(color.rgb); + return color; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader index 6857146ac21..4ffd39c9568 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ScreenSpaceShadows.shader @@ -7,6 +7,7 @@ Shader "Hidden/HDRP/ScreenSpaceShadows" #pragma target 4.5 #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/NormalBuffer.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs index 0d1e26a9a19..89cfa38f09d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs @@ -372,7 +372,11 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn } else { - if (IsExposureFixed()) + // Fix exposure is store in Exposure Textures at the beginning of the frame as there is no need for color buffer + // Dynamic exposure (Auto, curve) is store in Exposure Textures at the end of the frame (as it rely on color buffer) + // Texture current and previous are swapped at the beginning of the frame. + bool isFixedExposure = IsExposureFixed(); + if (isFixedExposure) { using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.FixedExposure))) { @@ -380,7 +384,14 @@ public void BeginFrame(CommandBuffer cmd, HDCamera camera, HDRenderPipeline hdIn } } - cmd.SetGlobalTexture(HDShaderIDs._ExposureTexture, GetExposureTexture(camera)); + // Note: GetExposureTexture(camera) must be call AFTER the call of DoFixedExposure to be correctly taken into account + // When we use Dynamic Exposure and we reset history we can't use pre-exposure (as there is no information) + // For this reasons we put neutral value at the beginning of the frame in Exposure textures and + // apply processed exposure from color buffer at the end of the Frame, only for a single frame. + // After that we re-use the pre-exposure system + RTHandle currentExposureTexture = (camera.resetPostProcessingHistory && !isFixedExposure) ? m_EmptyExposureTexture : GetExposureTexture(camera); + + cmd.SetGlobalTexture(HDShaderIDs._ExposureTexture, currentExposureTexture); cmd.SetGlobalTexture(HDShaderIDs._PrevExposureTexture, GetPreviousExposureTexture(camera)); } } @@ -485,9 +496,9 @@ void PoolSource(ref RTHandle src, RTHandle dst) cmd.DispatchCompute(cs, kernel, (camera.actualWidth + 7) / 8, (camera.actualHeight + 7) / 8, camera.viewCount); PoolSource(ref source, destination); + } } } - } if (m_PostProcessEnabled) { @@ -876,9 +887,9 @@ void DoDynamicExposure(CommandBuffer cmd, HDCamera camera, RTHandle colorBuffer, if (camera.resetPostProcessingHistory) { - kernel = cs.FindKernel("KReset"); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputTexture, prevExposure); - cmd.DispatchCompute(cs, kernel, 1, 1, 1); + // For Dynamic Exposure, we need to undo the pre-exposure from the color buffer to calculate the correct one + // When we reset history we must setup neutral value + prevExposure = m_EmptyExposureTexture; // Use neutral texture } m_ExposureVariants[0] = 1; // (int)exposureSettings.luminanceSource.value; From 59d426d152b2696ced19ebec804323873e534f9f Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Fri, 27 Mar 2020 12:33:22 +0100 Subject: [PATCH 104/200] Fix issue with metal shader and raytracing --- .../CHANGELOG.md | 1 + .../Material/LayeredLit/LayeredLit.shader | 33 ++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9054a5ba6c2..d797bc1fb19 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix black screen in XR when HDRP package is present but not used. - Fixed white flash happening with auto-exposure in some cases (case 1223774) - Fixed NaN which can appear with real time reflection and inf value +- Fixed raytracing shader compilation on Metal ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index 48fb5ccf9de..a9cac1fe65f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -369,7 +369,6 @@ Shader "HDRP/LayeredLit" HLSLINCLUDE #pragma target 4.5 - #pragma only_renderers d3d11 playstation xboxone vulkan metal switch #pragma shader_feature_local _ALPHATEST_ON #pragma shader_feature_local _DEPTHOFFSET_ON @@ -527,6 +526,8 @@ Shader "HDRP/LayeredLit" ColorMask 0 HLSLPROGRAM + + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -556,7 +557,7 @@ Shader "HDRP/LayeredLit" Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index Cull [_CullMode] - ZTest[_ZTestGBuffer] + ZTest [_ZTestGBuffer] Stencil { @@ -567,6 +568,8 @@ Shader "HDRP/LayeredLit" } HLSLPROGRAM + + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -593,8 +596,8 @@ Shader "HDRP/LayeredLit" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitSharePass.hlsl" - #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl" - #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassGBuffer.hlsl" #pragma vertex Vert #pragma fragment Frag @@ -612,6 +615,8 @@ Shader "HDRP/LayeredLit" Cull Off HLSLPROGRAM + + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -652,6 +657,8 @@ Shader "HDRP/LayeredLit" ZWrite On HLSLPROGRAM + + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -690,6 +697,8 @@ Shader "HDRP/LayeredLit" ColorMask 0 HLSLPROGRAM + + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -726,6 +735,8 @@ Shader "HDRP/LayeredLit" ZWrite On HLSLPROGRAM + + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -774,6 +785,8 @@ Shader "HDRP/LayeredLit" Cull [_CullMode] HLSLPROGRAM + + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch //enable GPU instancing support #pragma multi_compile_instancing #pragma instancing_options renderinglayer @@ -837,6 +850,8 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM + #pragma only_renderers d3d11 + #pragma raytracing surface_shader #pragma multi_compile _ DEBUG_DISPLAY @@ -880,6 +895,8 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM + #pragma only_renderers d3d11 + #pragma raytracing surface_shader #pragma multi_compile _ DEBUG_DISPLAY @@ -919,6 +936,8 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM + #pragma only_renderers d3d11 + #pragma raytracing surface_shader #pragma multi_compile _ DEBUG_DISPLAY @@ -954,6 +973,8 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM + #pragma only_renderers d3d11 + #pragma raytracing surface_shader #define SHADERPASS SHADERPASS_RAYTRACING_VISIBILITY @@ -978,6 +999,8 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM + #pragma only_renderers d3d11 + #pragma raytracing surface_shader #pragma multi_compile _ DEBUG_DISPLAY @@ -1010,6 +1033,8 @@ Shader "HDRP/LayeredLit" HLSLPROGRAM + #pragma only_renderers d3d11 + #pragma raytracing surface_shader #pragma multi_compile _ DEBUG_DISPLAY From 4c230278a40bdc48fcc3955894e8675acd38df60 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Thu, 16 Apr 2020 15:48:50 +0200 Subject: [PATCH 105/200] Fix default volume profile collapse --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d797bc1fb19..43cb17b29b1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed white flash happening with auto-exposure in some cases (case 1223774) - Fixed NaN which can appear with real time reflection and inf value - Fixed raytracing shader compilation on Metal +- Fixed an issue that was collapsing the volume components in the HDRP default settings ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs index b244d14d284..35167715150 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/DefaultSettingsPanel.cs @@ -45,7 +45,7 @@ public class Styles ReorderableList m_BeforeTransparentCustomPostProcesses; ReorderableList m_BeforePostProcessCustomPostProcesses; ReorderableList m_AfterPostProcessCustomPostProcesses; - int m_CurrentVolumeProfileHash; + int m_CurrentVolumeProfileInstanceID; public void OnGUI(string searchContext) { @@ -209,9 +209,9 @@ void Draw_VolumeInspector() EditorGUILayout.EndHorizontal(); // The state of the profile can change without the asset reference changing so in this case we need to reset the editor. - if (m_CurrentVolumeProfileHash != asset.GetHashCode() && m_CachedDefaultVolumeProfileEditor != null) + if (m_CurrentVolumeProfileInstanceID != asset.GetInstanceID() && m_CachedDefaultVolumeProfileEditor != null) { - m_CurrentVolumeProfileHash = asset.GetHashCode(); + m_CurrentVolumeProfileInstanceID = asset.GetInstanceID(); m_CachedDefaultVolumeProfileEditor = null; } From b58176ac7411b19cda3fbd8f18771821416cf331 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 16 Apr 2020 15:26:38 +0100 Subject: [PATCH 106/200] Update AxF-Shader.md (#152) --- .../Documentation~/AxF-Shader.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md b/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md index 0d5cb0b20ee..5a346878a38 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md @@ -25,7 +25,7 @@ This process does not duplicate the Textures and other resources that the origin ### Creating AxF Materials from scratch -New Materials in HDRP use the [Lit Shader](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/Lit-Shader.html) by default. To create an AxF Material from scratch, create a Material and then make it use the AxF Shader. To do this: +New Materials in HDRP use the [Lit Shader](Lit-Shader.md) by default. To create an AxF Material from scratch, create a Material and then make it use the AxF Shader. To do this: 1. In the Unity Editor, navigate to your Project's Asset window. 2. Right-click the Asset Window and select **Create > Material**. This adds a new Material to your Unity Project’s Asset folder. @@ -60,8 +60,9 @@ Note: The AxF Importer imports every Texture as half float, linear, sRGB gamut ( | --------------------- | ------------------------------------------------------------ | | **Material Tiling U** | Sets the tile rate along the x-axis for every Texture in the **Surface Inputs** section. HDRP uses this value to tile the Textures along the x-axis of the Material’s surface, in object space. | | **Material Tiling V** | Sets the tile rate along the y-axis for every Texture in the **Surface Inputs** section. HDRP uses this value to tile the Textures along the y-axis of the Material’s surface, in object space. | -| **BRDF Type** | Controls the main AxF Material representation.
• **SVBRDF**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - SVBRDF](https://docs.google.com/document/d/1_Oq2hsx3J7h8GHKoQM_8qf6Ip5VlHv_31K7dYYVOEmU/edit#heading=h.f1msh9g44mev).
•**CAR_PAINT**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - CAR_PAINT](https://docs.google.com/document/d/1_Oq2hsx3J7h8GHKoQM_8qf6Ip5VlHv_31K7dYYVOEmU/edit#heading=h.eorkre6buegg). | +| **BRDF Type** | Controls the main AxF Material representation.
• **SVBRDF**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - SVBRDF](#SVBRDF).
•**CAR_PAINT**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - CAR_PAINT](#CAR_PAINT). | + #### BRDF Type - SVBRDF | **Property** | **Description** | @@ -86,6 +87,7 @@ Note: The AxF Importer imports every Texture as half float, linear, sRGB gamut ( | **- Enable Refraction** | Indicates whether the clear coat is refractive. If you enable this checkbox, HDRP uses angles refracted by the clear coat to evaluate the undercoat of the Material surface. | | **- - Clearcoat IOR** | Specifies a Texture (red channel only) that implicitly defines the index of refraction (IOR) for the clear coat by encoding it to a monochromatic (single value) F0 (aka as specular color or Fresnel reflectance at 0 degree incidence. This also assumes the coat interfaces with air). As such, the value is in the range of **0** to **1** and HDRP calculates the final IOR as:
`IOR = (1.0 + squareRoot(R) ) / (1.0 - squareRoot(R))`
Where **R** is the normalized value in the red color channel of this Texture. Note: HDRP uses this IOR for both coat refraction and, if enabled, transmission and reflectance calculations through and on the coat. Therefore, you must always assign a Texture to this property when you enable clear coat. | + #### BRDF Type - CAR_PAINT | **Property** | **Description** | From 27d2abf75526f99450fc5297c94a041895dcc258 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 16 Apr 2020 10:20:46 -0700 Subject: [PATCH 107/200] Bind missing buffer #159 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 43cb17b29b1..a2b1726ffbc 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed NaN which can appear with real time reflection and inf value - Fixed raytracing shader compilation on Metal - Fixed an issue that was collapsing the volume components in the HDRP default settings +- Fixed warning about missing bound decal buffer ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. 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 ab4468b6cad..3ab1fcabdd2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -3104,6 +3104,10 @@ void RenderDBuffer(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext { // We still bind black textures to make sure that something is bound (can be a problem on some platforms) m_DbufferManager.BindBlackTextures(cmd); + + // Bind buffer to make sure that something is bound . + cmd.SetGlobalBuffer(HDShaderIDs._DecalPropertyMaskBufferSRV, m_DbufferManager.propertyMaskBuffer); + return; } From 19a40bbb20fd23577a6a6c9e0d345581627448ac Mon Sep 17 00:00:00 2001 From: skhiat <55133890+skhiat@users.noreply.github.com> Date: Fri, 17 Apr 2020 19:22:24 +0200 Subject: [PATCH 108/200] Enable Light Baking Cookies by default + Warning #79 --- .../Editor/Lighting/HDLightUI.Skin.cs | 1 + .../Editor/Lighting/HDLightUI.cs | 14 ++++++++------ .../Runtime/RenderPipeline/HDRenderPipeline.cs | 6 ++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs index 791fbe90800..19986edf466 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs @@ -42,6 +42,7 @@ sealed class Styles public readonly GUIContent cookieTextureTypeError = new GUIContent("HDRP does not support the Cookie Texture type, only Default is supported.", EditorGUIUtility.IconContent("console.warnicon").image); public readonly string cookieNonPOT = "HDRP does not support non power of two cookie textures."; public readonly string cookieTooSmall = "Min texture size for cookies is 2x2 pixels."; + public readonly string cookieBaking = "Light Baking for cookies disabled on the Project Settings."; // Additional light data diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index af3526dd800..cb3a5d59d1c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -410,7 +410,7 @@ static void DrawShapeContent(SerializedHDLight serialized, Editor owner) case AreaLightShape.Disc: //draw the built-in area light control at the moment as everything is handled by built-in serialized.settings.DrawArea(); - serialized.displayAreaLightEmissiveMesh.boolValue = false; //force deactivate emissive mesh for Disc (not supported) + serialized.displayAreaLightEmissiveMesh.boolValue = false; //force deactivate emissive mesh for Disc (not supported) break; case (AreaLightShape)(-1): //multiple different values using (new EditorGUI.DisabledScope(true)) @@ -722,12 +722,12 @@ static void DrawEmissionContent(SerializedHDLight serialized, Editor owner) EditorGUI.indentLevel--; } - ShowCookieTextureWarnings(serialized.settings.cookie); + ShowCookieTextureWarnings(serialized.settings.cookie, serialized.settings.isCompletelyBaked || serialized.settings.isBakedOrMixed); } else if (serialized.areaLightShape == AreaLightShape.Rectangle || serialized.areaLightShape == AreaLightShape.Disc) { EditorGUILayout.ObjectField( serialized.areaLightCookie, s_Styles.areaLightCookie ); - ShowCookieTextureWarnings(serialized.areaLightCookie.objectReferenceValue as Texture); + ShowCookieTextureWarnings(serialized.areaLightCookie.objectReferenceValue as Texture, serialized.settings.isCompletelyBaked || serialized.settings.isBakedOrMixed); } if (EditorGUI.EndChangeCheck()) @@ -737,7 +737,7 @@ static void DrawEmissionContent(SerializedHDLight serialized, Editor owner) } } - static void ShowCookieTextureWarnings(Texture cookie) + static void ShowCookieTextureWarnings(Texture cookie, bool useBaking) { if (cookie == null) return; @@ -767,12 +767,14 @@ static void ShowCookieTextureWarnings(Texture cookie) } } + if (useBaking && UnityEditor.EditorSettings.disableCookiesInLightmapper) + EditorGUILayout.HelpBox(s_Styles.cookieBaking, MessageType.Warning); if (cookie.width != cookie.height) EditorGUILayout.HelpBox(s_Styles.cookieNonPOT, MessageType.Warning); if (cookie.width < LightCookieManager.k_MinCookieSize || cookie.height < LightCookieManager.k_MinCookieSize) EditorGUILayout.HelpBox(s_Styles.cookieTooSmall, MessageType.Warning); } - + static void DrawEmissionAdvancedContent(SerializedHDLight serialized, Editor owner) { HDLightType lightType = serialized.type; @@ -808,7 +810,7 @@ static void DrawEmissionAdvancedContent(SerializedHDLight serialized, Editor own bool showSubArea = serialized.displayAreaLightEmissiveMesh.boolValue && !serialized.displayAreaLightEmissiveMesh.hasMultipleDifferentValues; ++EditorGUI.indentLevel; - + Rect lineRect = EditorGUILayout.GetControlRect(); ShadowCastingMode newCastShadow; EditorGUI.showMixedValue = serialized.areaLightEmissiveMeshCastShadow.hasMultipleDifferentValues; 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 79c13f2e614..49073ab750d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -104,6 +104,7 @@ internal static Volume GetOrCreateDefaultVolume() readonly XRSystem m_XRSystem; bool m_FrameSettingsHistoryEnabled = false; + bool m_DisableCookieForLightBaking = false; /// /// This functions allows the user to have an approximation of the number of rays that were traced for a given frame. @@ -663,6 +664,9 @@ void SetRenderingFeatures() GraphicsSettings.lightsUseLinearIntensity = true; GraphicsSettings.lightsUseColorTemperature = true; + m_DisableCookieForLightBaking = UnityEditor.EditorSettings.disableCookiesInLightmapper; + UnityEditor.EditorSettings.disableCookiesInLightmapper = false; + GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; SupportedRenderingFeatures.active = new SupportedRenderingFeatures() @@ -779,6 +783,8 @@ void UnsetRenderingFeatures() // Reset srp batcher state just in case GraphicsSettings.useScriptableRenderPipelineBatching = false; + UnityEditor.EditorSettings.disableCookiesInLightmapper = m_DisableCookieForLightBaking; + Lightmapping.ResetDelegate(); } From 0f446ddabb1351171eca43b03a670e0f0d760243 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Sat, 18 Apr 2020 01:41:02 +0200 Subject: [PATCH 109/200] Fix compil issue with Enable BakeCookie --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 49073ab750d..f15bd9bf712 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -104,7 +104,7 @@ internal static Volume GetOrCreateDefaultVolume() readonly XRSystem m_XRSystem; bool m_FrameSettingsHistoryEnabled = false; - bool m_DisableCookieForLightBaking = false; + bool m_PreviousDisableCookieForLightBaking = false; /// /// This functions allows the user to have an approximation of the number of rays that were traced for a given frame. @@ -664,9 +664,6 @@ void SetRenderingFeatures() GraphicsSettings.lightsUseLinearIntensity = true; GraphicsSettings.lightsUseColorTemperature = true; - m_DisableCookieForLightBaking = UnityEditor.EditorSettings.disableCookiesInLightmapper; - UnityEditor.EditorSettings.disableCookiesInLightmapper = false; - GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; SupportedRenderingFeatures.active = new SupportedRenderingFeatures() @@ -694,6 +691,10 @@ void SetRenderingFeatures() Lightmapping.SetDelegate(GlobalIlluminationUtils.hdLightsDelegate); #if UNITY_EDITOR + // HDRP always enable baking of cookie by default + m_PreviousDisableCookieForLightBaking = UnityEditor.EditorSettings.disableCookiesInLightmapper; + UnityEditor.EditorSettings.disableCookiesInLightmapper = false; + SceneViewDrawMode.SetupDrawMode(); if (UnityEditor.PlayerSettings.colorSpace == ColorSpace.Gamma) @@ -783,9 +784,11 @@ void UnsetRenderingFeatures() // Reset srp batcher state just in case GraphicsSettings.useScriptableRenderPipelineBatching = false; - UnityEditor.EditorSettings.disableCookiesInLightmapper = m_DisableCookieForLightBaking; - Lightmapping.ResetDelegate(); + +#if UNITY_EDITOR + UnityEditor.EditorSettings.disableCookiesInLightmapper = m_PreviousDisableCookieForLightBaking; +#endif } void InitializeDebugMaterials() From 6f7cbbb7aa929884d732d773a5309ae1363dc5eb Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Sat, 18 Apr 2020 11:17:23 +0200 Subject: [PATCH 110/200] Enable Light Baking Cookies by default + Warning - part 3 #79 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Documentation~/Upgrading-from-2019.3-to-2020.1.md | 4 ++++ .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 ++ 3 files changed, 7 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 369e5548dcd..e252ba3ba75 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. - Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. - Debug exposure in debug menu have been replace to debug exposure compensation in EV100 space and is always visible. +- Cookie are now supported in lightmaper. All lights casting cookie and baked will now include cookie influence. ## [7.3.0] - 2020-03-11 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md index 8742701deb8..6cd48c9c77a 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md @@ -5,3 +5,7 @@ In the High Definition Render Pipeline (HDRP), some features work differently be ## Scene View Camera Settings From Unity 2020.1, the HDRP-specific settings of the scene view camera (anti-aliasing mode and stop NaNs) can be found in the same pop-up window as the standard scene camera settings, which are accessible by clicking the scene camera button on the toolbar of the scene window. These settings were previously in the HDRP preferences window (Edit > Preferences). + +## Cookie baking + +From Unity 2020.1, Cookie on light are not taken into account for the lightmaps / Lightprobes. This support is always enable with HDRP. \ No newline at end of file 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 f15bd9bf712..44f1897e6cf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -104,7 +104,9 @@ internal static Volume GetOrCreateDefaultVolume() readonly XRSystem m_XRSystem; bool m_FrameSettingsHistoryEnabled = false; +#if UNITY_EDITOR bool m_PreviousDisableCookieForLightBaking = false; +#endif /// /// This functions allows the user to have an approximation of the number of rays that were traced for a given frame. From 378378b72f8a11047f57d940a96a974b433b862e Mon Sep 17 00:00:00 2001 From: slunity <37302815+slunity@users.noreply.github.com> Date: Fri, 17 Apr 2020 03:53:27 -0400 Subject: [PATCH 111/200] AxF fix: Use CALCULATE_TEXTURE2D_LOD macro for future cross platform compatibility (Metal) (#162) --- .../Runtime/Material/AxF/AxFData.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl index 8e919f6ddfe..b40ae677c35 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl @@ -113,7 +113,7 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p // Create mirrored UVs to hide flakes tiling surfaceData.flakesUV = _CarPaint2_FlakeTiling * UV0; - surfaceData.flakesMipLevel = _CarPaint2_BTFFlakeMap.CalculateLevelOfDetail(sampler_CarPaint2_BTFFlakeMap, surfaceData.flakesUV); + surfaceData.flakesMipLevel = CALCULATE_TEXTURE2D_LOD(_CarPaint2_BTFFlakeMap, sampler_CarPaint2_BTFFlakeMap, surfaceData.flakesUV); // TODO_FLAKES: this isn't really tiling if ((int(surfaceData.flakesUV.y) & 1) == 0) From 8e4a015dd81decbc2ab61de91835496987e9ec09 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Mon, 20 Apr 2020 10:40:41 +0200 Subject: [PATCH 112/200] [Backport 8.x.x] Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. (#180) * Added external references inside a material to diffusion profiles and materials in order to handle Material export to a package correctly. * Update changelog --- .../CHANGELOG.md | 1 + .../DiffusionProfileMaterialUI.cs | 12 +++- .../Material/MaterialExternalReferences.cs | 70 +++++++++++++++++++ .../MaterialExternalReferences.cs.meta | 11 +++ .../Editor/Material/PBR/HDPBRLit.cs | 4 +- .../Material/UIBlocks/LayerListUIBlock.cs | 12 +++- .../UIBlocks/LitSurfaceInputsUIBlock.cs | 2 +- .../Material/UIBlocks/ShaderGraphUIBlock.cs | 4 +- 8 files changed, 109 insertions(+), 7 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs create mode 100644 com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs.meta diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e252ba3ba75..30de80d611b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue that was collapsing the volume components in the HDRP default settings - Fixed warning about missing bound decal buffer - Fixed the debug exposure mode for display sky reflection and debug view baked lighting +- Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. Note that the diffusion profile or the material references need to be edited once before this can work properly. ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs index 726379b1193..b879b15367f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/DiffusionProfile/DiffusionProfileMaterialUI.cs @@ -18,7 +18,7 @@ public static bool IsSupported(MaterialEditor materialEditor) }); } - public static void OnGUI(MaterialProperty diffusionProfileAsset, MaterialProperty diffusionProfileHash) + public static void OnGUI(MaterialEditor materialEditor, MaterialProperty diffusionProfileAsset, MaterialProperty diffusionProfileHash, int profileIndex) { // We can't cache these fields because of several edge cases like undo/redo or pressing escape in the object picker string guid = HDUtils.ConvertVector4ToGUID(diffusionProfileAsset.vectorValue); @@ -42,6 +42,16 @@ public static void OnGUI(MaterialProperty diffusionProfileAsset, MaterialPropert // encode back GUID and it's hash diffusionProfileAsset.vectorValue = newGuid; diffusionProfileHash.floatValue = hash; + + // Update external reference. + foreach (var target in materialEditor.targets) + { + MaterialExternalReferences matExternalRefs = MaterialExternalReferences.GetMaterialExternalReferences(target as Material); + if (matExternalRefs != null) + { + matExternalRefs.SetDiffusionProfileReference(profileIndex, diffusionProfile); + } + } } DrawDiffusionProfileWarning(diffusionProfile); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs b/com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs new file mode 100644 index 00000000000..4466369d138 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs @@ -0,0 +1,70 @@ +using UnityEngine; +using UnityEngine.Rendering.HighDefinition; + +namespace UnityEditor.Rendering.HighDefinition +{ + // This class only purpose is to be used as a sub-asset to a material and store references to other assets. + // The goal is to be able to export the material as a package and not miss those referenced assets. + class MaterialExternalReferences : ScriptableObject + { + [SerializeField] + DiffusionProfileSettings[] m_DiffusionProfileReferences = new DiffusionProfileSettings[0]; + [SerializeField] + Material[] m_MaterialReferences = new Material[0]; + + public void SetDiffusionProfileReference(int index, DiffusionProfileSettings profile) + { + if (index >= m_DiffusionProfileReferences.Length) + { + var newList = new DiffusionProfileSettings[index + 1]; + for (int i = 0; i < m_DiffusionProfileReferences.Length; ++i) + newList[i] = m_DiffusionProfileReferences[i]; + + m_DiffusionProfileReferences = newList; + } + + m_DiffusionProfileReferences[index] = profile; + EditorUtility.SetDirty(this); + } + + public void SetMaterialReference(int index, Material mat) + { + if (index >= m_MaterialReferences.Length) + { + var newList = new Material[index + 1]; + for (int i = 0; i < m_MaterialReferences.Length; ++i) + newList[i] = m_MaterialReferences[i]; + + m_MaterialReferences = newList; + } + + m_MaterialReferences[index] = mat; + EditorUtility.SetDirty(this); + } + + public static MaterialExternalReferences GetMaterialExternalReferences(Material material) + { + var subAssets = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(material)); + MaterialExternalReferences matExternalRefs = null; + foreach (var subAsset in subAssets) + { + if (subAsset.GetType() == typeof(MaterialExternalReferences)) + { + matExternalRefs = subAsset as MaterialExternalReferences; + break; + } + } + + if (matExternalRefs == null) + { + matExternalRefs = CreateInstance(); + matExternalRefs.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector | HideFlags.NotEditable; + AssetDatabase.AddObjectToAsset(matExternalRefs, material); + EditorUtility.SetDirty(matExternalRefs); + EditorUtility.SetDirty(material); + } + + return matExternalRefs; + } + } +} diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs.meta b/com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs.meta new file mode 100644 index 00000000000..30af94f1846 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/Material/MaterialExternalReferences.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aa486462e6be1764e89c788ba30e61f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs index 8e793ffd2d4..5ebe1d51237 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs @@ -8,7 +8,7 @@ class HDPBRLitGUI : ShaderGUI public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { materialEditor.PropertiesDefaultGUI(props); - + EmissionUIBlock.BakedEmissionEnabledProperty(materialEditor); // Make sure all selected materials are initialized. @@ -40,7 +40,7 @@ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] pro } if (DiffusionProfileMaterialUI.IsSupported(materialEditor)) - DiffusionProfileMaterialUI.OnGUI(FindProperty("_DiffusionProfileAsset", props), FindProperty("_DiffusionProfileHash", props)); + DiffusionProfileMaterialUI.OnGUI(materialEditor, FindProperty("_DiffusionProfileAsset", props), FindProperty("_DiffusionProfileHash", props), 0); } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LayerListUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LayerListUIBlock.cs index 2053093ebfe..2db7c6e96b5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LayerListUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LayerListUIBlock.cs @@ -154,8 +154,18 @@ void DrawLayerListGUI() Undo.RecordObjects(new UnityEngine.Object[] { material, m_MaterialImporter }, "Change layer material"); LayeredLitGUI.SynchronizeLayerProperties(material, m_MaterialLayers, layerIndex, true); layersChanged = true; + + // Update external reference. + foreach (var target in materialEditor.targets) + { + MaterialExternalReferences matExternalRefs = MaterialExternalReferences.GetMaterialExternalReferences(target as Material); + if (matExternalRefs != null) + { + matExternalRefs.SetMaterialReference(layerIndex, m_MaterialLayers[layerIndex]); + } + } } - + EditorGUI.DrawRect(colorRect, kLayerColors[layerIndex]); m_WithUV[layerIndex] = EditorGUI.Toggle(uvRect, m_WithUV[layerIndex]); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LitSurfaceInputsUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LitSurfaceInputsUIBlock.cs index 2dfda3f8b14..004228f7c63 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LitSurfaceInputsUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LitSurfaceInputsUIBlock.cs @@ -557,7 +557,7 @@ void ShaderSSSAndTransmissionInputGUI() if (hdPipeline == null) return; - DiffusionProfileMaterialUI.OnGUI(diffusionProfileAsset[m_LayerIndex], diffusionProfileHash[m_LayerIndex]); + DiffusionProfileMaterialUI.OnGUI(materialEditor, diffusionProfileAsset[m_LayerIndex], diffusionProfileHash[m_LayerIndex], m_LayerIndex); // TODO: does not work with multi-selection if ((int)materialID.floatValue == (int)MaterialId.LitSSS && materials[0].GetSurfaceType() != SurfaceType.Transparent) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs index 12b758968ec..5111809ebd0 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/ShaderGraphUIBlock.cs @@ -97,7 +97,7 @@ void DrawShaderGraphGUI() // Filter out properties we don't want to draw: PropertiesDefaultGUI(properties); - // If we change a property in a shadergraph, we trigger a material keyword reset + // If we change a property in a shadergraph, we trigger a material keyword reset if (CheckPropertyChanged(properties)) { foreach (var material in materials) @@ -219,7 +219,7 @@ void DrawShadowMatteToggle() void DrawDiffusionProfileUI() { if (DiffusionProfileMaterialUI.IsSupported(materialEditor)) - DiffusionProfileMaterialUI.OnGUI(FindProperty("_DiffusionProfileAsset"), FindProperty("_DiffusionProfileHash")); + DiffusionProfileMaterialUI.OnGUI(materialEditor, FindProperty("_DiffusionProfileAsset"), FindProperty("_DiffusionProfileHash"), 0); } } } From a692cd5239a29d582f8ae57dcfc784b793c07f3c Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Mon, 20 Apr 2020 14:06:36 +0200 Subject: [PATCH 113/200] Add range attenuation to box-shaped spotlights [Skip CI] #101 --- .../1x_Materials/1210_Lit_BentNormal.unity | 2 +- .../1215_Lit_SubSurfaceScattering.unity | 4 +- .../Scenes/1x_Materials/1351_Fabric.unity | 2 +- .../2x_Lighting/2002_Light_DynamicMix.unity | 1620 +++++++++++++---- .../2313_Shadow_Mask_Spotlight_Shapes.unity | 4 +- .../Scenes/2x_Lighting/2501_LightLayers.unity | 2 +- .../9500_LightScripting/LightScriptCreator.cs | 1 + .../9601_SkinnedMeshBatching-Off.unity | 2 +- .../9602_SkinnedMeshBatching-On.unity | 2 +- .../9603_MeshRendererBatching-Off.unity | 2 +- .../9604_MeshRendererBatching-On.unity | 2 +- .../Metal/None/2002_Light_DynamicMix.png | 4 +- .../Direct3D11/None/2002_Light_DynamicMix.png | 4 +- .../Vulkan/None/2002_Light_DynamicMix.png | 4 +- .../Direct3D11/None/2002_Dynamic_Mix.png | 4 +- .../CHANGELOG.md | 1 + .../Documentation~/Light-Component.md | 2 +- .../Editor/Lighting/HDLightUI.cs | 6 +- .../Runtime/Lighting/LightEvaluation.hlsl | 37 +- .../Runtime/Lighting/LightLoop/LightLoop.cs | 4 +- .../Runtime/Lighting/PunctualLightCommon.hlsl | 12 +- 21 files changed, 1338 insertions(+), 383 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1210_Lit_BentNormal.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1210_Lit_BentNormal.unity index 0a899493caa..dd9d966835b 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1210_Lit_BentNormal.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1210_Lit_BentNormal.unity @@ -7677,7 +7677,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 30 m_MaxSmoothness: 1 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1215_Lit_SubSurfaceScattering.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1215_Lit_SubSurfaceScattering.unity index 3f8fdbe0108..b50dd9361aa 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1215_Lit_SubSurfaceScattering.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1215_Lit_SubSurfaceScattering.unity @@ -3928,7 +3928,7 @@ MonoBehaviour: aspectRatio: 1 shapeRadius: 0 maxSmoothness: 1 - applyRangeAttenuation: 1 + applyRangeAttenuation: 0 useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 @@ -4658,7 +4658,7 @@ MonoBehaviour: aspectRatio: 1 shapeRadius: 0 maxSmoothness: 1 - applyRangeAttenuation: 1 + applyRangeAttenuation: 0 useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1351_Fabric.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1351_Fabric.unity index ef053361d8a..934a5db5585 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1351_Fabric.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1351_Fabric.unity @@ -1082,7 +1082,7 @@ MonoBehaviour: aspectRatio: 0.4 shapeRadius: 0 maxSmoothness: 1 - applyRangeAttenuation: 1 + applyRangeAttenuation: 0 useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity index f42b4912e69..0669ff028df 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity @@ -38,24 +38,23 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.36615336, g: 0.38474482, b: 0.42534754, a: 1} + m_IndirectSpecularColor: {r: 0.30957052, g: 0.3253681, b: 0.35991505, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 10 + serializedVersion: 12 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 @@ -63,6 +62,7 @@ LightmapSettings: m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 @@ -77,10 +77,16 @@ LightmapSettings: m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 + m_PVREnvironmentMIS: 0 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 @@ -88,9 +94,11 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 563410596} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -110,9 +118,127 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &87360114 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 87360115} + - component: {fileID: 87360118} + - component: {fileID: 87360117} + - component: {fileID: 87360116} + m_Layer: 0 + m_Name: New Text (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &87360115 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87360114} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 6.6, y: 1.09, z: 3} + m_LocalScale: {x: 0.41697517, y: 0.41697517, z: 0.41697517} + m_Children: [] + m_Father: {fileID: 574762494} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &87360116 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87360114} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1843972f86a70ad4f9ac115809638244, type: 3} + m_Name: + m_EditorClassIdentifier: + pixelSize: 8 + testSettings: {fileID: 1900725528} + targetCamera: {fileID: 1900725527} + forceTargetDimensions: {x: 200, y: 150} + overrideTestSettings: 0 + textMesh: {fileID: 87360117} +--- !u!102 &87360117 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87360114} + m_Text: 'Spot - Box + + No attenuation' + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1.3 + m_Anchor: 7 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 0 + m_FontStyle: 0 + m_RichText: 0 + m_Font: {fileID: 12800000, guid: 306d620c715872046bf76568b7f382d4, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!23 &87360118 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87360114} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 306d620c715872046bf76568b7f382d4, type: 3} + 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: 0 + 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!1001 &183745593 PrefabInstance: m_ObjectHideFlags: 0 @@ -172,9 +298,16 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} --- !u!4 &183745594 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, + type: 3} m_PrefabInstance: {fileID: 183745593} m_PrefabAsset: {fileID: 0} +--- !u!4 &327226539 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, + type: 3} + m_PrefabInstance: {fileID: 429631461} + m_PrefabAsset: {fileID: 0} --- !u!1001 &333183857 PrefabInstance: m_ObjectHideFlags: 0 @@ -182,6 +315,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1192666584} m_Modifications: + - target: {fileID: 1752614318191108, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_Name + value: Cube (2) + objectReference: {fileID: 0} - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} propertyPath: m_LocalPosition.x value: 0.03999996 @@ -230,17 +367,75 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.y value: -39.959003 objectReference: {fileID: 0} - - target: {fileID: 1752614318191108, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} - propertyPath: m_Name - value: Cube (2) - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} --- !u!4 &333183858 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, + type: 3} m_PrefabInstance: {fileID: 333183857} m_PrefabAsset: {fileID: 0} +--- !u!1001 &429631461 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 2142451069} + m_Modifications: + - target: {fileID: 1752614318191108, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_Name + value: Cube (2) + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalPosition.x + value: 0.03999996 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalPosition.y + value: 1.817 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalPosition.z + value: -0.99 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalRotation.y + value: -0.34168717 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalRotation.w + value: 0.93981373 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalScale.x + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalScale.y + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalScale.z + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -39.959003 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} --- !u!1 &467207848 GameObject: m_ObjectHideFlags: 0 @@ -288,6 +483,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -299,6 +496,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -311,6 +509,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &467207851 MeshFilter: m_ObjectHideFlags: 0 @@ -344,7 +543,6 @@ GameObject: - component: {fileID: 487878713} - component: {fileID: 487878716} - component: {fileID: 487878715} - - component: {fileID: 487878714} m_Layer: 0 m_Name: Spot Light m_TagString: Untagged @@ -366,92 +564,117 @@ Transform: m_Father: {fileID: 1169686270} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 45, z: 0} ---- !u!114 &487878714 +--- !u!114 &487878715 MonoBehaviour: - m_ObjectHideFlags: 2 + m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 487878712} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3} + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 - shadowResolution: 512 - shadowDimmer: 1 - shadowFadeDistance: 10000 - contactShadows: 0 - viewBiasMin: 0.5 - viewBiasMax: 10 - viewBiasScale: 1 - normalBiasMin: 0.2 - normalBiasMax: 4 - normalBiasScale: 1 - sampleBiasScale: 1 - edgeLeakFixup: 1 - edgeToleranceNormal: 1 - edgeTolerance: 1 - shadowCascadeCount: 4 - shadowCascadeRatios: + m_Version: 10 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 1 + m_AreaLightShape: 0 + m_Intensity: 600 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 50 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 0 + m_FadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 1 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + 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: 1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 + 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_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_ShadowCascadeRatios: - 0.05 - 0.2 - 0.3 - shadowCascadeBorders: + m_ShadowCascadeBorders: - 0.2 - 0.2 - 0.2 - 0.2 - shadowAlgorithm: 0 - shadowVariant: 4 - shadowPrecision: 0 - shadowData: - format: 4 - data: 0bd7a33b0000803f - shadowDatas: - - format: 4 - data: 0bd7a33b0000803f ---- !u!114 &487878715 -MonoBehaviour: - m_ObjectHideFlags: 2 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 487878712} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 2 - m_Version: 2 - directionalIntensity: 3.1415927 - punctualIntensity: 600 - areaIntensity: 200 - enableSpotReflector: 0 - m_InnerSpotPercent: 50 - lightDimmer: 1 - volumetricDimmer: 1 - lightUnit: 0 - fadeDistance: 10000 - affectDiffuse: 1 - affectSpecular: 1 - nonLightmappedOnly: 0 - lightTypeExtent: 0 - spotLightShape: 1 - shapeWidth: 0.5 - shapeHeight: 0.5 - aspectRatio: 1 - shapeRadius: 0 - maxSmoothness: 1 - applyRangeAttenuation: 1 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 4 + m_ShadowPrecision: 0 useOldInspector: 0 + useVolumetric: 1 featuresFoldout: 1 showAdditionalSettings: 1 - displayLightIntensity: 600 - displayAreaLightEmissiveMesh: 0 - lightLayers: 1 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 --- !u!108 &487878716 Light: m_ObjectHideFlags: 0 @@ -460,12 +683,14 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 487878712} m_Enabled: 1 - serializedVersion: 8 + serializedVersion: 10 m_Type: 0 + m_Shape: 0 m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 47.746483 m_Range: 30 m_SpotAngle: 40 + m_InnerSpotAngle: 29.320492 m_CookieSize: 10 m_Shadows: m_Type: 1 @@ -475,6 +700,24 @@ Light: m_Bias: 0.05 m_NormalBias: 0.1 m_NearPlane: 2.16 + m_CullingMatrixOverride: + e00: 2.7474773 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 2.7474773 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1.0066667 + e23: -0.20066667 + e30: 0 + e31: 0 + e32: 1 + e33: 0 + m_UseCullingMatrixOverride: 1 m_Cookie: {fileID: 2800000, guid: 45f0819bab75a8b47b8c90e4c8a34999, type: 3} m_DrawHalo: 0 m_Flare: {fileID: 0} @@ -482,12 +725,15 @@ Light: m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 + m_RenderingLayerMask: 1 m_Lightmapping: 4 m_LightShadowCasterMode: 0 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 30} + m_UseBoundingSphereOverride: 1 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!1001 &517278656 @@ -497,6 +743,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 100000, guid: 35676372ff25f7942a8cfe7ddf9c7878, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} - target: {fileID: 400000, guid: 35676372ff25f7942a8cfe7ddf9c7878, type: 3} propertyPath: m_LocalPosition.x value: -0 @@ -533,12 +783,69 @@ PrefabInstance: propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} - - target: {fileID: 100000, guid: 35676372ff25f7942a8cfe7ddf9c7878, type: 3} - propertyPath: m_StaticEditorFlags - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 35676372ff25f7942a8cfe7ddf9c7878, type: 3} +--- !u!850595691 &563410596 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 2 + m_GIWorkflowMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRRussianRouletteStartBounce: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 --- !u!1 &574762493 GameObject: m_ObjectHideFlags: 0 @@ -570,9 +877,214 @@ Transform: - {fileID: 1074616646} - {fileID: 1890834151} - {fileID: 626316075} + - {fileID: 87360115} m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &576870512 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 576870513} + - component: {fileID: 576870515} + - component: {fileID: 576870514} + m_Layer: 0 + m_Name: Spot Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &576870513 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 576870512} + m_LocalRotation: {x: 0.20677853, y: -0.18417637, z: -0.07893372, w: 0.95764875} + m_LocalPosition: {x: 0.99, y: 2.6, z: -2.17} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 845179403} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 21.529, y: -24.475, z: -14.146} +--- !u!114 &576870514 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 576870512} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 10 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 2 + m_AreaLightShape: 0 + m_Intensity: 600 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 50 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 0 + m_FadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 3.5 + m_ShapeHeight: 3.5 + m_AspectRatio: 1 + m_ShapeRadius: 0 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 1 + m_ApplyRangeAttenuation: 0 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + 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: 1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 + 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_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 4 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + showAdditionalSettings: 5 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 +--- !u!108 &576870515 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 576870512} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 0 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 47.746483 + m_Range: 30 + 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.1 + m_NearPlane: 2.16 + m_CullingMatrixOverride: + e00: 0.5714286 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0.5714286 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0.066889636 + e23: -1.006689 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 1 + m_Cookie: {fileID: 2800000, guid: 45f0819bab75a8b47b8c90e4c8a34999, type: 3} + 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: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 15, w: 15.202796} + m_UseBoundingSphereOverride: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 --- !u!1001 &607344269 PrefabInstance: m_ObjectHideFlags: 0 @@ -580,6 +1092,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1902903443} m_Modifications: + - target: {fileID: 1752614318191108, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_Name + value: Cube (3) + objectReference: {fileID: 0} - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} propertyPath: m_LocalPosition.x value: 0.427 @@ -628,15 +1144,12 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.y value: 49.138 objectReference: {fileID: 0} - - target: {fileID: 1752614318191108, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} - propertyPath: m_Name - value: Cube (3) - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} --- !u!4 &607344270 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, + type: 3} m_PrefabInstance: {fileID: 607344269} m_PrefabAsset: {fileID: 0} --- !u!1 &626316074 @@ -708,6 +1221,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -719,6 +1234,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -731,6 +1247,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!114 &626316078 MonoBehaviour: m_ObjectHideFlags: 0 @@ -745,9 +1262,10 @@ MonoBehaviour: m_EditorClassIdentifier: pixelSize: 8 testSettings: {fileID: 1900725528} - camera: {fileID: 1900725527} + targetCamera: {fileID: 0} + forceTargetDimensions: {x: 200, y: 150} + overrideTestSettings: 0 textMesh: {fileID: 626316076} - pixelPerfect: 0 --- !u!1 &673842478 GameObject: m_ObjectHideFlags: 0 @@ -820,6 +1338,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 2109923720} m_Modifications: + - target: {fileID: 1752614318191108, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + propertyPath: m_Name + value: Cube (1) + objectReference: {fileID: 0} - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} propertyPath: m_LocalPosition.x value: 0.15299988 @@ -866,17 +1388,14 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: -32.272003 - objectReference: {fileID: 0} - - target: {fileID: 1752614318191108, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} - propertyPath: m_Name - value: Cube (1) + value: -32.272003 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} --- !u!4 &809663471 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, type: 3} + m_CorrespondingSourceObject: {fileID: 4729046375724384, guid: 48a8bf1cfd4090647aa6cdcd4cddfc23, + type: 3} m_PrefabInstance: {fileID: 809663470} m_PrefabAsset: {fileID: 0} --- !u!1 &835557360 @@ -926,6 +1445,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -937,6 +1458,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -949,6 +1471,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &835557363 MeshFilter: m_ObjectHideFlags: 0 @@ -971,6 +1494,37 @@ Transform: m_Father: {fileID: 2109923720} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &845179402 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 845179403} + m_Layer: 0 + m_Name: GameObject (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &845179403 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 845179402} + m_LocalRotation: {x: -0.23911758, y: -0.3696438, z: -0.099045746, w: 0.89239913} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 576870513} + m_Father: {fileID: 2142451069} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: -30, y: -45, z: 0} --- !u!1 &956017064 GameObject: m_ObjectHideFlags: 0 @@ -1049,6 +1603,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -1060,6 +1616,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -1072,6 +1629,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1028431634 MeshFilter: m_ObjectHideFlags: 0 @@ -1163,6 +1721,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -1174,6 +1734,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -1186,6 +1747,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!114 &1074616649 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1200,9 +1762,10 @@ MonoBehaviour: m_EditorClassIdentifier: pixelSize: 8 testSettings: {fileID: 1900725528} - camera: {fileID: 1900725527} + targetCamera: {fileID: 0} + forceTargetDimensions: {x: 200, y: 150} + overrideTestSettings: 0 textMesh: {fileID: 1074616647} - pixelPerfect: 0 --- !u!1 &1083378958 GameObject: m_ObjectHideFlags: 0 @@ -1214,7 +1777,6 @@ GameObject: - component: {fileID: 1083378959} - component: {fileID: 1083378962} - component: {fileID: 1083378961} - - component: {fileID: 1083378960} m_Layer: 0 m_Name: Spot Light m_TagString: Untagged @@ -1236,92 +1798,117 @@ Transform: m_Father: {fileID: 673842479} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 45, z: 0} ---- !u!114 &1083378960 +--- !u!114 &1083378961 MonoBehaviour: - m_ObjectHideFlags: 2 + m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1083378958} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3} + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 - shadowResolution: 512 - shadowDimmer: 1 - shadowFadeDistance: 10000 - contactShadows: 0 - viewBiasMin: 2.25 - viewBiasMax: 10 - viewBiasScale: 8 - normalBiasMin: 0.2 - normalBiasMax: 4 - normalBiasScale: 1 - sampleBiasScale: 1 - edgeLeakFixup: 1 - edgeToleranceNormal: 1 - edgeTolerance: 1 - shadowCascadeCount: 4 - shadowCascadeRatios: + m_Version: 10 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 2 + m_AreaLightShape: 0 + m_Intensity: 600 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 50 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 0 + m_FadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 3.5 + m_ShapeHeight: 3.5 + m_AspectRatio: 1 + m_ShapeRadius: 0 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 1 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + 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: 1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 + 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_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_ShadowCascadeRatios: - 0.05 - 0.2 - 0.3 - shadowCascadeBorders: + m_ShadowCascadeBorders: - 0.2 - 0.2 - 0.2 - 0.2 - shadowAlgorithm: 0 - shadowVariant: 4 - shadowPrecision: 0 - shadowData: - format: 4 - data: 0bd7a33b0000803f - shadowDatas: - - format: 4 - data: 0bd7a33b0000803f ---- !u!114 &1083378961 -MonoBehaviour: - m_ObjectHideFlags: 2 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1083378958} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 2 - m_Version: 2 - directionalIntensity: 3.1415927 - punctualIntensity: 600 - areaIntensity: 200 - enableSpotReflector: 0 - m_InnerSpotPercent: 50 - lightDimmer: 1 - volumetricDimmer: 1 - lightUnit: 0 - fadeDistance: 10000 - affectDiffuse: 1 - affectSpecular: 1 - nonLightmappedOnly: 0 - lightTypeExtent: 0 - spotLightShape: 2 - shapeWidth: 3.5 - shapeHeight: 3.5 - aspectRatio: 1 - shapeRadius: 0 - maxSmoothness: 1 - applyRangeAttenuation: 1 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 4 + m_ShadowPrecision: 0 useOldInspector: 0 + useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 1 - displayLightIntensity: 600 - displayAreaLightEmissiveMesh: 0 - lightLayers: 1 + showAdditionalSettings: 5 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 --- !u!108 &1083378962 Light: m_ObjectHideFlags: 0 @@ -1330,12 +1917,14 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1083378958} m_Enabled: 1 - serializedVersion: 8 + serializedVersion: 10 m_Type: 0 + m_Shape: 0 m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 47.746483 m_Range: 30 m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: m_Type: 1 @@ -1345,6 +1934,24 @@ Light: m_Bias: 0.05 m_NormalBias: 0.1 m_NearPlane: 2.16 + m_CullingMatrixOverride: + e00: 0.5714286 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0.5714286 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0.066889636 + e23: -1.006689 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 1 m_Cookie: {fileID: 2800000, guid: 45f0819bab75a8b47b8c90e4c8a34999, type: 3} m_DrawHalo: 0 m_Flare: {fileID: 0} @@ -1352,12 +1959,15 @@ Light: m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 + m_RenderingLayerMask: 1 m_Lightmapping: 4 m_LightShadowCasterMode: 0 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 15, w: 15.202796} + m_UseBoundingSphereOverride: 1 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!1 &1169686269 @@ -1436,7 +2046,6 @@ GameObject: - component: {fileID: 1302673723} - component: {fileID: 1302673722} - component: {fileID: 1302673721} - - component: {fileID: 1302673720} m_Layer: 0 m_Name: Point Light m_TagString: Untagged @@ -1444,7 +2053,7 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1302673720 +--- !u!114 &1302673721 MonoBehaviour: m_ObjectHideFlags: 2 m_CorrespondingSourceObject: {fileID: 0} @@ -1453,83 +2062,108 @@ MonoBehaviour: m_GameObject: {fileID: 1302673719} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3} + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 - shadowResolution: 512 - shadowDimmer: 1 - shadowFadeDistance: 10000 - contactShadows: 0 - viewBiasMin: 0.5 - viewBiasMax: 10 - viewBiasScale: 1 - normalBiasMin: 0.2 - normalBiasMax: 4 - normalBiasScale: 1 - sampleBiasScale: 1 - edgeLeakFixup: 1 - edgeToleranceNormal: 1 - edgeTolerance: 1 - shadowCascadeCount: 4 - shadowCascadeRatios: + m_Version: 10 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 + m_Intensity: 600 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 0 + m_FadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 1 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + 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: 1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 + 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_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_ShadowCascadeRatios: - 0.05 - 0.2 - 0.3 - shadowCascadeBorders: + m_ShadowCascadeBorders: - 0.2 - 0.2 - 0.2 - 0.2 - shadowAlgorithm: 0 - shadowVariant: 4 - shadowPrecision: 0 - shadowData: - format: 4 - data: 0bd7a33b0000803f - shadowDatas: - - format: 4 - data: 0bd7a33b0000803f ---- !u!114 &1302673721 -MonoBehaviour: - m_ObjectHideFlags: 2 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1302673719} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 2 - m_Version: 2 - directionalIntensity: 3.1415927 - punctualIntensity: 600 - areaIntensity: 200 - enableSpotReflector: 0 - m_InnerSpotPercent: 0 - lightDimmer: 1 - volumetricDimmer: 1 - lightUnit: 0 - fadeDistance: 10000 - affectDiffuse: 1 - affectSpecular: 1 - nonLightmappedOnly: 0 - lightTypeExtent: 0 - spotLightShape: 0 - shapeWidth: 0.5 - shapeHeight: 0.5 - aspectRatio: 1 - shapeRadius: 0 - maxSmoothness: 1 - applyRangeAttenuation: 1 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 4 + m_ShadowPrecision: 0 useOldInspector: 0 + useVolumetric: 1 featuresFoldout: 1 showAdditionalSettings: 1 - displayLightIntensity: 600 - displayAreaLightEmissiveMesh: 0 - lightLayers: 1 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 --- !u!108 &1302673722 Light: m_ObjectHideFlags: 0 @@ -1538,12 +2172,14 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1302673719} m_Enabled: 1 - serializedVersion: 8 + serializedVersion: 10 m_Type: 2 + m_Shape: 0 m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 47.746483 m_Range: 5 m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 m_CookieSize: 10 m_Shadows: m_Type: 1 @@ -1553,6 +2189,24 @@ Light: 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: 8900000, guid: bcd1d60980af623478368e9455ea5689, type: 3} m_DrawHalo: 0 m_Flare: {fileID: 0} @@ -1560,12 +2214,15 @@ Light: m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 + m_RenderingLayerMask: 1 m_Lightmapping: 4 m_LightShadowCasterMode: 0 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_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1302673723 @@ -1582,6 +2239,102 @@ Transform: m_Father: {fileID: 1902903443} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1375846046 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1375846047} + - component: {fileID: 1375846050} + - component: {fileID: 1375846049} + - component: {fileID: 1375846048} + m_Layer: 0 + m_Name: Capsule (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1375846047 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1375846046} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2142451069} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!136 &1375846048 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1375846046} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1375846049 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1375846046} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, 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: 0 + 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 &1375846050 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1375846046} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1498382498 GameObject: m_ObjectHideFlags: 0 @@ -1629,6 +2382,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -1640,6 +2395,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -1652,6 +2408,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1498382501 MeshFilter: m_ObjectHideFlags: 0 @@ -1776,6 +2533,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -1787,6 +2546,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -1799,6 +2559,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1556403013 MeshFilter: m_ObjectHideFlags: 0 @@ -1818,7 +2579,6 @@ GameObject: - component: {fileID: 1637281120} - component: {fileID: 1637281123} - component: {fileID: 1637281122} - - component: {fileID: 1637281121} m_Layer: 0 m_Name: Spot Light m_TagString: Untagged @@ -1840,7 +2600,7 @@ Transform: m_Father: {fileID: 956017065} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 45, z: 0} ---- !u!114 &1637281121 +--- !u!114 &1637281122 MonoBehaviour: m_ObjectHideFlags: 2 m_CorrespondingSourceObject: {fileID: 0} @@ -1849,83 +2609,108 @@ MonoBehaviour: m_GameObject: {fileID: 1637281119} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3} + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 - shadowResolution: 512 - shadowDimmer: 1 - shadowFadeDistance: 10000 - contactShadows: 0 - viewBiasMin: 0.5 - viewBiasMax: 10 - viewBiasScale: 1 - normalBiasMin: 0.2 - normalBiasMax: 4 - normalBiasScale: 1 - sampleBiasScale: 1 - edgeLeakFixup: 1 - edgeToleranceNormal: 1 - edgeTolerance: 1 - shadowCascadeCount: 4 - shadowCascadeRatios: + m_Version: 10 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 + m_Intensity: 600 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 50 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 0 + m_FadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 1 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + 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: 1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 + 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_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_ShadowCascadeRatios: - 0.05 - 0.2 - 0.3 - shadowCascadeBorders: + m_ShadowCascadeBorders: - 0.2 - 0.2 - 0.2 - 0.2 - shadowAlgorithm: 0 - shadowVariant: 4 - shadowPrecision: 0 - shadowData: - format: 4 - data: 0bd7a33b0000803f - shadowDatas: - - format: 4 - data: 0bd7a33b0000803f ---- !u!114 &1637281122 -MonoBehaviour: - m_ObjectHideFlags: 2 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1637281119} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 2 - m_Version: 2 - directionalIntensity: 3.1415927 - punctualIntensity: 600 - areaIntensity: 200 - enableSpotReflector: 0 - m_InnerSpotPercent: 50 - lightDimmer: 1 - volumetricDimmer: 1 - lightUnit: 0 - fadeDistance: 10000 - affectDiffuse: 1 - affectSpecular: 1 - nonLightmappedOnly: 0 - lightTypeExtent: 0 - spotLightShape: 0 - shapeWidth: 0.5 - shapeHeight: 0.5 - aspectRatio: 1 - shapeRadius: 0 - maxSmoothness: 1 - applyRangeAttenuation: 1 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 4 + m_ShadowPrecision: 0 useOldInspector: 0 + useVolumetric: 1 featuresFoldout: 1 showAdditionalSettings: 1 - displayLightIntensity: 600 - displayAreaLightEmissiveMesh: 0 - lightLayers: 1 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 --- !u!108 &1637281123 Light: m_ObjectHideFlags: 0 @@ -1934,12 +2719,14 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1637281119} m_Enabled: 1 - serializedVersion: 8 + serializedVersion: 10 m_Type: 0 + m_Shape: 0 m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 47.746483 m_Range: 30 m_SpotAngle: 40 + m_InnerSpotAngle: 29.320492 m_CookieSize: 10 m_Shadows: m_Type: 1 @@ -1949,6 +2736,24 @@ Light: m_Bias: 0.05 m_NormalBias: 0.1 m_NearPlane: 2.16 + 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: 2800000, guid: 45f0819bab75a8b47b8c90e4c8a34999, type: 3} m_DrawHalo: 0 m_Flare: {fileID: 0} @@ -1956,12 +2761,15 @@ Light: m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 + m_RenderingLayerMask: 1 m_Lightmapping: 4 m_LightShadowCasterMode: 0 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_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!1 &1660772714 @@ -2025,6 +2833,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -2036,6 +2846,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -2048,6 +2859,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1660772718 MeshFilter: m_ObjectHideFlags: 0 @@ -2056,6 +2868,102 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1660772714} m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1732980389 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1732980390} + - component: {fileID: 1732980393} + - component: {fileID: 1732980392} + - component: {fileID: 1732980391} + m_Layer: 0 + m_Name: Capsule (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1732980390 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732980389} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.86000013, y: 1, z: -0.72} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2142451069} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!136 &1732980391 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732980389} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1732980392 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732980389} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 2505e1d9c7a8c654487d6a2dcae04242, 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: 0 + 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 &1732980393 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732980389} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1753161993 GameObject: m_ObjectHideFlags: 0 @@ -2117,6 +3025,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -2128,6 +3038,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -2140,6 +3051,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1753161997 MeshFilter: m_ObjectHideFlags: 0 @@ -2195,6 +3107,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -2206,6 +3120,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -2218,6 +3133,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1837398468 MeshFilter: m_ObjectHideFlags: 0 @@ -2309,6 +3225,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -2320,6 +3238,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -2332,6 +3251,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!114 &1890834154 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2346,9 +3266,10 @@ MonoBehaviour: m_EditorClassIdentifier: pixelSize: 8 testSettings: {fileID: 1900725528} - camera: {fileID: 1900725527} + targetCamera: {fileID: 0} + forceTargetDimensions: {x: 200, y: 150} + overrideTestSettings: 0 textMesh: {fileID: 1890834152} - pixelPerfect: 0 --- !u!1001 &1900725526 PrefabInstance: m_ObjectHideFlags: 0 @@ -2388,40 +3309,58 @@ PrefabInstance: propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} propertyPath: far clip plane value: 50 objectReference: {fileID: 0} - - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} propertyPath: m_ClearFlags value: 2 objectReference: {fileID: 0} - - target: {fileID: 114270329781043846, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + - target: {fileID: 114270329781043846, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} propertyPath: width value: 853 objectReference: {fileID: 0} - - target: {fileID: 114270329781043846, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + - target: {fileID: 114270329781043846, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} propertyPath: height value: 480 objectReference: {fileID: 0} - - target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + - target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} propertyPath: width value: 853 objectReference: {fileID: 0} - - target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + - target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} propertyPath: height value: 480 objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_Version + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 + value: 70005818916701 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} --- !u!20 &1900725527 stripped Camera: - m_CorrespondingSourceObject: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + m_CorrespondingSourceObject: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} m_PrefabInstance: {fileID: 1900725526} m_PrefabAsset: {fileID: 0} --- !u!114 &1900725528 stripped MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + m_CorrespondingSourceObject: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} m_PrefabInstance: {fileID: 1900725526} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} @@ -2534,6 +3473,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -2545,6 +3486,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -2557,6 +3499,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!114 &1930668416 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2571,9 +3514,10 @@ MonoBehaviour: m_EditorClassIdentifier: pixelSize: 8 testSettings: {fileID: 1900725528} - camera: {fileID: 1900725527} + targetCamera: {fileID: 0} + forceTargetDimensions: {x: 200, y: 150} + overrideTestSettings: 0 textMesh: {fileID: 1930668414} - pixelPerfect: 0 --- !u!1 &2109923719 GameObject: m_ObjectHideFlags: 0 @@ -2669,6 +3613,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -2680,6 +3626,7 @@ MeshRenderer: m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 + m_ReceiveGI: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 @@ -2692,6 +3639,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &2138720847 MeshFilter: m_ObjectHideFlags: 0 @@ -2700,3 +3648,37 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2138720843} m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &2142451068 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2142451069} + m_Layer: 0 + m_Name: Spot_Box_No_Attenuation + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2142451069 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2142451068} + m_LocalRotation: {x: -0, y: 0.7231106, z: -0, w: 0.69073224} + m_LocalPosition: {x: 6.88, y: 2.61, z: 3.19} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1375846047} + - {fileID: 845179403} + - {fileID: 1732980390} + - {fileID: 327226539} + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 92.624, z: 0} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2313_Shadow_Mask_Spotlight_Shapes.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2313_Shadow_Mask_Spotlight_Shapes.unity index 226cf167867..910ea6977e2 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2313_Shadow_Mask_Spotlight_Shapes.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2313_Shadow_Mask_Spotlight_Shapes.unity @@ -614,7 +614,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 1 m_MaxSmoothness: 1 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 @@ -3784,7 +3784,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 1 m_MaxSmoothness: 1 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2501_LightLayers.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2501_LightLayers.unity index 8896708e86f..9a97ab3a219 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2501_LightLayers.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2501_LightLayers.unity @@ -5685,7 +5685,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 30 m_MaxSmoothness: 0.99 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9500_LightScripting/LightScriptCreator.cs b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9500_LightScripting/LightScriptCreator.cs index c9bf9ef982c..85e4ac311a3 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9500_LightScripting/LightScriptCreator.cs +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9500_LightScripting/LightScriptCreator.cs @@ -45,6 +45,7 @@ void Start() { case 0: // Spot Box hdLight.SetLightTypeAndShape(HDLightTypeAndShape.BoxSpot); + hdLight.applyRangeAttenuation = false; break; case 1: // Spot Pyramid hdLight.SetLightTypeAndShape(HDLightTypeAndShape.PyramidSpot); diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9601_SkinnedMeshBatching-Off.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9601_SkinnedMeshBatching-Off.unity index d50b9cf38da..d3a23be3c72 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9601_SkinnedMeshBatching-Off.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9601_SkinnedMeshBatching-Off.unity @@ -2871,7 +2871,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 30 m_MaxSmoothness: 0.99 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9602_SkinnedMeshBatching-On.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9602_SkinnedMeshBatching-On.unity index bd7e18f3a17..bd63f5f084e 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9602_SkinnedMeshBatching-On.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9602_SkinnedMeshBatching-On.unity @@ -4932,7 +4932,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 30 m_MaxSmoothness: 0.99 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9603_MeshRendererBatching-Off.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9603_MeshRendererBatching-Off.unity index 16de542d234..0c143444d60 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9603_MeshRendererBatching-Off.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9603_MeshRendererBatching-Off.unity @@ -18642,7 +18642,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 2.7 m_MaxSmoothness: 0.99 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9604_MeshRendererBatching-On.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9604_MeshRendererBatching-On.unity index 81aa46a1352..5747be64a64 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9604_MeshRendererBatching-On.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9604_MeshRendererBatching-On.unity @@ -1712,7 +1712,7 @@ MonoBehaviour: m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 2.7 m_MaxSmoothness: 0.99 - m_ApplyRangeAttenuation: 1 + m_ApplyRangeAttenuation: 0 m_DisplayAreaLightEmissiveMesh: 0 m_AreaLightCookie: {fileID: 0} m_AreaLightShadowCone: 120 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2002_Light_DynamicMix.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2002_Light_DynamicMix.png index a7d5f0fce51..79a13bdc8d2 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2002_Light_DynamicMix.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2002_Light_DynamicMix.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:306e45b96fb48846ed1b0a3ab0518e63102f3d3940621d34c8563e745ae08080 -size 101428 +oid sha256:485d2ae08d83b09f9d4221142d63bba53824cb00eeba136623acfddb1622b146 +size 98439 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2002_Light_DynamicMix.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2002_Light_DynamicMix.png index e2a312c25fb..79a13bdc8d2 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2002_Light_DynamicMix.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2002_Light_DynamicMix.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b1811054b28a801aa169c984bf1c502a3ab77bd3693a452793906936b039ee0 -size 88230 +oid sha256:485d2ae08d83b09f9d4221142d63bba53824cb00eeba136623acfddb1622b146 +size 98439 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2002_Light_DynamicMix.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2002_Light_DynamicMix.png index 638370615d9..79a13bdc8d2 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2002_Light_DynamicMix.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2002_Light_DynamicMix.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16dfa5ac5b7fa7d4e0b2a4cc1c3415fb5f5dda0708873b5873480d0c11326de9 -size 101637 +oid sha256:485d2ae08d83b09f9d4221142d63bba53824cb00eeba136623acfddb1622b146 +size 98439 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/2002_Dynamic_Mix.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/2002_Dynamic_Mix.png index 32eb9941606..79a13bdc8d2 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/2002_Dynamic_Mix.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/2002_Dynamic_Mix.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f55f4e303868c758d1118fbfc00c98361df23d7b7d73baa499bec58103eceaf -size 90610 +oid sha256:485d2ae08d83b09f9d4221142d63bba53824cb00eeba136623acfddb1622b146 +size 98439 diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 64aacc9d835..49f2662fb56 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added support for rasterized area light shadows in StackLit - Added Light decomposition lighting debugging modes and support in AOV - Added exposure compensation to Fixed exposure mode +- Added range attenuation for box-shaped spotlights. ### Fixed - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md index fd537c504a4..ea857ebb349 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md @@ -77,7 +77,7 @@ These settings define the area this Light affects. Each Light **Type** has its o | **Property** | **Description** | | ------------------- | ------------------------------------------------------------ | -| **Shape** | HDRP Spot Lights can use three shapes.
• **Cone** : Projects light from a single point at the GameObject’s position, out to a circular base, like a cone. Alter the radius of the circular base by changing the **Outer Angle** and the **Range**.
• **Pyramid** : Projects light from a single point at the GameObject’s position onto a base that is a square with its side length equal to the diameter of the **Cone**.
• **Box** : Projects light evenly across a rectangular area defined by a horizontal and vertical size. | +| **Shape** | HDRP Spot Lights can use three shapes.
• **Cone** : Projects light from a single point at the GameObject’s position, out to a circular base, like a cone. Alter the radius of the circular base by changing the **Outer Angle** and the **Range**.
• **Pyramid** : Projects light from a single point at the GameObject’s position onto a base that is a square with its side length equal to the diameter of the **Cone**.
• **Box** : Projects light evenly across a rectangular area defined by a horizontal and vertical size. This light has no attenuation unless **Range Attenuation** is checked. | | **Outer Angle** | The angle in degrees at the base of a Spot Light’s cone. This property is only for Lights with a **Cone Shape**. | | **Inner Angle (%)** | Determines where the attenuation between the inner cone and the outer cone starts. Higher values cause the light at the edges of the Spot Light to fade out. Lower values stop the light from fading at the edges. This property is only for Lights with a **Cone Shape**. | | **Spot Angle** | The angle in degrees used to determine the size of a Spot Light using a **Pyramid** shape. | diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index cb3a5d59d1c..16d0d0d0a04 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -787,14 +787,12 @@ static void DrawEmissionAdvancedContent(SerializedHDLight serialized, Editor own EditorGUILayout.PropertyField(serialized.affectSpecular, s_Styles.affectSpecular); if (lightType != HDLightType.Directional) { - if (serialized.spotLightShape.GetEnumValue() != SpotLightShape.Box) - EditorGUILayout.PropertyField(serialized.applyRangeAttenuation, s_Styles.applyRangeAttenuation); + EditorGUILayout.PropertyField(serialized.applyRangeAttenuation, s_Styles.applyRangeAttenuation); EditorGUILayout.PropertyField(serialized.fadeDistance, s_Styles.fadeDistance); } EditorGUILayout.PropertyField(serialized.lightDimmer, s_Styles.lightDimmer); } - else if (lightType == HDLightType.Point - || lightType == HDLightType.Spot && serialized.spotLightShape.GetEnumValue() != SpotLightShape.Box) + else if (lightType == HDLightType.Point || lightType == HDLightType.Spot) EditorGUILayout.PropertyField(serialized.applyRangeAttenuation, s_Styles.applyRangeAttenuation); // Emissive mesh for area light only (and not supported on Disc currently) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl index 51237056a5b..e509922b0d0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl @@ -302,42 +302,7 @@ DirectionalShadowType EvaluateShadow_Directional(LightLoopContext lightLoopConte // Punctual Light evaluation helper //----------------------------------------------------------------------------- -// distances = {d, d^2, 1/d, d_proj} -void ModifyDistancesForFillLighting(inout float4 distances, float lightSqRadius) -{ - // Apply the sphere light hack to soften the core of the punctual light. - // It is not physically plausible (using max() is more correct, but looks worse). - // See https://www.desmos.com/calculator/otqhxunqhl - // We only modify 1/d for performance reasons. - float sqDist = distances.y; - distances.z = rsqrt(sqDist + lightSqRadius); // Recompute 1/d -} - -// Returns the normalized light vector L and the distances = {d, d^2, 1/d, d_proj}. -void GetPunctualLightVectors(float3 positionWS, LightData light, out float3 L, out float4 distances) -{ - float3 lightToSample = positionWS - light.positionRWS; - - distances.w = dot(lightToSample, light.forward); - - if (light.lightType == GPULIGHTTYPE_PROJECTOR_BOX) - { - L = -light.forward; - distances.xyz = 1; // No distance or angle attenuation - } - else - { - float3 unL = -lightToSample; - float distSq = dot(unL, unL); - float distRcp = rsqrt(distSq); - float dist = distSq * distRcp; - - L = unL * distRcp; - distances.xyz = float3(dist, distSq, distRcp); - - ModifyDistancesForFillLighting(distances, light.size.x); - } -} +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/PunctualLightCommon.hlsl" float4 EvaluateCookie_Punctual(LightLoopContext lightLoopContext, LightData light, float3 lightToSample) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 0f560313454..74bdab7f01b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -1325,11 +1325,9 @@ internal void GetLightData(CommandBuffer cmd, HDCamera hdCamera, HDShadowSetting lightData.positionRWS = visibleLightAxisAndPosition.Position; - bool applyRangeAttenuation = additionalLightData.applyRangeAttenuation && (gpuLightType != GPULightType.ProjectorBox); - lightData.range = light.range; - if (applyRangeAttenuation) + if (additionalLightData.applyRangeAttenuation) { lightData.rangeAttenuationScale = 1.0f / (light.range * light.range); lightData.rangeAttenuationBias = 1.0f; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/PunctualLightCommon.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/PunctualLightCommon.hlsl index f8b161f99a6..6a580a85cb4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/PunctualLightCommon.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/PunctualLightCommon.hlsl @@ -26,7 +26,17 @@ void GetPunctualLightVectors(float3 positionWS, LightData light, out float3 L, o if (light.lightType == GPULIGHTTYPE_PROJECTOR_BOX) { L = -light.forward; - distances.xyz = 1; // No distance or angle attenuation + + if (light.rangeAttenuationBias == 1.0) // Light uses range attenuation + { + float dist = -dot(lightToSample, L); + float distSq = dist * dist; + float distRcp = rcp(dist); + distances.xyz = float3(dist, distSq, distRcp); + ModifyDistancesForFillLighting(distances, light.size.x); + } + else // Light is directionnal + distances.xyz = 1; // No distance or angle attenuation } else { From 5ddc82d78e4e012504b2e3958098e33ee35f669f Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 21 Apr 2020 14:44:12 +0200 Subject: [PATCH 114/200] Contact shadow min distance + fix scalarization code #150 --- .../CHANGELOG.md | 4 +- .../Images/Override-ContactShadows1.png | 4 +- .../Override-Contact-Shadows.md | 4 +- .../Lighting/Shadow/ContactShadowsEditor.cs | 13 ++++-- .../Runtime/Lighting/LightLoop/LightLoop.cs | 6 ++- .../Lighting/Shadow/ContactShadows.compute | 44 ++++++++++++------- .../Runtime/Lighting/Shadow/ContactShadows.cs | 8 ++++ .../Lighting/Shadow/ContactShadows.hlsl | 2 + 8 files changed, 61 insertions(+), 24 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 49f2662fb56..d39054f3aac 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added Light decomposition lighting debugging modes and support in AOV - Added exposure compensation to Fixed exposure mode - Added range attenuation for box-shaped spotlights. +- Added Min distance to contact shadows. ### Fixed - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. @@ -62,7 +63,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shader warning on Xbox for ResolveStencilBuffer.compute. - Fixed unneeded cookie texture allocation for cone stop lights. - Fixed issue when toggling anything in HDRP asset that will produce an error (case 1238155) -- Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. Note that the diffusion profile or the material references need to be edited once before this can work properly. +- Fixed scalarization code for contact shadows ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. @@ -74,6 +75,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Renamed "Environment" to "Reflection Probes" in tile/cluster debug menu. - Debug exposure in debug menu have been replace to debug exposure compensation in EV100 space and is always visible. - Cookie are now supported in lightmaper. All lights casting cookie and baked will now include cookie influence. +- Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. Note that the diffusion profile or the material references need to be edited once before this can work properly. ## [8.0.1] - 2020-02-25 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/Override-ContactShadows1.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/Override-ContactShadows1.png index 471cef78b6e..f99a790234f 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Images/Override-ContactShadows1.png +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/Override-ContactShadows1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:504ed4dc738c16bf4bbc227d0a30438c05fabe2847f3278dfbac74bcee8a8e87 -size 20392 +oid sha256:1a422374528d2c7b1aa36a22bef66d6b1c08938da684a8f40d8f3e92a41c8f1b +size 17389 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Override-Contact-Shadows.md b/com.unity.render-pipelines.high-definition/Documentation~/Override-Contact-Shadows.md index 6b22dddb8c1..00de0cfcf4f 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Override-Contact-Shadows.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Override-Contact-Shadows.md @@ -25,8 +25,10 @@ Only one Light can cast Contact Shadows at a time. This means that, if you have | __Enable__ | Enable the checkbox to make HDRP process Contact Shadows for this [Volume](Volumes.html). | | __Length__ | Use the slider to set the length of the rays, in meters, that HDRP uses for tracing. It also functions as the maximum distance at which the rays can captures details. | | __Distance Scale Factor__ | HDRP scales Contact Shadows up with distance. Use the slider to set the value that HDRP uses to dampen the scale to avoid biasing artifacts with distance. | +| __Min Distance__ | The distance from the Camera, in meters, at which HDRP begins to fade in Contact Shadows. | | __Max Distance__ | The distance from the Camera, in meters, at which HDRP begins to fade Contact Shadows out to zero. | -| __Fade Distance__ | The distance, in meters, over which HDRP fades Contact Shadows out when at the __Max Distance__. | +| __Fade In Distance__ | The distance, in meters, over which HDRP fades Contact Shadows in when past the **Min Distance**. | +| __Fade Out Distance__ | The distance, in meters, over which HDRP fades Contact Shadows out when at the __Max Distance__. | | __Sample Count__ | Use the slider to set the number of samples HDRP uses for ray casting. Increasing this increases quality at the cost of performance. | | __Opacity__ | Use the slider to set the opacity of the Contact Shadows. Lower values result in softer, less prominent shadows. | diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs index 3e49aee4062..8f365d80abc 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs @@ -11,11 +11,12 @@ class ContactShadowsEditor : VolumeComponentWithQualityEditor SerializedDataParameter m_Length; SerializedDataParameter m_DistanceScaleFactor; SerializedDataParameter m_MaxDistance; + SerializedDataParameter m_MinDistance; SerializedDataParameter m_FadeDistance; + SerializedDataParameter m_FadeInDistance; SerializedDataParameter m_SampleCount; SerializedDataParameter m_Opacity; - public override void OnEnable() { base.OnEnable(); @@ -26,7 +27,9 @@ public override void OnEnable() m_Length = Unpack(o.Find(x => x.length)); m_DistanceScaleFactor = Unpack(o.Find(x => x.distanceScaleFactor)); m_MaxDistance = Unpack(o.Find(x => x.maxDistance)); + m_MinDistance = Unpack(o.Find(x => x.minDistance)); m_FadeDistance = Unpack(o.Find(x => x.fadeDistance)); + m_FadeInDistance = Unpack(o.Find(x => x.fadeInDistance)); m_SampleCount = Unpack(o.Find(x => x.sampleCount)); m_Opacity = Unpack(o.Find(x => x.opacity)); } @@ -41,8 +44,12 @@ public override void OnInspectorGUI() { PropertyField(m_Length, EditorGUIUtility.TrTextContent("Length", "Controls the length of the rays HDRP uses to calculate Contact Shadows. Uses meters.")); PropertyField(m_DistanceScaleFactor, EditorGUIUtility.TrTextContent("Distance Scale Factor", "Dampens the scale up effect HDRP process with distance from the Camera.")); - PropertyField(m_MaxDistance, EditorGUIUtility.TrTextContent("Max Distance", "Sets The distance from the Camera at which HDRP begins to fade out Contact Shadows. Uses meters.")); - PropertyField(m_FadeDistance, EditorGUIUtility.TrTextContent("Fade Distance", "Sets the distance over which HDRP fades Contact Shadows out when at the Max Distance. Uses meters.")); + m_MinDistance.value.floatValue = Mathf.Clamp(m_MinDistance.value.floatValue, 0.0f, m_MaxDistance.value.floatValue); + PropertyField(m_MinDistance, EditorGUIUtility.TrTextContent("Min Distance", "Sets the distance from the camera at which HDRP begins to fade in Contact Shadows. Uses meters.")); + PropertyField(m_MaxDistance, EditorGUIUtility.TrTextContent("Max Distance", "Sets the distance from the Camera at which HDRP begins to fade out Contact Shadows. Uses meters.")); + m_FadeInDistance.value.floatValue = Mathf.Clamp(m_FadeInDistance.value.floatValue, 0.0f, m_MaxDistance.value.floatValue); + PropertyField(m_FadeInDistance, EditorGUIUtility.TrTextContent("Fade In Distance", "Sets the distance over which HDRP fades Contact Shadows in when past the Min Distance. Uses meters.")); + PropertyField(m_FadeDistance, EditorGUIUtility.TrTextContent("Fade Out Distance", "Sets the distance over which HDRP fades Contact Shadows out when at the Max Distance. Uses meters.")); PropertyField(m_Opacity, EditorGUIUtility.TrTextContent("Opacity", "Controls the opacity of the Contact Shadow.")); base.OnInspectorGUI(); GUI.enabled = useCustomValue; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 74bdab7f01b..1581bc42d14 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -3447,8 +3447,12 @@ ContactShadowsParameters PrepareContactShadowsParameters(HDCamera hdCamera, floa float contactShadowRange = Mathf.Clamp(m_ContactShadows.fadeDistance.value, 0.0f, m_ContactShadows.maxDistance.value); float contactShadowFadeEnd = m_ContactShadows.maxDistance.value; float contactShadowOneOverFadeRange = 1.0f / Math.Max(1e-6f, contactShadowRange); + + float contactShadowMinDist = Mathf.Min(m_ContactShadows.minDistance.value, contactShadowFadeEnd); + float contactShadowFadeIn = Mathf.Clamp(m_ContactShadows.fadeInDistance.value, 1e-6f, contactShadowFadeEnd); + parameters.params1 = new Vector4(m_ContactShadows.length.value, m_ContactShadows.distanceScaleFactor.value, contactShadowFadeEnd, contactShadowOneOverFadeRange); - parameters.params2 = new Vector4(firstMipOffsetY, 0.0f, 0.0f, 0.0f); + parameters.params2 = new Vector4(firstMipOffsetY, contactShadowMinDist, contactShadowFadeIn, 0.0f); parameters.sampleCount = m_ContactShadows.sampleCount; int deferredShadowTileSize = 16; // Must match DeferreDirectionalShadow.compute diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute index 49960dd6b30..fc45a4f92e6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute @@ -15,9 +15,9 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.hlsl" -// We perform scalarization only for forward rendering as for deferred loads will already be scalar since tiles will match waves and therefore all threads will read from the same tile. +// We perform scalarization all the time here as we don't know if we have clustered data structure or not at this point. // More info on scalarization: https://flashypixels.wordpress.com/2018/11/10/intro-to-gpu-scalarization-part-2-scalarize-all-the-lights/ -#define SCALARIZE_LIGHT_LOOP (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER) && SHADERPASS == SHADERPASS_FORWARD) +#define SCALARIZE_LIGHT_LOOP (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER)) #pragma only_renderers d3d11 playstation xboxone vulkan metal switch @@ -147,6 +147,9 @@ bool ComputeContactShadow(PositionInputs posInput, float3 direction, inout float //Here LightDirection is not the light direction but the light position float rayLength = _ContactShadowLength * max(0.5, posInput.linearDepth * _ContactShadowDistanceScaleFactor); occluded = ScreenSpaceShadowRayCast(posInput.positionWS, direction, rayLength, posInput.positionSS, fade); + // Fade in + fade *= saturate((posInput.linearDepth - _ContactShadowMinDistance) * rcp(_ContactShadowFadeInEnd)); + // Fade out fade *= saturate((_ContactShadowFadeEnd - posInput.linearDepth) * _ContactShadowFadeOneOverRange); globalFade = max(globalFade, fade); @@ -172,7 +175,7 @@ void DEFERRED_CONTACT_SHADOW_GENERIC(uint2 groupThreadId : SV_GroupThreadID, uin PositionInputs posInput = GetPositionInput(pixelCoord.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V, tileCoord); // discard the shadow if we're on the sky or outside of the contact shadow range - if (depth == UNITY_RAW_FAR_CLIP_VALUE || posInput.linearDepth - _ContactShadowFadeEnd > 1) + if (depth == UNITY_RAW_FAR_CLIP_VALUE || posInput.linearDepth - _ContactShadowFadeEnd > 1 || posInput.linearDepth < _ContactShadowMinDistance) { _ContactShadowTextureUAV[COORD_TEXTURE2D_X(pixelCoord)] = 0; @@ -228,26 +231,35 @@ void DEFERRED_CONTACT_SHADOW_GENERIC(uint2 groupThreadId : SV_GroupThreadID, uin lightStart = startFirstLane; } - for (uint lightListOffset = 0; lightListOffset < lightCount; lightListOffset++) + uint v_lightIdx = lightStart; + uint v_lightListOffset = 0; + while (v_lightListOffset < lightCount) { - uint v_lightIdx = FetchIndex(lightStart, lightListOffset); + v_lightIdx = FetchIndex(lightStart, v_lightListOffset); uint s_lightIdx = ScalarizeElementIndex(v_lightIdx, fastPath); if (s_lightIdx == -1) break; - LightData light = FetchLight(s_lightIdx); // Scalar load + LightData s_lightData = FetchLight(s_lightIdx); - if (light.contactShadowMask != 0 && light.isRayTracedContactShadow == 0.0) + // If current scalar and vector light index match, we process the light. The v_lightListOffset for current thread is increased. + // Note that the following should really be ==, however, since helper lanes are not considered by WaveActiveMin, such helper lanes could + // end up with a unique v_lightIdx value that is smaller than s_lightIdx hence being stuck in a loop. All the active lanes will not have this problem. + if (s_lightIdx >= v_lightIdx) { - // Compute light ray direction: - float3 direction = normalize(light.positionRWS.xyz - posInput.positionWS); - - bool occluded = ComputeContactShadow(posInput, direction, globalFade); - - // light.contactShadowMask contains one bit at the position of the contact shadow index that will - // be tested in the lightloop, so it insert 1 at the index of the contact shadow if there is a contact shadow - // we take full bits at one multiplied by contact shadow and filter the bit at the contact shadow index. - contactShadowMask |= light.contactShadowMask * occluded; + v_lightListOffset++; + if (s_lightData.contactShadowMask != 0 && s_lightData.isRayTracedContactShadow == 0.0) + { + // Compute light ray direction: + float3 direction = normalize(s_lightData.positionRWS.xyz - posInput.positionWS); + + bool occluded = ComputeContactShadow(posInput, direction, globalFade); + + // light.contactShadowMask contains one bit at the position of the contact shadow index that will + // be tested in the lightloop, so it insert 1 at the index of the contact shadow if there is a contact shadow + // we take full bits at one multiplied by contact shadow and filter the bit at the contact shadow index. + contactShadowMask |= s_lightData.contactShadowMask * occluded; + } } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.cs index a17d4e18af0..f2da6428bbe 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.cs @@ -31,10 +31,18 @@ public class ContactShadows : VolumeComponentWithQuality ///
public MinFloatParameter maxDistance = new MinFloatParameter(50.0f, 0.0f); /// + /// The distance from the camera, in meters, at which HDRP begins to fade in Contact Shadows. + /// + public MinFloatParameter minDistance = new MinFloatParameter(0.0f, 0.0f); + /// /// The distance, in meters, over which HDRP fades Contact Shadows out when past the Max Distance. /// public MinFloatParameter fadeDistance = new MinFloatParameter(5.0f, 0.0f); /// + /// The distance, in meters, over which HDRP fades Contact Shadows in when past the Min Distance. + /// + public MinFloatParameter fadeInDistance = new MinFloatParameter(0.0f, 0.0f); + /// /// Controls the number of samples HDRP takes along each contact shadow ray. Increasing this value can lead to higher quality. /// public int sampleCount diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.hlsl index 272c246e6c5..f5f01cb67a9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.hlsl @@ -11,3 +11,5 @@ CBUFFER_END #define _ContactShadowFadeEnd _ContactShadowParamsParameters.z #define _ContactShadowFadeOneOverRange _ContactShadowParamsParameters.w #define _RenderTargetHeight _ContactShadowParamsParameters2.x +#define _ContactShadowMinDistance _ContactShadowParamsParameters2.y +#define _ContactShadowFadeInEnd _ContactShadowParamsParameters2.z From 5d0d74c22b431e871ff683eed86f6ac12c1d23a2 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Wed, 22 Apr 2020 19:45:13 +0200 Subject: [PATCH 115/200] Hdrp/combine material samples with shader samples [Skip CI] #117 --- .../Direct3D11/None/1301_StackLitSG.png | 4 +- .../CHANGELOG.md | 5 + .../Documentation~/HDRP-Sample-Content.md | 14 +- .../Mesh/UnityBall.FBX.meta | 2 +- .../Samples~/MaterialSamples/Decals.unity | 655 +++ .../Decals.unity.meta} | 2 +- .../Samples~/MaterialSamples/Fabric.unity | 4165 +++++++++++++++++ .../Fabric.unity.meta} | 3 +- .../Samples~/MaterialSamples/Hair.unity | 655 +++ .../Hair.unity.meta} | 3 +- .../MaterialSamples/MaterialSamples.unity | 2966 +++++------- .../Materials}/Cotton.mat | 19 +- .../Materials}/Cotton.mat.meta | 0 .../Materials}/DC_WaterPuddle.mat | 0 .../Materials}/DC_WaterPuddle.mat.meta | 0 .../MaterialSamples/Materials/Denim.mat | 290 ++ .../Materials/Denim.mat.meta} | 4 +- .../MaterialSamples/Materials/GreyFloor 2.mat | 290 ++ .../Materials/GreyFloor 2.mat.meta | 10 + .../MaterialSamples/Materials/GreyFloor.mat | 8 +- .../Materials}/Hair_Lower_Layer.mat | 7 +- .../Materials}/Hair_Lower_Layer.mat.meta | 0 .../Materials}/Hair_Upper_Layer.mat | 9 +- .../Materials}/Hair_Upper_Layer.mat.meta | 0 .../MaterialSamples/Materials/Linen.mat | 290 ++ .../Materials/Linen.mat.meta} | 4 +- .../Materials}/Metal.mat | 10 +- .../Materials}/Metal.mat.meta | 0 .../MaterialSamples/Materials/Nylon.mat | 290 ++ .../Materials/Nylon.mat.meta} | 4 +- .../MaterialSamples/Materials/ShotSilk.mat | 290 ++ .../Materials/ShotSilk.mat.meta} | 4 +- .../Materials}/Silk.mat | 27 +- .../Materials}/Silk.mat.meta | 0 .../MaterialSamples/Materials/Velvet.mat | 290 ++ .../MaterialSamples/Materials/Velvet.mat.meta | 8 + .../MaterialSamples/Materials/Wool.mat | 290 ++ .../MaterialSamples/Materials/Wool.mat.meta | 8 + .../Meshes.meta | 0 .../Meshes/Cloth.obj.meta} | 76 +- .../Prefabs}/Decal Projector.prefab | 8 +- .../Prefabs}/Decal Projector.prefab.meta | 0 .../Prefabs/DirectionalLight.prefab | 206 + .../Prefabs/DirectionalLight.prefab.meta} | 2 +- .../Prefabs/FabricBall Variant.prefab | 149 + .../Prefabs/FabricBall Variant.prefab.meta} | 5 +- .../MaterialSamples/Prefabs/Frame.prefab | 346 +- .../Prefabs/Free Camera.prefab | 208 + .../Prefabs/Free Camera.prefab.meta | 7 + .../Prefabs/HairBall Variant.prefab | 171 + .../Prefabs/HairBall Variant.prefab.meta | 7 + .../Prefabs/MaterialBall.prefab.meta | 2 +- .../Prefabs/Rendering Settings.prefab | 50 + .../Prefabs/Rendering Settings.prefab.meta | 7 + .../Settings}/Cotton Thin.asset | 4 +- .../Settings}/Cotton Thin.asset.meta | 0 .../MaterialSamples/Settings/Linen Thin.asset | 24 + .../Settings/Linen Thin.asset.meta | 8 + ...Materials Samples Rendering Settings.asset | 37 +- .../MaterialSamples/Settings/Wool Thick.asset | 24 + .../Settings/Wool Thick.asset.meta | 8 + .../Shadergraphs.meta} | 2 +- .../Shadergraphs}/SG_CottonWool.ShaderGraph | 0 .../SG_CottonWool.ShaderGraph.meta | 0 .../SG_Decal_WaterPuddle.ShaderGraph | 0 .../SG_Decal_WaterPuddle.ShaderGraph.meta | 0 .../Shadergraphs}/SG_Hair.shadergraph | 0 .../Shadergraphs}/SG_Hair.shadergraph.meta | 0 .../Shadergraphs}/SG_Silk.ShaderGraph | 0 .../Shadergraphs}/SG_Silk.ShaderGraph.meta | 0 .../Subgraphs.meta | 0 .../SGR_ThreadMapDetail.shadersubgraph | 0 .../SGR_ThreadMapDetail.shadersubgraph.meta | 0 .../Subgraphs/SGR_uvCombine.shadersubgraph | 0 .../SGR_uvCombine.shadersubgraph.meta | 0 .../Textures}/DC_puddle01_H.tga | 0 .../Textures}/DC_puddle01_H.tga.meta | 0 .../Textures}/DC_puddle01_N.tga | 0 .../Textures}/DC_puddle01_N.tga.meta | 0 .../MaterialSamples/Textures/Denim_C.tga | 3 + .../Textures/Denim_C.tga.meta} | 25 +- .../MaterialSamples/Textures/Denim_CV.tga | 3 + .../Textures/Denim_CV.tga.meta | 142 + .../Textures}/Hair_AO.tga | 0 .../Textures}/Hair_AO.tga.meta | 0 .../Textures}/Hair_BC.tga | 0 .../Textures}/Hair_BC.tga.meta | 0 .../Textures}/Hair_N.tga | 0 .../Textures}/Hair_N.tga.meta | 0 .../Textures}/Hair_S.tga | 0 .../Textures}/Hair_S.tga.meta | 0 .../Textures}/Hair_Shift.tga | 0 .../Textures}/Hair_Shift.tga.meta | 0 .../Textures/Knit_Jersey_TM.tga | 3 + .../Textures/Knit_Jersey_TM.tga.meta} | 23 +- .../Textures/Knit_Ribbed__TM.tga | 3 + .../Textures/Knit_Ribbed__TM.tga.meta | 142 + .../Textures/WeavePattern01_F.tga | 4 +- .../Textures/WeavePattern01_F.tga.meta | 22 +- .../Textures/Weave_Jacket_TM.tga | 3 + .../Textures/Weave_Jacket_TM.tga.meta | 142 + .../Textures/Weave_Plain_CV.tga | 3 + .../Textures/Weave_Plain_CV.tga.meta | 142 + .../Textures/Weave_Plain_TM.tga | 3 + .../Textures/Weave_Plain_TM.tga.meta | 142 + .../Textures/Weave_Twill_TM.tga | 3 + .../Textures/Weave_Twill_TM.tga.meta | 142 + .../Samples~/ShaderGraphSamples/.sample.json | 5 - .../ShaderGraphSamples/Fabric/D_Cloth.fbx | 3 - .../ShaderGraphSamples/Fabric/Fabric.prefab | 190 - .../Fabric/WeavePattern01_D.tga | 3 - .../Fabric/WeavePattern01_F.tga | 3 - .../Meshes/MaterialBall.prefab | 193 - .../ShaderGraphSamples/SampleScene.unity | 1985 -------- .../SampleScene_PostProcessingSettings.asset | 190 - .../SampleScene_RenderingOverrides.asset | 79 - .../SampleScene_SkyAndFogSettings.asset | 311 -- .../package.json | 5 - 118 files changed, 10649 insertions(+), 5245 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Decals.unity rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/SampleScene.unity.meta => MaterialSamples/Decals.unity.meta} (74%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Fabric.unity rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair.meta => MaterialSamples/Fabric.unity.meta} (67%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Hair.unity rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal.meta => MaterialSamples/Hair.unity.meta} (67%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Materials}/Cotton.mat (94%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Materials}/Cotton.mat.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Materials}/DC_WaterPuddle.mat (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Materials}/DC_WaterPuddle.mat.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Denim.mat rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/SampleScene_RenderingOverrides.asset.meta => MaterialSamples/Materials/Denim.mat.meta} (64%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat.meta rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Materials}/Hair_Lower_Layer.mat (98%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Materials}/Hair_Lower_Layer.mat.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Materials}/Hair_Upper_Layer.mat (97%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Materials}/Hair_Upper_Layer.mat.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Linen.mat rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/SampleScene_PostProcessingSettings.asset.meta => MaterialSamples/Materials/Linen.mat.meta} (64%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Meshes => MaterialSamples/Materials}/Metal.mat (96%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Meshes => MaterialSamples/Materials}/Metal.mat.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Nylon.mat rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset.meta => MaterialSamples/Materials/Nylon.mat.meta} (64%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/ShotSilk.mat rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Meshes/MaterialBall.prefab.meta => MaterialSamples/Materials/ShotSilk.mat.meta} (63%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Materials}/Silk.mat (92%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Materials}/Silk.mat.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat.meta rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples => MaterialSamples}/Meshes.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric/D_Cloth.fbx.meta => MaterialSamples/Meshes/Cloth.obj.meta} (64%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Prefabs}/Decal Projector.prefab (90%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Prefabs}/Decal Projector.prefab.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/DirectionalLight.prefab rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric/Fabric.prefab.meta => MaterialSamples/Prefabs/DirectionalLight.prefab.meta} (74%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/FabricBall Variant.prefab rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric.meta => MaterialSamples/Prefabs/FabricBall Variant.prefab.meta} (57%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab.meta rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Settings}/Cotton Thin.asset (94%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Settings}/Cotton Thin.asset.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset.meta rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples.meta => MaterialSamples/Shadergraphs.meta} (77%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Shadergraphs}/SG_CottonWool.ShaderGraph (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Shadergraphs}/SG_CottonWool.ShaderGraph.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Shadergraphs}/SG_Decal_WaterPuddle.ShaderGraph (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Shadergraphs}/SG_Decal_WaterPuddle.ShaderGraph.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Shadergraphs}/SG_Hair.shadergraph (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Shadergraphs}/SG_Hair.shadergraph.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Shadergraphs}/SG_Silk.ShaderGraph (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric => MaterialSamples/Shadergraphs}/SG_Silk.ShaderGraph.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples => MaterialSamples}/Subgraphs.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples => MaterialSamples}/Subgraphs/SGR_ThreadMapDetail.shadersubgraph (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples => MaterialSamples}/Subgraphs/SGR_ThreadMapDetail.shadersubgraph.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples => MaterialSamples}/Subgraphs/SGR_uvCombine.shadersubgraph (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples => MaterialSamples}/Subgraphs/SGR_uvCombine.shadersubgraph.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Textures}/DC_puddle01_H.tga (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Textures}/DC_puddle01_H.tga.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Textures}/DC_puddle01_N.tga (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Decal => MaterialSamples/Textures}/DC_puddle01_N.tga.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_C.tga rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric/WeavePattern01_F.tga.meta => MaterialSamples/Textures/Denim_C.tga.meta} (80%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga.meta rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_AO.tga (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_AO.tga.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_BC.tga (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_BC.tga.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_N.tga (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_N.tga.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_S.tga (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_S.tga.meta (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_Shift.tga (100%) rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Hair => MaterialSamples/Textures}/Hair_Shift.tga.meta (100%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Jersey_TM.tga rename com.unity.render-pipelines.high-definition/Samples~/{ShaderGraphSamples/Fabric/WeavePattern01_D.tga.meta => MaterialSamples/Textures/Knit_Jersey_TM.tga.meta} (85%) create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga.meta create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga create mode 100644 com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga.meta delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/.sample.json delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/D_Cloth.fbx delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Fabric.prefab delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_D.tga delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_F.tga delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/MaterialBall.prefab delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene.unity delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_PostProcessingSettings.asset delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_RenderingOverrides.asset delete mode 100644 com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1301_StackLitSG.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1301_StackLitSG.png index 436b8f5d6cf..ad3f60e3eff 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1301_StackLitSG.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1301_StackLitSG.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf48f47312f7542bd25937f93901c00bb9b7136a327a2ce12e47875bd7331a5a -size 259020 +oid sha256:23b7e539db4e595ce4227da97eac968a489212fb6a3025d9bb5c3eb616d804e3 +size 259235 diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d39054f3aac..f8916604a8c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added exposure compensation to Fixed exposure mode - Added range attenuation for box-shaped spotlights. - Added Min distance to contact shadows. +- Added scenes for hair and fabric and decals with material samples +- Added fabric materials and textures +- Added information for fabric materials in fabric scene ### Fixed - Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. @@ -64,6 +67,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed unneeded cookie texture allocation for cone stop lights. - Fixed issue when toggling anything in HDRP asset that will produce an error (case 1238155) - Fixed scalarization code for contact shadows +- Fix MaterialBalls having same guid issue +- Fix spelling and grammatical errors in material samples ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md index f1a6b51ca45..08239ae0b3b 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md @@ -18,16 +18,6 @@ Additional Post-Processing Data gives you access to Textures you can use with po - Spectral Look-up Textures (designed for use in [Chromatic Aberrations](Post-Processing-Chromatic-Aberration.html)). - Look-Up Textures. -## Shader Graph Samples - -This Sample includes example Shader Graphs that show you how to use the following Master Nodes: - -* [Fabric Master Node](Master-Node-Fabric.html). -* [Hair Master Node](Master-Node-Hair.html). -* [Decal Master Node](Master-Node-Decal.html). - -The Fabric and Hair Master Nodes usually require various work from artists inside the Shader Graph and the Samples are a good head start. - ## Procedural Sky The [Procedural Sky](Override-Procedural-Sky.html) is a deprecated sky type from older versions of HDRP which you can use for compatibility. This Sample also includes an example of how to create a custom sky in your Project that is compatible with HDRP's [Volume framework](Volumes.html). HDRP will remove the Procedural Sky in a future version because it behaves incorrectly with HDRP's physically based light units. @@ -40,5 +30,5 @@ This Sample includes various examples of lit and unlit particle effects. ![Material Samples](Images/MaterialSamples.png) -This Sample includes various examples of Materials that use the [Lit Shader](Lit-Shader.html). The included Materials use effects such as subsurface scattering, displacement, and anisotropy. The **MaterialSamples** Scene requires Text Mesh Pro to display the text explanations. - +This Sample includes various examples of Materials. It includes Materials that use the [Lit Shader](Lit-Shader.html), [Fabric Master Node](Master-Node-Fabric.html), [Hair Master Node](Master-Node-Hair.html), and [Decal Master Node](Master-Node-Decal.html). The included Materials use effects such as subsurface scattering, displacement, and anisotropy. The **MaterialSamples** Scene requires Text Mesh Pro to display the text explanations. +The Fabric and Hair Master Nodes usually require various work from artists inside the Shader Graph and the Samples are a good head start. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/UnityBall.FBX.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/UnityBall.FBX.meta index 11742d7ea9e..9844b941314 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/UnityBall.FBX.meta +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/Mesh/UnityBall.FBX.meta @@ -109,7 +109,7 @@ ModelImporter: tangentSpace: normalSmoothAngle: 60 normalImportMode: 0 - tangentImportMode: 0 + tangentImportMode: 4 normalCalculationMode: 4 legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 blendShapeNormalImportMode: 1 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Decals.unity b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Decals.unity new file mode 100644 index 00000000000..8ea135ebbff --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Decals.unity @@ -0,0 +1,655 @@ +%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: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 299.8381, g: 336.92505, b: 537.1908, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 0 + 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: 10 + 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: 0 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 4 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + 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: 112000000, guid: 4a16e48f43111624e97012bdf696b6ae, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: be4d08321c523814b9453743df098ccf, 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!1001 &55440969 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.x + value: 6.02 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.y + value: 12.74 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.z + value: 19.01 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.x + value: 0.04474099 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9393257 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.z + value: 0.31783894 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.w + value: 0.121012256 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 37.440002 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -165.492 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -0.514 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232394, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_Name + value: Free Camera + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} +--- !u!1001 &236911332 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1652331201} + m_Modifications: + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalRotation.x + value: 0.70710695 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071067 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950670, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_Name + value: Decal Projector + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950671, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_Size.x + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3525908778427950671, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} + propertyPath: m_Size.y + value: 4 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} +--- !u!1 &286151611 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 286151616} + - component: {fileID: 286151615} + - component: {fileID: 286151614} + - component: {fileID: 286151613} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!65 &286151613 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &286151614 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: acd83b0da1aaa6244a40589e1e2027e2, 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: 0 + m_SelectedEditorRenderState: 2 + 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 &286151615 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &286151616 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.16, z: 0} + m_LocalScale: {x: 6.5, y: 0.2, z: 6.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1158603396 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532154, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_Name + value: Rendering Settings + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} +--- !u!1001 &1284116253 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3137672285531552026, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_Name + value: DirectionalLight + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.x + value: -1.83 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.y + value: 3.47 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.z + value: -0.97 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.x + value: 0.2769918 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.y + value: -0.79612345 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.z + value: 0.34268054 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.w + value: 0.41476864 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 50.842003 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -131.822 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -14.375001 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} +--- !u!1001 &1652331200 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: Decal + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Decal + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &1652331201 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 1652331200} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1690280215 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 10 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + top: + m_OverrideState: 0 + m_Value: {r: 0.22322798, g: 0.2581829, b: 0.4341537, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + middle: + m_OverrideState: 0 + m_Value: {r: 0.2767907, g: 0.32292244, b: 0.541, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + bottom: + m_OverrideState: 0 + m_Value: {r: 0.6273585, g: 0.6739387, b: 1, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + gradientDiffusion: + m_OverrideState: 0 + m_Value: 1 +--- !u!1 &1728193971 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1728193973} + - component: {fileID: 1728193972} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1728193972 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728193971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: bcce1d882ad78594e96df95e83512585, type: 2} + m_StaticLightingSkyUniqueID: 3 + m_SkySettings: {fileID: 1690280215} + m_SkySettingsFromProfile: {fileID: -213621468369542312, guid: bcce1d882ad78594e96df95e83512585, type: 2} +--- !u!4 &1728193973 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728193971} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene.unity.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Decals.unity.meta similarity index 74% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene.unity.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Decals.unity.meta index c813bb05f3d..7a68ef42caf 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene.unity.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Decals.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a35d5b0d27250b0408483d97aba2aebb +guid: 917b845d26db5684f88b93d82225f9e8 DefaultImporter: externalObjects: {} userData: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Fabric.unity b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Fabric.unity new file mode 100644 index 00000000000..184f5f4bd17 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Fabric.unity @@ -0,0 +1,4165 @@ +%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: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 299.8381, g: 336.92505, b: 537.1908, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 0 + 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: 10 + 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: 0 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 4 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + 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: 112000000, guid: 4a16e48f43111624e97012bdf696b6ae, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: be4d08321c523814b9453743df098ccf, 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!1001 &11141121 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: -2.625 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: -5.25 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: Silk + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Silk + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &11141122 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 11141121} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &119112983 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1623619257} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[1] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: Silk + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: -1.5 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1001 &158346740 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: 2.625 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: 5.25 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Cotton Materials 2 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &158346741 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 158346740} + m_PrefabAsset: {fileID: 0} +--- !u!1 &165984494 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 165984495} + - component: {fileID: 165984497} + - component: {fileID: 165984496} + m_Layer: 5 + m_Name: DescriptionText (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &165984495 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165984494} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: 1.207} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 283368761} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.013, y: 0.05} + m_SizeDelta: {x: 3.03, y: 1.94} + m_Pivot: {x: 0, y: 1} +--- !u!114 &165984496 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165984494} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Denim + + This Material uses a fuzz map to simulate the color variation + found in denim.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0.7245366} + m_textInfo: + textComponent: {fileID: 165984496} + characterCount: 84 + spriteCount: 0 + spaceCount: 14 + wordCount: 15 + linkCount: 0 + lineCount: 4 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 165984497} + m_maskType: 0 +--- !u!23 &165984497 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 165984494} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &176546505 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1623619257} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 7f6a1351c198a1b48ab420a21e193e6d, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 7f6a1351c198a1b48ab420a21e193e6d, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 7f6a1351c198a1b48ab420a21e193e6d, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: 7f6a1351c198a1b48ab420a21e193e6d, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: Nylon + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 7f6a1351c198a1b48ab420a21e193e6d, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1001 &270424307 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: 2.625 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: -5.25 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: Cotton + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.spaceCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Cotton + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &270424308 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 270424307} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &283368760 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: 2.625 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.spaceCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Cotton Materials + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &283368761 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 283368760} + m_PrefabAsset: {fileID: 0} +--- !u!1 &286151611 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 286151616} + - component: {fileID: 286151615} + - component: {fileID: 286151614} + - component: {fileID: 286151613} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!65 &286151613 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &286151614 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: acd83b0da1aaa6244a40589e1e2027e2, 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: 0 + m_SelectedEditorRenderState: 2 + 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 &286151615 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &286151616 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.16, z: 0} + m_LocalScale: {x: 12, y: 0.2, z: 17.25} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &315967744 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 315967745} + - component: {fileID: 315967747} + - component: {fileID: 315967746} + m_Layer: 5 + m_Name: DescriptionText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &315967745 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 315967744} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -1.53} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 270424308} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 2, y: 0.05} + m_SizeDelta: {x: 4, y: 1} + m_Pivot: {x: 0, y: 1} +--- !u!114 &315967746 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 315967744} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'These Materials use the Fabric Shader with the Material Type set to Cotton + Wool. + + + + This is a diffused shading model which you can use to create + Materials like cotton, denim, wool, linen, and velvet. + + + + The type + of fibers that make up the fabric, as well as the fabric''s knit or weave, influence + the appearance of the fabric. Natural fibers are typically rougher and therefore + diffuse light.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -2.2390704} + m_textInfo: + textComponent: {fileID: 315967746} + characterCount: 391 + spriteCount: 0 + spaceCount: 67 + wordCount: 66 + linkCount: 0 + lineCount: 11 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 315967747} + m_maskType: 0 +--- !u!23 &315967747 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 315967744} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &343717665 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 283368761} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: Cotton + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: -1.5 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1 &409108974 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 409108975} + - component: {fileID: 409108977} + - component: {fileID: 409108976} + m_Layer: 5 + m_Name: DescriptionText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &409108975 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 409108974} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -1.41} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 804286845} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 2, y: 0.05} + m_SizeDelta: {x: 4, y: 1.25} + m_Pivot: {x: 0, y: 1} +--- !u!114 &409108976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 409108974} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'These Materials use a threadmap for the high-frequency details that fabrics + include. This is similar to the Detail Map found in HDRP''s Lit Shaders. + + + + The + threadmap input is channel-packed to optimise memory and it arranged in a way + to optimise precision for the normal map. Its format is: + + + Red channel - + Ambient occlusion + + Green and alpha channels - Normals + + Blue channel + - Smoothness' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: 245 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} + m_textInfo: + textComponent: {fileID: 409108976} + characterCount: 385 + spriteCount: 0 + spaceCount: 64 + wordCount: 63 + linkCount: 0 + lineCount: 11 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 409108977} + m_maskType: 0 +--- !u!23 &409108977 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 409108974} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1 &518222927 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 518222930} + - component: {fileID: 518222929} + - component: {fileID: 518222928} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &518222928 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 518222927} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0ef8dc2c2eabfa4e8cb77be57a837c0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HDProbeVersion: 3 + m_ObsoleteInfiniteProjection: 1 + m_ObsoleteInfluenceVolume: + m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendDistance: 0 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_Shape: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} + m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ObsoleteMultiplier: 1 + m_ObsoleteWeight: 1 + m_ObsoleteMode: 0 + m_ObsoleteLightLayers: 1 + m_ObsoleteCaptureSettings: + overrides: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + useOcclusionCulling: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + projection: 0 + nearClipPlane: 0.3 + farClipPlane: 1000 + fieldOfView: 90 + orthographicSize: 5 + renderingPath: 0 + shadowDistance: 100 + m_ProbeSettings: + frustum: + fieldOfViewMode: 1 + fixedValue: 90 + automaticScale: 1 + viewerScale: 1 + type: 0 + mode: 1 + realtimeMode: 1 + lighting: + multiplier: 1 + weight: 1 + lightLayer: 1 + fadeDistance: 10000 + rangeCompressionFactor: 1 + influence: + m_EditorAdvancedModeBlendDistancePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_EditorSimplifiedModeBlendDistance: 0.4 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_Shape: 0 + m_BoxSize: {x: 13.44, y: 5, z: 18.59} + m_BoxBlendDistancePositive: {x: 0.4, y: 0.4, z: 0.4} + m_BoxBlendDistanceNegative: {x: 0.4, y: 0.4, z: 0.4} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + proxy: + m_CSVersion: 1 + m_ObsoleteSphereInfiniteProjection: 0 + m_ObsoleteBoxInfiniteProjection: 0 + m_Shape: 0 + m_BoxSize: {x: 1, y: 1, z: 1} + m_SphereRadius: 1 + proxySettings: + useInfluenceVolumeAsProxyVolume: 0 + capturePositionProxySpace: {x: 0, y: 0, z: 0} + captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} + mirrorPositionProxySpace: {x: 0, y: 0, z: 0} + mirrorRotationProxySpace: {x: 0, y: 0, z: 0, w: 0} + resolution: 512 + cameraSettings: + customRenderingSettings: 0 + renderingPathCustomFrameSettings: + bitDatas: + data1: 70280697347917 + data2: 4539628424926265344 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 0 + data2: 0 + bufferClearing: + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + volumes: + layerMask: + serializedVersion: 2 + m_Bits: 1 + anchorOverride: {fileID: 0} + frustum: + mode: 0 + aspect: 1 + farClipPlaneRaw: 1000 + nearClipPlaneRaw: 0.3 + fieldOfView: 90 + projectionMatrix: + 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 + culling: + useOcclusionCulling: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + sceneCullingMaskOverride: 0 + invertFaceCulling: 0 + flipYMode: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + defaultFrameSettings: 0 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ProbeSettingsOverride: + probe: 0 + camera: + camera: 0 + m_ProxyVolume: {fileID: 0} + m_BakedTexture: {fileID: 0} + m_CustomTexture: {fileID: 0} + m_BakedRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_CustomRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_EditorOnlyData: 0 + m_ReflectionProbeVersion: 9 + m_ObsoleteInfluenceShape: 0 + m_ObsoleteInfluenceSphereRadius: 3 + m_ObsoleteBlendDistancePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_ObsoleteBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_ObsoleteBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_ObsoleteBoxSideFadePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBoxSideFadeNegative: {x: 1, y: 1, z: 1} +--- !u!215 &518222929 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 518222927} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 2 + m_RefreshMode: 2 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 13.44, y: 5, z: 18.59} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 0 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!4 &518222930 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 518222927} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.01, y: 0.711, z: 0.48} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 563090809} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &563090808 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 563090809} + m_Layer: 0 + m_Name: ReflectionProbes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &563090809 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 563090808} + 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_Children: + - {fileID: 518222930} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &632544995 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 632544996} + - component: {fileID: 632544998} + - component: {fileID: 632544997} + m_Layer: 5 + m_Name: DescriptionText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &632544996 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 632544995} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -1.47} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 11141122} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 2, y: 0.04999997} + m_SizeDelta: {x: 4, y: 1} + m_Pivot: {x: 0, y: 1} +--- !u!114 &632544997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 632544995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'These Materials use the Fabric Shader with the Material Type set to Silk. + + + + You + can use the Silk Material Type to create fabrics like silk, satin, nylon, and + polyester. + + + + In general, silk and other synthetic fibers are smoother + because they are produced as a single smooth filament. When this is weaved, it + produces a fabric with anisotropic specular highlights.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: 173 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} + m_textInfo: + textComponent: {fileID: 632544997} + characterCount: 364 + spriteCount: 0 + spaceCount: 60 + wordCount: 59 + linkCount: 0 + lineCount: 10 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 632544998} + m_maskType: 0 +--- !u!23 &632544998 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 632544995} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1 &741173480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 741173481} + - component: {fileID: 741173483} + - component: {fileID: 741173482} + m_Layer: 5 + m_Name: DescriptionText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &741173481 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 741173480} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -1.67} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1623619257} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.1, y: 0.05} + m_SizeDelta: {x: 3.5, y: 1} + m_Pivot: {x: 0, y: 1} +--- !u!114 &741173482 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 741173480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Silk + + A smooth fabric with anisotropic specular highlights.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} + m_textInfo: + textComponent: {fileID: 741173482} + characterCount: 59 + spriteCount: 0 + spaceCount: 7 + wordCount: 8 + linkCount: 0 + lineCount: 3 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 741173483} + m_maskType: 0 +--- !u!23 &741173483 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 741173480} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &804286844 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: -2.625 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: 5.25 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: Threadmap + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Threadmap + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &804286845 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 804286844} + m_PrefabAsset: {fileID: 0} +--- !u!1 &866798823 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 866798824} + - component: {fileID: 866798826} + - component: {fileID: 866798825} + m_Layer: 5 + m_Name: DescriptionText (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &866798824 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 866798823} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -0.3} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1623619257} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.097, y: 0.05} + m_SizeDelta: {x: 3.5, y: 1} + m_Pivot: {x: 0, y: 1} +--- !u!114 &866798825 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 866798823} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Shot Silk + + Similar to Silk but with a separate specular color that + gives the Material an iridescent look.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} + m_textInfo: + textComponent: {fileID: 866798825} + characterCount: 105 + spriteCount: 0 + spaceCount: 17 + wordCount: 18 + linkCount: 0 + lineCount: 4 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 866798826} + m_maskType: 0 +--- !u!23 &866798826 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 866798823} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &915455750 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 158346741} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 71f035daef40b5043a1096a369f2ba68, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 71f035daef40b5043a1096a369f2ba68, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 71f035daef40b5043a1096a369f2ba68, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: 71f035daef40b5043a1096a369f2ba68, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: Linen + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.8583007 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: -1.5 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 71f035daef40b5043a1096a369f2ba68, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1001 &953053171 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 283368761} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: b439df939aa5a82448314bc0f1892ee2, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: b439df939aa5a82448314bc0f1892ee2, type: 2} + - target: {fileID: 3679209007977769608, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: b439df939aa5a82448314bc0f1892ee2, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: b439df939aa5a82448314bc0f1892ee2, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: Wool + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: b439df939aa5a82448314bc0f1892ee2, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1 &977234749 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 977234750} + - component: {fileID: 977234752} + - component: {fileID: 977234751} + m_Layer: 5 + m_Name: DescriptionText (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &977234750 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 977234749} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: 1.13} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1623619257} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.097, y: 0.05} + m_SizeDelta: {x: 3.5, y: 1} + m_Pivot: {x: 0, y: 1} +--- !u!114 &977234751 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 977234749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Nylon + + Nylon is a synthetic material which is smoother than natural + fabrics such as cotton or wool.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} + m_textInfo: + textComponent: {fileID: 977234751} + characterCount: 99 + spriteCount: 0 + spaceCount: 16 + wordCount: 17 + linkCount: 0 + lineCount: 4 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 977234752} + m_maskType: 0 +--- !u!23 &977234752 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 977234749} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &991643567 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3137672285531552026, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_Name + value: DirectionalLight + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.x + value: -1.83 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.y + value: 3.47 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.z + value: -0.97 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.x + value: 0.2769918 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.y + value: -0.79612345 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.z + value: 0.34268054 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.w + value: 0.41476864 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 50.842003 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -131.822 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -14.375001 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} +--- !u!1 &1139053732 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1139053733} + - component: {fileID: 1139053735} + - component: {fileID: 1139053734} + m_Layer: 5 + m_Name: DescriptionText (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1139053733 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1139053732} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -0.379} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 158346741} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.1, y: 0.05} + m_SizeDelta: {x: 3.5, y: 1} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1139053734 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1139053732} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Velvet + + Velvet can be made from synthetic or natural fibers. What + gives velvet its unique appearance is its tufting. This means that velvet fibers + point outwards from the surface which causes surfaces directly facing the viewer + to appear darker.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: 179 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} + m_textInfo: + textComponent: {fileID: 1139053734} + characterCount: 245 + spriteCount: 0 + spaceCount: 38 + wordCount: 39 + linkCount: 0 + lineCount: 7 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 1139053735} + m_maskType: 0 +--- !u!23 &1139053735 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1139053732} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &1290426674 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.x + value: -11.12 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.y + value: 4.19 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.z + value: 11.23 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.x + value: -0.063858435 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.y + value: -0.89895606 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.z + value: 0.13996918 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.w + value: -0.41013262 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 17.7 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -229.048 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232394, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_Name + value: Free Camera + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} +--- !u!1001 &1303308321 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1623619257} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 448a7febfc1e30f458a1711fb04de2f5, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 448a7febfc1e30f458a1711fb04de2f5, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 448a7febfc1e30f458a1711fb04de2f5, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: 448a7febfc1e30f458a1711fb04de2f5, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[1] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: ShotSilk + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 448a7febfc1e30f458a1711fb04de2f5, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1001 &1311056819 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 158346741} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e55eacba76a953b4ebd58ed3e413b68a, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e55eacba76a953b4ebd58ed3e413b68a, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e55eacba76a953b4ebd58ed3e413b68a, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: e55eacba76a953b4ebd58ed3e413b68a, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: Velvet + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e55eacba76a953b4ebd58ed3e413b68a, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1 &1469795888 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1469795889} + - component: {fileID: 1469795891} + - component: {fileID: 1469795890} + m_Layer: 5 + m_Name: DescriptionText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1469795889 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469795888} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -1.95} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 158346741} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.1, y: 0.05} + m_SizeDelta: {x: 3.5, y: 1} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1469795890 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469795888} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Linen + + This Material uses a plain weave. It also uses a fuzz map + to simulate color variation.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} + m_textInfo: + textComponent: {fileID: 1469795890} + characterCount: 93 + spriteCount: 0 + spaceCount: 16 + wordCount: 17 + linkCount: 0 + lineCount: 3 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 1469795891} + m_maskType: 0 +--- !u!23 &1469795891 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1469795888} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &1623619256 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: -2.625 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Silk Materials + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &1623619257 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 1623619256} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1728193971 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1728193973} + - component: {fileID: 1728193972} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1728193972 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728193971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: bcce1d882ad78594e96df95e83512585, type: 2} + m_StaticLightingSkyUniqueID: 3 +--- !u!4 &1728193973 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728193971} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1855606904 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532154, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_Name + value: Rendering Settings + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} +--- !u!1 &2006083191 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2006083192} + - component: {fileID: 2006083194} + - component: {fileID: 2006083193} + m_Layer: 5 + m_Name: DescriptionText (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2006083192 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2006083191} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -0.38} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 283368761} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.013, y: 0.05} + m_SizeDelta: {x: 3.03, y: 1.94} + m_Pivot: {x: 0, y: 1} +--- !u!114 &2006083193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2006083191} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Wool + + This Material uses a ribbed knit threadmap. This is a thicker + knit with a higher ambient occlusion and normal strength.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0.5933261} + m_textInfo: + textComponent: {fileID: 2006083193} + characterCount: 125 + spriteCount: 0 + spaceCount: 20 + wordCount: 21 + linkCount: 0 + lineCount: 5 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 2006083194} + m_maskType: 0 +--- !u!23 &2006083194 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2006083191} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!1001 &2025648721 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 283368761} + m_Modifications: + - target: {fileID: 2794411870894918487, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 774e20f249b7f894bab1d14018da85e0, type: 2} + - target: {fileID: 3113107838335753812, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 774e20f249b7f894bab1d14018da85e0, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 774e20f249b7f894bab1d14018da85e0, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: 774e20f249b7f894bab1d14018da85e0, type: 2} + - target: {fileID: 5238402017627224683, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 5251909375925040689, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Name + value: Denim + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.x + value: 1.85 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalPosition.z + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5257599313680890715, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5640198123085796521, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 774e20f249b7f894bab1d14018da85e0, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f70916a878dbe7a4789b71edd4ca6e41, type: 3} +--- !u!1 &2041204704 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2041204705} + - component: {fileID: 2041204707} + - component: {fileID: 2041204706} + m_Layer: 5 + m_Name: DescriptionText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2041204705 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2041204704} + m_LocalRotation: {x: 0.00000016858739, y: 0.7071068, z: -0.70710677, w: 0.00000016858739} + m_LocalPosition: {x: 0, y: 0, z: -1.84} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 283368761} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.01, y: 0.05} + m_SizeDelta: {x: 3.03, y: 1.94} + m_Pivot: {x: 0, y: 1} +--- !u!114 &2041204706 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2041204704} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Cotton + + This Material uses a jersey knit threadmap typically used + for clothing. It also includes a thin Diffusion Profile to add light transmission.' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_outlineColor: + serializedVersion: 2 + rgba: 4278190080 + m_fontSize: 1.75 + m_fontSizeBase: 1.75 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_isAlignmentEnumConverted: 0 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_firstOverflowCharacterIndex: -1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_isTextTruncated: 0 + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 0 + m_isCullingEnabled: 0 + m_ignoreCulling: 1 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_firstVisibleCharacter: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0.63981265} + m_textInfo: + textComponent: {fileID: 2041204706} + characterCount: 148 + spriteCount: 0 + spaceCount: 22 + wordCount: 23 + linkCount: 0 + lineCount: 5 + pageCount: 1 + materialCount: 1 + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_spriteAnimator: {fileID: 0} + m_hasFontAssetChanged: 0 + m_renderer: {fileID: 2041204707} + m_maskType: 0 +--- !u!23 &2041204707 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2041204704} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Fabric.unity.meta similarity index 67% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Fabric.unity.meta index 24f7000d215..8c1d85098e3 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Fabric.unity.meta @@ -1,6 +1,5 @@ fileFormatVersion: 2 -guid: 311afc27e71998b41a05e47f1cfae4db -folderAsset: yes +guid: 28bc28a7881730d4a8ab96620e7cba15 DefaultImporter: externalObjects: {} userData: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Hair.unity b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Hair.unity new file mode 100644 index 00000000000..ca2f25ae664 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Hair.unity @@ -0,0 +1,655 @@ +%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: 2 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 299.8381, g: 336.92505, b: 537.1908, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 0 + 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: 10 + 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: 0 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 4 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + 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: 112000000, guid: 4a16e48f43111624e97012bdf696b6ae, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: be4d08321c523814b9453743df098ccf, 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!114 &43944457 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 10 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + top: + m_OverrideState: 0 + m_Value: {r: 0.22322798, g: 0.2581829, b: 0.4341537, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + middle: + m_OverrideState: 0 + m_Value: {r: 0.2767907, g: 0.32292244, b: 0.541, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + bottom: + m_OverrideState: 0 + m_Value: {r: 0.6273585, g: 0.6739387, b: 1, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + gradientDiffusion: + m_OverrideState: 0 + m_Value: 1 +--- !u!1 &286151611 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 286151616} + - component: {fileID: 286151615} + - component: {fileID: 286151614} + - component: {fileID: 286151613} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!65 &286151613 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &286151614 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: acd83b0da1aaa6244a40589e1e2027e2, 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: 0 + m_SelectedEditorRenderState: 2 + 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 &286151615 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &286151616 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 286151611} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.16, z: 0} + m_LocalScale: {x: 6.5, y: 0.2, z: 6.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &768976822 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3137672285531552026, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_Name + value: DirectionalLight + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.x + value: -1.83 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.y + value: 3.47 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.z + value: -0.97 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.x + value: 0.2769918 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.y + value: -0.79612345 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.z + value: 0.34268054 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.w + value: 0.41476864 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 50.842003 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -131.822 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -14.375001 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} +--- !u!1001 &1318005242 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.x + value: 6.02 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.y + value: 12.74 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.z + value: 19.01 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.x + value: 0.04474099 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9393257 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.z + value: 0.31783894 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.w + value: 0.121012256 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 37.440002 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -165.492 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -0.514 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232394, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_Name + value: Free Camera + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} +--- !u!1001 &1652331200 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.characterCount + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.wordCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.lineCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.pageCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_text + value: Hair + objectReference: {fileID: 0} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_textInfo.spaceCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_Name + value: Hair + objectReference: {fileID: 0} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} +--- !u!4 &1652331201 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + m_PrefabInstance: {fileID: 1652331200} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1728193971 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1728193973} + - component: {fileID: 1728193972} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1728193972 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728193971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: bcce1d882ad78594e96df95e83512585, type: 2} + m_StaticLightingSkyUniqueID: 3 + m_SkySettings: {fileID: 43944457} + m_SkySettingsFromProfile: {fileID: -213621468369542312, guid: bcce1d882ad78594e96df95e83512585, type: 2} +--- !u!4 &1728193973 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1728193971} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &2083942547 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532154, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_Name + value: Rendering Settings + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} +--- !u!1001 &8418711576072568814 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1652331201} + m_Modifications: + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalPosition.z + value: 0.312 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8413979825653297321, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8417315021592821187, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} + propertyPath: m_Name + value: HairBall + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 40bac94bea7d26e4eb5a5c914a13b4c5, type: 3} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Hair.unity.meta similarity index 67% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Hair.unity.meta index 3129fae1aef..2e83de16ae6 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Hair.unity.meta @@ -1,6 +1,5 @@ fileFormatVersion: 2 -guid: 3a5f4b768c5808e41a6f716b87756d29 -folderAsset: yes +guid: 87d9f8a03c328e54fa75eb2ebec99f6d DefaultImporter: externalObjects: {} userData: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/MaterialSamples.unity b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/MaterialSamples.unity index 5a8a9303cfe..50c9a9e26df 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/MaterialSamples.unity +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/MaterialSamples.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 191.56483, g: 163.02795, b: 195.17299, a: 1} + m_IndirectSpecularColor: {r: 299.8381, g: 336.92505, b: 537.1908, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -97,10 +97,8 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 112000000, guid: 4a16e48f43111624e97012bdf696b6ae, - type: 2} - m_LightingSettings: {fileID: 4890085278179872738, guid: be4d08321c523814b9453743df098ccf, - type: 2} + m_LightingDataAsset: {fileID: 112000000, guid: 4a16e48f43111624e97012bdf696b6ae, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: be4d08321c523814b9453743df098ccf, type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -120,6 +118,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -130,125 +130,101 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.004511833 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 27 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 4 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 2 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: 'Reference values Non Metals' objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 3 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textAlignment value: 65535 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_fontSize value: 4 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_fontSizeBase value: 4 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_VerticalAlignment value: 1024 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -257,8 +233,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &10513010 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 10513009} m_PrefabAsset: {fileID: 0} --- !u!1 &26947401 @@ -343,82 +318,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1088189129} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Carbon Fiber objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.0045118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 1.2459998 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b86783b27e1ae6c468d63b7f762e79a0, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: b86783b27e1ae6c468d63b7f762e79a0, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &113946421 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 113946420} m_PrefabAsset: {fileID: 0} --- !u!1 &138015145 @@ -829,118 +801,95 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 319542408} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.004511833 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 12 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: Displacement objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -949,8 +898,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &167237509 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 167237508} m_PrefabAsset: {fileID: 0} --- !u!1001 &174910957 @@ -960,290 +908,81 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 821181733} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Aluminium Satin objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.5 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &174910958 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 174910957} m_PrefabAsset: {fileID: 0} ---- !u!1 &182246180 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 182246185} - - component: {fileID: 182246184} - - component: {fileID: 182246183} - - component: {fileID: 182246181} - - component: {fileID: 182246186} - m_Layer: 0 - m_Name: Free Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &182246181 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 182246180} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Version: 7 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 - clearColorMode: 0 - backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} - clearDepth: 1 - volumeLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - volumeAnchorOverride: {fileID: 0} - antialiasing: 2 - SMAAQuality: 2 - dithering: 0 - stopNaNs: 0 - taaSharpenStrength: 0.6 - physicalParameters: - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - flipYMode: 0 - fullscreenPassthrough: 0 - allowDynamicResolution: 0 - customRenderingSettings: 0 - invertFaceCulling: 0 - probeLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - hasPersistentHistory: 0 - m_RenderingPathCustomFrameSettings: - bitDatas: - data1: 2110972231500 - data2: 4539628424926265344 - lodBias: 1 - lodBiasMode: 0 - lodBiasQualityLevel: 0 - maximumLODLevel: 0 - maximumLODLevelMode: 0 - maximumLODLevelQualityLevel: 0 - materialQuality: 0 - renderingPathCustomFrameSettingsOverrideMask: - mask: - data1: 0 - data2: 0 - defaultFrameSettings: 0 ---- !u!81 &182246183 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 182246180} - m_Enabled: 1 ---- !u!20 &182246184 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 182246180} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.62552905, g: 0.684092, b: 0.7761194, a: 0.019607844} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 48.12937 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.02 - far clip plane: 400 - field of view: 28 - orthographic: 0 - orthographic size: 100 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &182246185 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 182246180} - m_LocalRotation: {x: 0.04474099, y: -0.9393257, z: 0.31783894, w: 0.121012256} - m_LocalPosition: {x: 6.02, y: 12.74, z: 19.01} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 37.440002, y: -165.492, z: -0.514} ---- !u!114 &182246186 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 182246180} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 618b0e3f6c65dd247a4a016150006c57, type: 3} - m_Name: - m_EditorClassIdentifier: - m_LookSpeedController: 120 - m_LookSpeedMouse: 3 - m_MoveSpeed: 10 - m_MoveSpeedIncrement: 2.5 - m_Turbo: 3 --- !u!1001 &238855216 PrefabInstance: m_ObjectHideFlags: 0 @@ -1251,115 +990,93 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 388158451} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.004511833 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 23 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 3 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 2 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: 'Reference values Metals' objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 2 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textAlignment value: 65535 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_VerticalAlignment value: 1024 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -1368,8 +1085,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &238855217 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 238855216} m_PrefabAsset: {fileID: 0} --- !u!1 &286151611 @@ -1461,8 +1177,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 286151611} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.1, z: 0} - m_LocalScale: {x: 30, y: 0.2, z: 30} + m_LocalPosition: {x: 0, y: -0.14, z: 0} + m_LocalScale: {x: 18, y: 0.2, z: 18} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 4 @@ -2050,102 +1766,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &480396049 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 480396050} - - component: {fileID: 480396053} - - component: {fileID: 480396052} - - component: {fileID: 480396051} - m_Layer: 0 - m_Name: Border02 (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &480396050 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 480396049} - m_LocalRotation: {x: 0.70710576, y: -0, z: -0, w: 0.70710784} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 5.1, y: 0.1, z: 1} - m_Children: [] - m_Father: {fileID: 2048363866} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: 0} ---- !u!64 &480396051 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 480396049} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &480396052 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 480396049} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - 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: 432261abd3c1815429a7027f8e7e2287, 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 &480396053 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 480396049} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &509008196 GameObject: m_ObjectHideFlags: 0 @@ -2513,6 +2133,7 @@ MonoBehaviour: captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} mirrorPositionProxySpace: {x: 0, y: 0, z: 0} mirrorRotationProxySpace: {x: 0, y: 0, z: 0, w: 0} + resolution: 512 cameraSettings: customRenderingSettings: 0 renderingPathCustomFrameSettings: @@ -2769,70 +2390,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 388158451} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Gold Rough objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.0045128 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.7539997 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 85adc02be1e76f9418e5ebc4d00db699, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 85adc02be1e76f9418e5ebc4d00db699, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &531224404 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 531224403} m_PrefabAsset: {fileID: 0} --- !u!1 &532036908 @@ -2908,82 +2526,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 584707369} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Fern objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.6789999 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 66c4426f785652541963fc7aec0607d6, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 66c4426f785652541963fc7aec0607d6, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &582881175 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 582881174} m_PrefabAsset: {fileID: 0} --- !u!1 &584707368 @@ -3029,74 +2644,71 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Black Artificial Smooth objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.7542405 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 47b3c72b7b2a43d4eb22143601ebfe44, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 47b3c72b7b2a43d4eb22143601ebfe44, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &632315728 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 632315727} m_PrefabAsset: {fileID: 0} --- !u!1001 &718437945 @@ -3106,84 +2718,176 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1088189129} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Metal Brushed Circular objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.0045118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.24624062 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 8410c9103b5956b4db3092b6c614417d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 8410c9103b5956b4db3092b6c614417d, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &718437946 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 718437945} m_PrefabAsset: {fileID: 0} +--- !u!1 &728054778 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 728054779} + - component: {fileID: 728054782} + - component: {fileID: 728054781} + - component: {fileID: 728054780} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &728054779 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 728054778} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.05, z: 1.3} + m_LocalScale: {x: 5.1, y: 0.1, z: 2.5} + m_Children: [] + m_Father: {fileID: 2048363866} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &728054780 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 728054778} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &728054781 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 728054778} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + 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: 5e064cf4e7d237040a28f8b178879754, 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 &728054782 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 728054778} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &821181732 GameObject: m_ObjectHideFlags: 0 @@ -3225,74 +2929,71 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: White Smooth objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 1.25 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: f5a7e3f5d10db3542abe6b95a6ebf098, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: f5a7e3f5d10db3542abe6b95a6ebf098, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &838343594 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 838343593} m_PrefabAsset: {fileID: 0} --- !u!1001 &841120036 @@ -3302,82 +3003,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 26947402} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Red Oiled Leather objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.0045118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 1.2459998 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 8d385efd7b0f6fd42b25d765a2abe040, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 8d385efd7b0f6fd42b25d765a2abe040, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &841120037 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 841120036} m_PrefabAsset: {fileID: 0} --- !u!1 &847396471 @@ -3579,72 +3277,139 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 388158451} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Silver Smooth objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.0050001 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.24599981 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 5fba161cd73864745ab8ce683acee228, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 5fba161cd73864745ab8ce683acee228, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &856447635 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 856447634} m_PrefabAsset: {fileID: 0} +--- !u!114 &858394528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 10 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + top: + m_OverrideState: 0 + m_Value: {r: 0.22322798, g: 0.2581829, b: 0.4341537, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + middle: + m_OverrideState: 0 + m_Value: {r: 0.2767907, g: 0.32292244, b: 0.541, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + bottom: + m_OverrideState: 0 + m_Value: {r: 0.6273585, g: 0.6739387, b: 1, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + gradientDiffusion: + m_OverrideState: 0 + m_Value: 1 --- !u!1 &870913444 GameObject: m_ObjectHideFlags: 0 @@ -3782,82 +3547,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 319542408} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Brick Wall objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 123 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.7545117 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.246 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: ef2177720a601264fb7be039d89d1f59, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: ef2177720a601264fb7be039d89d1f59, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &900070689 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 900070688} m_PrefabAsset: {fileID: 0} --- !u!23 &900070692 @@ -3927,118 +3689,95 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1088189129} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.25451183 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 10 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: Anisotropy objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -4047,8 +3786,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &900445291 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 900445290} m_PrefabAsset: {fileID: 0} --- !u!1001 &915699459 @@ -4058,82 +3796,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 532036909} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Glossy Floor objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.25 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: de2dc38afc730cc449a16b641a58a849, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: de2dc38afc730cc449a16b641a58a849, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &915699460 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 915699459} m_PrefabAsset: {fileID: 0} --- !u!1 &927623962 @@ -4333,70 +4068,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 388158451} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Copper Smooth objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.0045128 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.7540002 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 4ed728e867ad6924db3e6861fa9e8a25, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 4ed728e867ad6924db3e6861fa9e8a25, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &938324933 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 938324932} m_PrefabAsset: {fileID: 0} --- !u!1001 &948283467 @@ -4406,70 +4138,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 388158451} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Silver Rough objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.24599981 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 6 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 2bc7c7fbc0203f54e96b389743773c67, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 2bc7c7fbc0203f54e96b389743773c67, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &948283468 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 948283467} m_PrefabAsset: {fileID: 0} --- !u!1 &980060211 @@ -4668,70 +4397,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Bright Grey Rough objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.25 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 7 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: ed2d8fc136573ee4c96fe6eed19063d0, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: ed2d8fc136573ee4c96fe6eed19063d0, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &982970340 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 982970339} m_PrefabAsset: {fileID: 0} --- !u!1 &1045578953 @@ -4811,7 +4537,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Iridescence alterates the specular color depending on the view direction. + m_text: Iridescence alters the specular color depending on the view direction. It simulates an iridescent film on top of the material. m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -4886,7 +4612,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} m_textInfo: textComponent: {fileID: 1068290592} - characterCount: 129 + characterCount: 126 spriteCount: 0 spaceCount: 19 wordCount: 20 @@ -4976,75 +4702,27 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &1088189129 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1088189128} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 5, y: 0, z: 5.25} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 113946421} - - {fileID: 718437946} - - {fileID: 1737146548} - - {fileID: 900445291} - - {fileID: 1999589725} - - {fileID: 927623967} - - {fileID: 339312057} - - {fileID: 980060216} - m_Father: {fileID: 0} - m_RootOrder: 11 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1093614734 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1093614737} - - component: {fileID: 1093614735} - m_Layer: 0 - m_Name: Rendering Settings - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1093614735 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1093614734} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} - m_Name: - m_EditorClassIdentifier: - isGlobal: 1 - priority: 0 - blendDistance: 1 - weight: 1 - sharedProfile: {fileID: 11400000, guid: bcce1d882ad78594e96df95e83512585, type: 2} ---- !u!4 &1093614737 +--- !u!4 &1088189129 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1093614734} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: 0} + m_GameObject: {fileID: 1088189128} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 5, y: 0, z: 5.25} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] + m_Children: + - {fileID: 113946421} + - {fileID: 718437946} + - {fileID: 1737146548} + - {fileID: 900445291} + - {fileID: 1999589725} + - {fileID: 927623967} + - {fileID: 339312057} + - {fileID: 980060216} m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1099205689 PrefabInstance: @@ -5053,74 +4731,71 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Black Natural Smooth objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.0045128 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.75 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 1300dbb2a27131a42a31616be9926ea8, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 1300dbb2a27131a42a31616be9926ea8, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1099205690 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1099205689} m_PrefabAsset: {fileID: 0} --- !u!1001 &1147103453 @@ -5130,284 +4805,81 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 26947402} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Anodized Metal objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.0045118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.0039997 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 6 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 29f254e62304da64895f0cd4d248e1a0, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 29f254e62304da64895f0cd4d248e1a0, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1147103454 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1147103453} m_PrefabAsset: {fileID: 0} ---- !u!1 &1149377673 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1149377677} - - component: {fileID: 1149377676} - - component: {fileID: 1149377675} - m_Layer: 0 - m_Name: DirectionalLight - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1149377675 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1149377673} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Version: 9 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 1024 - m_ObsoleteContactShadows: 0 - m_PointlightHDType: 0 - m_SpotLightShape: 0 - m_AreaLightShape: 0 - m_Intensity: 5000 - m_EnableSpotReflector: 0 - m_LuxAtDistance: 1 - m_InnerSpotPercent: 0 - m_LightDimmer: 1 - m_VolumetricDimmer: 1 - m_LightUnit: 2 - m_FadeDistance: 10000 - m_AffectDiffuse: 1 - m_AffectSpecular: 1 - m_NonLightmappedOnly: 0 - m_ShapeWidth: 0.5 - m_ShapeHeight: 0.5 - m_AspectRatio: 1 - m_ShapeRadius: 0 - m_SoftnessScale: 1 - m_UseCustomSpotLightShadowCone: 0 - m_CustomSpotLightShadowCone: 30 - m_MaxSmoothness: 1 - m_ApplyRangeAttenuation: 1 - m_DisplayAreaLightEmissiveMesh: 0 - m_AreaLightCookie: {fileID: 0} - 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_ColorShadow: 1 - 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: 32 - m_MinFilterSize: 1 - m_KernelSize: 5 - m_LightAngle: 1 - m_MaxDepthBias: 0.001 - m_ShadowResolution: - m_Override: 1024 - m_UseOverride: 0 - m_Level: 2 - m_ShadowDimmer: 1 - m_VolumetricShadowDimmer: 1 - m_ShadowFadeDistance: 10000 - m_UseContactShadow: - m_Override: 1 - m_UseOverride: 1 - m_Level: 1 - 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_BarnDoorAngle: 90 - m_BarnDoorLength: 0.05 - m_ShadowCascadeRatios: - - 0.05 - - 0.15 - - 0.3 - m_ShadowCascadeBorders: - - 0 - - 0 - - 0 - - 0 - m_ShadowAlgorithm: 0 - m_ShadowVariant: 3 - m_ShadowPrecision: 0 - useOldInspector: 0 - useVolumetric: 1 - featuresFoldout: 1 - showAdditionalSettings: 0 ---- !u!108 &1149377676 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1149377673} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 5000 - m_Range: 30 - 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: 1 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6000 - m_UseColorTemperature: 1 - m_BoundingSphereOverride: {x: 5.16e-43, y: -0.0000000059714402, z: 5.16e-43, w: -0.0000000048252033} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &1149377677 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1149377673} - m_LocalRotation: {x: 0.2769918, y: -0.79612345, z: 0.34268054, w: 0.41476864} - m_LocalPosition: {x: -1.83, y: 3.47, z: -0.97} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 50.842003, y: -131.822, z: -14.375001} --- !u!1001 &1186775352 PrefabInstance: m_ObjectHideFlags: 0 @@ -5415,118 +4887,95 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 821181733} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.25451183 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 10 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 2 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: Detail Map objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -5535,8 +4984,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &1186775353 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 1186775352} m_PrefabAsset: {fileID: 0} --- !u!1001 &1236996263 @@ -5546,118 +4994,95 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 26947402} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.004511833 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 7 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 11 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: Iridescence objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -5666,8 +5091,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &1236996264 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 1236996263} m_PrefabAsset: {fileID: 0} --- !u!1001 &1257249401 @@ -5677,82 +5101,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 584707369} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Skin Bright objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -2.073 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b94dd69c17b799346aa5cfabc1b1e2b6, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: b94dd69c17b799346aa5cfabc1b1e2b6, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1257249402 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1257249401} m_PrefabAsset: {fileID: 0} --- !u!1 &1264842108 @@ -5792,7 +5213,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "Foliage\nThis material uses Translucency in oder to let light go through + m_text: "Foliage\nThis material uses Translucency in order to let light go through the leaves. This effect is also controlled by a Diffusion profile which allows you to tint the lighting. \nIn the material, you can modulate how much light goes through with the Thickness value or the Thickness Map.\nThin materials will @@ -5846,7 +5267,7 @@ MonoBehaviour: m_enableWordWrapping: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 - m_firstOverflowCharacterIndex: 178 + m_firstOverflowCharacterIndex: 179 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_isTextTruncated: 0 @@ -5870,7 +5291,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} m_textInfo: textComponent: {fileID: 1264842109} - characterCount: 383 + characterCount: 384 spriteCount: 0 spaceCount: 65 wordCount: 65 @@ -5951,82 +5372,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 72455034} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Thin Glass objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.7545118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.5042404 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 62fa474f631d39742b25b03ca4573445, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 62fa474f631d39742b25b03ca4573445, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1271931787 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1271931786} m_PrefabAsset: {fileID: 0} --- !u!1 &1273056953 @@ -6226,142 +5644,69 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 388158451} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Gold Smooth objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.0050001 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.7539997 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 4f5472168a032f64296fd420c8454cb8, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 4f5472168a032f64296fd420c8454cb8, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1295776581 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1295776580} m_PrefabAsset: {fileID: 0} ---- !u!114 &1313603912 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3} - m_Name: - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - rotation: - m_OverrideState: 0 - m_Value: 0 - min: 0 - max: 360 - skyIntensityMode: - m_OverrideState: 0 - m_Value: 0 - exposure: - m_OverrideState: 0 - m_Value: 10 - multiplier: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxValue: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxColor: - m_OverrideState: 0 - m_Value: {x: 0, y: 0, z: 0} - desiredLuxValue: - m_OverrideState: 0 - m_Value: 20000 - updateMode: - m_OverrideState: 0 - m_Value: 0 - updatePeriod: - m_OverrideState: 0 - m_Value: 0 - min: 0 - includeSunInBaking: - m_OverrideState: 0 - m_Value: 0 - top: - m_OverrideState: 0 - m_Value: {r: 0.079863995, g: 0.13676903, b: 0.29799998, a: 1} - hdr: 1 - showAlpha: 0 - showEyeDropper: 1 - middle: - m_OverrideState: 0 - m_Value: {r: 0.48026317, g: 0.48026317, b: 0.5, a: 1} - hdr: 1 - showAlpha: 0 - showEyeDropper: 1 - bottom: - m_OverrideState: 0 - m_Value: {r: 0.29799998, g: 0.16491261, b: 0.0839029, a: 1} - hdr: 1 - showAlpha: 0 - showEyeDropper: 1 - gradientDiffusion: - m_OverrideState: 0 - m_Value: 4 --- !u!1001 &1368864992 PrefabInstance: m_ObjectHideFlags: 0 @@ -6369,82 +5714,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 821181733} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Metal Foil objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.50000006 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: ae80b31cb5bb2a14e8fce80a3d00a0d6, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: ae80b31cb5bb2a14e8fce80a3d00a0d6, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1368864993 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1368864992} m_PrefabAsset: {fileID: 0} --- !u!1001 &1396803400 @@ -6454,70 +5796,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 388158451} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Copper Rough objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.7542405 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: c25f8ab7887256d4b85b44a6680ea258, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: c25f8ab7887256d4b85b44a6680ea258, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1396803401 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1396803400} m_PrefabAsset: {fileID: 0} --- !u!1 &1415663849 @@ -6584,7 +5923,7 @@ MonoBehaviour: are used to represent unique details.\n\nUsed alone, the Detail map can represent pretty well materials that don't need hue variation in the Base Color or in Metallic value.\n\nDetail maps can also be used with the Layered Lit shader when blending - several material is necessary.\n\nDetail maps can easily be shared accross different + several material is necessary.\n\nDetail maps can easily be shared across different materials and building a library of detail maps is very useful to add details to generic materials such as plaster, plastic, metal, rubber, concrete, ..." m_isRightToLeft: 0 @@ -6660,7 +5999,7 @@ MonoBehaviour: m_margin: {x: 0, y: 0, z: 0, w: -0.01088585} m_textInfo: textComponent: {fileID: 1415663851} - characterCount: 860 + characterCount: 859 spriteCount: 0 spaceCount: 147 wordCount: 140 @@ -6722,82 +6061,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 26947402} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Soap Bubble objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.0045118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.020240784 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 8c8cc541d25a25948a7784856bf67245, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 8c8cc541d25a25948a7784856bf67245, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1417744597 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1417744596} m_PrefabAsset: {fileID: 0} --- !u!1001 &1470791638 @@ -6807,70 +6143,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Black Artificial Rough objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.0045128 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.75 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: b44e098edc52a01489ee26629b156fd2, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: b44e098edc52a01489ee26629b156fd2, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1470791639 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1470791638} m_PrefabAsset: {fileID: 0} --- !u!1001 &1523477147 @@ -6880,70 +6213,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Black Natural Rough objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.75 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 6 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: bbee55a43ea52be4a9fabc4e9d3a8e8e, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: bbee55a43ea52be4a9fabc4e9d3a8e8e, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1523477148 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1523477147} m_PrefabAsset: {fileID: 0} --- !u!1 &1672247820 @@ -7167,9 +6497,8 @@ MonoBehaviour: m_EditorClassIdentifier: m_Profile: {fileID: 11400000, guid: bcce1d882ad78594e96df95e83512585, type: 2} m_StaticLightingSkyUniqueID: 3 - m_SkySettings: {fileID: 1313603912} - m_SkySettingsFromProfile: {fileID: -213621468369542312, guid: bcce1d882ad78594e96df95e83512585, - type: 2} + m_SkySettings: {fileID: 858394528} + m_SkySettingsFromProfile: {fileID: -213621468369542312, guid: bcce1d882ad78594e96df95e83512585, type: 2} --- !u!4 &1728193973 Transform: m_ObjectHideFlags: 1 @@ -7191,82 +6520,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1088189129} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Metal Brushed objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.7539997 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d3fa990485269f14fa204a640a4ec976, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: d3fa990485269f14fa204a640a4ec976, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1737146548 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1737146547} m_PrefabAsset: {fileID: 0} --- !u!1001 &1759405595 @@ -7276,82 +6602,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 72455034} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Orange Sphere Glass objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.7545118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.99600005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: baf660dc26c500b46b864b17eb5a4c86, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: baf660dc26c500b46b864b17eb5a4c86, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1759405596 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1759405595} m_PrefabAsset: {fileID: 0} --- !u!23 &1759405599 @@ -7444,7 +6767,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2048363866} - m_RootOrder: 5 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -7606,82 +6929,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 532036909} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Plaster Wall objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.75 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 699949bbb2cfbe74baa377c4a616eefe, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 699949bbb2cfbe74baa377c4a616eefe, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1784811147 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1784811146} m_PrefabAsset: {fileID: 0} --- !u!1 &1811538564 @@ -8262,82 +7582,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 319542408} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Metro Tiles objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 123 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.7545117 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.2542403 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: bfbc7260e9674bc48bd6c0363e8fc952, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: bfbc7260e9674bc48bd6c0363e8fc952, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1885307755 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1885307754} m_PrefabAsset: {fileID: 0} --- !u!1001 &1983304268 @@ -8347,74 +7664,71 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Bright Grey Smooth objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 0.25 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d977773a9c69f544cbcb736fecd29468, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: d977773a9c69f544cbcb736fecd29468, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &1983304269 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 1983304268} m_PrefabAsset: {fileID: 0} --- !u!1 &1999589720 @@ -8611,82 +7925,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 532036909} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Wood Clean objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 1.25 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: c34d3d14a89c1434ebcb8a80a3a4643f, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: c34d3d14a89c1434ebcb8a80a3a4643f, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &2007706379 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 2007706378} m_PrefabAsset: {fileID: 0} --- !u!1001 &2048363865 @@ -8696,143 +8007,128 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 584707369} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 2928182508587883262, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2928182508587883262, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 21 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 2 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: Subsurface Scattering objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_fontSize value: 4.9 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_fontSizeBase value: 4.9 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} + - target: {fileID: 8328653822409946966, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 8328653822409946966, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalScale.z + value: 2.5 + objectReference: {fileID: 0} + - target: {fileID: 8328653822409946966, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} + propertyPath: m_LocalPosition.z + value: -1.3 + objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 8805608495123376348, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &2048363866 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 2048363865} m_PrefabAsset: {fileID: 0} --- !u!1001 &2080240963 @@ -8842,82 +8138,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 72455034} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Blue Glass objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 1.7545118 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -0.254 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: fad1e75d406d97541bce27787612adb5, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: fad1e75d406d97541bce27787612adb5, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &2080240964 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 2080240963} m_PrefabAsset: {fileID: 0} --- !u!1001 &2093962960 @@ -8927,82 +8220,79 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 584707369} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: Skin Dark objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: -1.073 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.x value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.y value: 4 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalScale.z value: 4 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: ac3299a99f4c8f1468d6be787b74961a, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: ac3299a99f4c8f1468d6be787b74961a, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &2093962961 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 2093962960} m_PrefabAsset: {fileID: 0} --- !u!1001 &2120747050 @@ -9012,118 +8302,95 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 72455034} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.004511833 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: Refraction objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 0 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -9132,8 +8399,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &2120747051 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 2120747050} m_PrefabAsset: {fileID: 0} --- !u!1001 &2144617644 @@ -9143,70 +8409,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 1045578954} m_Modifications: - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1235965980648682, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Name value: White Rough objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 1753626115838088, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_StaticEditorFlags value: 4294967295 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.x value: 2.005 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalPosition.z value: 1.25 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_RootOrder value: 8 objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: 56fa57e989fccfe4f8913eb7743ee075, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} propertyPath: m_Materials.Array.data[2] value: objectReference: {fileID: 2100000, guid: 56fa57e989fccfe4f8913eb7743ee075, type: 2} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} --- !u!4 &2144617645 stripped Transform: - m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} m_PrefabInstance: {fileID: 2144617644} m_PrefabAsset: {fileID: 0} --- !u!1001 &25250436406411998 @@ -9216,118 +8479,95 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 532036909} m_Modifications: - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.x value: 0.25451183 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.y value: 0.02 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalPosition.z value: -0.004240513 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.characterCount value: 12 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.wordCount value: 2 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.lineCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.pageCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_text value: Standard Lit objectReference: {fileID: 0} - - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 3893201738618080673, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_textInfo.spaceCount value: 1 objectReference: {fileID: 0} - - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5573612767648057585, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Layer value: 5 objectReference: {fileID: 0} - - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 5755837464793802478, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Name value: Frame objectReference: {fileID: 0} - - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + - target: {fileID: 6010459870305395345, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} propertyPath: m_Mesh value: objectReference: {fileID: 0} @@ -9336,7 +8576,177 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} --- !u!4 &25250436406411999 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, - type: 3} + m_CorrespondingSourceObject: {fileID: 2101728995791149842, guid: 9ac48f5bd365ad941a7c3fa37540fa33, type: 3} m_PrefabInstance: {fileID: 25250436406411998} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1669185313431166062 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.x + value: 6.02 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.y + value: 12.74 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalPosition.z + value: 19.01 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.x + value: 0.04474099 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.y + value: -0.9393257 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.z + value: 0.31783894 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalRotation.w + value: 0.121012256 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 37.440002 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -165.492 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232391, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -0.514 + objectReference: {fileID: 0} + - target: {fileID: 1669185313534232394, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} + propertyPath: m_Name + value: Free Camera + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9, type: 3} +--- !u!1001 &3137672284516394387 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3137672285531552026, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_Name + value: DirectionalLight + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.x + value: -1.83 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.y + value: 3.47 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalPosition.z + value: -0.97 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.x + value: 0.2769918 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.y + value: -0.79612345 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.z + value: 0.34268054 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalRotation.w + value: 0.41476864 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 50.842003 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -131.822 + objectReference: {fileID: 0} + - target: {fileID: 3137672285531552030, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -14.375001 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 09d873e82f06a51458debc9fd17532f1, type: 3} +--- !u!1001 &3542236250311574836 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532133, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3542236251404532154, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} + propertyPath: m_Name + value: Rendering Settings + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d9e1396e69a15a5469ebb9e5c4ccf373, type: 3} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Cotton.mat similarity index 94% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton.mat rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Cotton.mat index 35de2b26d57..1f07f88cb8d 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton.mat +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Cotton.mat @@ -9,7 +9,7 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: Cotton m_Shader: {fileID: 4800000, guid: e816bb13b8cf2944599acc993048a906, type: 3} - m_ShaderKeywords: _DISABLE_SSR _DOUBLESIDED_ON + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 @@ -107,7 +107,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _ThreadMap: - m_Texture: {fileID: 2800000, guid: cd19c89d4b2f99f439cb28098be331dc, type: 3} + m_Texture: {fileID: 2800000, guid: 8ba4df4ce48ed49429490ee07034ac7e, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _TransmittanceColorMap: @@ -170,8 +170,8 @@ Material: - _EnableSpecularOcclusion: 0 - _EnableWind: 0 - _EnergyConservingSpecularColor: 1 - - _FuzzMapUVScale: 0.1 - - _FuzzStrength: 0.18 + - _FuzzMapUVScale: 0.2 + - _FuzzStrength: 0.087 - _HdrpVersion: 2 - _HeightAmplitude: 0.02 - _HeightCenter: 0.5 @@ -199,6 +199,7 @@ Material: - _PPDPrimitiveLength: 1 - _PPDPrimitiveWidth: 1 - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 - _RefractionModel: 0 - _RequireSplitLighting: 1 - _SSRefractionProjectionModel: 0 @@ -232,7 +233,7 @@ Material: - _ThicknessMultiplier: 1 - _ThreadAOStrength01: 0.655 - _ThreadNormalStrength: 1 - - _ThreadSmoothnessScale: 0.35 + - _ThreadSmoothnessScale: 0.205 - _TransmissionEnable: 1 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 @@ -253,11 +254,10 @@ Material: - _ZWrite: 1 - _useThreadMap: 1 m_Colors: - - _BaseColor: {r: 0.85300004, g: 0.42022192, b: 0.20898502, a: 1} + - _BaseColor: {r: 0.638, g: 0.638, b: 0.638, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - - _Color: {r: 0.85300004, g: 0.4202219, b: 0.20898497, a: 1} - - _DiffusionProfileAsset: {r: -8.851371e-34, g: 1.2241986e+22, b: -2.5962676e-29, - a: -2.918011e-34} + - _Color: {r: 0.63799995, g: 0.63799995, b: 0.63799995, a: 1} + - _DiffusionProfileAsset: {r: -8.851371e-34, g: 1.2241986e+22, b: -2.5962676e-29, a: -2.918011e-34} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} @@ -274,6 +274,7 @@ Material: - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} - _uvThreadST: {r: 40, g: 40, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!114 &3775346471072160633 MonoBehaviour: m_ObjectHideFlags: 11 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Cotton.mat.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton.mat.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Cotton.mat.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_WaterPuddle.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/DC_WaterPuddle.mat similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_WaterPuddle.mat rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/DC_WaterPuddle.mat diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_WaterPuddle.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/DC_WaterPuddle.mat.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_WaterPuddle.mat.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/DC_WaterPuddle.mat.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Denim.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Denim.mat new file mode 100644 index 00000000000..12e0dc0b7f7 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Denim.mat @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Denim + m_Shader: {fileID: 4800000, guid: e816bb13b8cf2944599acc993048a906, type: 3} + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: 2000 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 2800000, guid: e51b3858f115aaa4ca644b144edfb9e2, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FuzzMap: + m_Texture: {fileID: 2800000, guid: b6c00f81c69572149bfe3fd8074bc899, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: e51b3858f115aaa4ca644b144edfb9e2, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThreadMap: + m_Texture: {fileID: 2800000, guid: 963d136eca7b7bc4e838b34654450ab2, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 0 + - _CullModeForward: 0 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 0 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 0 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 0 + - _DistortionEnable: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 0 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 1 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _FuzzMapUVScale: 0.05 + - _FuzzStrength: 0.055 + - _HdrpVersion: 2 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InitialBend: 1 + - _InvTilingScale: 1 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _NormalMapSpace: 0 + - _NormalMapStrength: 1 + - _NormalScale: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _RequireSplitLighting: 1 + - _SSRefractionProjectionModel: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.5 + - _SmoothnessMax: 0.443 + - _SmoothnessMin: 0 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SrcBlend: 1 + - _StencilRef: 4 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 6 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _ThreadAOStrength01: 1 + - _ThreadNormalStrength: 1 + - _ThreadSmoothnessScale: 0.05 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingVelocity: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 8 + - _ZTestTransparent: 4 + - _ZWrite: 1 + - _useThreadMap: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 0.23, g: 0.23, b: 0.23, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} + - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} + - _uvThreadST: {r: 50, g: 50, b: 0, a: 0} + m_BuildTextureStacks: [] +--- !u!114 &3775346471072160633 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_RenderingOverrides.asset.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Denim.mat.meta similarity index 64% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_RenderingOverrides.asset.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Denim.mat.meta index f55e6ce243d..ed84143a783 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_RenderingOverrides.asset.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Denim.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 95dc10e465a19064495fec2a7890aefc +guid: 774e20f249b7f894bab1d14018da85e0 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 0 + mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat new file mode 100644 index 00000000000..e324c5bbe13 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: GreyFloor 2 + m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _MAPPING_PLANAR _NORMALMAP_TANGENT_SPACE + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: + - DistortionVectors + - TransparentBackfaceDebugDisplay + - MOTIONVECTORS + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceRadiusMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 1 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatCoverage: 1 + - _CoatIOR: 0.5 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1.607 + - _DetailNormalScale: 0.173 + - _DetailSmoothnessScale: 0.356 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 1 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 1 + - _DistortionDepthTest: 0 + - _DistortionDstBlend: 1 + - _DistortionEnable: 0 + - _DistortionOnly: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 1 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EditorExpendedAreas: 3e-45 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnablePerPixelDisplacement: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _HdrpVersion: 2 + - _HeightAmplitude: 0.01 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: -1 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0 + - _IOR: 1 + - _InitialBend: 1 + - _InvTilingScale: 1.4285715 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _NormalMapSpace: 0 + - _NormalScale: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _PreRefractionPass: 0 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionMode: 0 + - _RefractionModel: 0 + - _RefractionSSRayModel: 0 + - _SSRefractionProjectionModel: 0 + - _SSSAndTransmissionType: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.205 + - _SmoothnessRemapMax: 0.8636441 + - _SmoothnessRemapMin: 0.23889849 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SubsurfaceProfile: 0 + - _SubsurfaceRadius: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 0.7 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVBase: 4 + - _UVDetail: 1 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestMode: 8 + - _ZTestModeDistortion: 8 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.496, g: 0.496, b: 0.496, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.496, g: 0.496, b: 0.496, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 0, g: 1, b: 0, a: 0} + - _UVMappingMask: {r: 0, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] +--- !u!114 &6449898488318781868 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat.meta new file mode 100644 index 00000000000..ebb681208fb --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor 2.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5e064cf4e7d237040a28f8b178879754 +timeCreated: 1506356282 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor.mat index 7124cdafec7..77ba3add6b9 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor.mat +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/GreyFloor.mat @@ -9,7 +9,7 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: GreyFloor m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} - m_ShaderKeywords: _DETAIL_MAP _MAPPING_PLANAR _MASKMAP _NORMALMAP _NORMALMAP_TANGENT_SPACE + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _MAPPING_PLANAR _NORMALMAP_TANGENT_SPACE m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -46,7 +46,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailMap: - m_Texture: {fileID: 2800000, guid: a19f31ecee053c447ab84f8f87b01f71, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 2, y: 2} m_Offset: {x: 0, y: 0} - _DistortionVectorMap: @@ -74,7 +74,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MaskMap: - m_Texture: {fileID: 2800000, guid: a6f7a16e2b2a05a43980982ef82f4895, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _NormalMap: @@ -203,6 +203,7 @@ Material: - _PPDPrimitiveWidth: 1 - _PreRefractionPass: 0 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RefractionMode: 0 - _RefractionModel: 0 - _RefractionSSRayModel: 0 @@ -273,6 +274,7 @@ Material: - _UVDetailsMappingMask: {r: 0, g: 1, b: 0, a: 0} - _UVMappingMask: {r: 0, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!114 &6449898488318781868 MonoBehaviour: m_ObjectHideFlags: 11 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Lower_Layer.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Lower_Layer.mat similarity index 98% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Lower_Layer.mat rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Lower_Layer.mat index b600d760373..205eb8e6d44 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Lower_Layer.mat +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Lower_Layer.mat @@ -21,9 +21,8 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Hair_Lower_Layer - m_Shader: {fileID: -6465566751694194690, guid: 101a796373a94404faec2ab2055d5d4b, - type: 3} - m_ShaderKeywords: _ALPHATEST_ON + m_Shader: {fileID: -6465566751694194690, guid: 101a796373a94404faec2ab2055d5d4b, type: 3} + m_ShaderKeywords: _ALPHATEST_ON _DISABLE_SSR_TRANSPARENT m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -220,6 +219,7 @@ Material: - _PPDPrimitiveLength: 1 - _PPDPrimitiveWidth: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RefractionModel: 0 - _RequireSplitLighting: 0 - _SSRefractionProjectionModel: 0 @@ -291,3 +291,4 @@ Material: - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} - _uvBaseST: {r: 4, g: 2, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Lower_Layer.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Lower_Layer.mat.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Lower_Layer.mat.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Lower_Layer.mat.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Upper_Layer.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Upper_Layer.mat similarity index 97% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Upper_Layer.mat rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Upper_Layer.mat index b371a9d4760..a09f1d2c8f7 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Upper_Layer.mat +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Upper_Layer.mat @@ -21,10 +21,9 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Hair_Upper_Layer - m_Shader: {fileID: -6465566751694194690, guid: 101a796373a94404faec2ab2055d5d4b, - type: 3} - m_ShaderKeywords: _ALPHATEST_ON _BLENDMODE_ALPHA _DOUBLESIDED_ON _ENABLE_FOG_ON_TRANSPARENT - _SURFACE_TYPE_TRANSPARENT + m_Shader: {fileID: -6465566751694194690, guid: 101a796373a94404faec2ab2055d5d4b, type: 3} + m_ShaderKeywords: _ALPHATEST_ON _BLENDMODE_ALPHA _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON + _ENABLE_FOG_ON_TRANSPARENT _SURFACE_TYPE_TRANSPARENT m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 @@ -221,6 +220,7 @@ Material: - _PPDPrimitiveLength: 1 - _PPDPrimitiveWidth: 1 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RefractionModel: 0 - _RequireSplitLighting: 0 - _SSRefractionProjectionModel: 0 @@ -292,3 +292,4 @@ Material: - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} - _uvBaseST: {r: 4, g: 2, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Upper_Layer.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Upper_Layer.mat.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Upper_Layer.mat.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Hair_Upper_Layer.mat.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Linen.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Linen.mat new file mode 100644 index 00000000000..2a7d3f3c5f7 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Linen.mat @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Linen + m_Shader: {fileID: 4800000, guid: e816bb13b8cf2944599acc993048a906, type: 3} + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FuzzMap: + m_Texture: {fileID: 2800000, guid: 46d2baa7dbdc17345a1851e9866cae69, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThreadMap: + m_Texture: {fileID: 2800000, guid: 96621ef40ef616245b8e7ccbe29c8847, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 0 + - _CullModeForward: 0 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 2.7485805 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 0 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 0 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 0 + - _DistortionEnable: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 0 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 1 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _FuzzMapUVScale: 0.1 + - _FuzzStrength: 0.06 + - _HdrpVersion: 2 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InitialBend: 1 + - _InvTilingScale: 1 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _NormalMapSpace: 0 + - _NormalMapStrength: 1 + - _NormalScale: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _RequireSplitLighting: 1 + - _SSRefractionProjectionModel: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.5 + - _SmoothnessMax: 0.461 + - _SmoothnessMin: 0 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SrcBlend: 1 + - _StencilRef: 4 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 6 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _ThreadAOStrength01: 1 + - _ThreadNormalStrength: 1 + - _ThreadSmoothnessScale: 0.046 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingVelocity: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 8 + - _ZTestTransparent: 4 + - _ZWrite: 1 + - _useThreadMap: 1 + m_Colors: + - _BaseColor: {r: 0.688, g: 0.6365376, b: 0.57104003, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.688, g: 0.6365376, b: 0.57104003, a: 1} + - _DiffusionProfileAsset: {r: -1.415065e+35, g: 8.5898663e-17, b: -5.2136603e+35, a: 8.070834e-22} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 0.23, g: 0.23, b: 0.23, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} + - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} + - _uvThreadST: {r: 60, g: 60, b: 0, a: 0} + m_BuildTextureStacks: [] +--- !u!114 &3775346471072160633 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_PostProcessingSettings.asset.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Linen.mat.meta similarity index 64% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_PostProcessingSettings.asset.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Linen.mat.meta index e875d4484f2..f0c399d2660 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_PostProcessingSettings.asset.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Linen.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: eeed9a0cde831a244a3f3d23aca255c3 +guid: 71f035daef40b5043a1096a369f2ba68 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 11400000 + mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/Metal.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Metal.mat similarity index 96% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/Metal.mat rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Metal.mat index bb4f2af5dac..e79d38ffa0b 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/Metal.mat +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Metal.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} m_Name: m_EditorClassIdentifier: - version: 2 + version: 3 --- !u!21 &2100000 Material: serializedVersion: 6 @@ -22,7 +22,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: Metal m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} - m_ShaderKeywords: _DOUBLESIDED_ON _ENABLE_GEOMETRIC_SPECULAR_AA _NORMALMAP_TANGENT_SPACE + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON _ENABLE_GEOMETRIC_SPECULAR_AA + _NORMALMAP_TANGENT_SPACE m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 @@ -34,6 +35,7 @@ Material: - TransparentDepthPrepass - TransparentDepthPostpass - TransparentBackface + - RayTracingPrepass m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -134,6 +136,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _BlendMode: 0 - _CoatMask: 0 @@ -203,7 +206,9 @@ Material: - _PPDMinSamples: 5 - _PPDPrimitiveLength: 1 - _PPDPrimitiveWidth: 1 + - _RayTracing: 0 - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 - _RefractionModel: 0 - _SSRefractionProjectionModel: 0 - _ShiverDirectionality: 0.5 @@ -269,3 +274,4 @@ Material: - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/Metal.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Metal.mat.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/Metal.mat.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Metal.mat.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Nylon.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Nylon.mat new file mode 100644 index 00000000000..a85d4b2ca3e --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Nylon.mat @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2535723721878266329 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Nylon + m_Shader: {fileID: 4800000, guid: 16421cf35ab84f44bb91798b9c46be6d, type: 3} + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FuzzMap: + m_Texture: {fileID: 2800000, guid: 632ea38a7fe456b4d87ded4efbea8d6c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThreadMap: + m_Texture: {fileID: 2800000, guid: 0162a5f6db80825468422e8b0ae88a6f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _Anisotropy: -0.7 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 0 + - _CullModeForward: 0 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 3.5426073 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 0 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 0 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 0 + - _DistortionEnable: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 0 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 1 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _FuzzMapUVScale: 0.2 + - _FuzzStrength: 0.015 + - _HdrpVersion: 2 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InitialBend: 1 + - _InvTilingScale: 1 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _NormalMapSpace: 0 + - _NormalMapStrength: 1 + - _NormalScale: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _RequireSplitLighting: 0 + - _SSRefractionProjectionModel: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.5 + - _SmoothnessMax: 0 + - _SmoothnessMin: 0 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 2 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _ThreadAOStrength01: 0 + - _ThreadNormalStrength: 1 + - _ThreadSmoothnessScale: 0.08 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingVelocity: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 8 + - _ZTestTransparent: 4 + - _ZWrite: 1 + - _useThreadMap: 1 + m_Colors: + - _BaseColor: {r: 0.15065883, g: 0.1610689, b: 0.22352941, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.15065879, g: 0.16106886, b: 0.22352937, a: 1} + - _DiffusionProfileAsset: {r: -8.851371e-34, g: 1.2241986e+22, b: -2.5962676e-29, a: -2.918011e-34} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 0.28381178, g: 0.3122147, b: 0.43529412, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} + - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} + - _uvThreadST: {r: 60, g: 60, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Nylon.mat.meta similarity index 64% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Nylon.mat.meta index 2c96599680e..e50a1b3d5a1 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Nylon.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 8ad7f7e9a8decf446acae77fa1ad1a6a +guid: 7f6a1351c198a1b48ab420a21e193e6d NativeFormatImporter: externalObjects: {} - mainObjectFileID: 11400000 + mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/ShotSilk.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/ShotSilk.mat new file mode 100644 index 00000000000..e89b91caa56 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/ShotSilk.mat @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2535723721878266329 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ShotSilk + m_Shader: {fileID: 4800000, guid: 16421cf35ab84f44bb91798b9c46be6d, type: 3} + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FuzzMap: + m_Texture: {fileID: 2800000, guid: 632ea38a7fe456b4d87ded4efbea8d6c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThreadMap: + m_Texture: {fileID: 2800000, guid: 963d136eca7b7bc4e838b34654450ab2, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _Anisotropy: -0.729 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 0 + - _CullModeForward: 0 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 3.5426073 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 0 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 0 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 0 + - _DistortionEnable: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 0 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 1 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _FuzzMapUVScale: 0.2 + - _FuzzStrength: 0.1 + - _HdrpVersion: 2 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InitialBend: 1 + - _InvTilingScale: 1 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _NormalMapSpace: 0 + - _NormalMapStrength: 1 + - _NormalScale: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _RequireSplitLighting: 0 + - _SSRefractionProjectionModel: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.5 + - _SmoothnessMax: 0.2 + - _SmoothnessMin: 0 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 2 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _ThreadAOStrength01: 0.29 + - _ThreadNormalStrength: 0.419 + - _ThreadSmoothnessScale: 0.162 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingVelocity: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 8 + - _ZTestTransparent: 4 + - _ZWrite: 1 + - _useThreadMap: 1 + m_Colors: + - _BaseColor: {r: 0.45098042, g: 0.15294118, b: 0.38823533, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.45098042, g: 0.15294114, b: 0.3882353, a: 1} + - _DiffusionProfileAsset: {r: -8.851371e-34, g: 1.2241986e+22, b: -2.5962676e-29, a: -2.918011e-34} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 0.10399998, g: 0.41326314, b: 0.624, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} + - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} + - _uvThreadST: {r: 100, g: 100, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/MaterialBall.prefab.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/ShotSilk.mat.meta similarity index 63% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/MaterialBall.prefab.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/ShotSilk.mat.meta index 49e879340b3..4de33c2f69a 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/MaterialBall.prefab.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/ShotSilk.mat.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 7822020b9f9222c458b8de51cf8846ec +guid: 448a7febfc1e30f458a1711fb04de2f5 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 100100000 + mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Silk.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Silk.mat similarity index 92% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Silk.mat rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Silk.mat index c13580f2f4f..6c45cd446a1 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Silk.mat +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Silk.mat @@ -22,7 +22,7 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: Silk m_Shader: {fileID: 4800000, guid: 16421cf35ab84f44bb91798b9c46be6d, type: 3} - m_ShaderKeywords: _DISABLE_SSR _DOUBLESIDED_ON + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 @@ -120,7 +120,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _ThreadMap: - m_Texture: {fileID: 2800000, guid: cd19c89d4b2f99f439cb28098be331dc, type: 3} + m_Texture: {fileID: 2800000, guid: 963d136eca7b7bc4e838b34654450ab2, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _TransmittanceColorMap: @@ -184,7 +184,7 @@ Material: - _EnableWind: 0 - _EnergyConservingSpecularColor: 1 - _FuzzMapUVScale: 0.2 - - _FuzzStrength: 0.3 + - _FuzzStrength: 0.1 - _HdrpVersion: 2 - _HeightAmplitude: 0.02 - _HeightCenter: 0.5 @@ -212,13 +212,14 @@ Material: - _PPDPrimitiveLength: 1 - _PPDPrimitiveWidth: 1 - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 - _RefractionModel: 0 - _RequireSplitLighting: 0 - _SSRefractionProjectionModel: 0 - _ShiverDirectionality: 0.5 - _ShiverDrag: 0.2 - _Smoothness: 0.5 - - _SmoothnessMax: 0.232 + - _SmoothnessMax: 0.2 - _SmoothnessMin: 0 - _SmoothnessRemapMax: 1 - _SmoothnessRemapMin: 0 @@ -243,9 +244,9 @@ Material: - _TexWorldScaleEmissive: 1 - _Thickness: 1 - _ThicknessMultiplier: 1 - - _ThreadAOStrength01: 0.6 - - _ThreadNormalStrength: 0.25 - - _ThreadSmoothnessScale: 0.262 + - _ThreadAOStrength01: 0.29 + - _ThreadNormalStrength: 0.2 + - _ThreadSmoothnessScale: 0.2 - _TransmissionEnable: 1 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 @@ -266,18 +267,17 @@ Material: - _ZWrite: 1 - _useThreadMap: 1 m_Colors: - - _BaseColor: {r: 0.754717, g: 0.17221427, b: 0.16019939, a: 1} + - _BaseColor: {r: 0.6313726, g: 0.5852338, b: 0.44196078, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - - _Color: {r: 0.75471693, g: 0.17221424, b: 0.16019934, a: 1} - - _DiffusionProfileAsset: {r: -8.851371e-34, g: 1.2241986e+22, b: -2.5962676e-29, - a: -2.918011e-34} + - _Color: {r: 0.6313726, g: 0.5852338, b: 0.44196075, a: 1} + - _DiffusionProfileAsset: {r: -8.851371e-34, g: 1.2241986e+22, b: -2.5962676e-29, a: -2.918011e-34} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - - _SpecularColor: {r: 0.769, g: 0.25377, b: 0.25377, a: 1} + - _SpecularColor: {r: 0.872, g: 0.8082769, b: 0.61039996, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} @@ -286,4 +286,5 @@ Material: - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} - - _uvThreadST: {r: 40, g: 40, b: 0, a: 0} + - _uvThreadST: {r: 100, g: 100, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Silk.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Silk.mat.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Silk.mat.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Silk.mat.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat new file mode 100644 index 00000000000..a6d2246295e --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Velvet + m_Shader: {fileID: 4800000, guid: e816bb13b8cf2944599acc993048a906, type: 3} + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FuzzMap: + m_Texture: {fileID: 2800000, guid: 2e0a359b392828444b3a2ad8a99161aa, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThreadMap: + m_Texture: {fileID: 2800000, guid: 4ebf36acb1b2394429358a96429f6278, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 0 + - _CullModeForward: 0 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 0 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 0 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 0 + - _DistortionEnable: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 0 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 1 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _FuzzMapUVScale: 0.3 + - _FuzzStrength: 0.03 + - _HdrpVersion: 2 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InitialBend: 1 + - _InvTilingScale: 1 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _NormalMapSpace: 0 + - _NormalMapStrength: 1.41 + - _NormalScale: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _RequireSplitLighting: 1 + - _SSRefractionProjectionModel: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.5 + - _SmoothnessMax: 1 + - _SmoothnessMin: 0 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SrcBlend: 1 + - _StencilRef: 4 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 6 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _ThreadAOStrength01: 0 + - _ThreadNormalStrength: 0 + - _ThreadSmoothnessScale: 0 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingVelocity: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 8 + - _ZTestTransparent: 4 + - _ZWrite: 1 + - _useThreadMap: 0 + m_Colors: + - _BaseColor: {r: 0.156, g: 0.022285713, b: 0.04457147, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.15599996, g: 0.022285713, b: 0.044571444, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 0.4784314, g: 0.023529414, b: 0.06666667, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} + - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} + - _uvThreadST: {r: 30, g: 30, b: 0, a: 0} + m_BuildTextureStacks: [] +--- !u!114 &3775346471072160633 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat.meta new file mode 100644 index 00000000000..657cec4fd20 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Velvet.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e55eacba76a953b4ebd58ed3e413b68a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat new file mode 100644 index 00000000000..fe659e1531b --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat @@ -0,0 +1,290 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Wool + m_Shader: {fileID: 4800000, guid: e816bb13b8cf2944599acc993048a906, type: 3} + m_ShaderKeywords: _DISABLE_SSR _DISABLE_SSR_TRANSPARENT _DOUBLESIDED_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + - TransparentBackface + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FuzzMap: + m_Texture: {fileID: 2800000, guid: 632ea38a7fe456b4d87ded4efbea8d6c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThreadMap: + m_Texture: {fileID: 2800000, guid: 838330f64b9f8354796242a4fc530cb6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 0 + - _CullModeForward: 0 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 2.5183809 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 0 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 0 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 0 + - _DistortionEnable: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 0 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 1 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _FuzzMapUVScale: 0.66 + - _FuzzStrength: 0.296 + - _HdrpVersion: 2 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InitialBend: 1 + - _InvTilingScale: 1 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _NormalMapSpace: 0 + - _NormalMapStrength: 1 + - _NormalScale: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _ReceivesSSR: 0 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _RequireSplitLighting: 1 + - _SSRefractionProjectionModel: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.5 + - _SmoothnessMax: 0.754 + - _SmoothnessMin: 0 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SrcBlend: 1 + - _StencilRef: 4 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 6 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _ThreadAOStrength01: 1 + - _ThreadNormalStrength: 2 + - _ThreadSmoothnessScale: 0 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingVelocity: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 8 + - _ZTestTransparent: 4 + - _ZWrite: 1 + - _useThreadMap: 1 + m_Colors: + - _BaseColor: {r: 0.41553935, g: 0.42606673, b: 0.4339623, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.41553932, g: 0.4260667, b: 0.43396226, a: 1} + - _DiffusionProfileAsset: {r: -1.2618865e-19, g: -639.73883, b: -625913.7, a: 0.0000000012495336} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 0.23, g: 0.23, b: 0.23, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseMask: {r: 1, g: 0, b: 0, a: 0} + - _uvBaseST: {r: 1, g: 1, b: 0, a: 0} + - _uvThreadMask: {r: 1, g: 0, b: 0, a: 0} + - _uvThreadST: {r: 15, g: 15, b: 0.44, a: 0} + m_BuildTextureStacks: [] +--- !u!114 &3775346471072160633 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat.meta new file mode 100644 index 00000000000..d5ba029df51 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Materials/Wool.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b439df939aa5a82448314bc0f1892ee2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Meshes.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Meshes.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/D_Cloth.fbx.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Meshes/Cloth.obj.meta similarity index 64% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/D_Cloth.fbx.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Meshes/Cloth.obj.meta index 7f1ef591e02..660922623af 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/D_Cloth.fbx.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Meshes/Cloth.obj.meta @@ -1,64 +1,11 @@ fileFormatVersion: 2 -guid: df78c424f13308848bb47b3e6d8bdc44 +guid: 5c3a756b28711f0439c33377f4d11e18 ModelImporter: - serializedVersion: 26 - internalIDToNameTable: - - first: - 1: 100000 - second: //RootNode - - first: - 1: 100002 - second: Fabric - - first: - 1: 100004 - second: Sphere - - first: - 4: 400000 - second: //RootNode - - first: - 4: 400002 - second: Fabric - - first: - 4: 400004 - second: Sphere - - first: - 21: 2100000 - second: No Name - - first: - 23: 2300000 - second: //RootNode - - first: - 23: 2300002 - second: Fabric - - first: - 23: 2300004 - second: Sphere - - first: - 33: 3300000 - second: //RootNode - - first: - 33: 3300002 - second: Fabric - - first: - 33: 3300004 - second: Sphere - - first: - 43: 4300000 - second: grid1 - - first: - 43: 4300002 - second: Fabric - - first: - 43: 4300004 - second: Sphere - externalObjects: - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: No Name - second: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} + serializedVersion: 20100 + internalIDToNameTable: [] + externalObjects: {} materials: - importMaterials: 1 + materialImportMode: 1 materialName: 0 materialSearch: 1 materialLocation: 1 @@ -84,7 +31,7 @@ ModelImporter: extraExposedTransformPaths: [] extraUserProperties: [] clipAnimations: [] - isReadable: 1 + isReadable: 0 meshes: lODScreenPercentages: [] globalScale: 1 @@ -101,15 +48,19 @@ ModelImporter: useFileUnits: 1 keepQuads: 0 weldVertices: 1 + bakeAxisConversion: 0 preserveHierarchy: 0 skinWeightsMode: 0 maxBonesPerVertex: 4 minBoneWeight: 0.001 - meshOptimizationFlags: 1 + meshOptimizationFlags: -1 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 secondaryUVPackMargin: 4 useFileScale: 1 tangentSpace: @@ -122,7 +73,6 @@ ModelImporter: normalSmoothingSource: 0 referencedClips: [] importAnimation: 1 - copyAvatar: 0 humanDescription: serializedVersion: 3 human: [] @@ -140,8 +90,10 @@ ModelImporter: hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 0 + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 humanoidOversampling: 1 + avatarSetup: 0 additionalBone: 0 userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/Decal Projector.prefab b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Decal Projector.prefab similarity index 90% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/Decal Projector.prefab rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Decal Projector.prefab index 5bf86712a3e..91d035a0ff6 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/Decal Projector.prefab +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Decal Projector.prefab @@ -24,13 +24,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3525908778427950670} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: 0.70710695, y: -0, z: -0, w: 0.7071067} m_LocalPosition: {x: 1, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!114 &3525908778427950671 MonoBehaviour: m_ObjectHideFlags: 0 @@ -43,6 +43,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: + m_Version: 2 m_Material: {fileID: 2100000, guid: d239f76ebfa6ba94da3746ab2d26090e, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 @@ -50,6 +51,5 @@ MonoBehaviour: m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 0 m_Offset: {x: 0, y: 0, z: 0} - m_Size: {x: 2, y: 0.2, z: 2} - m_IsCropModeEnabled: 0 + m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 1 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/Decal Projector.prefab.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Decal Projector.prefab.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/Decal Projector.prefab.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Decal Projector.prefab.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/DirectionalLight.prefab b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/DirectionalLight.prefab new file mode 100644 index 00000000000..81f9e47a815 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/DirectionalLight.prefab @@ -0,0 +1,206 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3137672285531552026 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3137672285531552030} + - component: {fileID: 3137672285531552031} + - component: {fileID: 3137672285531552024} + m_Layer: 0 + m_Name: DirectionalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3137672285531552030 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3137672285531552026} + m_LocalRotation: {x: 0.2769918, y: -0.79612345, z: 0.34268054, w: 0.41476864} + m_LocalPosition: {x: -1.83, y: 3.47, z: -0.97} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50.842003, y: -131.822, z: -14.375001} +--- !u!108 &3137672285531552031 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3137672285531552026} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 5000 + m_Range: 30 + 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: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6000 + m_UseColorTemperature: 1 + m_BoundingSphereOverride: {x: 5.16e-43, y: -0.0000000059714402, z: 5.16e-43, w: -0.0000000048252033} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!114 &3137672285531552024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3137672285531552026} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 10 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 1024 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 + m_Intensity: 5000 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 2 + m_FadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 1 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + 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: 32 + m_MinFilterSize: 1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 1024 + m_UseOverride: 0 + m_Level: 2 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 1 + m_UseOverride: 1 + m_Level: 1 + 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_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_ShadowCascadeRatios: + - 0.05 + - 0.15 + - 0.3 + m_ShadowCascadeBorders: + - 0 + - 0 + - 0 + - 0 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 3 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + showAdditionalSettings: 0 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Fabric.prefab.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/DirectionalLight.prefab.meta similarity index 74% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Fabric.prefab.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/DirectionalLight.prefab.meta index cec0572e2ed..febb40a27ee 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Fabric.prefab.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/DirectionalLight.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 41c87b7333da66b47b573551700111c5 +guid: 09d873e82f06a51458debc9fd17532f1 PrefabImporter: externalObjects: {} userData: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/FabricBall Variant.prefab b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/FabricBall Variant.prefab new file mode 100644 index 00000000000..40c185f0df7 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/FabricBall Variant.prefab @@ -0,0 +1,149 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3683289960018831420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4405751948226276490} + - component: {fileID: 3991491667227572313} + - component: {fileID: 5640198123085796521} + m_Layer: 0 + m_Name: Cloth + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4405751948226276490 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3683289960018831420} + 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_Children: [] + m_Father: {fileID: 5257599313680890715} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3991491667227572313 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3683289960018831420} + m_Mesh: {fileID: -2432090755550338912, guid: 5c3a756b28711f0439c33377f4d11e18, type: 3} +--- !u!23 &5640198123085796521 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3683289960018831420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -3033667219593020291, guid: 5c3a756b28711f0439c33377f4d11e18, type: 3} + 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!1001 &5253322766097779063 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_Name + value: FabricBall Variant + objectReference: {fileID: 0} + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} +--- !u!4 &5257599313680890715 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + m_PrefabInstance: {fileID: 5253322766097779063} + m_PrefabAsset: {fileID: 0} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/FabricBall Variant.prefab.meta similarity index 57% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/FabricBall Variant.prefab.meta index 8e75bd73b86..2fd173579a7 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/FabricBall Variant.prefab.meta @@ -1,7 +1,6 @@ fileFormatVersion: 2 -guid: 0af27a2d356bd444d9690ebeeef012f5 -folderAsset: yes -DefaultImporter: +guid: f70916a878dbe7a4789b71edd4ca6e41 +PrefabImporter: externalObjects: {} userData: assetBundleName: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Frame.prefab b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Frame.prefab index 5b0b782f384..b85e82e62b8 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Frame.prefab +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Frame.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &1024751854246692625 +--- !u!1 &2901721053673301837 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,142 +8,46 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7590086570363274005} - - component: {fileID: 6609020102793499692} - - component: {fileID: 3947190031290084941} - - component: {fileID: 8680680438822231691} + - component: {fileID: 8328653822409946966} + - component: {fileID: 3631502872870894545} + - component: {fileID: 837619491023392607} + - component: {fileID: 2637457796180512661} m_Layer: 0 - m_Name: Border01 + m_Name: Cube m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &7590086570363274005 +--- !u!4 &8328653822409946966 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1024751854246692625} - m_LocalRotation: {x: 0.70710576, y: -0, z: -0, w: 0.70710784} - m_LocalPosition: {x: 0, y: 0, z: 2.5} - m_LocalScale: {x: 5.1, y: 0.1, z: 1} + m_GameObject: {fileID: 2901721053673301837} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -0.05, z: 0} + m_LocalScale: {x: 5.1, y: 0.1, z: 5.1} m_Children: [] m_Father: {fileID: 2101728995791149842} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: 0} ---- !u!33 &6609020102793499692 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1024751854246692625} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &3947190031290084941 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1024751854246692625} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - 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: 432261abd3c1815429a7027f8e7e2287, 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!64 &8680680438822231691 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1024751854246692625} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &4193111664978422462 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4370576703281384917} - - component: {fileID: 5423549475332653647} - - component: {fileID: 4438254496821996401} - - component: {fileID: 6375808997941475898} - m_Layer: 0 - m_Name: Border04 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4370576703281384917 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4193111664978422462} - m_LocalRotation: {x: 0.4999993, y: 0.49999928, z: -0.5000007, w: 0.5000008} - m_LocalPosition: {x: -2.5, y: 0, z: 0} - m_LocalScale: {x: 5.1, y: 0.1, z: 1} - m_Children: [] - m_Father: {fileID: 2101728995791149842} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: -90.00001} ---- !u!33 &5423549475332653647 + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3631502872870894545 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4193111664978422462} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &4438254496821996401 + m_GameObject: {fileID: 2901721053673301837} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &837619491023392607 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4193111664978422462} + m_GameObject: {fileID: 2901721053673301837} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -156,7 +60,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 432261abd3c1815429a7027f8e7e2287, type: 2} + - {fileID: 2100000, guid: 5e064cf4e7d237040a28f8b178879754, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -178,20 +82,19 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!64 &6375808997941475898 -MeshCollider: +--- !u!65 &2637457796180512661 +BoxCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4193111664978422462} + m_GameObject: {fileID: 2901721053673301837} m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!1 &5573612767648057585 GameObject: m_ObjectHideFlags: 0 @@ -222,7 +125,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2101728995791149842} - m_RootOrder: 4 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 180, z: -0.000015258789} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -404,203 +307,8 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 7590086570363274005} - - {fileID: 2958448687888125124} - - {fileID: 5595391402160613141} - - {fileID: 4370576703281384917} - {fileID: 2928182508587883262} + - {fileID: 8328653822409946966} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &7135112560196991354 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2958448687888125124} - - component: {fileID: 8979153630800152999} - - component: {fileID: 1042692693395059357} - - component: {fileID: 8165644772162683028} - m_Layer: 0 - m_Name: Border02 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2958448687888125124 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7135112560196991354} - m_LocalRotation: {x: 0.70710576, y: -0, z: -0, w: 0.70710784} - m_LocalPosition: {x: 0, y: 0, z: -2.5} - m_LocalScale: {x: 5.1, y: 0.1, z: 1} - m_Children: [] - m_Father: {fileID: 2101728995791149842} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: 0} ---- !u!33 &8979153630800152999 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7135112560196991354} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &1042692693395059357 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7135112560196991354} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - 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: 432261abd3c1815429a7027f8e7e2287, 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!64 &8165644772162683028 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7135112560196991354} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &7775065102121788095 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5595391402160613141} - - component: {fileID: 8508148539759596771} - - component: {fileID: 3128388040028993647} - - component: {fileID: 2008378931241101419} - m_Layer: 0 - m_Name: Border03 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5595391402160613141 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7775065102121788095} - m_LocalRotation: {x: 0.4999993, y: 0.49999928, z: -0.5000007, w: 0.5000008} - m_LocalPosition: {x: 2.5, y: 0, z: 0} - m_LocalScale: {x: 5.1, y: 0.1, z: 1} - m_Children: [] - m_Father: {fileID: 2101728995791149842} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: -90.00001} ---- !u!33 &8508148539759596771 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7775065102121788095} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &3128388040028993647 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7775065102121788095} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - 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: 432261abd3c1815429a7027f8e7e2287, 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!64 &2008378931241101419 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7775065102121788095} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab new file mode 100644 index 00000000000..b8d80fe6ce8 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab @@ -0,0 +1,208 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1669185313534232394 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1669185313534232391} + - component: {fileID: 1669185313534232390} + - component: {fileID: 1669185313534232393} + - component: {fileID: 1669185313534232395} + - component: {fileID: 1669185313534232388} + m_Layer: 0 + m_Name: Free Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1669185313534232391 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669185313534232394} + m_LocalRotation: {x: 0.04474099, y: -0.9393257, z: 0.31783894, w: 0.121012256} + m_LocalPosition: {x: 6.02, y: 12.74, z: 19.01} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 37.440002, y: -165.492, z: -0.514} +--- !u!20 &1669185313534232390 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669185313534232394} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.62552905, g: 0.684092, b: 0.7761194, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 48.12937 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.02 + far clip plane: 400 + field of view: 28 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &1669185313534232393 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669185313534232394} + m_Enabled: 1 +--- !u!114 &1669185313534232395 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669185313534232394} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 7 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} + clearDepth: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + volumeAnchorOverride: {fileID: 0} + antialiasing: 2 + SMAAQuality: 2 + dithering: 0 + stopNaNs: 0 + taaSharpenStrength: 0.6 + physicalParameters: + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + flipYMode: 0 + fullscreenPassthrough: 0 + allowDynamicResolution: 0 + customRenderingSettings: 0 + invertFaceCulling: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + hasPersistentHistory: 0 + m_RenderingPathCustomFrameSettings: + bitDatas: + data1: 2110972231500 + data2: 4539628424926265344 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 0 + data2: 0 + defaultFrameSettings: 0 +--- !u!114 &1669185313534232388 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669185313534232394} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 618b0e3f6c65dd247a4a016150006c57, type: 3} + m_Name: + m_EditorClassIdentifier: + m_LookSpeedController: 120 + m_LookSpeedMouse: 3 + m_MoveSpeed: 10 + m_MoveSpeedIncrement: 2.5 + m_Turbo: 3 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab.meta new file mode 100644 index 00000000000..cafe6711e94 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Free Camera.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1a42cbeb3ca2a3a4c9cbcd64f25b23c9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab new file mode 100644 index 00000000000..d7149e334eb --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab @@ -0,0 +1,171 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3624354265217343887 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3807526723187398174} + - component: {fileID: 6962599493630211355} + - component: {fileID: 1662988365467905857} + - component: {fileID: 7307356912546877374} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3807526723187398174 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3624354265217343887} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.122, z: 0} + m_LocalScale: {x: 0.19111207, y: 0.19111207, z: 0.19111207} + m_Children: [] + m_Father: {fileID: 8413979825653297321} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &6962599493630211355 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3624354265217343887} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1662988365467905857 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3624354265217343887} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + 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: 3f2e487e0890ee74198c88ff96b593ee, 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!135 &7307356912546877374 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3624354265217343887} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1001 &8418711575223616133 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1419437755678534, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_Name + value: HairBall + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalPosition.z + value: 0.312 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 06e9fda3cfaed4749ba51f675be63934, type: 2} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_Materials.Array.data[3] + value: + objectReference: {fileID: 2100000, guid: 4f75b29101db52948b5b1462f75a6b71, type: 2} + - target: {fileID: 23934003906556700, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + propertyPath: m_Materials.Array.data[2] + value: + objectReference: {fileID: 2100000, guid: 06e9fda3cfaed4749ba51f675be63934, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} +--- !u!4 &8413979825653297321 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4841702488699436, guid: 2545682e6985a5b42aee563ca36c7666, type: 3} + m_PrefabInstance: {fileID: 8418711575223616133} + m_PrefabAsset: {fileID: 0} diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab.meta new file mode 100644 index 00000000000..3a877a21a09 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/HairBall Variant.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 40bac94bea7d26e4eb5a5c914a13b4c5 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/MaterialBall.prefab.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/MaterialBall.prefab.meta index 49e879340b3..972f2271bf8 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/MaterialBall.prefab.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/MaterialBall.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7822020b9f9222c458b8de51cf8846ec +guid: 2545682e6985a5b42aee563ca36c7666 NativeFormatImporter: externalObjects: {} mainObjectFileID: 100100000 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab new file mode 100644 index 00000000000..59a02a86a41 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab @@ -0,0 +1,50 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3542236251404532154 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3542236251404532133} + - component: {fileID: 3542236251404532155} + m_Layer: 0 + m_Name: Rendering Settings + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3542236251404532133 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3542236251404532154} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3542236251404532155 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3542236251404532154} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 1 + weight: 1 + sharedProfile: {fileID: 11400000, guid: bcce1d882ad78594e96df95e83512585, type: 2} diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab.meta new file mode 100644 index 00000000000..27daedf8a6f --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Prefabs/Rendering Settings.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d9e1396e69a15a5469ebb9e5c4ccf373 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton Thin.asset b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Cotton Thin.asset similarity index 94% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton Thin.asset rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Cotton Thin.asset index 2414e4ea47c..454a8d1c988 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton Thin.asset +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Cotton Thin.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} m_Name: Cotton Thin m_EditorClassIdentifier: + m_Version: 1 profile: - name: Cotton Thin scatteringDistance: {r: 0.5, g: 0.5, b: 0.5, a: 1} transmissionTint: {r: 1, g: 1, b: 1, a: 1} texturingMode: 0 @@ -22,5 +22,3 @@ MonoBehaviour: worldScale: 1 ior: 1.4 hash: 1080211988 - m_Version: 1 - profiles: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton Thin.asset.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Cotton Thin.asset.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Cotton Thin.asset.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Cotton Thin.asset.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset new file mode 100644 index 00000000000..2436082d36f --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} + m_Name: Linen Thin + m_EditorClassIdentifier: + m_Version: 1 + profile: + scatteringDistance: {r: 0.5849056, g: 0.5849056, b: 0.5849056, a: 1} + transmissionTint: {r: 1, g: 1, b: 1, a: 1} + texturingMode: 0 + transmissionMode: 1 + thicknessRemap: {x: 0.2, y: 1} + worldScale: 1 + ior: 1.4 + hash: 1076881598 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset.meta new file mode 100644 index 00000000000..e770a887943 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Linen Thin.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7906daf99f11c624a9d2c8fa0eed731c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: '{"assetGUIDs":["","","","","","","","","","","","","","","",""]}' + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Materials Samples Rendering Settings.asset b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Materials Samples Rendering Settings.asset index 8b99988705f..26210c7cc44 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Materials Samples Rendering Settings.asset +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Materials Samples Rendering Settings.asset @@ -92,6 +92,28 @@ MonoBehaviour: m_Value: 2 min: 1 max: 6 +--- !u!114 &-3069833263037934007 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 32b6af8f7ad32324cb6941c3290e5895, type: 3} + m_Name: MicroShadowing + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + enable: + m_OverrideState: 1 + m_Value: 1 + opacity: + m_OverrideState: 1 + m_Value: 0.5 + min: 0 + max: 1 --- !u!114 &-2580125098236727541 MonoBehaviour: m_ObjectHideFlags: 3 @@ -186,6 +208,9 @@ MonoBehaviour: m_Value: 1 min: 0 max: 20 + cameraMotionBlur: + m_OverrideState: 0 + m_Value: 1 m_SampleCount: m_OverrideState: 0 m_Value: 8 @@ -294,25 +319,25 @@ MonoBehaviour: m_Value: 0 top: m_OverrideState: 1 - m_Value: {r: 0.079863995, g: 0.13676903, b: 0.29799998, a: 1} + m_Value: {r: 0.22322798, g: 0.2581829, b: 0.4341537, a: 1} hdr: 1 showAlpha: 0 showEyeDropper: 1 middle: m_OverrideState: 1 - m_Value: {r: 0.48026317, g: 0.48026317, b: 0.5, a: 1} + m_Value: {r: 0.2767907, g: 0.32292244, b: 0.541, a: 1} hdr: 1 showAlpha: 0 showEyeDropper: 1 bottom: m_OverrideState: 1 - m_Value: {r: 0.29799998, g: 0.16491261, b: 0.0839029, a: 1} + m_Value: {r: 0.6273585, g: 0.6739387, b: 1, a: 1} hdr: 1 showAlpha: 0 showEyeDropper: 1 gradientDiffusion: m_OverrideState: 1 - m_Value: 4 + m_Value: 1 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -338,6 +363,7 @@ MonoBehaviour: - {fileID: 1014795077881267267} - {fileID: -2464658362000225752} - {fileID: -2580125098236727541} + - {fileID: -3069833263037934007} --- !u!114 &114441308821087078 MonoBehaviour: m_ObjectHideFlags: 3 @@ -572,6 +598,9 @@ MonoBehaviour: m_Value: - {fileID: 11400000, guid: ad180cf900c4ef141be2b350f09ffa5b, type: 2} - {fileID: 11400000, guid: fcd70d05840926746a3daff4f0a00e1a, type: 2} + - {fileID: 11400000, guid: 92119388ece825647ba5039062efc187, type: 2} + - {fileID: 11400000, guid: 7906daf99f11c624a9d2c8fa0eed731c, type: 2} + - {fileID: 11400000, guid: 2efa14a049ef1fc49bcf18c90ebcab30, type: 2} --- !u!114 &5969154729827946099 MonoBehaviour: m_ObjectHideFlags: 3 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset new file mode 100644 index 00000000000..3ebf1396719 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset @@ -0,0 +1,24 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b2686e09ec7aef44bad2843e4416f057, type: 3} + m_Name: Wool Thick + m_EditorClassIdentifier: + m_Version: 1 + profile: + scatteringDistance: {r: 0.5, g: 0.5, b: 0.5, a: 1} + transmissionTint: {r: 1, g: 1, b: 1, a: 1} + texturingMode: 0 + transmissionMode: 1 + thicknessRemap: {x: 0, y: 2.5} + worldScale: 1 + ior: 1.4 + hash: 1075916071 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset.meta new file mode 100644 index 00000000000..d6914574ff6 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Settings/Wool Thick.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2efa14a049ef1fc49bcf18c90ebcab30 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: '{"assetGUIDs":["","","","","","","","","","","","","","","",""]}' + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs.meta similarity index 77% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs.meta index 2081b3b96e2..d6d51408636 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8d5ed8131a09855458a7c316dd590fde +guid: 67b9803fda986ea4cae9b26979f4fcc0 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_CottonWool.ShaderGraph b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_CottonWool.ShaderGraph similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_CottonWool.ShaderGraph rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_CottonWool.ShaderGraph diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_CottonWool.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_CottonWool.ShaderGraph.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_CottonWool.ShaderGraph.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_CottonWool.ShaderGraph.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/SG_Decal_WaterPuddle.ShaderGraph b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Decal_WaterPuddle.ShaderGraph similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/SG_Decal_WaterPuddle.ShaderGraph rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Decal_WaterPuddle.ShaderGraph diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/SG_Decal_WaterPuddle.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Decal_WaterPuddle.ShaderGraph.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/SG_Decal_WaterPuddle.ShaderGraph.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Decal_WaterPuddle.ShaderGraph.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/SG_Hair.shadergraph b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Hair.shadergraph similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/SG_Hair.shadergraph rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Hair.shadergraph diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/SG_Hair.shadergraph.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Hair.shadergraph.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/SG_Hair.shadergraph.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Hair.shadergraph.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_Silk.ShaderGraph b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Silk.ShaderGraph similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_Silk.ShaderGraph rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Silk.ShaderGraph diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_Silk.ShaderGraph.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Silk.ShaderGraph.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/SG_Silk.ShaderGraph.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Shadergraphs/SG_Silk.ShaderGraph.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_ThreadMapDetail.shadersubgraph.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_uvCombine.shadersubgraph b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_uvCombine.shadersubgraph similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_uvCombine.shadersubgraph rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_uvCombine.shadersubgraph diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_uvCombine.shadersubgraph.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_uvCombine.shadersubgraph.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Subgraphs/SGR_uvCombine.shadersubgraph.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Subgraphs/SGR_uvCombine.shadersubgraph.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_H.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_H.tga similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_H.tga rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_H.tga diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_H.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_H.tga.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_H.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_H.tga.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_N.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_N.tga similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_N.tga rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_N.tga diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_N.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_N.tga.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Decal/DC_puddle01_N.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/DC_puddle01_N.tga.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_C.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_C.tga new file mode 100644 index 00000000000..8cebc111768 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_C.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6e6de1d9fccbb8b2e39d201e1fefe1de505a8ff0f337318c9712f993f3f7951 +size 786476 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_F.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_C.tga.meta similarity index 80% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_F.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_C.tga.meta index 578fc9b96b3..d06c605ca55 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_F.tga.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_C.tga.meta @@ -1,13 +1,13 @@ fileFormatVersion: 2 -guid: 632ea38a7fe456b4d87ded4efbea8d6c +guid: e51b3858f115aaa4ca644b144edfb9e2 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 9 + serializedVersion: 11 mipmaps: mipMapMode: 0 enableMipMap: 1 - sRGBTexture: 0 + sRGBTexture: 1 linearTexture: 0 fadeOut: 0 borderMipMap: 0 @@ -23,6 +23,7 @@ TextureImporter: isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -51,12 +52,14 @@ TextureImporter: alphaUsage: 1 alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 10 + textureType: 0 textureShape: 1 - singleChannelComponent: 1 + singleChannelComponent: 0 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -70,18 +73,6 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga new file mode 100644 index 00000000000..868504b8637 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57d3f917e31ca915a40501784fb2c65112022d579f4c12f28667e4825d2680c1 +size 262188 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga.meta new file mode 100644 index 00000000000..5a63ec933e0 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Denim_CV.tga.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: b6c00f81c69572149bfe3fd8074bc899 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 4 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + 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: 10 + textureShape: 1 + singleChannelComponent: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_AO.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_AO.tga similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_AO.tga rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_AO.tga diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_AO.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_AO.tga.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_AO.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_AO.tga.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_BC.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_BC.tga similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_BC.tga rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_BC.tga diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_BC.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_BC.tga.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_BC.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_BC.tga.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_N.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_N.tga similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_N.tga rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_N.tga diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_N.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_N.tga.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_N.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_N.tga.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_S.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_S.tga similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_S.tga rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_S.tga diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_S.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_S.tga.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_S.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_S.tga.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Shift.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_Shift.tga similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Shift.tga rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_Shift.tga diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Shift.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_Shift.tga.meta similarity index 100% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Hair/Hair_Shift.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Hair_Shift.tga.meta diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Jersey_TM.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Jersey_TM.tga new file mode 100644 index 00000000000..a992c55ad00 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Jersey_TM.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dd1df975652cadb0203f40bb4d4971c018174f6e69f3ea73fcd5838035d1b80 +size 1048620 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_D.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Jersey_TM.tga.meta similarity index 85% rename from com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_D.tga.meta rename to com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Jersey_TM.tga.meta index c881f710847..a89d2c776f8 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_D.tga.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Jersey_TM.tga.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: cd19c89d4b2f99f439cb28098be331dc +guid: 8ba4df4ce48ed49429490ee07034ac7e TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 11 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -23,6 +23,7 @@ TextureImporter: isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -57,6 +58,8 @@ TextureImporter: maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -83,7 +86,7 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 - buildTarget: PS4 + buildTarget: Windows Store Apps maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -95,7 +98,19 @@ TextureImporter: androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 - buildTarget: XboxOne + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga new file mode 100644 index 00000000000..4bec9aef08d --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9da036fb5c8e80609ef45be096124b79053e54a60a8d7562eef0a4d4b4c45eab +size 1048620 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga.meta new file mode 100644 index 00000000000..22c506a10f1 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Knit_Ribbed__TM.tga.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 838330f64b9f8354796242a4fc530cb6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 4 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga index 96942d36617..56e9d047e80 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbbb2d15d776f1f7fecab4e55513e95473dbb4b66058d598ebab2edcadc16652 -size 65580 +oid sha256:be4bea7f6982f3436a101050898af04a3ce0ee41a0d13d0557ed54d41e823845 +size 262188 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga.meta index b6b21b210ec..578fc9b96b3 100644 --- a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga.meta +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/WeavePattern01_F.tga.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 04eedbc81f09ede42a9ce8266c9e1853 +guid: 632ea38a7fe456b4d87ded4efbea8d6c TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 9 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -32,7 +32,7 @@ TextureImporter: textureSettings: serializedVersion: 2 filterMode: -1 - aniso: 4 + aniso: -1 mipBias: -100 wrapU: -1 wrapV: -1 @@ -60,7 +60,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 512 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -72,19 +72,7 @@ TextureImporter: forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Standalone - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: PS4 - maxTextureSize: 512 + maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga new file mode 100644 index 00000000000..d9edfac68b4 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:317fe174941a62f81f9b8c16f21dae097f2ab074167948bfbafd5b3c53fe5ea3 +size 1048620 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga.meta new file mode 100644 index 00000000000..e060859f8dd --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Jacket_TM.tga.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 0162a5f6db80825468422e8b0ae88a6f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 4 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga new file mode 100644 index 00000000000..5906dcb2fa3 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2602d6e5b1b4ca5cde6fcbd01b365e5380c60bbad7ed8fbfbebc28255416b3c +size 262188 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga.meta new file mode 100644 index 00000000000..6d3c1a2032f --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_CV.tga.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 46d2baa7dbdc17345a1851e9866cae69 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + 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: 10 + textureShape: 1 + singleChannelComponent: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga new file mode 100644 index 00000000000..59ffba643d8 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39826a9f7200776afd9bca7c9b62b9a978161f96dec759f2d1af71b0ba921797 +size 1048620 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga.meta new file mode 100644 index 00000000000..98eeb067d55 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Plain_TM.tga.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 96621ef40ef616245b8e7ccbe29c8847 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 4 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga new file mode 100644 index 00000000000..83fed0d985e --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5810d58f1348050dfbbd84ba38a335f55c191d58aba77e7ec4ee1932b9c5c584 +size 1048620 diff --git a/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga.meta b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga.meta new file mode 100644 index 00000000000..e30c84fe8a3 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Samples~/MaterialSamples/Textures/Weave_Twill_TM.tga.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 963d136eca7b7bc4e838b34654450ab2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 4 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/.sample.json b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/.sample.json deleted file mode 100644 index 454db5ae254..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/.sample.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "displayName":"Shader Graph Samples", - "description": "Adds Shader Graph samples to your project. Open the SampleScene to see typical use cases for the Hair, Fabric, and Decal Master Nodes for Shader Graph.", - "createSeparatePackage": false -} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/D_Cloth.fbx b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/D_Cloth.fbx deleted file mode 100644 index 7cc1f58d0a8..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/D_Cloth.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45eddfd1f2f807445824c2c08423df9058195735e23e598605f471c39dc67f39 -size 748608 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Fabric.prefab b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Fabric.prefab deleted file mode 100644 index 1dd5715949d..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/Fabric.prefab +++ /dev/null @@ -1,190 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1478626404205079528 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1478626404205574088} - - component: {fileID: 1478626404204279784} - - component: {fileID: 1478626404203148584} - m_Layer: 0 - m_Name: Fabric - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1478626404205574088 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1478626404205079528} - 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_Children: [] - m_Father: {fileID: 1478626404205574090} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &1478626404204279784 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1478626404205079528} - m_Mesh: {fileID: 4300002, guid: df78c424f13308848bb47b3e6d8bdc44, type: 3} ---- !u!23 &1478626404203148584 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1478626404205079528} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, 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: 0 - 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 ---- !u!1 &1478626404205079530 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1478626404205574090} - m_Layer: 0 - m_Name: Fabric - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1478626404205574090 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1478626404205079530} - m_LocalRotation: {x: -0, y: 0.000000029802319, z: -0, w: 1} - m_LocalPosition: {x: -1.5, y: 0, z: -0.25} - m_LocalScale: {x: 10, y: 10, z: 10} - m_Children: - - {fileID: 1478626404205574088} - - {fileID: 2182732558702146355} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2182732558701784851 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2182732558702146355} - - component: {fileID: 2182732558702916371} - - component: {fileID: 2182732558704046547} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &2182732558702146355 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2182732558701784851} - m_LocalRotation: {x: 0.00000008146034, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -0.00055, z: 0} - m_LocalScale: {x: 0.97, y: 0.97, z: 0.97} - m_Children: [] - m_Father: {fileID: 1478626404205574090} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &2182732558702916371 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2182732558701784851} - m_Mesh: {fileID: 4300004, guid: df78c424f13308848bb47b3e6d8bdc44, type: 3} ---- !u!23 &2182732558704046547 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2182732558701784851} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, 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: 0 - 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 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_D.tga b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_D.tga deleted file mode 100644 index 677d4ccacaa..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_D.tga +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:404bb740a80487eaf5a4ec384125714688e0dfea47f6452f6ed8896d25d06b47 -size 1048620 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_F.tga b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_F.tga deleted file mode 100644 index 56e9d047e80..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Fabric/WeavePattern01_F.tga +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be4bea7f6982f3436a101050898af04a3ce0ee41a0d13d0557ed54d41e823845 -size 262188 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/MaterialBall.prefab b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/MaterialBall.prefab deleted file mode 100644 index 6c429ceb901..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/Meshes/MaterialBall.prefab +++ /dev/null @@ -1,193 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1235965980648682 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4762721505711636} - - component: {fileID: 33055988003368552} - - component: {fileID: 23216588617088184} - m_Layer: 0 - m_Name: UnityBall_Base - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4762721505711636 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235965980648682} - 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_Children: [] - m_Father: {fileID: 4841702488699436} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &33055988003368552 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235965980648682} - m_Mesh: {fileID: 4300000, guid: 232ab27f257e8524eacc2e73daf536f5, type: 3} ---- !u!23 &23216588617088184 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1235965980648682} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, 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: 0 - 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 ---- !u!1 &1419437755678534 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4841702488699436} - m_Layer: 0 - m_Name: MaterialBall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4841702488699436 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1419437755678534} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.5, z: 0} - m_LocalScale: {x: 4, y: 4, z: 4} - m_Children: - - {fileID: 4762721505711636} - - {fileID: 4698010934444374} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1753626115838088 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4698010934444374} - - component: {fileID: 33977157838289438} - - component: {fileID: 23934003906556700} - m_Layer: 0 - m_Name: UnityBall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4698010934444374 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753626115838088} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.122, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 4841702488699436} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &33977157838289438 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753626115838088} - m_Mesh: {fileID: 4300000, guid: abd6f93423e74814797118f1c6d9393b, type: 3} ---- !u!23 &23934003906556700 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753626115838088} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} - - {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} - - {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, 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: 0 - 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 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene.unity b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene.unity deleted file mode 100644 index f44d443fac6..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene.unity +++ /dev/null @@ -1,1985 +0,0 @@ -%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.10334374, g: 0.07211017, b: 0.0697264, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - 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: 10 - 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: 0 - 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_UseShadowmask: 0 ---- !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 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &92339266 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 92339268} - - component: {fileID: 92339267} - m_Layer: 0 - m_Name: Planar Reflection - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &92339267 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 92339266} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a4ee7c3a3b205a14a94094d01ff91d6b, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HDProbeVersion: 3 - m_ObsoleteInfiniteProjection: 1 - m_ObsoleteInfluenceVolume: - m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendDistance: 0 - m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendNormalDistance: 0 - m_EditorAdvancedModeEnabled: 0 - m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} - m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} - m_Version: 1 - m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} - m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 10, y: 10, z: 10} - m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 - m_ObsoleteMultiplier: 1 - m_ObsoleteWeight: 1 - m_ObsoleteMode: 0 - m_ObsoleteLightLayers: 1 - m_ObsoleteCaptureSettings: - overrides: 0 - clearColorMode: 0 - backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} - clearDepth: 1 - cullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - useOcclusionCulling: 1 - volumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - volumeAnchorOverride: {fileID: 0} - projection: 0 - nearClipPlane: 0.3 - farClipPlane: 1000 - fieldOfView: 90 - orthographicSize: 5 - renderingPath: 0 - shadowDistance: 100 - m_ProbeSettings: - frustum: - fieldOfViewMode: 1 - fixedValue: 90 - automaticScale: 1 - viewerScale: 1.65 - type: 1 - mode: 1 - realtimeMode: 0 - lighting: - multiplier: 1 - weight: 1 - lightLayer: 1 - influence: - m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendDistance: 0 - m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendNormalDistance: 0 - m_EditorAdvancedModeEnabled: 0 - m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} - m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} - m_Version: 1 - m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} - m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 10, y: 0.01, z: 10} - m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 - proxy: - m_CSVersion: 1 - m_ObsoleteSphereInfiniteProjection: 0 - m_ObsoleteBoxInfiniteProjection: 0 - m_Shape: 0 - m_BoxSize: {x: 1, y: 1, z: 1} - m_SphereRadius: 1 - proxySettings: - useInfluenceVolumeAsProxyVolume: 0 - capturePositionProxySpace: {x: 0, y: 0, z: 0} - captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} - mirrorPositionProxySpace: {x: 0, y: 0, z: 0} - mirrorRotationProxySpace: {x: -0.70710677, y: 0, z: 0, w: 0.70710677} - camera: - customRenderingSettings: 0 - renderingPathCustomFrameSettings: - bitDatas: - data1: 70280697347933 - data2: 4539628424926265344 - lodBias: 1 - lodBiasMode: 0 - lodBiasQualityLevel: 0 - maximumLODLevel: 0 - maximumLODLevelMode: 0 - maximumLODLevelQualityLevel: 0 - materialQuality: 0 - renderingPathCustomFrameSettingsOverrideMask: - mask: - data1: 0 - data2: 0 - bufferClearing: - clearColorMode: 0 - backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} - clearDepth: 1 - volumes: - layerMask: - serializedVersion: 2 - m_Bits: 1 - anchorOverride: {fileID: 0} - frustum: - mode: 0 - aspect: 1 - farClipPlane: 1000 - nearClipPlane: 0.3 - fieldOfView: 90 - projectionMatrix: - 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 - culling: - useOcclusionCulling: 1 - cullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - invertFaceCulling: 0 - flipYMode: 0 - probeLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - defaultFrameSettings: 0 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 - m_ProbeSettingsOverride: - probe: 0 - camera: - camera: 0 - m_ProxyVolume: {fileID: 0} - m_BakedTexture: {fileID: 0} - m_CustomTexture: {fileID: 0} - m_BakedRenderData: - m_WorldToCameraRHS: - e00: 0 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 0 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 0 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 0 - m_ProjectionMatrix: - e00: 0 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 0 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 0 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 0 - m_CapturePosition: {x: 0, y: 0, z: 0} - m_CustomRenderData: - m_WorldToCameraRHS: - e00: 0 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 0 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 0 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 0 - m_ProjectionMatrix: - e00: 0 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 0 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 0 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 0 - m_CapturePosition: {x: 0, y: 0, z: 0} - m_EditorOnlyData: 0 - m_PlanarProbeVersion: 6 - m_ObsoleteCaptureNearPlane: 0.3 - m_ObsoleteCaptureFarPlane: 1000 - m_ObsoleteOverrideFieldOfView: 0 - m_ObsoleteFieldOfViewOverride: 90 - m_LocalReferencePosition: {x: 0, y: 0.99999994, z: 0.000000059604645} ---- !u!4 &92339268 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 92339266} - 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 13 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &111444352 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 111444353} - - component: {fileID: 111444356} - - component: {fileID: 111444355} - - component: {fileID: 111444354} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &111444353 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 111444352} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.19, y: 0.19, z: 0.19} - m_Children: [] - m_Father: {fileID: 976434606} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &111444354 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 111444352} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &111444355 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 111444352} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 3f2e487e0890ee74198c88ff96b593ee, 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 ---- !u!33 &111444356 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 111444352} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1001 &162321149 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_Name - value: MaterialBall Cotton - objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.y - value: 0.70710677 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_RootOrder - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 90.00001 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 23216588617088184, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[1] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[3] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[2] - value: - objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} ---- !u!114 &639017683 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d877ec3e844f2ca46830012e8e79319b, type: 3} - m_Name: - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - rotation: - m_OverrideState: 0 - m_Value: 0 - min: 0 - max: 360 - skyIntensityMode: - m_OverrideState: 0 - m_Value: 0 - exposure: - m_OverrideState: 0 - m_Value: 0 - multiplier: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxValue: - m_OverrideState: 0 - m_Value: 1 - min: 0 - desiredLuxValue: - m_OverrideState: 0 - m_Value: 20000 - updateMode: - m_OverrideState: 0 - m_Value: 0 - updatePeriod: - m_OverrideState: 0 - m_Value: 0 - min: 0 - includeSunInBaking: - m_OverrideState: 0 - m_Value: 0 - planetaryRadius: - m_OverrideState: 0 - m_Value: 6378.759 - min: 0 - planetCenterPosition: - m_OverrideState: 0 - m_Value: {x: 0, y: -6378.759, z: 0} - airAttenuationDistance: - m_OverrideState: 0 - m_Value: {r: 0.17241378, g: 0.074074075, b: 0.030211482, a: 1} - hdr: 1 - showAlpha: 0 - showEyeDropper: 0 - airAlbedo: - m_OverrideState: 0 - m_Value: {r: 0.9, g: 0.9, b: 1, a: 1} - hdr: 0 - showAlpha: 0 - showEyeDropper: 0 - airMaximumAltitude: - m_OverrideState: 0 - m_Value: 58.3 - min: 0 - aerosolAttenuationDistance: - m_OverrideState: 0 - m_Value: 0.5 - min: 0 - aerosolAlbedo: - m_OverrideState: 0 - m_Value: 0.9 - min: 0 - max: 1 - aerosolMaximumAltitude: - m_OverrideState: 0 - m_Value: 8.3 - min: 0 - aerosolAnisotropy: - m_OverrideState: 0 - m_Value: 0 - min: -1 - max: 1 - numberOfBounces: - m_OverrideState: 0 - m_Value: 8 - min: 1 - max: 10 - groundColor: - m_OverrideState: 0 - m_Value: {r: 0.4, g: 0.25, b: 0.15, a: 1} - hdr: 0 - showAlpha: 0 - showEyeDropper: 0 - groundAlbedoTexture: - m_OverrideState: 0 - m_Value: {fileID: 0} - groundEmissionTexture: - m_OverrideState: 0 - m_Value: {fileID: 0} - planetRotation: - m_OverrideState: 0 - m_Value: {x: 0, y: 0, z: 0} - spaceEmissionTexture: - m_OverrideState: 0 - m_Value: {fileID: 0} - spaceRotation: - m_OverrideState: 0 - m_Value: {x: 0, y: 0, z: 0} ---- !u!1 &705246201 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 705246203} - - component: {fileID: 705246202} - m_Layer: 0 - m_Name: Rendering Overrides - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &705246202 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705246201} - 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: 95dc10e465a19064495fec2a7890aefc, type: 2} ---- !u!4 &705246203 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 705246201} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.42864275, y: 0.2001754, z: -0.4535408} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 12 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &976434605 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_Name - value: MaterialBall Hair - objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.z - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.y - value: 0.70710677 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_RootOrder - value: 9 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 90.00001 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 23216588617088184, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[1] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[3] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 06e9fda3cfaed4749ba51f675be63934, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[2] - value: - objectReference: {fileID: 2100000, guid: 06e9fda3cfaed4749ba51f675be63934, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_RendererPriority - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} ---- !u!4 &976434606 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4698010934444374, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - m_PrefabInstance: {fileID: 976434605} - m_PrefabAsset: {fileID: 0} ---- !u!1001 &1135781136 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3525908778427950670, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_Name - value: Decal Water Puddle - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalPosition.x - value: 1.363 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalPosition.y - value: 0.13900001 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalPosition.z - value: 0.000000014901161 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalRotation.x - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_RootOrder - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 90 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950668, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950671, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_Offset.z - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950671, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_Size.y - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950671, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_Size.z - value: 0.2 - objectReference: {fileID: 0} - - target: {fileID: 3525908778427950671, guid: 6b6ccb46df2af1a4c939d89725517275, - type: 3} - propertyPath: m_Version - value: 2 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 6b6ccb46df2af1a4c939d89725517275, type: 3} ---- !u!1 &1170272898 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1170272902} - - component: {fileID: 1170272901} - - component: {fileID: 1170272900} - - component: {fileID: 1170272899} - m_Layer: 0 - m_Name: Ground - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967295 - m_IsActive: 1 ---- !u!65 &1170272899 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1170272898} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1170272900 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1170272898} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, 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 ---- !u!33 &1170272901 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1170272898} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1170272902 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1170272898} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.25, z: 0} - m_LocalScale: {x: 10, y: 0.5, z: 10} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 10 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1226850509 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_Name - value: MaterialBall Silk - objectReference: {fileID: 0} - - target: {fileID: 1419437755678534, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalPosition.z - value: -2 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.y - value: 0.70710677 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_RootOrder - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 90.00001 - objectReference: {fileID: 0} - - target: {fileID: 4841702488699436, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967294 - objectReference: {fileID: 0} - - target: {fileID: 1235965980648682, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} - propertyPath: m_StaticEditorFlags - value: 4294967295 - objectReference: {fileID: 0} - - target: {fileID: 23216588617088184, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[1] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[3] - value: - objectReference: {fileID: 2100000, guid: 87915bbb717577540b99bdbe29ef6b5d, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} - - target: {fileID: 23934003906556700, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - propertyPath: m_Materials.Array.data[2] - value: - objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7822020b9f9222c458b8de51cf8846ec, type: 3} ---- !u!1 &1443957471 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 1753626115838088, guid: 7822020b9f9222c458b8de51cf8846ec, - type: 3} - m_PrefabInstance: {fileID: 1226850509} - m_PrefabAsset: {fileID: 0} ---- !u!135 &1443957475 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1443957471} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.10011649 - m_Center: {x: 0, y: 0, z: 0.000000014901161} ---- !u!1 &1500373578 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1500373581} - - component: {fileID: 1500373580} - m_Layer: 0 - m_Name: Post Processing settings - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1500373580 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1500373578} - 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: eeed9a0cde831a244a3f3d23aca255c3, type: 2} ---- !u!4 &1500373581 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1500373578} - 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1527946158 -GameObject: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1527946160} - - component: {fileID: 1527946159} - m_Layer: 0 - m_Name: StaticLightingSky - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1527946159 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1527946158} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Profile: {fileID: 11400000, guid: 8ad7f7e9a8decf446acae77fa1ad1a6a, type: 2} - m_StaticLightingSkyUniqueID: 4 - m_SkySettings: {fileID: 639017683} - m_SkySettingsFromProfile: {fileID: -8403843368353428522, guid: 8ad7f7e9a8decf446acae77fa1ad1a6a, - type: 2} ---- !u!4 &1527946160 -Transform: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1527946158} - 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 11 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1569679546 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1569679549} - - component: {fileID: 1569679548} - - component: {fileID: 1569679547} - - component: {fileID: 1569679550} - - component: {fileID: 1569679551} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1569679547 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569679546} - m_Enabled: 1 ---- !u!20 &1569679548 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569679546} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 45 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1569679549 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569679546} - m_LocalRotation: {x: 0.07787519, y: -0.7028054, z: 0.077875175, w: 0.70280546} - m_LocalPosition: {x: 3.959, y: 1.085, z: -0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 12.646001, y: -90.00001, z: 0} ---- !u!114 &1569679550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569679546} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Version: 7 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 - clearColorMode: 0 - backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} - clearDepth: 1 - volumeLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - volumeAnchorOverride: {fileID: 0} - antialiasing: 2 - SMAAQuality: 2 - dithering: 1 - stopNaNs: 0 - taaSharpenStrength: 0.6 - physicalParameters: - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - flipYMode: 0 - fullscreenPassthrough: 0 - allowDynamicResolution: 0 - customRenderingSettings: 0 - invertFaceCulling: 0 - probeLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - hasPersistentHistory: 0 - m_RenderingPathCustomFrameSettings: - bitDatas: - data1: 70005818654557 - data2: 4539628424389459968 - lodBias: 1 - lodBiasMode: 0 - lodBiasQualityLevel: 0 - maximumLODLevel: 0 - maximumLODLevelMode: 0 - maximumLODLevelQualityLevel: 0 - materialQuality: 0 - renderingPathCustomFrameSettingsOverrideMask: - mask: - data1: 0 - data2: 0 - defaultFrameSettings: 0 ---- !u!114 &1569679551 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569679546} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 618b0e3f6c65dd247a4a016150006c57, type: 3} - m_Name: - m_EditorClassIdentifier: - m_LookSpeedController: 120 - m_LookSpeedMouse: 10 - m_MoveSpeed: 10 - m_MoveSpeedIncrement: 2.5 - m_Turbo: 10 ---- !u!1001 &1928318913 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1478626404205079530, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_Name - value: Fabric Cotton - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalPosition.y - value: 0.75 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalPosition.z - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.y - value: 0.000000029802319 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_RootOrder - value: 7 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalScale.x - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalScale.y - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalScale.z - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 1478626404203148584, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 2996d09558e888041a0a0293f1cfae9b, type: 2} - - target: {fileID: 1478626404203148584, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_RenderingLayerMask - value: 4294967295 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 41c87b7333da66b47b573551700111c5, type: 3} ---- !u!1001 &1941780699 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1478626404205079530, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_Name - value: Fabric Silk - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalPosition.y - value: 0.75 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalPosition.z - value: -1 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.y - value: 0.000000029802319 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_RootOrder - value: 4 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalScale.x - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalScale.y - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 1478626404205574090, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_LocalScale.z - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 1478626404203148584, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 63741e8ecccc1984b910e4928f389038, type: 2} - - target: {fileID: 1478626404203148584, guid: 41c87b7333da66b47b573551700111c5, - type: 3} - propertyPath: m_RenderingLayerMask - value: 4294967295 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 41c87b7333da66b47b573551700111c5, type: 3} ---- !u!1 &1942148483 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1942148486} - - component: {fileID: 1942148485} - m_Layer: 0 - m_Name: Sky and Fog settings - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1942148485 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1942148483} - 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: 8ad7f7e9a8decf446acae77fa1ad1a6a, type: 2} ---- !u!4 &1942148486 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1942148483} - 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2100051604 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2100051606} - - component: {fileID: 2100051605} - - component: {fileID: 2100051608} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &2100051605 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2100051604} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 3.1415927 - 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: 1 - m_LightShadowCasterMode: 2 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 5500 - m_UseColorTemperature: 1 - m_BoundingSphereOverride: {x: 0, y: NaN, z: 8.16e-43, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &2100051606 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2100051604} - m_LocalRotation: {x: 0.15304591, y: -0.6903456, z: 0.15304591, w: 0.6903456} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 25, y: -90, z: 0} ---- !u!114 &2100051608 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2100051604} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Version: 6 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 512 - m_ObsoleteContactShadows: 1 - m_Intensity: 3.1415927 - m_EnableSpotReflector: 0 - m_LuxAtDistance: 1 - m_InnerSpotPercent: 0 - m_LightDimmer: 1 - m_VolumetricDimmer: 1 - m_LightUnit: 2 - m_FadeDistance: 10000 - m_AffectDiffuse: 1 - m_AffectSpecular: 1 - m_NonLightmappedOnly: 0 - m_LightTypeExtent: 0 - m_SpotLightShape: 0 - m_ShapeWidth: 0.5 - m_ShapeHeight: 0.5 - m_AspectRatio: 1 - m_ShapeRadius: 0 - m_UseCustomSpotLightShadowCone: 0 - m_CustomSpotLightShadowCone: 30 - m_MaxSmoothness: 0.99 - m_ApplyRangeAttenuation: 1 - m_DisplayAreaLightEmissiveMesh: 0 - m_AreaLightCookie: {fileID: 0} - m_AreaLightShadowCone: 120 - m_UseScreenSpaceShadows: 0 - m_InteractsWithSky: 1 - m_AngularDiameter: 0 - m_Distance: 150000000 - m_EvsmExponent: 15 - m_EvsmLightLeakBias: 0 - m_EvsmVarianceBias: 0.00001 - m_EvsmBlurPasses: 0 - m_LightlayersMask: 1 - m_LinkShadowLayers: 1 - m_ShadowNearPlane: 0.1 - m_ShadowSoftness: 0.5 - m_BlockerSampleCount: 24 - m_FilterSampleCount: 16 - m_MinFilterSize: 0.00001 - m_KernelSize: 5 - m_LightAngle: 1 - m_MaxDepthBias: 0.001 - m_ShadowResolution: - m_Override: 512 - m_UseOverride: 0 - m_Level: 1 - m_ShadowDimmer: 1 - m_VolumetricShadowDimmer: 1 - m_ShadowFadeDistance: 10000 - m_UseContactShadow: - m_Level: 0 - m_UseOverride: 1 - m_Override: 1 - m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} - m_NormalBias: 0.75 - m_ConstantBias: 0.25 - m_ShadowUpdateMode: 0 - 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 - showAdditionalSettings: 8 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_PostProcessingSettings.asset b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_PostProcessingSettings.asset deleted file mode 100644 index 68e636c6777..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_PostProcessingSettings.asset +++ /dev/null @@ -1,190 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-7953912526439673537 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bcf384b154398e341b6b29969c078198, type: 3} - m_Name: MotionBlur - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - quality: - m_OverrideState: 0 - m_Value: 3 - intensity: - m_OverrideState: 1 - m_Value: 0.5 - min: 0 - maximumVelocity: - m_OverrideState: 0 - m_Value: 200 - min: 0 - max: 1500 - minimumVelocity: - m_OverrideState: 0 - m_Value: 2 - min: 0 - max: 64 - cameraRotationVelocityClamp: - m_OverrideState: 0 - m_Value: 0.03 - min: 0 - max: 0.2 - depthComparisonExtent: - m_OverrideState: 0 - m_Value: 1 - min: 0 - max: 20 - cameraMotionBlur: - m_OverrideState: 0 - m_Value: 1 - m_SampleCount: - m_OverrideState: 0 - m_Value: 8 - min: 2 ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} - m_Name: SampleScene_PostProcessingSettings - m_EditorClassIdentifier: - components: - - {fileID: 1243758200817775853} - - {fileID: 6741633909942615523} - - {fileID: -7953912526439673537} ---- !u!114 &1243758200817775853 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2c1be1b6c95cd2e41b27903b9270817f, type: 3} - m_Name: Vignette - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - mode: - m_OverrideState: 0 - m_Value: 0 - color: - m_OverrideState: 0 - m_Value: {r: 0, g: 0, b: 0, a: 1} - hdr: 0 - showAlpha: 0 - showEyeDropper: 1 - center: - m_OverrideState: 0 - m_Value: {x: 0.5, y: 0.5} - intensity: - m_OverrideState: 1 - m_Value: 0.2 - min: 0 - max: 1 - smoothness: - m_OverrideState: 0 - m_Value: 0.2 - min: 0.01 - max: 1 - roundness: - m_OverrideState: 0 - m_Value: 1 - min: 0 - max: 1 - rounded: - m_OverrideState: 0 - m_Value: 0 - mask: - m_OverrideState: 0 - m_Value: {fileID: 0} - opacity: - m_OverrideState: 0 - m_Value: 1 - min: 0 - max: 1 ---- !u!114 &6741633909942615523 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2d08ce26990eb1a4a9177b860541e702, type: 3} - m_Name: Exposure - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - mode: - m_OverrideState: 1 - m_Value: 0 - meteringMode: - m_OverrideState: 0 - m_Value: 2 - luminanceSource: - m_OverrideState: 0 - m_Value: 1 - fixedExposure: - m_OverrideState: 1 - m_Value: -1.35 - compensation: - m_OverrideState: 0 - m_Value: 0 - limitMin: - m_OverrideState: 0 - m_Value: -10 - limitMax: - m_OverrideState: 0 - m_Value: 20 - curveMap: - m_OverrideState: 0 - m_Value: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: -10 - value: -10 - inSlope: 0 - outSlope: 1 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 20 - value: 20 - inSlope: 1 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - adaptationMode: - m_OverrideState: 0 - m_Value: 1 - adaptationSpeedDarkToLight: - m_OverrideState: 0 - m_Value: 3 - min: 0.001 - adaptationSpeedLightToDark: - m_OverrideState: 0 - m_Value: 1 - min: 0.001 diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_RenderingOverrides.asset b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_RenderingOverrides.asset deleted file mode 100644 index b77ec7c08a9..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_RenderingOverrides.asset +++ /dev/null @@ -1,79 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-7050104594354352404 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a7ff42a8c5be6646ad3975f3a54c1eb, type: 3} - m_Name: DiffusionProfileOverride - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - diffusionProfiles: - m_OverrideState: 1 - m_Value: - - {fileID: 11400000, guid: 92119388ece825647ba5039062efc187, type: 2} ---- !u!114 &-1345864707780619217 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7ddcec8a8eb2d684d833ac8f5d26aebd, type: 3} - m_Name: HDShadowSettings - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - maxShadowDistance: - m_OverrideState: 1 - m_Value: 50 - min: 0 - cascadeShadowSplitCount: - m_OverrideState: 0 - m_Value: 4 - min: 1 - max: 4 - cascadeShadowSplit0: - m_OverrideState: 0 - m_Value: 0.05 - cascadeShadowSplit1: - m_OverrideState: 0 - m_Value: 0.15 - cascadeShadowSplit2: - m_OverrideState: 0 - m_Value: 0.3 - cascadeShadowBorder0: - m_OverrideState: 0 - m_Value: 0 - cascadeShadowBorder1: - m_OverrideState: 0 - m_Value: 0 - cascadeShadowBorder2: - m_OverrideState: 0 - m_Value: 0 - cascadeShadowBorder3: - m_OverrideState: 0 - m_Value: 0 ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} - m_Name: SampleScene_RenderingOverrides - m_EditorClassIdentifier: - components: - - {fileID: -7050104594354352404} - - {fileID: -1345864707780619217} diff --git a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset b/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset deleted file mode 100644 index 768aebb2d28..00000000000 --- a/com.unity.render-pipelines.high-definition/Samples~/ShaderGraphSamples/SampleScene_SkyAndFogSettings.asset +++ /dev/null @@ -1,311 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-8403843368353428522 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d877ec3e844f2ca46830012e8e79319b, type: 3} - m_Name: PhysicallyBasedSky - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - rotation: - m_OverrideState: 0 - m_Value: 0 - min: 0 - max: 360 - skyIntensityMode: - m_OverrideState: 0 - m_Value: 0 - exposure: - m_OverrideState: 0 - m_Value: 0 - multiplier: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxValue: - m_OverrideState: 0 - m_Value: 1 - min: 0 - desiredLuxValue: - m_OverrideState: 0 - m_Value: 20000 - updateMode: - m_OverrideState: 0 - m_Value: 0 - updatePeriod: - m_OverrideState: 0 - m_Value: 0 - min: 0 - includeSunInBaking: - m_OverrideState: 0 - m_Value: 0 - planetaryRadius: - m_OverrideState: 0 - m_Value: 6378.759 - min: 0 - planetCenterPosition: - m_OverrideState: 0 - m_Value: {x: 0, y: -6378.759, z: 0} - airAttenuationDistance: - m_OverrideState: 0 - m_Value: {r: 0.17241378, g: 0.074074075, b: 0.030211482, a: 1} - hdr: 1 - showAlpha: 0 - showEyeDropper: 0 - airAlbedo: - m_OverrideState: 0 - m_Value: {r: 0.9, g: 0.9, b: 1, a: 1} - hdr: 0 - showAlpha: 0 - showEyeDropper: 0 - airMaximumAltitude: - m_OverrideState: 0 - m_Value: 58.3 - min: 0 - aerosolAttenuationDistance: - m_OverrideState: 0 - m_Value: 0.5 - min: 0 - aerosolAlbedo: - m_OverrideState: 0 - m_Value: 0.9 - min: 0 - max: 1 - aerosolMaximumAltitude: - m_OverrideState: 0 - m_Value: 8.3 - min: 0 - aerosolAnisotropy: - m_OverrideState: 0 - m_Value: 0 - min: -1 - max: 1 - numberOfBounces: - m_OverrideState: 0 - m_Value: 8 - min: 1 - max: 10 - groundColor: - m_OverrideState: 0 - m_Value: {r: 0.4, g: 0.25, b: 0.15, a: 1} - hdr: 0 - showAlpha: 0 - showEyeDropper: 0 - groundAlbedoTexture: - m_OverrideState: 0 - m_Value: {fileID: 0} - groundEmissionTexture: - m_OverrideState: 0 - m_Value: {fileID: 0} - planetRotation: - m_OverrideState: 0 - m_Value: {x: 0, y: 0, z: 0} - spaceEmissionTexture: - m_OverrideState: 0 - m_Value: {fileID: 0} - spaceRotation: - m_OverrideState: 0 - m_Value: {x: 0, y: 0, z: 0} ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} - m_Name: SampleScene_SkyAndFogSettings - m_EditorClassIdentifier: - components: - - {fileID: 6042563956104857214} - - {fileID: 5015183341179822234} - - {fileID: -8403843368353428522} ---- !u!114 &596598944029034261 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3df29e7cc05fbec4aa43e06ea875565d, type: 3} - m_Name: - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - rotation: - m_OverrideState: 1 - m_Value: 0 - min: 0 - max: 360 - skyIntensityMode: - m_OverrideState: 1 - m_Value: 0 - exposure: - m_OverrideState: 1 - m_Value: 1 - multiplier: - m_OverrideState: 1 - m_Value: 1 - min: 0 - upperHemisphereLuxValue: - m_OverrideState: 1 - m_Value: 1 - min: 0 - desiredLuxValue: - m_OverrideState: 1 - m_Value: 20000 - updateMode: - m_OverrideState: 1 - m_Value: 0 - updatePeriod: - m_OverrideState: 1 - m_Value: 0 - min: 0 - includeSunInBaking: - m_OverrideState: 1 - m_Value: 0 - sunSize: - m_OverrideState: 1 - m_Value: 0.04 - min: 0 - max: 1 - sunSizeConvergence: - m_OverrideState: 1 - m_Value: 5 - min: 1 - max: 10 - atmosphereThickness: - m_OverrideState: 1 - m_Value: 1 - min: 0 - max: 5 - skyTint: - m_OverrideState: 1 - m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - groundColor: - m_OverrideState: 1 - m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - enableSunDisk: - m_OverrideState: 1 - m_Value: 1 ---- !u!114 &5015183341179822234 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 953beb541740ddc499d005ee80c9ff29, type: 3} - m_Name: Fog - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - enabled: - m_OverrideState: 1 - m_Value: 1 - colorMode: - m_OverrideState: 0 - m_Value: 1 - color: - m_OverrideState: 0 - m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} - hdr: 1 - showAlpha: 0 - showEyeDropper: 1 - maxFogDistance: - m_OverrideState: 0 - m_Value: 5000 - min: 0 - mipFogMaxMip: - m_OverrideState: 0 - m_Value: 0.5 - min: 0 - max: 1 - mipFogNear: - m_OverrideState: 0 - m_Value: 0 - min: 0 - mipFogFar: - m_OverrideState: 0 - m_Value: 1000 - min: 0 - baseHeight: - m_OverrideState: 0 - m_Value: 0 - maximumHeight: - m_OverrideState: 0 - m_Value: 50 - albedo: - m_OverrideState: 0 - m_Value: {r: 1, g: 1, b: 1, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - meanFreePath: - m_OverrideState: 0 - m_Value: 400 - min: 1 - enableVolumetricFog: - m_OverrideState: 1 - m_Value: 1 - anisotropy: - m_OverrideState: 0 - m_Value: 0 - min: -1 - max: 1 - globalLightProbeDimmer: - m_OverrideState: 0 - m_Value: 1 - min: 0 - max: 1 - depthExtent: - m_OverrideState: 0 - m_Value: 64 - min: 0.1 - sliceDistributionUniformity: - m_OverrideState: 0 - m_Value: 0.75 - min: 0 - max: 1 ---- !u!114 &6042563956104857214 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3} - m_Name: - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - skyType: - m_OverrideState: 1 - m_Value: 4 - skyAmbientMode: - m_OverrideState: 1 - m_Value: 0 - fogType: - m_OverrideState: 1 - m_Value: 2 diff --git a/com.unity.render-pipelines.high-definition/package.json b/com.unity.render-pipelines.high-definition/package.json index 39947d86a31..7986fb89021 100644 --- a/com.unity.render-pipelines.high-definition/package.json +++ b/com.unity.render-pipelines.high-definition/package.json @@ -24,11 +24,6 @@ "description" : "Adds additional post-processing data to your project, such as Lens Dirt textures.", "path" : "Samples~/PostProcessingData" }, - { - "displayName" : "Shader Graph Samples", - "description" : "Adds Shader Graph samples to your project. Open the SampleScene to see typical use cases for the Hair, Fabric, and Decal Master Nodes for Shader Graph.", - "path" : "Samples~/ShaderGraphSamples" - }, { "displayName" : "Procedural Sky", "description" : "Adds the deprecated procedural sky of HDRP.", From b3aac5202fabfdb06a7ae8e34fd472cce7929dd0 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Mon, 27 Apr 2020 16:21:33 +0200 Subject: [PATCH 116/200] [8.x.x backport] Fix quality settings UI and shadow mask UI [Depends on C++] (#124) * Update HDRenderPipeline.cs * Update HDRenderPipeline.cs * Update CHANGELOG.md * Update HDRenderPipeline.cs * fix typo * fix typo 2 --- .../CHANGELOG.md | 2 ++ .../RenderPipeline/HDRenderPipeline.cs | 26 +++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 6b53290ab98..1729d00da51 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -74,6 +74,7 @@ The version number for this package has increased due to a version update of a r - Fixed scalarization code for contact shadows - Fix MaterialBalls having same guid issue - Fix spelling and grammatical errors in material samples +- Fixed shadowmask UI now correctly showing shadowmask disable ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. @@ -86,6 +87,7 @@ The version number for this package has increased due to a version update of a r - Debug exposure in debug menu have been replace to debug exposure compensation in EV100 space and is always visible. - Cookie are now supported in lightmaper. All lights casting cookie and baked will now include cookie influence. - Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. Note that the diffusion profile or the material references need to be edited once before this can work properly. +- Shadowmask and realtime reflection probe property are hide in Quality settings ## [8.0.1] - 2020-02-25 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 fc6f433e7e5..8e5e4ca9b7e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -103,6 +103,12 @@ internal static Volume GetOrCreateDefaultVolume() readonly PostProcessSystem m_PostProcessSystem; readonly XRSystem m_XRSystem; + // Keep track of previous Graphic and QualitySettings value to reset when switching to another pipeline + bool m_PreviousLightsUseLinearIntensity; + bool m_PreviousLightsUseColorTemperature; + bool m_PreviousSRPBatcher; + ShadowmaskMode m_PreviousShadowMaskMode; + bool m_FrameSettingsHistoryEnabled = false; #if UNITY_EDITOR bool m_PreviousDisableCookieForLightBaking = false; @@ -663,16 +669,22 @@ void SetRenderingFeatures() Shader.globalRenderPipeline = "HDRenderPipeline"; // HD use specific GraphicsSettings + m_PreviousLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; GraphicsSettings.lightsUseLinearIntensity = true; + m_PreviousLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; GraphicsSettings.lightsUseColorTemperature = true; - + m_PreviousSRPBatcher = GraphicsSettings.useScriptableRenderPipelineBatching; GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; + // In case shadowmask mode isn't setup correctly, force it to correct usage (as there is no UI to fix it) + m_PreviousShadowMaskMode = QualitySettings.shadowmaskMode; + QualitySettings.shadowmaskMode = ShadowmaskMode.DistanceShadowmask; + SupportedRenderingFeatures.active = new SupportedRenderingFeatures() { reflectionProbeModes = SupportedRenderingFeatures.ReflectionProbeModes.Rotation, defaultMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly, - mixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly | SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask, + mixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly | (m_Asset.currentPlatformRenderPipelineSettings.supportShadowMask ? SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask : 0), lightmapBakeTypes = LightmapBakeType.Baked | LightmapBakeType.Mixed | LightmapBakeType.Realtime, lightmapsModes = LightmapsMode.NonDirectional | LightmapsMode.CombinedDirectional, lightProbeProxyVolumes = true, @@ -688,6 +700,8 @@ void SetRenderingFeatures() , overridesLODBias = true , overridesMaximumLODLevel = true , terrainDetailUnsupported = true + , overridesShadowmask = true // Don't display the shadow mask UI in Quality Settings + , overridesRealtimeReflectionProbes = true // Don't display the real time reflection probes checkbox UI in Quality Settings }; Lightmapping.SetDelegate(GlobalIlluminationUtils.hdLightsDelegate); @@ -781,10 +795,12 @@ void UnsetRenderingFeatures() { Shader.globalRenderPipeline = ""; - SupportedRenderingFeatures.active = new SupportedRenderingFeatures(); + GraphicsSettings.lightsUseLinearIntensity = m_PreviousLightsUseLinearIntensity; + GraphicsSettings.lightsUseColorTemperature = m_PreviousLightsUseColorTemperature; + GraphicsSettings.useScriptableRenderPipelineBatching = m_PreviousSRPBatcher; + QualitySettings.shadowmaskMode = m_PreviousShadowMaskMode; - // Reset srp batcher state just in case - GraphicsSettings.useScriptableRenderPipelineBatching = false; + SupportedRenderingFeatures.active = new SupportedRenderingFeatures(); Lightmapping.ResetDelegate(); From 3f6c2f2c0c10c35618f8d43ce7206a79591fcc8c Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Mon, 27 Apr 2020 16:23:40 +0200 Subject: [PATCH 117/200] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 1729d00da51..fd32fbcb022 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -6,8 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -Version Updated -The version number for this package has increased due to a version update of a related graphics package. +### Fixed +- Fixed shadowmask UI now correctly showing shadowmask disable + +### Changed +- Shadowmask and realtime reflection probe property are hide in Quality settings ## [8.1.0] - 2020-04-21 @@ -74,7 +77,6 @@ The version number for this package has increased due to a version update of a r - Fixed scalarization code for contact shadows - Fix MaterialBalls having same guid issue - Fix spelling and grammatical errors in material samples -- Fixed shadowmask UI now correctly showing shadowmask disable ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. From 990903f7744ebac999a9f8430906b9cb7e460ded Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Tue, 5 May 2020 19:59:16 +0200 Subject: [PATCH 118/200] [8.x.x Backport] Fix pre/post pass sg properties #82 (#86) * Fix depth pre/post passes not correctly enabled when switching shaders on the material # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs # com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs # com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs * Hide prepass and postpass in the material UI # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs * Updated changelog Co-authored-by: sebastienlagarde --- .../CHANGELOG.md | 1 + .../Editor/Material/Eye/ShaderGraph/EyeGUI.cs | 3 ++- .../Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs | 1 + .../Editor/Material/Fabric/ShaderGraph/FabricGUI.cs | 3 ++- .../Material/Fabric/ShaderGraph/FabricMasterNode.cs | 1 + .../Editor/Material/Hair/ShaderGraph/HairGUI.cs | 3 ++- .../Material/Hair/ShaderGraph/HairMasterNode.cs | 1 + .../Editor/Material/Lit/ShaderGraph/HDLitGUI.cs | 3 ++- .../Material/Lit/ShaderGraph/HDLitMasterNode.cs | 1 + .../Material/StackLit/ShaderGraph/StackLitGUI.cs | 3 ++- .../StackLit/ShaderGraph/StackLitMasterNode.cs | 1 + .../Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs | 12 ++++++++---- .../Editor/Material/Unlit/HDShaderGUI.cs | 3 ++- .../Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs | 3 ++- .../Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs | 1 + .../Editor/ShaderGraph/HDSubShaderUtilities.cs | 6 ++++++ 16 files changed, 35 insertions(+), 11 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index fd32fbcb022..1e7f2414d60 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -77,6 +77,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed scalarization code for contact shadows - Fix MaterialBalls having same guid issue - Fix spelling and grammatical errors in material samples +- Fixed depth prepass and postpass being disabled after changing the shader in the material UI. ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs index 083a42d386d..d3070c798a7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs @@ -14,7 +14,8 @@ class EyeGUI : HDShaderGUI // For surface option shader graph we only want all unlit features but alpha clip, back then front rendering and SSR const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass + ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs index db67c7bdc70..bc1fca3d904 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeMasterNode.cs @@ -783,6 +783,7 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera ); HDSubShaderUtilities.AddAlphaCutoffShaderProperties(collector, alphaTest.isOn, false); HDSubShaderUtilities.AddDoubleSidedProperty(collector, doubleSidedMode); + HDSubShaderUtilities.AddPrePostPassProperties(collector, alphaTestDepthPrepass.isOn, alphaTestDepthPostpass.isOn); base.CollectShaderProperties(collector, generationMode); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs index adf7cf976e7..f94a62156f2 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs @@ -15,7 +15,8 @@ class FabricGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass + ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs index dcdbacbe89f..070f81ac458 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricMasterNode.cs @@ -794,6 +794,7 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera ); HDSubShaderUtilities.AddAlphaCutoffShaderProperties(collector, alphaTest.isOn, false); HDSubShaderUtilities.AddDoubleSidedProperty(collector, doubleSidedMode); + HDSubShaderUtilities.AddPrePostPassProperties(collector, false, false); base.CollectShaderProperties(collector, generationMode); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs index fefeb3f5b21..e354ec5f0c0 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs @@ -15,7 +15,8 @@ class HairGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass + ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs index 9d7c6df5740..700b2149105 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairMasterNode.cs @@ -899,6 +899,7 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera ); HDSubShaderUtilities.AddAlphaCutoffShaderProperties(collector, alphaTest.isOn, alphaTestShadow.isOn); HDSubShaderUtilities.AddDoubleSidedProperty(collector, doubleSidedMode); + HDSubShaderUtilities.AddPrePostPassProperties(collector, alphaTestDepthPrepass.isOn, alphaTestDepthPostpass.isOn); base.CollectShaderProperties(collector, generationMode); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs index f0f3d03b87d..e41bc36ed26 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs @@ -15,7 +15,8 @@ class HDLitGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass + ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs index 4a416f917a6..e5062d7e708 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs @@ -1119,6 +1119,7 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera ); HDSubShaderUtilities.AddAlphaCutoffShaderProperties(collector, alphaTest.isOn, alphaTestShadow.isOn); HDSubShaderUtilities.AddDoubleSidedProperty(collector, doubleSidedMode); + HDSubShaderUtilities.AddPrePostPassProperties(collector, alphaTestDepthPrepass.isOn, alphaTestDepthPostpass.isOn); base.CollectShaderProperties(collector, generationMode); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs index dba83b9b46a..aec2a60c1b8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs @@ -15,7 +15,8 @@ class StackLitGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass + ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs index 5a26461c754..6a212a98848 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitMasterNode.cs @@ -1424,6 +1424,7 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera ); HDSubShaderUtilities.AddAlphaCutoffShaderProperties(collector, alphaTest.isOn, false); HDSubShaderUtilities.AddDoubleSidedProperty(collector, doubleSidedMode); + HDSubShaderUtilities.AddPrePostPassProperties(collector, false, false); base.CollectShaderProperties(collector, generationMode); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs index 053bac86cbd..86bc32c050e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs @@ -26,6 +26,7 @@ public enum Features ReceiveSSR = 1 << 8, ShowAfterPostProcessPass = 1 << 9, Unlit = Surface | BlendMode | DoubleSided | DoubleSidedNormalMode | AlphaCutoff | AlphaCutoffShadowThreshold | AlphaCutoffThreshold | BackThenFrontRendering | ShowAfterPostProcessPass, + ShowPrePassAndPostPass = 1 << 11, Lit = All, All = ~0, } @@ -483,11 +484,14 @@ void DrawSurfaceGUI() if (transparentBackfaceEnable != null) materialEditor.ShaderProperty(transparentBackfaceEnable, Styles.transparentBackfaceEnableText); - if (transparentDepthPrepassEnable != null) - materialEditor.ShaderProperty(transparentDepthPrepassEnable, Styles.transparentDepthPrepassEnableText); + if ((m_Features & Features.ShowPrePassAndPostPass) != 0) + { + if (transparentDepthPrepassEnable != null) + materialEditor.ShaderProperty(transparentDepthPrepassEnable, Styles.transparentDepthPrepassEnableText); - if (transparentDepthPostpassEnable != null) - materialEditor.ShaderProperty(transparentDepthPostpassEnable, Styles.transparentDepthPostpassEnableText); + if (transparentDepthPostpassEnable != null) + materialEditor.ShaderProperty(transparentDepthPostpassEnable, Styles.transparentDepthPostpassEnableText); + } if (transparentWritingMotionVec != null) materialEditor.ShaderProperty(transparentWritingMotionVec, Styles.transparentWritingMotionVecText); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs index 0c887989336..01994b5ccc1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs @@ -90,7 +90,8 @@ protected static void ResetMaterialCustomRenderQueue(Material material) } readonly static string[] floatPropertiesToSynchronize = { - "_UseShadowThreshold", kReceivesSSR, kUseSplitLighting + "_UseShadowThreshold", kReceivesSSR, kUseSplitLighting, + kTransparentDepthPrepassEnable, kTransparentDepthPostpassEnable }; protected static void SynchronizeShaderGraphProperties(Material material) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs index a3f577a6075..9d91aadf2a9 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs @@ -16,7 +16,8 @@ class HDUnlitGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.DoubleSidedNormalMode - ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering; + ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering + ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs index 796960e98f0..3ad1dc98b42 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitMasterNode.cs @@ -495,6 +495,7 @@ public override void CollectShaderProperties(PropertyCollector collector, Genera ); HDSubShaderUtilities.AddAlphaCutoffShaderProperties(collector, alphaTest.isOn, false); HDSubShaderUtilities.AddDoubleSidedProperty(collector, doubleSided.isOn ? DoubleSidedMode.Enabled : DoubleSidedMode.Disabled); + HDSubShaderUtilities.AddPrePostPassProperties(collector, false, false); base.CollectShaderProperties(collector, generationMode); } diff --git a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs index dd362a78cfa..e3e2f90883d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs +++ b/com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs @@ -1336,6 +1336,12 @@ public static void AddDoubleSidedProperty(PropertyCollector collector, DoubleSid }); } + public static void AddPrePostPassProperties(PropertyCollector collector, bool prepass, bool postpass) + { + collector.AddToggleProperty(kTransparentDepthPrepassEnable, prepass); + collector.AddToggleProperty(kTransparentDepthPostpassEnable, postpass); + } + public static string RenderQueueName(HDRenderQueue.RenderQueueType value) { switch (value) From 414135567fe83160ea22e25fdc8a147d6f6cbfd1 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Wed, 6 May 2020 00:03:13 +0200 Subject: [PATCH 119/200] - Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). (#285) --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 1e7f2414d60..6c734558706 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed shadowmask UI now correctly showing shadowmask disable +- Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings 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 8e5e4ca9b7e..bbdf5c69be5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1072,6 +1072,10 @@ void PushGlobalParams(HDCamera hdCamera, CommandBuffer cmd) // Bind the camera's ray tracing frame index cmd.SetGlobalInt(HDShaderIDs._RaytracingFrameIndex, RayTracingFrameIndex(hdCamera)); } + else + { + cmd.SetGlobalInt(HDShaderIDs._RaytracedIndirectDiffuse, 0); + } cmd.SetGlobalFloat(HDShaderIDs._ContactShadowOpacity, m_ContactShadows.opacity.value); } } From 407d7ece58afee0882fc84be08efe3987763d520 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Wed, 6 May 2020 00:05:52 +0200 Subject: [PATCH 120/200] Fixed a performance issue with stochastic ray traced area shadows. (#310) Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Raytracing/Shaders/Shadows/SphericalQuad.hlsl | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 6c734558706..800cdbf9f16 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed shadowmask UI now correctly showing shadowmask disable - Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). +- Fixed a performance issue with stochastic ray traced area shadows. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Shadows/SphericalQuad.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Shadows/SphericalQuad.hlsl index a2edee5e38f..48f5b932b71 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Shadows/SphericalQuad.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Shadows/SphericalQuad.hlsl @@ -1,7 +1,11 @@ +// I am not sure why exactly, by a lower epsilon generates ray that even if they give a valid result with ray tracing +// nuke the performance. Changing the epsilon from 1e-6 to 1e-5 seems to solve the issue. +#define PLANE_INTERSECTION_EPSILON 1e-5 + bool IntersectPlane(float3 ray_origin, float3 ray_dir, float3 pos, float3 normal, out float t) { float denom = dot(normal, ray_dir); - if (abs(denom) > 1e-6) + if (abs(denom) > PLANE_INTERSECTION_EPSILON) { float3 d = pos - ray_origin; t = dot(d, normal) / denom; From 1b9cdc290cc2a76f4be1e986d04dde721c6af52b Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 6 May 2020 10:04:59 +0200 Subject: [PATCH 121/200] [Backport 8.x.x] Updated raytracing async compute warning. (#305) * Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. * Update changelog Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../RenderPipeline/Settings/FrameSettingsUI.Drawers.cs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 800cdbf9f16..7431638907b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shadowmask UI now correctly showing shadowmask disable - Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). - Fixed a performance issue with stochastic ray traced area shadows. +- Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs index 3a5972baca5..38e6edc192a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs @@ -105,8 +105,11 @@ internal static CED.IDrawer InspectorInnerbox(bool withOverride = true) => CED.G RenderPipelineSettings hdrpSettings = GetHDRPAssetFor(owner).currentPlatformRenderPipelineSettings; if (hdrpSettings.supportRayTracing) { - if (serialized.IsEnabled(FrameSettingsField.AsyncCompute) ?? false) - EditorGUILayout.HelpBox("With Raytracing, the Asynchronous Execution will be forced to false", MessageType.Warning); + bool rtEffectUseAsync = (serialized.IsEnabled(FrameSettingsField.SSRAsync) ?? false) || (serialized.IsEnabled(FrameSettingsField.SSAOAsync) ?? false) + //|| (serialized.IsEnabled(FrameSettingsField.ContactShadowsAsync) ?? false) // Contact shadow async is not visible in the UI for now and defaults to true. + ; + if (rtEffectUseAsync) + EditorGUILayout.HelpBox("Asynchronous execution of Raytracing effects is not supported. Asynchronous Execution will be forced to false for them", MessageType.Warning); } })); From 102ce9989b9df6efa664da73a06c9c065a6f502c Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 6 May 2020 10:07:10 +0200 Subject: [PATCH 122/200] [Backport 8.x.x] Fixed a null ref exception in static sky when the default volume profile is invalid. (#302) * Fixed a null ref exception in static sky when the default volume profile is invalid. * Update changelog. --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Sky/StaticLightingSky.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7431638907b..54c9ce8cf50 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). - Fixed a performance issue with stochastic ray traced area shadows. - Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. +- Fixed a null ref exception in static sky when the default volume profile is invalid. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs index d3aa6bb1293..14822937688 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs @@ -125,7 +125,9 @@ void UpdateCurrentStaticLightingSky() var profileSkyParameters = m_SkySettingsFromProfile.parameters; var defaultVolume = HDRenderPipeline.GetOrCreateDefaultVolume(); - defaultVolume.sharedProfile.TryGet(skyType, out SkySettings defaultSky); + SkySettings defaultSky = null; + if (defaultVolume.sharedProfile != null) // This can happen with old projects. + defaultVolume.sharedProfile.TryGet(skyType, out defaultSky); var defaultSkyParameters = defaultSky != null ? defaultSky.parameters : null; // Can be null if the profile does not contain the component. // Seems to inexplicably happen sometimes on domain reload. From 1f9ee66d521ccd59498f6c7c83b28121d8f850c4 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 6 May 2020 10:10:59 +0200 Subject: [PATCH 123/200] [Backport 8.x.x] Fixed an error about procedural sky being logged by mistake. (#308) * Fixed an error about procedural sky being logged by mistake. * Update changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Sky/VisualEnvironment.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 54c9ce8cf50..588e419a68d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a performance issue with stochastic ray traced area shadows. - Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. - Fixed a null ref exception in static sky when the default volume profile is invalid. +- Fixed an error about procedural sky being logged by mistake. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs index 531e03b333f..94618852e64 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs @@ -11,7 +11,7 @@ namespace UnityEngine.Rendering.HighDefinition public sealed class VisualEnvironment : VolumeComponent { /// Type of sky that should be used for rendering. - public IntParameter skyType = new IntParameter(0); + public NoInterpIntParameter skyType = new NoInterpIntParameter(0); /// Defines the way the ambient probe should be computed. public SkyAmbientModeParameter skyAmbientMode = new SkyAmbientModeParameter(SkyAmbientMode.Static); From 0b29892784b6f04bd28afde0dce826ecbd9138f2 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 6 May 2020 10:14:10 +0200 Subject: [PATCH 124/200] [Backport 8.x.x] Hdrp/public static sky (#309) * Made the static lighting sky public so that users can change it by script for baking purpose. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs * Update changelog --- .../CHANGELOG.md | 1 + .../Runtime/Sky/StaticLightingSky.cs | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 588e419a68d..ce4de18c909 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings +- Made the StaticLightingSky class public so that users can change it by script for baking purpose. ## [8.1.0] - 2020-04-21 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs index 14822937688..16729facca7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs @@ -4,10 +4,13 @@ namespace UnityEngine.Rendering.HighDefinition { + /// + /// Class controlling which sky is used for static and baked lighting. + /// [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "Static-Lighting-Sky" + Documentation.endURL)] [ExecuteAlways] [AddComponentMenu("")] // Hide this object from the Add Component menu - class StaticLightingSky : MonoBehaviour + public class StaticLightingSky : MonoBehaviour { [SerializeField] VolumeProfile m_Profile; @@ -16,12 +19,10 @@ class StaticLightingSky : MonoBehaviour int m_LastComputedHash; bool m_NeedUpdateStaticLightingSky; - [NonSerialized] - public SkySettings m_SkySettings; // This one contain only property values from overridden properties in the original profile component - [NonSerialized] - public SkySettings m_SkySettingsFromProfile; + SkySettings m_SkySettings; // This one contain only property values from overridden properties in the original profile component + SkySettings m_SkySettingsFromProfile; - public SkySettings skySettings + internal SkySettings skySettings { get { @@ -42,7 +43,9 @@ public SkySettings skySettings List m_VolumeSkyList = new List(); - + /// + /// Volume profile where the sky settings used for static lighting will be fetched. + /// public VolumeProfile profile { get @@ -69,6 +72,10 @@ public VolumeProfile profile } } + /// + /// Unique ID of the sky used for static lighting. + /// The unique ID should be for a sky that is present in the profile. See SkySettings.GetUniqueID to get the ID per sky type. + /// public int staticLightingSkyUniqueID { get From 80ea1a3ee7bfdf683e1230158f4412acae401cce Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 6 May 2020 14:28:48 +0200 Subject: [PATCH 125/200] [Backport 8.x.x] Added a function to reset the reference size of RTHandle systems. (#378) * Added a function (HDRenderPipeline.ResetRTHandleReferenceSize) to reset the reference size of RTHandle systems. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs * Update changelog * Update CHANGELOG.md Co-authored-by: sebastienlagarde --- .../Runtime/RenderGraph/RenderGraph.cs | 11 +++++++++++ .../RenderGraph/RenderGraphResourceRegistry.cs | 5 +++++ .../Runtime/Textures/BufferedRTHandleSystem.cs | 11 +++++++++++ .../Runtime/Textures/RTHandleSystem.cs | 16 ++++++++++++++-- .../Runtime/Textures/RTHandles.cs | 10 ++++++++++ .../CHANGELOG.md | 3 +++ .../Runtime/RenderPipeline/Camera/HDCamera.cs | 14 ++++++++++++++ .../Runtime/RenderPipeline/HDRenderPipeline.cs | 18 ++++++++++++++++-- 8 files changed, 84 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs index a9f9c22b96c..aeeb5986e1a 100644 --- a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs +++ b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs @@ -236,6 +236,17 @@ public void UnRegisterDebug() //m_DebugParameters.UnRegisterDebug(); } + /// + /// Resets the reference size of the internal RTHandle System. + /// This allows users to reduce the memory footprint of render textures after doing a super sampled rendering pass for example. + /// + /// New width of the internal RTHandle System. + /// New height of the internal RTHandle System. + public void ResetRTHandleReferenceSize(int width, int height) + { + m_Resources.ResetRTHandleReferenceSize(width, height); + } + /// /// Import an external texture to the Render Graph. /// diff --git a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs index 292d96b51b4..f8b5fc64097 100644 --- a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs +++ b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs @@ -659,6 +659,11 @@ internal void Clear() #endif } + internal void ResetRTHandleReferenceSize(int width, int height) + { + m_RTHandleSystem.ResetReferenceSize(width, height); + } + internal void Cleanup() { foreach (var value in m_TexturePool) diff --git a/com.unity.render-pipelines.core/Runtime/Textures/BufferedRTHandleSystem.cs b/com.unity.render-pipelines.core/Runtime/Textures/BufferedRTHandleSystem.cs index 7d10f4fe881..51888e2e4aa 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/BufferedRTHandleSystem.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/BufferedRTHandleSystem.cs @@ -134,6 +134,17 @@ public void SwapAndSetReferenceSize(int width, int height, MSAASamples msaaSampl m_RTHandleSystem.SetReferenceSize(width, height, msaaSamples); } + /// + /// Reset the reference size of the system and reallocate all textures. + /// + /// New width. + /// New height. + public void ResetReferenceSize(int width, int height) + { + m_RTHandleSystem.ResetReferenceSize(width, height); + } + + void Swap() { foreach (var item in m_RTHandles) diff --git a/com.unity.render-pipelines.core/Runtime/Textures/RTHandleSystem.cs b/com.unity.render-pipelines.core/Runtime/Textures/RTHandleSystem.cs index 155686bc188..2f75277b5af 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/RTHandleSystem.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/RTHandleSystem.cs @@ -125,13 +125,25 @@ internal void Remove(RTHandle rth) m_AutoSizedRTs.Remove(rth); } + /// + /// Reset the reference size of the system and reallocate all textures. + /// + /// New width. + /// New height. + public void ResetReferenceSize(int width, int height) + { + m_MaxWidths = width; + m_MaxHeights = height; + SetReferenceSize(width, height, m_ScaledRTCurrentMSAASamples, reset: true); + } + /// /// Sets the reference rendering size for subsequent rendering for the RTHandle System /// /// Reference rendering width for subsequent rendering. /// Reference rendering height for subsequent rendering. /// Number of MSAA samples for multisampled textures for subsequent rendering. - public void SetReferenceSize(int width, int height, MSAASamples msaaSamples) + public void SetReferenceSize(int width, int height, MSAASamples msaaSamples, bool reset = false) { m_RTHandleProperties.previousViewportSize = m_RTHandleProperties.currentViewportSize; m_RTHandleProperties.previousRenderTargetSize = m_RTHandleProperties.currentRenderTargetSize; @@ -140,7 +152,7 @@ public void SetReferenceSize(int width, int height, MSAASamples msaaSamples) width = Mathf.Max(width, 1); height = Mathf.Max(height, 1); - bool sizeChanged = width > GetMaxWidth() || height > GetMaxHeight(); + bool sizeChanged = width > GetMaxWidth() || height > GetMaxHeight() || reset; bool msaaSamplesChanged = (msaaSamples != m_ScaledRTCurrentMSAASamples); if (sizeChanged || msaaSamplesChanged) diff --git a/com.unity.render-pipelines.core/Runtime/Textures/RTHandles.cs b/com.unity.render-pipelines.core/Runtime/Textures/RTHandles.cs index 4b748445f94..8ad0ff6c6a3 100644 --- a/com.unity.render-pipelines.core/Runtime/Textures/RTHandles.cs +++ b/com.unity.render-pipelines.core/Runtime/Textures/RTHandles.cs @@ -294,5 +294,15 @@ MSAASamples msaaSamples msaaSamples ); } + + /// + /// Reset the reference size of the system and reallocate all textures. + /// + /// New width. + /// New height. + public static void ResetReferenceSize(int width, int height) + { + s_DefaultInstance.ResetReferenceSize(width, height); + } } } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ce4de18c909..a3889a21019 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added +- Added a function (HDRenderPipeline.ResetRTHandleReferenceSize) to reset the reference size of RTHandle systems. + ### Fixed - Fixed shadowmask UI now correctly showing shadowmask disable - Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). 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 f935ef4e77a..3c15fd2be24 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 @@ -555,6 +555,20 @@ internal static void CleanUnused() s_Cleanup.Clear(); } + internal static void ResetAllHistoryRTHandleSystems(int width, int height) + { + foreach (var kvp in s_Cameras) + { + var hdCamera = kvp.Value; + var currentHistorySize = hdCamera.m_HistoryRTSystem.rtHandleProperties.currentRenderTargetSize; + // We only reset if the new size if smaller than current reference (otherwise we might increase the size of off screen camera with lower resolution than the new reference. + if (width < currentHistorySize.x || height < currentHistorySize.y) + { + hdCamera.m_HistoryRTSystem.ResetReferenceSize(width, height); + } + } + } + // Set up UnityPerView CBuffer. internal void SetupGlobalParams(CommandBuffer cmd, int frameCount) { 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 bbdf5c69be5..cfd9915aa6e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -567,6 +567,20 @@ void ValidateResources() #endif + /// + /// Resets the reference size of the internal RTHandle System. + /// This allows users to reduce the memory footprint of render textures after doing a super sampled rendering pass for example. + /// + /// New width of the internal RTHandle System. + /// New height of the internal RTHandle System. + public void ResetRTHandleReferenceSize(int width, int height) + { + RTHandles.ResetReferenceSize(width, height); + HDCamera.ResetAllHistoryRTHandleSystems(width, height); + if (m_RenderGraph != null) + m_RenderGraph.ResetRTHandleReferenceSize(width, height); + } + void InitializeRenderTextures() { RenderPipelineSettings settings = m_Asset.currentPlatformRenderPipelineSettings; @@ -971,7 +985,7 @@ void DisposeProbeCameraPool() // Dispose of Render Pipeline can be call either by OnValidate() or by OnDisable(). // Inside an OnValidate() call we can't call a DestroyImmediate(). // Here we are releasing our singleton to not leak while doing a domain reload. - // However this is doing a call to DestroyImmediate(). + // However this is doing a call to DestroyImmediate(). // To workaround this, and was we only leak with Singleton while doing domain reload (and not in OnValidate) // we are detecting if we are in an OnValidate call and releasing the Singleton only if it is not the case. if (!m_Asset.isInOnValidateCall) @@ -3142,7 +3156,7 @@ void RenderDBuffer(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext { // We still bind black textures to make sure that something is bound (can be a problem on some platforms) m_DbufferManager.BindBlackTextures(cmd); - + // Bind buffer to make sure that something is bound . cmd.SetGlobalBuffer(HDShaderIDs._DecalPropertyMaskBufferSRV, m_DbufferManager.propertyMaskBuffer); From d861f7a6cd7395c20b9c5452a6e501ece67498da Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 6 May 2020 14:29:57 +0200 Subject: [PATCH 126/200] [Backport 8.x.x] Fix flickering lighting in the scene and game view when lookdev is open. (#380) * Fixed flickering of the game/scene view when lookdev is running. * Update changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Sky/SkyManager.cs | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a3889a21019..7fca9c8c66d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. - Fixed a null ref exception in static sky when the default volume profile is invalid. - Fixed an error about procedural sky being logged by mistake. +- Fixed flickering of the game/scene view when lookdev is running. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs index 52bb03f685c..1192bc4e189 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -697,7 +697,7 @@ public void UpdateEnvironment( HDCamera hdCamera, // This is to avoid cases in which the probe camera is below ground and the parent is not, leading to // in case of PBR sky to a black sky. All other parameters are left as is. // This can introduce inaccuracies, but they should be acceptable if the distance parent camera - probe camera is - // small. + // small. if (hdCamera.camera.cameraType == CameraType.Reflection && hdCamera.parentCamera != null) { worldSpaceCameraPos = hdCamera.parentCamera.transform.position; @@ -794,13 +794,14 @@ public void UpdateEnvironment(HDCamera hdCamera, ScriptableRenderContext renderC // because we only maintain one static sky. Since we don't care that the static lighting may be a bit different in the preview we never recompute // and we use the one from the main camera. bool forceStaticUpdate = false; + StaticLightingSky staticLightingSky = GetStaticLightingSky(); #if UNITY_EDITOR - // In the editor, we might need the static sky ready for baking lightmaps/lightprobes regardless of the current ambient mode so we force it to update in this case. - forceStaticUpdate = true; + // In the editor, we might need the static sky ready for baking lightmaps/lightprobes regardless of the current ambient mode so we force it to update in this case if it's not been computed yet.. + // We don't test if the hash of the static sky has changed here because it depends on the sun direction and in the case of LookDev, sun will be different from the main rendering so it will induce improper recomputation. + forceStaticUpdate = staticLightingSky != null && m_StaticLightingSky.skyParametersHash == -1; ; #endif if ((ambientMode == SkyAmbientMode.Static || forceStaticUpdate) && hdCamera.camera.cameraType != CameraType.Preview) { - StaticLightingSky staticLightingSky = GetStaticLightingSky(); if (staticLightingSky != null) { m_StaticLightingSky.skySettings = staticLightingSky.skySettings; From b25af4a800e71fbc1e75e7da240248c4cd7da7d2 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 6 May 2020 14:38:49 +0200 Subject: [PATCH 127/200] [8.x.x Backport] Fix issue with ambient probe not being correct with OnEnable/OnDemand probes (#316) * render until ambient probe is ready * remove comment * changelog --- .../CHANGELOG.md | 1 + .../Runtime/Lighting/Reflection/HDProbe.cs | 7 +++ .../RenderPipeline/HDRenderPipeline.cs | 44 ++++++++++++------- .../Runtime/Sky/SkyManager.cs | 18 ++++++++ .../Runtime/Sky/SkyRenderingContext.cs | 4 ++ 5 files changed, 58 insertions(+), 16 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7fca9c8c66d..d31f1a2bc1f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -664,6 +664,7 @@ The version number for this package has increased due to a version update of a r - Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' - Fix Wizard load when none selected for RenderPipelineAsset - Fixed issue with unclear naming of debug menu for decals. +- Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs index d7acda444b7..145981a32b3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs @@ -428,6 +428,13 @@ public virtual void PrepareCulling() { } ///
public void RequestRenderNextUpdate() => m_WasRenderedSinceLastOnDemandRequest = false; + // Forces the re-rendering for both OnDemand and OnEnable + internal void ForceRenderingNextUpdate() + { + m_WasRenderedSinceLastOnDemandRequest = false; + wasRenderedAfterOnEnable = false; + } + void UpdateProbeName() { // TODO: ask if this is ok: 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 cfd9915aa6e..dc84a5702d2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1647,6 +1647,14 @@ ref _cullingResults continue; } + // HACK! We render the probe until we know the ambient probe for the associated sky context is ready. + // For one-off rendering the dynamic ambient probe will be set to black until they are not processed, leading to faulty rendering. + // So we enqueue another rendering and then we will not set the probe texture until we have rendered with valid ambient probe. + if (!m_SkyManager.HasSetValidAmbientProbe(hdCamera)) + { + visibleProbe.ForceRenderingNextUpdate(); + } + hdCamera.parentCamera = parentCamera; // Used to inherit the properties of the view HDAdditionalCameraData hdCam; @@ -1693,26 +1701,30 @@ ref _cullingResults // TODO: store DecalCullResult }; - // As we render realtime texture on GPU side, we must tag the texture so our texture array cache detect that something have change - visibleProbe.realtimeTexture.IncrementUpdateCount(); - - if (cameraSettings.Count > 1) + if (m_SkyManager.HasSetValidAmbientProbe(hdCamera)) { - var face = (CubemapFace)j; - request.target = new RenderRequest.Target + // As we render realtime texture on GPU side, we must tag the texture so our texture array cache detect that something have change + visibleProbe.realtimeTexture.IncrementUpdateCount(); + + if (cameraSettings.Count > 1) { - copyToTarget = visibleProbe.realtimeTexture, - face = face - }; - } - else - { - request.target = new RenderRequest.Target + var face = (CubemapFace)j; + request.target = new RenderRequest.Target + { + copyToTarget = visibleProbe.realtimeTexture, + face = face + }; + } + else { - id = visibleProbe.realtimeTexture, - face = CubemapFace.Unknown - }; + request.target = new RenderRequest.Target + { + id = visibleProbe.realtimeTexture, + face = CubemapFace.Unknown + }; + } } + renderRequests.Add(request); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs index 1192bc4e189..ba9ba4d50de 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -413,6 +413,24 @@ internal SphericalHarmonicsL2 GetAmbientProbe(HDCamera hdCamera) return GetAmbientProbe(hdCamera.lightingSky); } + internal bool HasSetValidAmbientProbe(HDCamera hdCamera) + { + SkyAmbientMode ambientMode = hdCamera.volumeStack.GetComponent().skyAmbientMode.value; + if (ambientMode == SkyAmbientMode.Static) + return true; + + if (hdCamera.skyAmbientMode == SkyAmbientMode.Dynamic && hdCamera.lightingSky != null && + hdCamera.lightingSky.IsValid() && IsCachedContextValid(hdCamera.lightingSky)) + { + ref CachedSkyContext cachedContext = ref m_CachedSkyContexts[hdCamera.lightingSky.cachedSkyRenderingContextId]; + var renderingContext = cachedContext.renderingContext; + return renderingContext.ambientProbeIsReady; + } + + return false; + + } + internal void SetupAmbientProbe(HDCamera hdCamera) { // Working around GI current system diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderingContext.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderingContext.cs index d03791d1d2b..9016477b396 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderingContext.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderingContext.cs @@ -14,6 +14,8 @@ internal class SkyRenderingContext public CubemapArray skyboxBSDFCubemapArray { get; private set; } public bool supportsConvolution { get; private set; } = false; + internal bool ambientProbeIsReady = false; + public SkyRenderingContext(int resolution, int bsdfCount, bool supportsConvolution, SphericalHarmonicsL2 ambientProbe, string name) { m_AmbientProbe = ambientProbe; @@ -71,6 +73,8 @@ public void OnComputeAmbientProbeDone(AsyncGPUReadbackRequest request) m_AmbientProbe[channel, coeff] = result[channel * 9 + coeff]; } } + + ambientProbeIsReady = true; } } } From 31b0f5218a61ac4558726f6bddf805a6584cca58 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 14 May 2020 14:00:18 +0200 Subject: [PATCH 128/200] [Backport 8.x.x] Fixed some gcalloc in the debug window (#465) * Fixed some GCAlloc in the debug window # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Debug/VolumeDebug.cs * Update changelog --- .../Editor/Debugging/DebugUIDrawer.cs | 4 +++- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.cs b/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.cs index 2dd6c162e83..38845ceeda3 100644 --- a/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.cs +++ b/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.cs @@ -36,10 +36,12 @@ protected T Cast(object o) where T : class { var casted = o as T; - string typeName = o == null ? "null" : o.GetType().ToString(); if (casted == null) + { + string typeName = o == null ? "null" : o.GetType().ToString(); throw new InvalidOperationException("Can't cast " + typeName + " to " + typeof(T)); + } return casted; } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d31f1a2bc1f..2687bc4f62a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a null ref exception in static sky when the default volume profile is invalid. - Fixed an error about procedural sky being logged by mistake. - Fixed flickering of the game/scene view when lookdev is running. +- Fixed some GCAlloc in the debug window. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings From da8c76de5e45921545b0a32823d2ae9066eda5f7 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 14 May 2020 14:01:21 +0200 Subject: [PATCH 129/200] [Backport 8.x.x] Hdrp/small ui update (#467) * Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Sky/AtmosphericScattering/FogEditor.cs * Update changelog --- .../CHANGELOG.md | 1 + .../Lighting/Shadow/ContactShadowsEditor.cs | 29 +++++++++---------- .../Sky/AtmosphericScattering/FogEditor.cs | 26 ++++++++--------- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 2687bc4f62a..2c2dbb99fba 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an error about procedural sky being logged by mistake. - Fixed flickering of the game/scene view when lookdev is running. - Fixed some GCAlloc in the debug window. +- Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs index 8f365d80abc..a97685d796e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs @@ -40,22 +40,19 @@ public override void OnInspectorGUI() if (!m_Enable.value.hasMultipleDifferentValues) { - using (new EditorGUI.DisabledGroupScope(!m_Enable.value.boolValue)) - { - PropertyField(m_Length, EditorGUIUtility.TrTextContent("Length", "Controls the length of the rays HDRP uses to calculate Contact Shadows. Uses meters.")); - PropertyField(m_DistanceScaleFactor, EditorGUIUtility.TrTextContent("Distance Scale Factor", "Dampens the scale up effect HDRP process with distance from the Camera.")); - m_MinDistance.value.floatValue = Mathf.Clamp(m_MinDistance.value.floatValue, 0.0f, m_MaxDistance.value.floatValue); - PropertyField(m_MinDistance, EditorGUIUtility.TrTextContent("Min Distance", "Sets the distance from the camera at which HDRP begins to fade in Contact Shadows. Uses meters.")); - PropertyField(m_MaxDistance, EditorGUIUtility.TrTextContent("Max Distance", "Sets the distance from the Camera at which HDRP begins to fade out Contact Shadows. Uses meters.")); - m_FadeInDistance.value.floatValue = Mathf.Clamp(m_FadeInDistance.value.floatValue, 0.0f, m_MaxDistance.value.floatValue); - PropertyField(m_FadeInDistance, EditorGUIUtility.TrTextContent("Fade In Distance", "Sets the distance over which HDRP fades Contact Shadows in when past the Min Distance. Uses meters.")); - PropertyField(m_FadeDistance, EditorGUIUtility.TrTextContent("Fade Out Distance", "Sets the distance over which HDRP fades Contact Shadows out when at the Max Distance. Uses meters.")); - PropertyField(m_Opacity, EditorGUIUtility.TrTextContent("Opacity", "Controls the opacity of the Contact Shadow.")); - base.OnInspectorGUI(); - GUI.enabled = useCustomValue; - PropertyField(m_SampleCount, EditorGUIUtility.TrTextContent("Sample Count", "Controls the number of samples HDRP uses for ray casting.")); - GUI.enabled = true; - } + PropertyField(m_Length, EditorGUIUtility.TrTextContent("Length", "Controls the length of the rays HDRP uses to calculate Contact Shadows. Uses meters.")); + PropertyField(m_DistanceScaleFactor, EditorGUIUtility.TrTextContent("Distance Scale Factor", "Dampens the scale up effect HDRP process with distance from the Camera.")); + m_MinDistance.value.floatValue = Mathf.Clamp(m_MinDistance.value.floatValue, 0.0f, m_MaxDistance.value.floatValue); + PropertyField(m_MinDistance, EditorGUIUtility.TrTextContent("Min Distance", "Sets the distance from the camera at which HDRP begins to fade in Contact Shadows. Uses meters.")); + PropertyField(m_MaxDistance, EditorGUIUtility.TrTextContent("Max Distance", "Sets the distance from the Camera at which HDRP begins to fade out Contact Shadows. Uses meters.")); + m_FadeInDistance.value.floatValue = Mathf.Clamp(m_FadeInDistance.value.floatValue, 0.0f, m_MaxDistance.value.floatValue); + PropertyField(m_FadeInDistance, EditorGUIUtility.TrTextContent("Fade In Distance", "Sets the distance over which HDRP fades Contact Shadows in when past the Min Distance. Uses meters.")); + PropertyField(m_FadeDistance, EditorGUIUtility.TrTextContent("Fade Out Distance", "Sets the distance over which HDRP fades Contact Shadows out when at the Max Distance. Uses meters.")); + PropertyField(m_Opacity, EditorGUIUtility.TrTextContent("Opacity", "Controls the opacity of the Contact Shadow.")); + base.OnInspectorGUI(); + GUI.enabled = useCustomValue; + PropertyField(m_SampleCount, EditorGUIUtility.TrTextContent("Sample Count", "Controls the number of samples HDRP uses for ray casting.")); + GUI.enabled = true; } } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/AtmosphericScattering/FogEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Sky/AtmosphericScattering/FogEditor.cs index ce918bb696b..26a6e07fb47 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Sky/AtmosphericScattering/FogEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/AtmosphericScattering/FogEditor.cs @@ -106,22 +106,20 @@ public override void OnInspectorGUI() if (volumetricLightingAvailable) { PropertyField(m_EnableVolumetricFog, s_EnableVolumetricFog); - if (m_EnableVolumetricFog.value.boolValue) + + EditorGUI.indentLevel++; + PropertyField(m_Albedo, s_AlbedoLabel); + PropertyField(m_Anisotropy, s_AnisotropyLabel); + PropertyField(m_GlobalLightProbeDimmer, s_GlobalLightProbeDimmerLabel); + + if (isInAdvancedMode) { - EditorGUI.indentLevel++; - PropertyField(m_Albedo, s_AlbedoLabel); - PropertyField(m_Anisotropy, s_AnisotropyLabel); - PropertyField(m_GlobalLightProbeDimmer, s_GlobalLightProbeDimmerLabel); - - if (isInAdvancedMode) - { - PropertyField(m_DepthExtent); - PropertyField(m_SliceDistributionUniformity); - PropertyField(m_Filter); - } - - EditorGUI.indentLevel--; + PropertyField(m_DepthExtent); + PropertyField(m_SliceDistributionUniformity); + PropertyField(m_Filter); } + + EditorGUI.indentLevel--; } } } From 1668c2b5bca2b2f43f83fa38fcee6133422dcab0 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 14 May 2020 16:04:15 +0200 Subject: [PATCH 130/200] [Backport 8.x.x] PBR Sky renderer now shares its internal precomputation table between different instances. (#483) * PBR Sky renderer now shares its internal precomputation table between different instances. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs * Doc update * Update changelog --- .../CHANGELOG.md | 1 + .../Documentation~/Creating-a-Custom-Sky.md | 10 + .../Runtime/RenderPipeline/Camera/HDCamera.cs | 2 + .../PhysicallyBasedSky/PhysicallyBasedSky.cs | 44 -- .../PhysicallyBasedSkyRenderer.cs | 516 ++++++++++-------- .../Runtime/Sky/SkyUpdateContext.cs | 16 +- 6 files changed, 324 insertions(+), 265 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 2c2dbb99fba..096c3c82ef0 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed flickering of the game/scene view when lookdev is running. - Fixed some GCAlloc in the debug window. - Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. +- Fixed over consumption of GPU memory by the Physically Based Sky. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md b/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md index a165bdddd69..58efdb653bb 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md @@ -59,6 +59,12 @@ public class NewSky : SkySettings } return hash; } + + public override int GetHashCode(Camera camera) + { + // Implement if your sky depends on the camera settings (like position for instance) + return GetHashCode(); + } } ``` @@ -159,6 +165,10 @@ class NewSkyRenderer : SkyRenderer } ``` +### Important note: +If your sky renderer has to manage heavy data (like precomputed textures or similar things) then particular care has to be taken. Indeed, one instance of the renderer will exist per camera so by default if this data is a member of the renderer, it willl also be duplicated in memory. +Since each sky renderer can have very different needs, the responsbility to share this kind of data is the renderer's and need to be implemented by the user. + ## Sky rendering Shader 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 3c15fd2be24..fe601292eb8 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 @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Collections.Generic; using System.Linq; using Utilities; @@ -18,6 +19,7 @@ namespace UnityEngine.Rendering.HighDefinition /// HDCamera class. /// This class holds all information for a given camera. Constants used for shading as well as buffers persistent from one frame to another etc. ///
+ [DebuggerDisplay("({camera.name})")] public class HDCamera { #region Public API diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs index 202f4be7312..03bb3b49385 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.cs @@ -289,24 +289,6 @@ internal int GetPrecomputationHashCode() unchecked { #if UNITY_2019_3 // In 2019.3, when we call GetHashCode on a VolumeParameter it generate garbage (due to the boxing of the generic parameter) - // These parameters affect precomputation. - hash = hash * 23 + earthPreset.value.GetHashCode(); - hash = hash * 23 + planetaryRadius.value.GetHashCode(); - hash = hash * 23 + groundTint.value.GetHashCode(); - - hash = hash * 23 + airMaximumAltitude.value.GetHashCode(); - hash = hash * 23 + airDensityR.value.GetHashCode(); - hash = hash * 23 + airDensityG.value.GetHashCode(); - hash = hash * 23 + airDensityB.value.GetHashCode(); - hash = hash * 23 + airTint.value.GetHashCode(); - - hash = hash * 23 + aerosolMaximumAltitude.value.GetHashCode(); - hash = hash * 23 + aerosolDensity.value.GetHashCode(); - hash = hash * 23 + aerosolTint.value.GetHashCode(); - hash = hash * 23 + aerosolAnisotropy.value.GetHashCode(); - - hash = hash * 23 + numberOfBounces.value.GetHashCode(); - // These parameters affect precomputation. hash = hash * 23 + earthPreset.overrideState.GetHashCode(); hash = hash * 23 + planetaryRadius.overrideState.GetHashCode(); @@ -376,32 +358,6 @@ public override int GetHashCode() { #if UNITY_2019_3 // In 2019.3, when we call GetHashCode on a VolumeParameter it generate garbage (due to the boxing of the generic parameter) // These parameters do NOT affect precomputation. - hash = hash * 23 + sphericalMode.value.GetHashCode(); - hash = hash * 23 + seaLevel.value.GetHashCode(); - hash = hash * 23 + planetCenterPosition.value.GetHashCode(); - hash = hash * 23 + planetRotation.value.GetHashCode(); - - if (groundColorTexture.value != null) - hash = hash * 23 + groundColorTexture.value.GetHashCode(); - - if (groundEmissionTexture.value != null) - hash = hash * 23 + groundEmissionTexture.value.GetHashCode(); - - hash = hash * 23 + groundEmissionMultiplier.value.GetHashCode(); - - hash = hash * 23 + spaceRotation.value.GetHashCode(); - - if (spaceEmissionTexture.value != null) - hash = hash * 23 + spaceEmissionTexture.value.GetHashCode(); - - hash = hash * 23 + spaceEmissionMultiplier.value.GetHashCode(); - hash = hash * 23 + colorSaturation.value.GetHashCode(); - hash = hash * 23 + alphaSaturation.value.GetHashCode(); - hash = hash * 23 + alphaMultiplier.value.GetHashCode(); - hash = hash * 23 + horizonTint.value.GetHashCode(); - hash = hash * 23 + zenithTint.value.GetHashCode(); - hash = hash * 23 + horizonZenithShift.value.GetHashCode(); - hash = hash * 23 + sphericalMode.overrideState.GetHashCode(); hash = hash * 23 + seaLevel.overrideState.GetHashCode(); hash = hash * 23 + planetCenterPosition.overrideState.GetHashCode(); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs index 6c206f55888..03767aec550 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs @@ -1,10 +1,291 @@ using System; +using System.Collections.Generic; using UnityEngine.Experimental.Rendering; namespace UnityEngine.Rendering.HighDefinition { class PhysicallyBasedSkyRenderer : SkyRenderer { + class PrecomputationCache + { + class RefCountedData + { + public int refCount; + public PrecomputationData data = new PrecomputationData(); + } + + ObjectPool m_DataPool = new ObjectPool(null, null); + Dictionary m_CachedData = new Dictionary(); + + public PrecomputationData Get(int hash) + { + RefCountedData result; + if (m_CachedData.TryGetValue(hash, out result)) + { + result.refCount++; + return result.data; + } + else + { + result = m_DataPool.Get(); + result.refCount = 1; + result.data.Allocate(); + m_CachedData.Add(hash, result); + return result.data; + } + } + + public void Release(int hash) + { + if (m_CachedData.TryGetValue(hash, out var result)) + { + result.refCount--; + if (result.refCount == 0) + { + result.data.Release(); + m_CachedData.Remove(hash); + m_DataPool.Release(result); + } + } + } + } + + class PrecomputationData + { + // We compute at most one bounce per frame for perf reasons. + // We need to store the frame index because more than one render can happen during a frame (cubemap update + regular rendering). + int m_LastPrecomputedBounce; + int m_LastFrameComputation; + + RTHandle[] m_GroundIrradianceTables; // All orders, one order + RTHandle[] m_InScatteredRadianceTables; // Air SS, Aerosol SS, Atmosphere MS, Atmosphere one order, Temp + + RTHandle AllocateGroundIrradianceTable(int index) + { + var table = RTHandles.Alloc((int)PbrSkyConfig.GroundIrradianceTableSize, 1, + colorFormat: s_ColorFormat, + enableRandomWrite: true, + name: string.Format("GroundIrradianceTable{0}", index)); + + Debug.Assert(table != null); + + return table; + } + + RTHandle AllocateInScatteredRadianceTable(int index) + { + // Emulate a 4D texture with a "deep" 3D texture. + var table = RTHandles.Alloc((int)PbrSkyConfig.InScatteredRadianceTableSizeX, + (int)PbrSkyConfig.InScatteredRadianceTableSizeY, + (int)PbrSkyConfig.InScatteredRadianceTableSizeZ * + (int)PbrSkyConfig.InScatteredRadianceTableSizeW, + dimension: TextureDimension.Tex3D, + colorFormat: s_ColorFormat, + enableRandomWrite: true, + name: string.Format("InScatteredRadianceTable{0}", index)); + + Debug.Assert(table != null); + + return table; + } + + public void Allocate() + { + m_LastFrameComputation = -1; + m_LastPrecomputedBounce = 0; + + // No temp tables. + m_GroundIrradianceTables = new RTHandle[2]; + m_GroundIrradianceTables[0] = AllocateGroundIrradianceTable(0); + + m_InScatteredRadianceTables = new RTHandle[5]; + m_InScatteredRadianceTables[0] = AllocateInScatteredRadianceTable(0); + m_InScatteredRadianceTables[1] = AllocateInScatteredRadianceTable(1); + m_InScatteredRadianceTables[2] = AllocateInScatteredRadianceTable(2); + } + + public void Release() + { + RTHandles.Release(m_GroundIrradianceTables[0]); m_GroundIrradianceTables[0] = null; + RTHandles.Release(m_GroundIrradianceTables[1]); m_GroundIrradianceTables[1] = null; + RTHandles.Release(m_InScatteredRadianceTables[0]); m_InScatteredRadianceTables[0] = null; + RTHandles.Release(m_InScatteredRadianceTables[1]); m_InScatteredRadianceTables[1] = null; + RTHandles.Release(m_InScatteredRadianceTables[2]); m_InScatteredRadianceTables[2] = null; + RTHandles.Release(m_InScatteredRadianceTables[3]); m_InScatteredRadianceTables[3] = null; + RTHandles.Release(m_InScatteredRadianceTables[4]); m_InScatteredRadianceTables[4] = null; + } + + void PrecomputeTables(CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.InScatteredRadiancePrecomputation))) + { + int order = m_LastPrecomputedBounce + 1; + { + // For efficiency reasons, multiple scattering is computed in 2 passes: + // 1. Gather the in-scattered radiance over the entire sphere of directions. + // 2. Accumulate the in-scattered radiance along the ray. + // Single scattering performs both steps during the same pass. + + int firstPass = Math.Min(order - 1, 2); + int accumPass = 3; + int numPasses = Math.Min(order, 2); + + for (int i = 0; i < numPasses; i++) + { + int pass = (i == 0) ? firstPass : accumPass; + + switch (pass) + { + case 0: + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AirSingleScatteringTable, m_InScatteredRadianceTables[0]); + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AerosolSingleScatteringTable, m_InScatteredRadianceTables[1]); + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[2]); // MS orders + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTableOrder, m_InScatteredRadianceTables[3]); // One order + break; + case 1: + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._GroundIrradianceTexture, m_GroundIrradianceTables[1]); // One order + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[4]); // Temp + break; + case 2: + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[3]); // One order + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._GroundIrradianceTexture, m_GroundIrradianceTables[1]); // One order + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[4]); // Temp + break; + case 3: + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[4]); // Temp + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTableOrder, m_InScatteredRadianceTables[3]); // One order + cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[2]); // MS orders + break; + default: + Debug.Assert(false); + break; + } + + // Re-illuminate the sky with each bounce. + // Emulate a 4D dispatch with a "deep" 3D dispatch. + cmd.DispatchCompute(s_InScatteredRadiancePrecomputationCS, pass, (int)PbrSkyConfig.InScatteredRadianceTableSizeX / 4, + (int)PbrSkyConfig.InScatteredRadianceTableSizeY / 4, + (int)PbrSkyConfig.InScatteredRadianceTableSizeZ / 4 * + (int)PbrSkyConfig.InScatteredRadianceTableSizeW); + } + + { + // Used by all passes. + cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._GroundIrradianceTable, m_GroundIrradianceTables[0]); // All orders + cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._GroundIrradianceTableOrder, m_GroundIrradianceTables[1]); // One order + } + + switch (firstPass) + { + case 0: + break; + case 1: + cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); + cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); + break; + case 2: + cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[3]); // One order + break; + default: + Debug.Assert(false); + break; + } + + // Re-illuminate the ground with each bounce. + cmd.DispatchCompute(s_GroundIrradiancePrecomputationCS, firstPass, (int)PbrSkyConfig.GroundIrradianceTableSize / 64, 1, 1); + } + } + } + + public void BindGlobalBuffers(CommandBuffer cmd) + { + // TODO: ground irradiance table? Volume SH? Something else? + if (m_LastPrecomputedBounce > 0) + { + cmd.SetGlobalTexture(HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); + cmd.SetGlobalTexture(HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); + cmd.SetGlobalTexture(HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[2]); + } + else + { + cmd.SetGlobalTexture(HDShaderIDs._AirSingleScatteringTexture, CoreUtils.blackVolumeTexture); + cmd.SetGlobalTexture(HDShaderIDs._AerosolSingleScatteringTexture, CoreUtils.blackVolumeTexture); + cmd.SetGlobalTexture(HDShaderIDs._MultipleScatteringTexture, CoreUtils.blackVolumeTexture); + } + } + + public void BindBuffers(CommandBuffer cmd, MaterialPropertyBlock mpb) + { + if (m_LastPrecomputedBounce != 0) + { + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._GroundIrradianceTexture, m_GroundIrradianceTables[0]); + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[2]); + } + else + { + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._GroundIrradianceTexture, Texture2D.blackTexture); + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AirSingleScatteringTexture, CoreUtils.blackVolumeTexture); + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AerosolSingleScatteringTexture, CoreUtils.blackVolumeTexture); + s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._MultipleScatteringTexture, CoreUtils.blackVolumeTexture); + } + + } + + public bool Update(BuiltinSkyParameters builtinParams, PhysicallyBasedSky pbrSky) + { + if (builtinParams.frameIndex <= m_LastFrameComputation) + return false; + + m_LastFrameComputation = builtinParams.frameIndex; + + if (m_LastPrecomputedBounce == 0) + { + // Allocate temp tables if needed + if (m_GroundIrradianceTables[1] == null) + { + m_GroundIrradianceTables[1] = AllocateGroundIrradianceTable(1); + } + + if (m_InScatteredRadianceTables[3] == null) + { + m_InScatteredRadianceTables[3] = AllocateInScatteredRadianceTable(3); + } + + if (m_InScatteredRadianceTables[4] == null) + { + m_InScatteredRadianceTables[4] = AllocateInScatteredRadianceTable(4); + } + } + + if (m_LastPrecomputedBounce == pbrSky.numberOfBounces.value) + { + // Free temp tables. + // This is a deferred release (one frame late)! + RTHandles.Release(m_GroundIrradianceTables[1]); + RTHandles.Release(m_InScatteredRadianceTables[3]); + RTHandles.Release(m_InScatteredRadianceTables[4]); + m_GroundIrradianceTables[1] = null; + m_InScatteredRadianceTables[3] = null; + m_InScatteredRadianceTables[4] = null; + } + + if (m_LastPrecomputedBounce < pbrSky.numberOfBounces.value) + { + PrecomputeTables(builtinParams.commandBuffer); + m_LastPrecomputedBounce++; + + // If the sky is realtime, an upcoming update will update the sky lighting. Otherwise we need to force an update. + return builtinParams.skySettings.updateMode != EnvironmentUpdateMode.Realtime; + } + + return false; + } + } + [GenerateHLSL] public enum PbrSkyConfig { @@ -22,49 +303,18 @@ public enum PbrSkyConfig // If the hash does not match, we must recompute our data. int m_LastPrecomputationParamHash; - // We compute at most one bounce per frame for perf reasons. - // We need to store the frame index because more than one render can happen during a frame (cubemap update + regular rendering). - int m_LastPrecomputedBounce; - // Precomputed data below. - RTHandle[] m_GroundIrradianceTables; // All orders, one order - RTHandle[] m_InScatteredRadianceTables; // Air SS, Aerosol SS, Atmosphere MS, Atmosphere one order, Temp + PrecomputationData m_PrecomputedData; static ComputeShader s_GroundIrradiancePrecomputationCS; static ComputeShader s_InScatteredRadiancePrecomputationCS; - Material s_PbrSkyMaterial; + Material m_PbrSkyMaterial; static MaterialPropertyBlock s_PbrSkyMaterialProperties; - static GraphicsFormat s_ColorFormat = GraphicsFormat.R16G16B16A16_SFloat; - - RTHandle AllocateGroundIrradianceTable(int index) - { - var table = RTHandles.Alloc((int)PbrSkyConfig.GroundIrradianceTableSize, 1, - colorFormat: s_ColorFormat, - enableRandomWrite: true, - name: string.Format("GroundIrradianceTable{0}", index)); + static PrecomputationCache s_PrecomputaionCache = new PrecomputationCache(); - Debug.Assert(table != null); - - return table; - } + static GraphicsFormat s_ColorFormat = GraphicsFormat.R16G16B16A16_SFloat; - RTHandle AllocateInScatteredRadianceTable(int index) - { - // Emulate a 4D texture with a "deep" 3D texture. - var table = RTHandles.Alloc((int)PbrSkyConfig.InScatteredRadianceTableSizeX, - (int)PbrSkyConfig.InScatteredRadianceTableSizeY, - (int)PbrSkyConfig.InScatteredRadianceTableSizeZ * - (int)PbrSkyConfig.InScatteredRadianceTableSizeW, - dimension: TextureDimension.Tex3D, - colorFormat: s_ColorFormat, - enableRandomWrite: true, - name: string.Format("InScatteredRadianceTable{0}", index)); - - Debug.Assert(table != null); - - return table; - } public PhysicallyBasedSkyRenderer() { @@ -80,54 +330,28 @@ public override void Build() s_InScatteredRadiancePrecomputationCS = hdrpResources.shaders.inScatteredRadiancePrecomputationCS; s_PbrSkyMaterialProperties = new MaterialPropertyBlock(); - s_PbrSkyMaterial = CoreUtils.CreateEngineMaterial(hdrpResources.shaders.physicallyBasedSkyPS); + m_PbrSkyMaterial = CoreUtils.CreateEngineMaterial(hdrpResources.shaders.physicallyBasedSkyPS); Debug.Assert(s_GroundIrradiancePrecomputationCS != null); Debug.Assert(s_InScatteredRadiancePrecomputationCS != null); - - // No temp tables. - m_GroundIrradianceTables = new RTHandle[2]; - m_GroundIrradianceTables[0] = AllocateGroundIrradianceTable(0); - - m_InScatteredRadianceTables = new RTHandle[5]; - m_InScatteredRadianceTables[0] = AllocateInScatteredRadianceTable(0); - m_InScatteredRadianceTables[1] = AllocateInScatteredRadianceTable(1); - m_InScatteredRadianceTables[2] = AllocateInScatteredRadianceTable(2); } public override void SetGlobalSkyData(CommandBuffer cmd, BuiltinSkyParameters builtinParams) { UpdateGlobalConstantBuffer(cmd, builtinParams); - - // TODO: ground irradiance table? Volume SH? Something else? - if (m_LastPrecomputedBounce > 0) - { - cmd.SetGlobalTexture(HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); - cmd.SetGlobalTexture(HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); - cmd.SetGlobalTexture(HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[2]); - } - else - { - cmd.SetGlobalTexture(HDShaderIDs._AirSingleScatteringTexture, CoreUtils.blackVolumeTexture); - cmd.SetGlobalTexture(HDShaderIDs._AerosolSingleScatteringTexture, CoreUtils.blackVolumeTexture); - cmd.SetGlobalTexture(HDShaderIDs._MultipleScatteringTexture, CoreUtils.blackVolumeTexture); - } - + if (m_PrecomputedData != null) + m_PrecomputedData.BindGlobalBuffers(builtinParams.commandBuffer); } public override void Cleanup() { - RTHandles.Release(m_GroundIrradianceTables[0]); m_GroundIrradianceTables[0] = null; - RTHandles.Release(m_GroundIrradianceTables[1]); m_GroundIrradianceTables[1] = null; - RTHandles.Release(m_InScatteredRadianceTables[0]); m_InScatteredRadianceTables[0] = null; - RTHandles.Release(m_InScatteredRadianceTables[1]); m_InScatteredRadianceTables[1] = null; - RTHandles.Release(m_InScatteredRadianceTables[2]); m_InScatteredRadianceTables[2] = null; - RTHandles.Release(m_InScatteredRadianceTables[3]); m_InScatteredRadianceTables[3] = null; - RTHandles.Release(m_InScatteredRadianceTables[4]); m_InScatteredRadianceTables[4] = null; - - CoreUtils.Destroy(s_PbrSkyMaterial); - - m_LastPrecomputedBounce = 0; + if (m_PrecomputedData != null) + { + s_PrecomputaionCache.Release(m_LastPrecomputationParamHash); + m_LastPrecomputationParamHash = 0; + m_PrecomputedData = null; + } + CoreUtils.Destroy(m_PbrSkyMaterial); } static float CornetteShanksPhasePartConstant(float anisotropy) @@ -197,90 +421,6 @@ void UpdateGlobalConstantBuffer(CommandBuffer cmd, BuiltinSkyParameters builtinP cmd.SetGlobalFloat( HDShaderIDs._HorizonZenithShiftScale, expParams.y); } - void PrecomputeTables(CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.InScatteredRadiancePrecomputation))) - { - int order = m_LastPrecomputedBounce + 1; - { - // For efficiency reasons, multiple scattering is computed in 2 passes: - // 1. Gather the in-scattered radiance over the entire sphere of directions. - // 2. Accumulate the in-scattered radiance along the ray. - // Single scattering performs both steps during the same pass. - - int firstPass = Math.Min(order - 1, 2); - int accumPass = 3; - int numPasses = Math.Min(order, 2); - - for (int i = 0; i < numPasses; i++) - { - int pass = (i == 0) ? firstPass : accumPass; - - switch (pass) - { - case 0: - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AirSingleScatteringTable, m_InScatteredRadianceTables[0]); - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AerosolSingleScatteringTable, m_InScatteredRadianceTables[1]); - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[2]); // MS orders - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTableOrder, m_InScatteredRadianceTables[3]); // One order - break; - case 1: - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._GroundIrradianceTexture, m_GroundIrradianceTables[1]); // One order - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[4]); // Temp - break; - case 2: - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[3]); // One order - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._GroundIrradianceTexture, m_GroundIrradianceTables[1]); // One order - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[4]); // Temp - break; - case 3: - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[4]); // Temp - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTableOrder, m_InScatteredRadianceTables[3]); // One order - cmd.SetComputeTextureParam(s_InScatteredRadiancePrecomputationCS, pass, HDShaderIDs._MultipleScatteringTable, m_InScatteredRadianceTables[2]); // MS orders - break; - default: - Debug.Assert(false); - break; - } - - // Re-illuminate the sky with each bounce. - // Emulate a 4D dispatch with a "deep" 3D dispatch. - cmd.DispatchCompute(s_InScatteredRadiancePrecomputationCS, pass, (int)PbrSkyConfig.InScatteredRadianceTableSizeX / 4, - (int)PbrSkyConfig.InScatteredRadianceTableSizeY / 4, - (int)PbrSkyConfig.InScatteredRadianceTableSizeZ / 4 * - (int)PbrSkyConfig.InScatteredRadianceTableSizeW); - } - - { - // Used by all passes. - cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._GroundIrradianceTable, m_GroundIrradianceTables[0]); // All orders - cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._GroundIrradianceTableOrder, m_GroundIrradianceTables[1]); // One order - } - - switch (firstPass) - { - case 0: - break; - case 1: - cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); - cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); - break; - case 2: - cmd.SetComputeTextureParam(s_GroundIrradiancePrecomputationCS, firstPass, HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[3]); // One order - break; - default: - Debug.Assert(false); - break; - } - - // Re-illuminate the ground with each bounce. - cmd.DispatchCompute(s_GroundIrradiancePrecomputationCS, firstPass, (int)PbrSkyConfig.GroundIrradianceTableSize / 64, 1, 1); - } - } - } - protected override bool Update(BuiltinSkyParameters builtinParams) { UpdateGlobalConstantBuffer(builtinParams.commandBuffer, builtinParams); @@ -289,54 +429,13 @@ protected override bool Update(BuiltinSkyParameters builtinParams) int currPrecomputationParamHash = pbrSky.GetPrecomputationHashCode(); if (currPrecomputationParamHash != m_LastPrecomputationParamHash) { - // Hash does not match, have to restart the precomputation from scratch. - m_LastPrecomputedBounce = 0; - } - - if (m_LastPrecomputedBounce == 0) - { - // Allocate temp tables if needed - if (m_GroundIrradianceTables[1] == null) - { - m_GroundIrradianceTables[1] = AllocateGroundIrradianceTable(1); - } - - if (m_InScatteredRadianceTables[3] == null) - { - m_InScatteredRadianceTables[3] = AllocateInScatteredRadianceTable(3); - } - - if (m_InScatteredRadianceTables[4] == null) - { - m_InScatteredRadianceTables[4] = AllocateInScatteredRadianceTable(4); - } - } - - if (m_LastPrecomputedBounce == pbrSky.numberOfBounces.value) - { - // Free temp tables. - // This is a deferred release (one frame late)! - RTHandles.Release(m_GroundIrradianceTables[1]); - RTHandles.Release(m_InScatteredRadianceTables[3]); - RTHandles.Release(m_InScatteredRadianceTables[4]); - m_GroundIrradianceTables[1] = null; - m_InScatteredRadianceTables[3] = null; - m_InScatteredRadianceTables[4] = null; - } - - if (m_LastPrecomputedBounce < pbrSky.numberOfBounces.value) - { - PrecomputeTables(builtinParams.commandBuffer); - m_LastPrecomputedBounce++; - - // Update the hash for the current bounce. + if (m_LastPrecomputationParamHash != 0) + s_PrecomputaionCache.Release(m_LastPrecomputationParamHash); + m_PrecomputedData = s_PrecomputaionCache.Get(currPrecomputationParamHash); m_LastPrecomputationParamHash = currPrecomputationParamHash; - - // If the sky is realtime, an upcoming update will update the sky lighting. Otherwise we need to force an update. - return builtinParams.skySettings.updateMode != EnvironmentUpdateMode.Realtime; } - return false; + return m_PrecomputedData.Update(builtinParams, pbrSky); } // 'renderSunDisk' parameter is not supported. @@ -370,20 +469,7 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo s_PbrSkyMaterialProperties.SetMatrix(HDShaderIDs._PlanetRotation, Matrix4x4.Rotate(planetRotation)); s_PbrSkyMaterialProperties.SetMatrix(HDShaderIDs._SpaceRotation, Matrix4x4.Rotate(spaceRotation)); - if (m_LastPrecomputedBounce != 0) - { - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._GroundIrradianceTexture, m_GroundIrradianceTables[0]); - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AirSingleScatteringTexture, m_InScatteredRadianceTables[0]); - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AerosolSingleScatteringTexture, m_InScatteredRadianceTables[1]); - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._MultipleScatteringTexture, m_InScatteredRadianceTables[2]); - } - else - { - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._GroundIrradianceTexture, Texture2D.blackTexture); - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AirSingleScatteringTexture, CoreUtils.blackVolumeTexture); - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._AerosolSingleScatteringTexture, CoreUtils.blackVolumeTexture); - s_PbrSkyMaterialProperties.SetTexture(HDShaderIDs._MultipleScatteringTexture, CoreUtils.blackVolumeTexture); - } + m_PrecomputedData.BindBuffers(cmd, s_PbrSkyMaterialProperties); int hasGroundAlbedoTexture = 0; @@ -418,7 +504,7 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo int pass = (renderForCubemap ? 0 : 2) + (isPbrSkyActive ? 0 : 1); - CoreUtils.DrawFullScreen(builtinParams.commandBuffer, s_PbrSkyMaterial, s_PbrSkyMaterialProperties, pass); + CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_PbrSkyMaterial, s_PbrSkyMaterialProperties, pass); } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs index 3ae3591daa4..9127a4824f0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs @@ -16,6 +16,15 @@ public SkySettings skySettings get { return m_SkySettings; } set { + // We cleanup the renderer first here because in some cases, after scene unload, the skySettings field will be "null" because the object got destroyed. + // In this case, the renderer might stay allocated until a non null value is set. To avoid a lingering allocation, we cleanup first before anything else. + // So next frame after scene unload, renderer will be freed. + if (skyRenderer != null && (value == null || value.GetSkyRendererType() != skyRenderer.GetType())) + { + skyRenderer.Cleanup(); + skyRenderer = null; + } + if (m_SkySettings == value) return; @@ -23,13 +32,8 @@ public SkySettings skySettings m_SkySettings = value; currentUpdateTime = 0.0f; - if (m_SkySettings != null && (skyRenderer == null || m_SkySettings.GetSkyRendererType() != skyRenderer.GetType())) + if (m_SkySettings != null && skyRenderer == null) { - if (skyRenderer != null) - { - skyRenderer.Cleanup(); - } - var rendererType = m_SkySettings.GetSkyRendererType(); skyRenderer = (SkyRenderer)Activator.CreateInstance(rendererType); skyRenderer.Build(); From 9c412ab586b9b2faed3b2281468da27b0fdc1db1 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 14 May 2020 16:05:20 +0200 Subject: [PATCH 131/200] [Backport 8.x.x] New tooltip for camera background and fixed exposure when switching the background mode. (#481) * Put more information in Camera background type tooltip and fixed inconsistent exposure behavior when changing bg type. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs * Update changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs | 2 +- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 096c3c82ef0..f3814c441b3 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed some GCAlloc in the debug window. - Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. - Fixed over consumption of GPU memory by the Physically Based Sky. +- Put more information in Camera background type tooltip and fixed inconsistent exposure behavior when changing bg type. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs index 527ea9b2e5e..8ea6009a9c8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Skin.cs @@ -13,7 +13,7 @@ static partial class HDCameraUI const string msaaWarningMessage = "Manual MSAA target set with deferred rendering. This will lead to undefined behavior."; - static readonly GUIContent clearModeContent = EditorGUIUtility.TrTextContent("Background Type", "Specifies the type of background the Camera applies when it clears the screen before rendering a frame."); + static readonly GUIContent clearModeContent = EditorGUIUtility.TrTextContent("Background Type", "Specifies the type of background the Camera applies when it clears the screen before rendering a frame. Be aware that when setting this to None, the background is never cleared and since HDRP shares render texture between cameras, you may end up with garbage from previous rendering."); static readonly GUIContent backgroundColorContent = EditorGUIUtility.TrTextContent("Background Color", "The Background Color used to clear the screen when selecting Background Color before rendering."); static readonly GUIContent cullingMaskContent = EditorGUIUtility.TrTextContent("Culling Mask"); static readonly GUIContent volumeLayerMaskContent = EditorGUIUtility.TrTextContent("Volume Layer Mask"); 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 fe601292eb8..d59f6cc0911 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 @@ -256,6 +256,9 @@ internal HDAdditionalCameraData.ClearColorMode clearColorMode } } + HDAdditionalCameraData.ClearColorMode m_PreviousClearColorMode = HDAdditionalCameraData.ClearColorMode.None; + + internal Color backgroundColorHDR { get @@ -880,9 +883,11 @@ void UpdateAntialiasing() } // When changing antialiasing mode to TemporalAA we must reset the history, otherwise we get one frame of garbage - if (previousAntialiasing != antialiasing && antialiasing == AntialiasingMode.TemporalAntialiasing) + if ( (previousAntialiasing != antialiasing && antialiasing == AntialiasingMode.TemporalAntialiasing) + || (m_PreviousClearColorMode != clearColorMode)) { resetPostProcessingHistory = true; + m_PreviousClearColorMode = clearColorMode; } } From df6775b07f27aa7df9a66e9827b908d4e6ec0c6f Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 14 May 2020 16:07:35 +0200 Subject: [PATCH 132/200] [Backport 8.x.x] Fixed asset preview being rendered white because of static lighting sky. (#478) * Fixed an issue where asset preview could be rendered white because of static lighting sky. Also fixed an issue where static lighting was not updated when removing the static lighting sky profile. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs * Update changelog --- .../CHANGELOG.md | 2 ++ .../Sky/HDLightingWindowEnvironmentSection.cs | 16 ++++++---------- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index f3814c441b3..d3b7105592e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. - Fixed over consumption of GPU memory by the Physically Based Sky. - Put more information in Camera background type tooltip and fixed inconsistent exposure behavior when changing bg type. +- Fixed an issue where asset preview could be rendered white because of static lighting sky. +- Fixed an issue where static lighting was not updated when removing the static lighting sky profile. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs b/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs index 813fdf8a5cd..682cba36804 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs @@ -32,17 +32,13 @@ class SerializedStaticLightingSky { SerializedObject serializedObject; public SerializedProperty skyUniqueID; - - public VolumeProfile volumeProfile - { - get => (serializedObject.targetObject as StaticLightingSky).profile; - set => (serializedObject.targetObject as StaticLightingSky).profile = value; - } + public SerializedProperty profile; public SerializedStaticLightingSky(StaticLightingSky staticLightingSky) { serializedObject = new SerializedObject(staticLightingSky); skyUniqueID = serializedObject.FindProperty("m_StaticLightingSkyUniqueID"); + profile = serializedObject.FindProperty("m_Profile"); } public void Apply() => serializedObject.ApplyModifiedProperties(); @@ -174,10 +170,10 @@ void DrawGUI() ++EditorGUI.indentLevel; //cannot use SerializeProperty due to logic in the property - var profile = m_SerializedActiveSceneLightingSky.volumeProfile; - var newProfile = EditorGUILayout.ObjectField(EditorGUIUtility.TrTextContent("Profile"), profile, typeof(VolumeProfile), allowSceneObjects: false) as VolumeProfile; + var profile = m_SerializedActiveSceneLightingSky.profile.objectReferenceValue; + var newProfile = EditorGUILayout.ObjectField(EditorGUIUtility.TrTextContent("Profile"), m_SerializedActiveSceneLightingSky.profile.objectReferenceValue, typeof(VolumeProfile), allowSceneObjects: false) as VolumeProfile; if (profile != newProfile) - m_SerializedActiveSceneLightingSky.volumeProfile = newProfile; + m_SerializedActiveSceneLightingSky.profile.objectReferenceValue = newProfile; using (new EditorGUI.DisabledScope(m_SkyClassNames.Count == 1)) // Only "None" { @@ -204,7 +200,7 @@ void UpdateSkyIntPopupData() m_SkyClassNames.Add(new GUIContent("None")); m_SkyUniqueIDs.Add(0); - VolumeProfile profile = m_SerializedActiveSceneLightingSky.volumeProfile; + VolumeProfile profile = m_SerializedActiveSceneLightingSky.profile.objectReferenceValue as VolumeProfile; if (profile != null) { var skyTypesDict = SkyManager.skyTypesDict; 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 dc84a5702d2..20b5733ac26 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2006,7 +2006,6 @@ AOVRequestData aovRequest m_PostProcessSystem.BeginFrame(cmd, hdCamera, this); ApplyDebugDisplaySettings(hdCamera, cmd); - m_SkyManager.UpdateCurrentSkySettings(hdCamera); SetupCameraProperties(hdCamera, renderContext, cmd); @@ -2783,6 +2782,7 @@ ref HDCullingResults cullingResults hdProbeCullState = HDProbeSystem.PrepareCull(camera); // We need to set the ambient probe here because it's passed down to objects during the culling process. + skyManager.UpdateCurrentSkySettings(hdCamera); skyManager.SetupAmbientProbe(hdCamera); using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.CullResultsCull))) From 77b09acea8d3018be287c3d9fa8bd6900510539c Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Fri, 15 May 2020 01:57:45 +0200 Subject: [PATCH 133/200] [8.x.x Backport] Fix issue with corrupted values with Layer Lit when using multiply mode for vertex color (#424) * Saturate vertex color to avoid negative values. * changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Material/LayeredLit/LayeredLitData.hlsl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d3b7105592e..c1e45fdfadc 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -671,6 +671,7 @@ The version number for this package has increased due to a version update of a r - Fix Wizard load when none selected for RenderPipelineAsset - Fixed issue with unclear naming of debug menu for decals. - Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). +- Fixed corrupted values on LayeredLit when using Vertex Color multiply mode to multiply and MSAA is activated. ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index ab216729cbc..821ee5814e8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -494,7 +494,7 @@ float4 GetBlendMask(LayerTexCoord layerTexCoord, float4 vertexColor, bool useLod // It also means that when using wind, users can't use vertex color to modulate the effect of influence from the main layer. float4 maskVertexColor = vertexColor; #if defined(_LAYER_MASK_VERTEX_COLOR_MUL) - blendMasks *= maskVertexColor; + blendMasks *= saturate(maskVertexColor); #elif defined(_LAYER_MASK_VERTEX_COLOR_ADD) blendMasks = saturate(blendMasks + maskVertexColor * 2.0 - 1.0); #endif From 5b4620c87dc5e937062c37e75138d4b505ce864f Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 12 May 2020 18:16:59 +0200 Subject: [PATCH 134/200] fix issue with ShowPrePassAndPostPass --- .../Editor/Material/Eye/ShaderGraph/EyeGUI.cs | 3 +-- .../Editor/Material/Fabric/ShaderGraph/FabricGUI.cs | 3 +-- .../Editor/Material/Hair/ShaderGraph/HairGUI.cs | 3 +-- .../Editor/Material/Lit/ShaderGraph/HDLitGUI.cs | 4 +--- .../Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs | 3 +-- .../Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs | 3 +-- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs index d3070c798a7..083a42d386d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeGUI.cs @@ -14,8 +14,7 @@ class EyeGUI : HDShaderGUI // For surface option shader graph we only want all unlit features but alpha clip, back then front rendering and SSR const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass - ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs index f94a62156f2..adf7cf976e7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricGUI.cs @@ -15,8 +15,7 @@ class FabricGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass - ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs index e354ec5f0c0..fefeb3f5b21 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Hair/ShaderGraph/HairGUI.cs @@ -15,8 +15,7 @@ class HairGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass - ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs index e41bc36ed26..affca5d0f81 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitGUI.cs @@ -14,9 +14,7 @@ class HDLitGUI : HDShaderGUI // For surface option shader graph we only want all unlit features but alpha clip and back then front rendering const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold - ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass - ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; + ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs index aec2a60c1b8..dba83b9b46a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitGUI.cs @@ -15,8 +15,7 @@ class StackLitGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass - ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; + ^ SurfaceOptionUIBlock.Features.ShowAfterPostProcessPass; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs index 9d91aadf2a9..a3f577a6075 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitGUI.cs @@ -16,8 +16,7 @@ class HDUnlitGUI : HDShaderGUI const SurfaceOptionUIBlock.Features surfaceOptionFeatures = SurfaceOptionUIBlock.Features.Unlit ^ SurfaceOptionUIBlock.Features.AlphaCutoffThreshold ^ SurfaceOptionUIBlock.Features.DoubleSidedNormalMode - ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering - ^ SurfaceOptionUIBlock.Features.ShowPrePassAndPostPass; + ^ SurfaceOptionUIBlock.Features.BackThenFrontRendering; MaterialUIBlockList uiBlocks = new MaterialUIBlockList { From ff8601d45b564b565c5c31491cd713bd185482e2 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Fri, 22 May 2020 16:47:35 +0200 Subject: [PATCH 135/200] Fix an issue in reading the gbuffer for ray traced subsurface scattering (#539) --- .../CHANGELOG.md | 1 + .../SubsurfaceScatteringManager.cs | 4 ---- .../Raytracing/Shaders/RayTracingSubSurface.raytrace | 12 ++++-------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9a0b29d276f..98452a7c16f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where static lighting was not updated when removing the static lighting sky profile. - Fixed SceneView Draw Modes not being properly updated after opening new scene view panels or changing the editor layout. - Fixed depth prepass and postpass being disabled after changing the shader in the material UI. +- Fix an issue in reading the gbuffer for ray traced subsurface scattering (case 1248358). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs index 08419191dcb..114ccae3f06 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs @@ -350,10 +350,6 @@ void RenderSubsurfaceScattering(HDCamera hdCamera, CommandBuffer cmd, RTHandle c // Bind the textures for ray generation cmd.SetRayTracingTextureParam(subSurfaceShader, HDShaderIDs._DepthTexture, sharedRTManager.GetDepthStencilBuffer()); cmd.SetRayTracingTextureParam(subSurfaceShader, HDShaderIDs._NormalBufferTexture, sharedRTManager.GetNormalBuffer()); - cmd.SetRayTracingTextureParam(subSurfaceShader, HDShaderIDs._GBufferTexture[0], m_GbufferManager.GetBuffer(0)); - cmd.SetRayTracingTextureParam(subSurfaceShader, HDShaderIDs._GBufferTexture[1], m_GbufferManager.GetBuffer(1)); - cmd.SetRayTracingTextureParam(subSurfaceShader, HDShaderIDs._GBufferTexture[2], m_GbufferManager.GetBuffer(2)); - cmd.SetRayTracingTextureParam(subSurfaceShader, HDShaderIDs._GBufferTexture[3], m_GbufferManager.GetBuffer(3)); cmd.SetRayTracingTextureParam(subSurfaceShader, HDShaderIDs._SSSBufferTexture, m_SSSColor); cmd.SetGlobalTexture(HDShaderIDs._StencilTexture, sharedRTManager.GetDepthStencilBuffer(), RenderTextureSubElement.Stencil); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingSubSurface.raytrace b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingSubSurface.raytrace index faffd8f5997..85762c9926e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingSubSurface.raytrace +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingSubSurface.raytrace @@ -66,13 +66,9 @@ void RayGenSubSurface() PositionInputs posInput = GetPositionInput(currentPixelCoord, 1.0/LaunchDim.xy, depthValue, UNITY_MATRIX_I_VP, GetWorldToViewMatrix(), 0); posInput.positionWS = GetAbsolutePositionWS(posInput.positionWS); - // Read the bsdf data and builtin data from the gbuffer - BSDFData bsdfData; - ZERO_INITIALIZE(BSDFData, bsdfData); - BuiltinData builtinData; - ZERO_INITIALIZE(BuiltinData, builtinData); - uint featureFlags = MATERIALFEATUREFLAGS_LIT_SUBSURFACE_SCATTERING; - DecodeFromGBuffer(currentPixelCoord, featureFlags, bsdfData, builtinData); + // Read the normal data + NormalData normalData; + DecodeFromNormalBuffer(currentPixelCoord, normalData); // Read the SSS Data SSSData sssData; @@ -88,7 +84,7 @@ void RayGenSubSurface() // Do our walk ScatteringResult scatteringResult; - ScatteringWalk(bsdfData.normalWS, bsdfData.diffuseColor, scatteringDistance, currentPixelCoord, globalSampleIndex, posInput.positionWS, scatteringResult); + ScatteringWalk(normalData.normalWS, sssData.diffuseColor, scatteringDistance, currentPixelCoord, globalSampleIndex, posInput.positionWS, scatteringResult); // Normalize the throughput scatteringResult.outputThroughput /= (float)_RaytracingNumSamples; From 3b309c63f8a3f632975971965695b462be6335f7 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Fri, 22 May 2020 16:48:34 +0200 Subject: [PATCH 136/200] [8.x.x backport] Change exposure compensation in the default volume profile to 0. (#389) * Change default compensation * Upgrade guide * changelog --- .../CHANGELOG.md | 1 + .../Upgrading-from-2019.3-to-2020.1.md | 6 +++++- .../DefaultSettingsVolumeProfile.asset | 12 ++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 98452a7c16f..66b835acd8d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings - Made the StaticLightingSky class public so that users can change it by script for baking purpose. +- Changed default exposure compensation to 0. ## [8.1.0] - 2020-04-21 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md index 6cd48c9c77a..aaf04d2c617 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md @@ -8,4 +8,8 @@ From Unity 2020.1, the HDRP-specific settings of the scene view camera (anti-ali ## Cookie baking -From Unity 2020.1, Cookie on light are not taken into account for the lightmaps / Lightprobes. This support is always enable with HDRP. \ No newline at end of file +From Unity 2020.1, Cookie on light are not taken into account for the lightmaps / Lightprobes. This support is always enable with HDRP. + +## Default Volume Profile + +From Unity 2020.1, the Default Volume Profile asset has changed so that the Exposure component sets the default Compensation to 0. \ No newline at end of file diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset index a5fe482a2e2..86c0e736098 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset @@ -87,10 +87,18 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 50 min: 0 + minDistance: + m_OverrideState: 0 + m_Value: 0 + min: 0 fadeDistance: m_OverrideState: 0 m_Value: 5 min: 0 + fadeInDistance: + m_OverrideState: 0 + m_Value: 0 + min: 0 m_SampleCount: m_OverrideState: 1 m_Value: 12 @@ -322,8 +330,8 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 0 compensation: - m_OverrideState: 1 - m_Value: 1 + m_OverrideState: 0 + m_Value: 0 limitMin: m_OverrideState: 0 m_Value: -10 From c895648e483a78928486e061b321492967918da4 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Wed, 27 May 2020 20:54:58 +0200 Subject: [PATCH 137/200] Fix Look Dev default profile not updating correctly #630 --- .../CHANGELOG.md | 3 +- .../HDRenderPipeline.LookDev.cs | 93 +++++++++++++++---- 2 files changed, 77 insertions(+), 19 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 0c2b77a25af..ea826f2f878 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changelog +# Changelog All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed SceneView Draw Modes not being properly updated after opening new scene view panels or changing the editor layout. - Fixed depth prepass and postpass being disabled after changing the shader in the material UI. - Fix an issue in reading the gbuffer for ray traced subsurface scattering (case 1248358). +- Fixed an issue where editing the Look Dev default profile would not reflect directly in the Look Dev window. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs index b8cc17d3187..853e2e7af89 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs @@ -5,6 +5,8 @@ namespace UnityEngine.Rendering.HighDefinition { public partial class HDRenderPipeline : IDataProvider { + int m_LookDevVolumeProfileHash = -1; + struct LookDevDataForHDRP { public HDAdditionalCameraData additionalCameraData; @@ -14,6 +16,65 @@ struct LookDevDataForHDRP public Volume volume; } +#if UNITY_EDITOR + bool UpdateVolumeProfile(Volume volume, out VisualEnvironment visualEnvironment, out HDRISky sky) + { + HDRenderPipelineAsset hdrpAsset = GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset; + if (hdrpAsset.defaultLookDevProfile == null) + hdrpAsset.defaultLookDevProfile = hdrpAsset.renderPipelineEditorResources.lookDev.defaultLookDevVolumeProfile; + + int newHashCode = hdrpAsset.defaultLookDevProfile.GetHashCode(); + if (newHashCode != m_LookDevVolumeProfileHash) + { + VolumeProfile oldProfile = volume.sharedProfile; + + m_LookDevVolumeProfileHash = newHashCode; + + VolumeProfile profile = ScriptableObject.Instantiate(hdrpAsset.defaultLookDevProfile); + volume.sharedProfile = profile; + + // Remove potentially existing components in the user profile. + if (profile.TryGet(out visualEnvironment)) + profile.Remove(); + + if (profile.TryGet(out sky)) + profile.Remove(); + + // If there was a profile before we needed to re-instantiate the new profile, we need to copy the data over for sky settings. + if (oldProfile != null) + { + if (oldProfile.TryGet(out HDRISky oldSky)) + { + sky = Object.Instantiate(oldSky); + profile.components.Add(sky); + } + if (oldProfile.TryGet(out VisualEnvironment oldVisualEnv)) + { + visualEnvironment = Object.Instantiate(oldVisualEnv); + profile.components.Add(visualEnvironment); + } + + CoreUtils.Destroy(oldProfile); + } + else + { + visualEnvironment = profile.Add(); + visualEnvironment.skyType.Override((int)SkyType.HDRI); + visualEnvironment.skyAmbientMode.Override(SkyAmbientMode.Dynamic); + sky = profile.Add(); + } + + return true; + } + else + { + visualEnvironment = null; + sky = null; + return false; + } + } +#endif + /// /// This hook allows HDRP to init the scene when creating the view /// @@ -51,24 +112,11 @@ void IDataProvider.FirstInitScene(StageRuntimeInterface SRI) volume.priority = float.MaxValue; volume.enabled = false; -#if UNITY_EDITOR - HDRenderPipelineAsset hdrpAsset = GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset; - if (hdrpAsset.defaultLookDevProfile == null) - hdrpAsset.defaultLookDevProfile = hdrpAsset.renderPipelineEditorResources.lookDev.defaultLookDevVolumeProfile; - VolumeProfile profile = ScriptableObject.Instantiate(hdrpAsset.defaultLookDevProfile); - volume.sharedProfile = profile; - - VisualEnvironment visualEnvironment; - if (profile.TryGet(out visualEnvironment)) - profile.Remove(); - visualEnvironment = profile.Add(); - visualEnvironment.skyType.Override((int)SkyType.HDRI); - visualEnvironment.skyAmbientMode.Override(SkyAmbientMode.Dynamic); - HDRISky sky; - if (profile.TryGet(out sky)) - profile.Remove(); - sky = profile.Add(); +#if UNITY_EDITOR + // Make sure we invalidate the current volume when first loading a scene. + m_LookDevVolumeProfileHash = -1; + UpdateVolumeProfile(volume, out var visualEnvironment, out var sky); SRI.SRPData = new LookDevDataForHDRP() { @@ -79,7 +127,7 @@ void IDataProvider.FirstInitScene(StageRuntimeInterface SRI) volume = volume }; #else - //remove unasigned warnings when building + //remove unassigned warnings when building SRI.SRPData = new LookDevDataForHDRP() { additionalCameraData = null, @@ -122,6 +170,15 @@ void IDataProvider.UpdateSky(Camera camera, Sky sky, StageRuntimeInterface SRI) void IDataProvider.OnBeginRendering(StageRuntimeInterface SRI) { LookDevDataForHDRP data = (LookDevDataForHDRP)SRI.SRPData; +#if UNITY_EDITOR + // The default volume can change in the HDRP asset so if it does we need to re-instantiate it. + if (UpdateVolumeProfile(data.volume, out var visualEnv, out var sky)) + { + data.sky = sky; + data.visualEnvironment = visualEnv; + SRI.SRPData = data; + } +#endif data.volume.enabled = true; } From 4f1dda176e9558fbd5f57611c9ca6614e5529350 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Wed, 27 May 2020 22:54:00 +0200 Subject: [PATCH 138/200] [10.x.x] Fix issue with Lookdev not compiling in player --- .../Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs index 853e2e7af89..1d3aa84ec17 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LookDev.cs @@ -5,7 +5,9 @@ namespace UnityEngine.Rendering.HighDefinition { public partial class HDRenderPipeline : IDataProvider { +#if UNITY_EDITOR int m_LookDevVolumeProfileHash = -1; +#endif struct LookDevDataForHDRP { From e2148c3409ffb7207d90c1a4d13fd594f6170d04 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Sat, 6 Jun 2020 02:31:23 +0200 Subject: [PATCH 139/200] bump versions (#614) --- TestProjects/HDRP_RuntimeTests/Packages/manifest.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TestProjects/HDRP_RuntimeTests/Packages/manifest.json b/TestProjects/HDRP_RuntimeTests/Packages/manifest.json index b3fe4f73c2c..eb8a5c99261 100644 --- a/TestProjects/HDRP_RuntimeTests/Packages/manifest.json +++ b/TestProjects/HDRP_RuntimeTests/Packages/manifest.json @@ -7,10 +7,10 @@ "com.unity.render-pipelines.high-definition": "file:../../../com.unity.render-pipelines.high-definition", "com.unity.render-pipelines.high-definition-config": "file:../../../com.unity.render-pipelines.high-definition-config", "com.unity.shadergraph": "file:../../../com.unity.shadergraph", - "com.unity.test-framework": "1.1.5", - "com.unity.test-framework.build": "0.0.1-preview.3", - "com.unity.test-framework.utp-reporter": "0.1.3-preview.17", - "com.unity.testframework.graphics": "7.1.12-preview", + "com.unity.test-framework": "1.1.14", + "com.unity.test-framework.build": "0.0.1-preview.12", + "com.unity.test-framework.utp-reporter": "1.0.0-preview", + "com.unity.testframework.graphics": "7.1.13-preview", "com.unity.testing.hdrp": "file:../../../com.unity.testing.hdrp", "com.unity.ugui": "1.0.0", "com.unity.visualeffectgraph": "file:../../../com.unity.visualeffectgraph", From 25ce2cb1865dd7de6633d820cfd4728aed423c3f Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Fri, 19 Jun 2020 17:34:51 +0200 Subject: [PATCH 140/200] [Backport 8.x.x] Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. (#989) * Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. * Update changelog --- .../Editor/Volume/VolumeComponentListEditor.cs | 4 ++-- .../Runtime/Volume/VolumeProfile.cs | 13 +++++++++++++ .../CHANGELOG.md | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs index 21a110079a0..9669c56a435 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs @@ -199,10 +199,10 @@ public void OnGUI() // Even if the asset is not dirty, the list of component may have been changed by another inspector. // In this case, only the hash will tell us that we need to refresh. - if (asset.isDirty || asset.GetHashCode() != m_CurrentHashCode) + if (asset.isDirty || asset.GetComponentListHashCode() != m_CurrentHashCode) { RefreshEditors(); - m_CurrentHashCode = asset.GetHashCode(); + m_CurrentHashCode = asset.GetComponentListHashCode(); asset.isDirty = false; } diff --git a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs index 198a44af7ac..a687a86fb4d 100644 --- a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs +++ b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs @@ -297,5 +297,18 @@ public override int GetHashCode() return hash; } } + + internal int GetComponentListHashCode() + { + unchecked + { + int hash = 17; + + for (int i = 0; i < components.Count; i++) + hash = hash * 23 + components[i].GetType().GetHashCode(); + + return hash; + } + } } } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ea826f2f878..099bb49af8d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed depth prepass and postpass being disabled after changing the shader in the material UI. - Fix an issue in reading the gbuffer for ray traced subsurface scattering (case 1248358). - Fixed an issue where editing the Look Dev default profile would not reflect directly in the Look Dev window. +- Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings From 3b8cd8d284f30fe36938dc358576a140cd703a9b Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Fri, 19 Jun 2020 18:02:28 +0200 Subject: [PATCH 141/200] [Backport 8.x.x] Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once. (#991) * Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs * Update changelog --- .../CHANGELOG.md | 1 + .../Sky/HDLightingWindowEnvironmentSection.cs | 17 +++++++++++------ .../Runtime/Sky/SkyManager.cs | 9 +++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 099bb49af8d..7bb9d4c08b1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix an issue in reading the gbuffer for ray traced subsurface scattering (case 1248358). - Fixed an issue where editing the Look Dev default profile would not reflect directly in the Look Dev window. - Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. +- Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs b/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs index 682cba36804..53357c92561 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs @@ -32,13 +32,16 @@ class SerializedStaticLightingSky { SerializedObject serializedObject; public SerializedProperty skyUniqueID; - public SerializedProperty profile; + public VolumeProfile volumeProfile + { + get => (serializedObject.targetObject as StaticLightingSky).profile; + set => (serializedObject.targetObject as StaticLightingSky).profile = value; + } public SerializedStaticLightingSky(StaticLightingSky staticLightingSky) { serializedObject = new SerializedObject(staticLightingSky); skyUniqueID = serializedObject.FindProperty("m_StaticLightingSkyUniqueID"); - profile = serializedObject.FindProperty("m_Profile"); } public void Apply() => serializedObject.ApplyModifiedProperties(); @@ -170,10 +173,12 @@ void DrawGUI() ++EditorGUI.indentLevel; //cannot use SerializeProperty due to logic in the property - var profile = m_SerializedActiveSceneLightingSky.profile.objectReferenceValue; - var newProfile = EditorGUILayout.ObjectField(EditorGUIUtility.TrTextContent("Profile"), m_SerializedActiveSceneLightingSky.profile.objectReferenceValue, typeof(VolumeProfile), allowSceneObjects: false) as VolumeProfile; + var profile = m_SerializedActiveSceneLightingSky.volumeProfile; + var newProfile = EditorGUILayout.ObjectField(EditorGUIUtility.TrTextContent("Profile"), profile, typeof(VolumeProfile), allowSceneObjects: false) as VolumeProfile; if (profile != newProfile) - m_SerializedActiveSceneLightingSky.profile.objectReferenceValue = newProfile; + { + m_SerializedActiveSceneLightingSky.volumeProfile = newProfile; + } using (new EditorGUI.DisabledScope(m_SkyClassNames.Count == 1)) // Only "None" { @@ -200,7 +205,7 @@ void UpdateSkyIntPopupData() m_SkyClassNames.Add(new GUIContent("None")); m_SkyUniqueIDs.Add(0); - VolumeProfile profile = m_SerializedActiveSceneLightingSky.profile.objectReferenceValue as VolumeProfile; + VolumeProfile profile = m_SerializedActiveSceneLightingSky.volumeProfile; if (profile != null) { var skyTypesDict = SkyManager.skyTypesDict; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs index ba9ba4d50de..63543b12ea4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -820,12 +820,9 @@ public void UpdateEnvironment(HDCamera hdCamera, ScriptableRenderContext renderC #endif if ((ambientMode == SkyAmbientMode.Static || forceStaticUpdate) && hdCamera.camera.cameraType != CameraType.Preview) { - if (staticLightingSky != null) - { - m_StaticLightingSky.skySettings = staticLightingSky.skySettings; - UpdateEnvironment(hdCamera, renderContext, m_StaticLightingSky, sunLight, m_StaticSkyUpdateRequired, true, true, SkyAmbientMode.Static, frameIndex, cmd); - m_StaticSkyUpdateRequired = false; - } + m_StaticLightingSky.skySettings = staticLightingSky != null ? staticLightingSky.skySettings : null; + UpdateEnvironment(hdCamera, renderContext, m_StaticLightingSky, sunLight, m_StaticSkyUpdateRequired, true, true, SkyAmbientMode.Static, frameIndex, cmd); + m_StaticSkyUpdateRequired = false; } m_UpdateRequired = false; From 332213dfd19d041450889016628fe70fb21f5d0f Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:43:01 +0200 Subject: [PATCH 142/200] [Backport 8.x.x] Add defines guards around shadows hlsl files (#1092) * Add guards to shadow includes # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl * changelog --- .../ShaderLibrary/Shadow/ShadowSamplingTent.hlsl | 3 +++ com.unity.render-pipelines.high-definition/CHANGELOG.md | 3 +++ .../Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl | 4 ++++ .../Runtime/Lighting/Shadow/HDShadowSampling.hlsl | 3 +++ .../Runtime/Lighting/Shadow/ShadowMoments.hlsl | 3 +++ 5 files changed, 16 insertions(+) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Shadow/ShadowSamplingTent.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Shadow/ShadowSamplingTent.hlsl index 43280100c26..507635aaffe 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/Shadow/ShadowSamplingTent.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/Shadow/ShadowSamplingTent.hlsl @@ -1,3 +1,5 @@ +#ifndef SHADOW_SAMPLING_TENT_INCLUDED +#define SHADOW_SAMPLING_TENT_INCLUDED // ------------------------------------------------------------------ // PCF Filtering Tent Functions // ------------------------------------------------------------------ @@ -242,3 +244,4 @@ void SampleShadow_ComputeSamples_Tent_7x7(real4 shadowMapTexture_TexelSize, real fetchesWeights[14] = fetchesWeightsU.z * fetchesWeightsV.w; fetchesWeights[15] = fetchesWeightsU.w * fetchesWeightsV.w; } +#endif diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7bb9d4c08b1..5a639b5f79c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -29,6 +29,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where editing the Look Dev default profile would not reflect directly in the Look Dev window. - Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. - Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once. +- Fixed missing include guards in shadow hlsl files. + + ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl index 1aa7a294ab4..188c8dfe876 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl @@ -1,3 +1,6 @@ +#ifndef HD_SHADOW_ALGORITHMS_INCLUDED +#define HD_SHADOW_ALGORITHMS_INCLUDED + // Various shadow algorithms // There are two variants provided, one takes the texture and sampler explicitly so they can be statically passed in. // The variant without resource parameters dynamically accesses the texture when sampling. @@ -341,3 +344,4 @@ float EvalShadow_SampleClosestDistance_Punctual(HDShadowData sd, Texture2D tex, return distance(occluderPosWS, lightPositionWS); } +#endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSampling.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSampling.hlsl index a89d6292779..3480866c0a9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSampling.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowSampling.hlsl @@ -1,3 +1,5 @@ +#ifndef HD_SHADOW_SAMPLING_INCLUDED +#define HD_SHADOW_SAMPLING_INCLUDED // Various shadow sampling logic. // Again two versions, one for dynamic resource indexing, one for static resource access. @@ -328,3 +330,4 @@ float SampleShadow_PCSS(float3 tcs, float2 posSS, float2 scale, float2 offset, f // shadowData.shadowFilterParams0.z = shadowRequest.maxDepthBias; // #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDIMS.hlsl" +#endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowMoments.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowMoments.hlsl index d5ded67dc81..bce8d31f69c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowMoments.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ShadowMoments.hlsl @@ -1,3 +1,5 @@ +#ifndef SHADOW_MOMENTS_INCLUDED +#define SHADOW_MOMENTS_INCLUDED // Library header containing various useful functions for doing moment based shadow maps. // Supported flavors are VSM, EVSM and MSM @@ -131,3 +133,4 @@ float ShadowMoments_SolveDelta4MSM( float3 z, float4 b, float lightLeakBias) return saturate( ((1.0 - attenuation) - lightLeakBias) / (1.0 - lightLeakBias) ); } +#endif From 9d05c2e9298caddf3424f6dcb0fa9ccee919368d Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:53:56 +0200 Subject: [PATCH 143/200] [Backport 8.x.x] Fix issue with light layers > 7 in the deferred path (#1094) * Mask layers to consider only the supported 8 bits * changelog Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 3 +-- .../Runtime/Material/Lit/Lit.hlsl | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 5a639b5f79c..e8f04574608 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -30,8 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. - Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once. - Fixed missing include guards in shadow hlsl files. - - +- Fixed issue with light layers bigger than 8 (and above the supported range). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings 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 64ad119c8fd..1e856c8d89f 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 @@ -643,7 +643,8 @@ void EncodeIntoGBuffer( SurfaceData surfaceData outGBuffer3 *= GetCurrentExposureMultiplier(); #ifdef LIGHT_LAYERS - OUT_GBUFFER_LIGHT_LAYERS = float4(0.0, 0.0, 0.0, builtinData.renderingLayers / 255.0); + // Note: we need to mask out only 8bits of the layer mask before encoding it as otherwise any value > 255 will map to all layers active + OUT_GBUFFER_LIGHT_LAYERS = float4(0.0, 0.0, 0.0, (builtinData.renderingLayers & 0x000000FF) / 255.0); #endif #ifdef SHADOWS_SHADOWMASK From 78daa436a0587596e3b752cbc5fb13e0c3980652 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Thu, 2 Jul 2020 11:36:53 +0200 Subject: [PATCH 144/200] [Backport 8.x.x] Fix decal being duplicated in prefab isolation mode. (#1102) * Fixed decals being duplicated in prefab isolation mode. * Fix decals in the player. * Update changelog --- .../CHANGELOG.md | 1 + .../Material/Decal/DecalProjectorEditor.cs | 2 +- .../Decal/DecalProjector.Migration.cs | 4 +- .../Runtime/Material/Decal/DecalProjector.cs | 12 ++-- .../Runtime/Material/Decal/DecalSystem.cs | 56 ++++++++++++------- .../Runtime/RenderPipeline/Utility/HDUtils.cs | 9 +++ 6 files changed, 54 insertions(+), 30 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e8f04574608..173b6bc51c6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once. - Fixed missing include guards in shadow hlsl files. - Fixed issue with light layers bigger than 8 (and above the supported range). +- Fixed an issue where decals were duplicated in prefab isolation mode. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs index ab124573fa3..28842b8128a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs @@ -254,7 +254,7 @@ void DrawHandles() { // Smoothly update the decal image projected Matrix4x4 sizeOffset = Matrix4x4.Translate(decalProjector.decalOffset) * Matrix4x4.Scale(decalProjector.decalSize); - DecalSystem.instance.UpdateCachedData(decalProjector.position, decalProjector.rotation, sizeOffset, decalProjector.drawDistance, decalProjector.fadeScale, decalProjector.uvScaleBias, decalProjector.affectsTransparency, decalProjector.Handle, decalProjector.gameObject.layer, decalProjector.fadeFactor); + DecalSystem.instance.UpdateCachedData(decalProjector.position, decalProjector.rotation, sizeOffset, decalProjector.drawDistance, decalProjector.fadeScale, decalProjector.uvScaleBias, decalProjector.affectsTransparency, decalProjector.Handle, decalProjector.gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(decalProjector.gameObject), decalProjector.fadeFactor); } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.Migration.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.Migration.cs index da2070093f2..8c1ef20a3f2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.Migration.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.Migration.cs @@ -37,7 +37,7 @@ enum Version if (decal.m_Handle != null) DecalSystem.instance.RemoveDecal(decal.m_Handle); Matrix4x4 sizeOffset = Matrix4x4.Translate(decal.decalOffset) * Matrix4x4.Scale(decal.decalSize); - decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, decal.m_FadeFactor); + decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(decal.gameObject), decal.m_FadeFactor); }), MigrationStep.New(Version.FixPivotPosition, (DecalProjector decal) => { @@ -69,7 +69,7 @@ enum Version if (decal.m_Handle != null) DecalSystem.instance.RemoveDecal(decal.m_Handle); Matrix4x4 sizeOffset = Matrix4x4.Translate(decal.decalOffset) * Matrix4x4.Scale(decal.decalSize); - decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, decal.m_FadeFactor); + decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(decal.gameObject), decal.m_FadeFactor); }) ); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs index 4f2504252ed..b27590314f4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs @@ -231,7 +231,7 @@ void OnEnable() } Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize); - m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, m_FadeFactor); + m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(gameObject), m_FadeFactor); m_OldMaterial = m_Material; #if UNITY_EDITOR @@ -253,7 +253,7 @@ void UpdateDecalVisibility() else if (m_Handle == null) { Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize); - m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, m_FadeFactor); + m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(gameObject), m_FadeFactor); } } #endif @@ -292,7 +292,7 @@ internal void OnValidate() if (m_Material != null) { - m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, m_FadeFactor); + m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(gameObject), m_FadeFactor); if (!DecalSystem.IsHDRenderPipelineDecal(m_Material.shader)) // non HDRP/decal shaders such as shader graph decal do not affect transparency { @@ -310,7 +310,7 @@ internal void OnValidate() } else // no material change, just update whatever else changed { - DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, m_FadeFactor); + DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(gameObject), m_FadeFactor); } } } @@ -322,7 +322,7 @@ void Update() // only run in editor { Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize); m_Layer = gameObject.layer; - DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, m_FadeFactor); + DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(gameObject), m_FadeFactor); } } #endif @@ -334,7 +334,7 @@ void LateUpdate() if (transform.hasChanged == true) { Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize); - DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, m_FadeFactor); + DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, HDUtils.GetSceneCullingMaskFromGameObject(gameObject), m_FadeFactor); transform.hasChanged = false; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs index ceeed37afbd..c19d3d507b3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs @@ -422,7 +422,7 @@ private BoundingSphere GetDecalProjectBoundingSphere(Matrix4x4 decalToWorld) return res; } - public void UpdateCachedData(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, float fadeFactor) + public void UpdateCachedData(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, ulong sceneLayerMask, float fadeFactor) { int index = handle.m_Index; m_CachedDecalToWorld[index] = localToWorld * sizeOffset; @@ -448,19 +448,20 @@ public void UpdateCachedData(Matrix4x4 localToWorld, Quaternion rotation, Matrix m_CachedUVScaleBias[index] = uvScaleBias; m_CachedAffectsTransparency[index] = affectsTransparency; m_CachedLayerMask[index] = layerMask; + m_CachedSceneLayerMask[index] = sceneLayerMask; m_CachedFadeFactor[index] = fadeFactor; m_BoundingSpheres[index] = GetDecalProjectBoundingSphere(m_CachedDecalToWorld[index]); } - public void UpdateCachedData(Transform transform, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, float fadeFactor) + public void UpdateCachedData(Transform transform, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, ulong sceneLayerMask, float fadeFactor) { if (m_Material == null) return; - UpdateCachedData(transform.localToWorldMatrix, transform.rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, fadeFactor); + UpdateCachedData(transform.localToWorldMatrix, transform.rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, sceneLayerMask, fadeFactor); } - public DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, int materialID, int layerMask, float fadeFactor) + public DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, int materialID, int layerMask, ulong sceneLayerMask, float fadeFactor) { // increase array size if no space left if (m_DecalsCount == m_Handles.Length) @@ -473,6 +474,7 @@ public DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4 Vector4[] newCachedUVScaleBias = new Vector4[m_DecalsCount + kDecalBlockSize]; bool[] newCachedAffectsTransparency = new bool[m_DecalsCount + kDecalBlockSize]; int[] newCachedLayerMask = new int[m_DecalsCount + kDecalBlockSize]; + ulong[] newCachedSceneLayerMask = new ulong[m_DecalsCount + kDecalBlockSize]; float[] newCachedFadeFactor = new float[m_DecalsCount + kDecalBlockSize]; m_ResultIndices = new int[m_DecalsCount + kDecalBlockSize]; @@ -484,6 +486,7 @@ public DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4 m_CachedUVScaleBias.CopyTo(newCachedUVScaleBias, 0); m_CachedAffectsTransparency.CopyTo(newCachedAffectsTransparency, 0); m_CachedLayerMask.CopyTo(newCachedLayerMask, 0); + m_CachedSceneLayerMask.CopyTo(newCachedSceneLayerMask, 0); m_CachedFadeFactor.CopyTo(newCachedFadeFactor, 0); m_Handles = newHandles; @@ -493,13 +496,13 @@ public DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4 m_CachedDrawDistances = newCachedDrawDistances; m_CachedUVScaleBias = newCachedUVScaleBias; m_CachedAffectsTransparency = newCachedAffectsTransparency; - m_CachedLayerMask = newCachedLayerMask; + m_CachedSceneLayerMask = newCachedSceneLayerMask; m_CachedFadeFactor = newCachedFadeFactor; } DecalHandle decalHandle = new DecalHandle(m_DecalsCount, materialID); m_Handles[m_DecalsCount] = decalHandle; - UpdateCachedData(localToWorld, rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, decalHandle, layerMask, fadeFactor); + UpdateCachedData(localToWorld, rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, decalHandle, layerMask, sceneLayerMask, fadeFactor); m_DecalsCount++; return decalHandle; } @@ -520,6 +523,7 @@ public void RemoveDecal(DecalHandle handle) m_CachedUVScaleBias[removeAtIndex] = m_CachedUVScaleBias[m_DecalsCount - 1]; m_CachedAffectsTransparency[removeAtIndex] = m_CachedAffectsTransparency[m_DecalsCount - 1]; m_CachedLayerMask[removeAtIndex] = m_CachedLayerMask[m_DecalsCount - 1]; + m_CachedSceneLayerMask[removeAtIndex] = m_CachedSceneLayerMask[m_DecalsCount - 1]; m_CachedFadeFactor[removeAtIndex] = m_CachedFadeFactor[m_DecalsCount - 1]; m_DecalsCount--; handle.m_Index = kInvalidIndex; @@ -628,14 +632,23 @@ public void CreateDrawData() AssignCurrentBatches(ref decalToWorldBatch, ref normalToWorldBatch, batchCount); Vector3 cameraPos = instance.CurrentCamera.transform.position; - Matrix4x4 worldToView = HDRenderPipeline.WorldToCamera(instance.CurrentCamera); + var camera = instance.CurrentCamera; + Matrix4x4 worldToView = HDRenderPipeline.WorldToCamera(camera); bool perChannelMask = instance.perChannelMask; + int cullingMask = camera.cullingMask; + ulong sceneCullingMask = HDUtils.GetSceneCullingMaskFromCamera(camera); + for (int resultIndex = 0; resultIndex < m_NumResults; resultIndex++) { int decalIndex = m_ResultIndices[resultIndex]; - int cullingMask = instance.CurrentCamera.cullingMask; int decalMask = 1 << m_CachedLayerMask[decalIndex]; - if ((cullingMask & decalMask) != 0) + ulong decalSceneCullingMask = m_CachedSceneLayerMask[decalIndex]; + bool sceneViewCullingMaskTest = true; +#if UNITY_EDITOR + // In the player, both masks will be zero. Besides we don't want to pay the cost in this case. + sceneViewCullingMaskTest = (sceneCullingMask & decalSceneCullingMask) != 0; +#endif + if ((cullingMask & decalMask) != 0 && sceneViewCullingMaskTest) { // do additional culling based on individual decal draw distances float distanceToDecal = (cameraPos - m_BoundingSpheres[decalIndex].position).magnitude; @@ -817,6 +830,7 @@ public int MaskBlendMode private Vector4[] m_CachedUVScaleBias = new Vector4[kDecalBlockSize]; // xy - scale, zw bias private bool[] m_CachedAffectsTransparency = new bool[kDecalBlockSize]; private int[] m_CachedLayerMask = new int[kDecalBlockSize]; + private ulong[] m_CachedSceneLayerMask = new ulong[kDecalBlockSize]; private float[] m_CachedFadeFactor = new float[kDecalBlockSize]; private Material m_Material; private MaterialPropertyBlock m_PropertyBlock = new MaterialPropertyBlock(); @@ -878,7 +892,7 @@ void SetupMipStreamingSettings(Material material, bool allMips) } } - DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, Material material, int layerMask, float fadeFactor) + DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, Material material, int layerMask, ulong sceneLayerMask, float fadeFactor) { SetupMipStreamingSettings(material, true); @@ -889,18 +903,18 @@ DecalHandle AddDecal(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 size decalSet = new DecalSet(material); m_DecalSets.Add(key, decalSet); } - return decalSet.AddDecal(localToWorld, rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, key, layerMask, fadeFactor); + return decalSet.AddDecal(localToWorld, rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, key, layerMask, sceneLayerMask, fadeFactor); } - public DecalHandle AddDecal(Vector3 position, Quaternion rotation, Vector3 scale, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, Material material, int layerMask, float fadeFactor) + public DecalHandle AddDecal(Vector3 position, Quaternion rotation, Vector3 scale, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, Material material, int layerMask, ulong sceneLayerMask, float fadeFactor) { - return AddDecal(Matrix4x4.TRS(position, rotation, scale), rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, material, layerMask, fadeFactor); + return AddDecal(Matrix4x4.TRS(position, rotation, scale), rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, material, layerMask, sceneLayerMask, fadeFactor); } - public DecalHandle AddDecal(Transform transform, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, Material material, int layerMask, float fadeFactor) + public DecalHandle AddDecal(Transform transform, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, Material material, int layerMask, ulong sceneLayerMask, float fadeFactor) { - return AddDecal(transform.localToWorldMatrix, transform.rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, material, layerMask, fadeFactor); + return AddDecal(transform.localToWorldMatrix, transform.rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, material, layerMask, sceneLayerMask, fadeFactor); } public void RemoveDecal(DecalHandle handle) @@ -922,7 +936,7 @@ public void RemoveDecal(DecalHandle handle) } } - void UpdateCachedData(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, float fadeFactor) + void UpdateCachedData(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, ulong sceneLayerMask, float fadeFactor) { if (!DecalHandle.IsValid(handle)) return; @@ -931,18 +945,18 @@ void UpdateCachedData(Matrix4x4 localToWorld, Quaternion rotation, Matrix4x4 siz int key = handle.m_MaterialID; if (m_DecalSets.TryGetValue(key, out decalSet)) { - decalSet.UpdateCachedData(localToWorld, rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, fadeFactor); + decalSet.UpdateCachedData(localToWorld, rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, sceneLayerMask, fadeFactor); } } - public void UpdateCachedData(Vector3 position, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, float fadeFactor) + public void UpdateCachedData(Vector3 position, Quaternion rotation, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, ulong sceneLayerMask, float fadeFactor) { - UpdateCachedData(Matrix4x4.TRS(position, rotation, Vector3.one), rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, fadeFactor); + UpdateCachedData(Matrix4x4.TRS(position, rotation, Vector3.one), rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, sceneLayerMask, fadeFactor); } - public void UpdateCachedData(Transform transform, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, float fadeFactor) + public void UpdateCachedData(Transform transform, Matrix4x4 sizeOffset, float drawDistance, float fadeScale, Vector4 uvScaleBias, bool affectsTransparency, DecalHandle handle, int layerMask, ulong sceneLayerMask, float fadeFactor) { - UpdateCachedData(Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one)/*transform.localToWorldMatrix*/, transform.rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, fadeFactor); + UpdateCachedData(Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one)/*transform.localToWorldMatrix*/, transform.rotation, sizeOffset, drawDistance, fadeScale, uvScaleBias, affectsTransparency, handle, layerMask, sceneLayerMask, fadeFactor); } public void BeginCull(CullRequest request) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs index 0560b4eaebb..cf69cfe6142 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs @@ -932,6 +932,15 @@ internal static UInt64 GetSceneCullingMaskFromCamera(Camera camera) } + internal static ulong GetSceneCullingMaskFromGameObject(GameObject go) + { +#if UNITY_EDITOR + return (go.scene == null) ? ~(ulong)0 : EditorSceneManager.GetSceneCullingMask(go.scene); +#else + return 0; +#endif + } + internal static HDAdditionalCameraData TryGetAdditionalCameraDataOrDefault(Camera camera) { if (camera == null || camera.Equals(null)) From a92b5daf301e917ff8a172d9a0933cac647fbce9 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Fri, 3 Jul 2020 15:51:29 +0200 Subject: [PATCH 145/200] Fixed the valid TRS test failing due to variable not being initialized to the identity matrix in RTShadows (1220600). (#1100) Co-authored-by: sebastienlagarde --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 ++ .../Runtime/Lighting/Light/HDAdditionalLightData.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 173b6bc51c6..cbd396bb6a5 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed missing include guards in shadow hlsl files. - Fixed issue with light layers bigger than 8 (and above the supported range). - Fixed an issue where decals were duplicated in prefab isolation mode. +- Fixed issue with light layers bigger than 8 (and above the supported range). +- Fixed the valid TRS test failing due to variable not being initialized to the identity matrix in RTShadows (1220600). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index 13a317b27d4..b9b8ffe8124 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -1430,7 +1430,7 @@ internal int shadowPrecision Plane[] m_ShadowFrustumPlanes = new Plane[6]; // temporary matrix that stores the previous light data (mainly used to discard history for ray traced screen space shadows) - [System.NonSerialized] internal Matrix4x4 previousTransform = new Matrix4x4(); + [System.NonSerialized] internal Matrix4x4 previousTransform = Matrix4x4.identity; // Temporary index that stores the current shadow index for the light [System.NonSerialized] internal int shadowIndex = -1; From e37db95404621c6fd0667193471eb85ffd1167e0 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Mon, 6 Jul 2020 18:35:57 +0200 Subject: [PATCH 146/200] Update CHANGELOG.md --- .../CHANGELOG.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 1c4d59cfa68..176dc0804e1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added a function (HDRenderPipeline.ResetRTHandleReferenceSize) to reset the reference size of RTHandle systems. ### Fixed +- Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). +- Fixed corrupted values on LayeredLit when using Vertex Color multiply mode to multiply and MSAA is activated. +- Fixed a cause of NaN when a normal of 0-length is generated (usually via shadergraph). +- Fixed a bug where not all entries were generated for the Attributes Struct in Shader Graph shaders. (case 1250275) +- VFX: Removed irrelevant queues in render queue selection from HDRP outputs +- VFX: Motion Vector are correctly renderered with MSAA [Case 1240754](https://issuetracker.unity3d.com/product/unity/issues/guid/1240754/) - Fixed shadowmask UI now correctly showing shadowmask disable - Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). - Fixed a performance issue with stochastic ray traced area shadows. @@ -32,7 +38,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed missing include guards in shadow hlsl files. - Fixed issue with light layers bigger than 8 (and above the supported range). - Fixed an issue where decals were duplicated in prefab isolation mode. -- Fixed issue with light layers bigger than 8 (and above the supported range). - Fixed the valid TRS test failing due to variable not being initialized to the identity matrix in RTShadows (1220600). ### Changed @@ -40,12 +45,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Made the StaticLightingSky class public so that users can change it by script for baking purpose. - Changed default exposure compensation to 0. -### Fixed -- Fixed a cause of NaN when a normal of 0-length is generated (usually via shadergraph). -- Fixed a bug where not all entries were generated for the Attributes Struct in Shader Graph shaders. (case 1250275) -- VFX: Removed irrelevant queues in render queue selection from HDRP outputs -- VFX: Motion Vector are correctly renderered with MSAA [Case 1240754](https://issuetracker.unity3d.com/product/unity/issues/guid/1240754/) - ## [8.1.0] - 2020-04-21 ### Added @@ -687,8 +686,6 @@ The version number for this package has increased due to a version update of a r - Added a fix script to handle the warning 'referenced script in (GameObject 'SceneIDMap') is missing' - Fix Wizard load when none selected for RenderPipelineAsset - Fixed issue with unclear naming of debug menu for decals. -- Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). -- Fixed corrupted values on LayeredLit when using Vertex Color multiply mode to multiply and MSAA is activated. ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled From 2bf57a4cbcb084f13e0e5fd574f1993b8684c26f Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 23 Apr 2020 13:44:00 +0100 Subject: [PATCH 147/200] Changed UI name, tooltip, and doc for maximum decals on screen (#232) Implements feedback from https://fogbugz.unity3d.com/f/cases/1189618/ --- .../Documentation~/HDRP-Asset.md | 2 +- .../Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md index ba666e6311b..73ff57b6263 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md @@ -65,7 +65,7 @@ These settings control the draw distance and resolution of the decals atlas that | **- Atlas Width** | The Decal Atlas width. This atlas stores all decals that project onto transparent surfaces. | | **- Atlas Height** | The Decal Atlas height. This atlas stores all decals that project onto transparent surfaces. | | **- Metal and Ambient Occlusion properties** | Enable the checkbox to allow decals to affect metallic and ambient occlusion Material properties. Enabling this feature has a performance impact. | -| **- Maximum** **Decals on Screen** | The maximum number of decals you can have on screen at one time. | +| **- Maximum Clustered Decals on Screen** | The maximum number of clustered decals that can affect transparent GameObjects on screen. Clustered decals refer to a list of decals that HDRP uses when it renders transparent GameObjects. | 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 c1aedeca879..d019df5a07b 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 @@ -145,7 +145,7 @@ public class GeneralSection public static readonly GUIContent maxPonctualContent = EditorGUIUtility.TrTextContent("Maximum Punctual on Screen", "Sets the maximum number of Point and Spot Lights HDRP can handle on screen at once."); public static readonly GUIContent maxAreaContent = EditorGUIUtility.TrTextContent("Maximum Area on Screen", "Sets the maximum number of area Lights HDRP can handle on screen at once."); public static readonly GUIContent maxEnvContent = EditorGUIUtility.TrTextContent("Maximum Reflection Probes on Screen", "Sets the maximum number of Planar and Reflection Probes HDRP can handle on screen at once."); - public static readonly GUIContent maxDecalContent = EditorGUIUtility.TrTextContent("Maximum Decals on Screen", "Sets the maximum number of Decals HDRP can handle on screen at once."); + public static readonly GUIContent maxDecalContent = EditorGUIUtility.TrTextContent("Maximum Clustered Decals on Screen", "Sets the maximum number of decals that can affect transparent GameObjects on screen."); public static readonly GUIContent resolutionContent = EditorGUIUtility.TrTextContent("Resolution", "Specifies the resolution of the shadow Atlas."); public static readonly GUIContent directionalShadowPrecisionContent = EditorGUIUtility.TrTextContent("Directional Shadow Precision", "Select the shadow map bit depth, this forces HDRP to use selected bit depth for shadow maps."); From f28fcccd96dbe64cdb7c7e8c4a93568a3a8f3339 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Fri, 24 Apr 2020 20:22:53 +0100 Subject: [PATCH 148/200] Update Custom-Post-Process.md (#233) --- .../Documentation~/Custom-Post-Process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md index 35148a1abb8..8e1943c222e 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Custom-Post-Process.md @@ -113,7 +113,7 @@ Now there are the **Setup**, **Render**, and **Cleanup** functions. These are he ### GrayScale Shader -HDRP gives you total control over the vertex and fragment Shader so you can edit both of them to suit your needs. Note that there are a number of utility functions in [Common.hlsl](https://github.com/Unity-Technologies/ScriptableRenderPipeline/blob/master/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl) and [Color.hlsl](https://github.com/Unity-Technologies/ScriptableRenderPipeline/blob/master/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl) that the Shader includes by default. This means that you have access to these utility functions in your effect. For example, the GrayScale Shader uses the Luminance() function to convert a linear RGB value to its luminance equivalent. +HDRP gives you total control over the vertex and fragment Shader so you can edit both of them to suit your needs. Note that there are a number of utility functions in [Common.hlsl](https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl) and [Color.hlsl](https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl) that the Shader includes by default. This means that you have access to these utility functions in your effect. For example, the GrayScale Shader uses the Luminance() function to convert a linear RGB value to its luminance equivalent. ``` Shader "Hidden/Shader/GrayScale" From 58be3b8ee876521159bebf13d27f47d95a8ce06b Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Fri, 24 Apr 2020 20:22:15 +0100 Subject: [PATCH 149/200] Update HDRP-Features.md (#235) --- .../Documentation~/HDRP-Features.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md index feb8105994e..73f8f3bbe18 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md @@ -92,19 +92,19 @@ The StackLit Shader improves on the Lit Shader in favor of quality over performa ![](Images/HDRPFeatures-HairShader.png) -The Hair Shader is purpose-built to accurately render realistic hair in your Unity Project. It uses an improved Kajiya Kay lighting model which features better energy conservation and provides you with more flexibility. +The Hair Shader is purpose-built to accurately render realistic hair in your Unity Project. It uses an improved Kajiya Kay lighting model which features better energy conservation and provides you with more flexibility. For more information, including a full list of Shader properties, see the [Hair Shader documentation](Master-Node-Hair). ### Fabric Shader ![](Images/HDRPFeatures-FabricShader.png) -The Fabric Shader allows you to render realistic fabric Materials in HDRP. You can use the cotton wool or silk lighting model to create a wide variety of fabrics. +The Fabric Shader allows you to render realistic fabric Materials in HDRP. You can use the cotton wool or silk lighting model to create a wide variety of fabrics. For more information, including a full list of Shader properties, see the [Fabric Shader documentation](Master-Node-Fabric). ### AxF Shader ![](Images/HDRPFeatures-AxFShader.png) -The AxF Shader supports the [X-Rite AxF](https://www.xrite.com/axf) measured Material format. The AxF importer, available in [Unity Enterprise for Product Lifecylce](https://unity.com/products/unity-enterprise-product-lifecycle), automatically populates an AxF Material when it imports AxF Assets. +The AxF Shader supports the [X-Rite AxF](https://www.xrite.com/axf) measured Material format. The AxF importer, available in [Unity Enterprise for Product Lifecylce](https://unity.com/products/unity-enterprise-product-lifecycle), automatically populates an AxF Material when it imports AxF Assets. For more information, including a full list of Shader properties, see the [AxF Shader documentation](AxF-Shader). ### Decal Shader @@ -216,7 +216,7 @@ om ![](Images/HDRPFeatures-Fog.png) -In HDRP, you set up fog, inside a [Volume](Volumes.md),so you can change fog settings, or even the fog type itself, depending on the position of the Camera in the Scene. You can set the color of the fog yourself or use the color of the sky. HDRP fog affects Materials with both opaque and transparent surfaces. HDRP implements an exponential [fog](Override-Fog.md) with optional volumetric effects. +In HDRP, you set up fog, inside a [Volume](Volumes.md), so you can change fog settings, or even the fog type itself, depending on the position of the Camera in the Scene. You can set the color of the fog yourself or use the color of the sky. HDRP fog affects Materials with both opaque and transparent surfaces. HDRP implements an exponential [fog](Override-Fog.md) with optional volumetric effects. ### Light Layers @@ -250,7 +250,7 @@ HDRP uses ray tracing to replace some of its screen space effects, shadowing tec Real time raytracing effect are currently in Preview and behavior could change in the future. - [Ray-Traced Ambient Occlusion](Ray-Traced-Ambient-Occlusion.md) replaces [screen space ambient occlusion](Override-Ambient-Occlusion.md) with a more accurate, ray-traced, ambient occlusion technique that can use off screen data. -- [Ray-Traced Contact Shadows](Ray-Tracing-Contact-Shadows.md) replaces [contact shadows](Override-Contact-Shadows.md) with a more accurate, ray-traced, contact shadow technique that can use off screen data. +- [Ray-Traced Contact Shadows](Ray-Traced-Contact-Shadows.md) replaces [contact shadows](Override-Contact-Shadows.md) with a more accurate, ray-traced, contact shadow technique that can use off screen data. - [Ray-Traced Global Illumination](Ray-Traced-Global-Illumination.md) is an alternative to Light Probes and lightmaps in HDRP. - [Ray-Traced Reflections](Ray-Traced-Reflections.md) is a replacement for [screen space reflection](Override-Screen-Space-Reflection.md) that uses a ray-traced reflection technique that can use off-screen data. - [Ray-Traced Shadows](Ray-Traced-Shadows.md) replace shadow maps for Directional, Point, and Area [Lights](Light-Component.md). @@ -307,7 +307,7 @@ The Render Pipeline Debugger contains many debugging and visualization tools to ### LookDev ![](Images/HDRPFeatures-LookDev.png) -The LookDev is a viewer that allows you to import and display Assets in a good, consistent lighting environment. Use it to validate outsourced Assets or to showcase your own created Asset with HDRP. For more information on the LookDev, including a description of how to use it, see the [LookDev documentation](LookDev.md). +The LookDev is a viewer that allows you to import and display Assets in a good, consistent lighting environment. Use it to validate outsourced Assets or to showcase your own created Asset with HDRP. For more information on the LookDev, including a description of how to use it, see the [LookDev documentation](Look-Dev.md). ### MatCap mode From 5f0ba2e1a5979688c0b5a2f9888d788284c7f050 Mon Sep 17 00:00:00 2001 From: fredericv-unity3d <55485372+fredericv-unity3d@users.noreply.github.com> Date: Thu, 7 May 2020 13:20:43 +0200 Subject: [PATCH 150/200] Hdrp/reflection probe scale perf #252 --- .../Editor/HDReflectionSystemTests.cs | 52 ++++++++ .../Editor/HDReflectionSystemTests.cs.meta | 11 ++ .../CHANGELOG.md | 1 + .../Reflection/HDBakedReflectionSystem.cs | 48 ++++---- .../Reflection/HDProbeCullingResults.cs | 5 +- .../Lighting/Reflection/HDProbeSystem.cs | 113 +++++++++--------- 6 files changed, 150 insertions(+), 80 deletions(-) create mode 100644 TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs create mode 100644 TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs.meta diff --git a/TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs b/TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs new file mode 100644 index 00000000000..1e7f0dfcc0c --- /dev/null +++ b/TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs @@ -0,0 +1,52 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor.Rendering; +using UnityEngine.TestTools; +using NUnit.Framework; +using System.Text.RegularExpressions; +using System.Globalization; +using System.Threading; +using Unity.PerformanceTesting; +using UnityEditor.Rendering.HighDefinition; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using static PerformanceTestUtils; +using static PerformanceMetricNames; + +public class HDReflectionSystemTests : EditorPerformanceTests +{ + [Version("1"), Test, Performance] + public void HDProbeSystemRegister() + { + using (ListPool.Get(out var probes)) + { + // Create a lot of probe + for (var i = 0; i < 10000; ++i) + { + var gameObject = new GameObject(i.ToString("0000")); + // Deactivate the GameObject to avoid OnEnable calls (which register the probe) + gameObject.SetActive(false); + gameObject.AddComponent(); + var probe = gameObject.AddComponent(); + probe.enabled = false; + probes.Add(probe); + } + + // Measure registration + Measure.Method(() => + { + foreach (var probe in probes) + HDProbeSystem.RegisterProbe(probe); + }).Run(); + + // Unregister + foreach (var probe in probes) + HDProbeSystem.UnregisterProbe(probe); + + // Delete the probes + foreach (var probe in probes) + Object.DestroyImmediate(probe.gameObject); + } + } +} diff --git a/TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs.meta b/TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs.meta new file mode 100644 index 00000000000..bf2dcfddbaa --- /dev/null +++ b/TestProjects/HDRP_PerformanceTests/Assets/PerformanceTests/Editor/HDReflectionSystemTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 34a610b21c88b5947a1780a1175ca3e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 176dc0804e1..c1543360fe1 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Shadowmask and realtime reflection probe property are hide in Quality settings - Made the StaticLightingSky class public so that users can change it by script for baking purpose. - Changed default exposure compensation to 0. +- Improved performance of reflection probe management when using a lot of probes. ## [8.1.0] - 2020-04-21 diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs index 071cf80f198..416a320cdbc 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs @@ -131,26 +131,27 @@ IScriptableBakedReflectionSystemStageNotifier handle HashUtilities.AppendHash(ref skySettingsHash, ref allProbeDependencyHash); var bakedProbes = HDProbeSystem.bakedProbes; + var bakedProbeCount = HDProbeSystem.bakedProbeCount; // == 2. == - var states = stackalloc HDProbeBakingState[bakedProbes.Count]; + var states = stackalloc HDProbeBakingState[bakedProbeCount]; ComputeProbeInstanceID(bakedProbes, states); ComputeProbeSettingsHashes(bakedProbes, states); // TODO: Handle bounce dependency here - ComputeProbeBakingHashes(bakedProbes.Count, allProbeDependencyHash, states); + ComputeProbeBakingHashes(bakedProbeCount, allProbeDependencyHash, states); CoreUnsafeUtils.QuickSort( - bakedProbes.Count, states + bakedProbeCount, states ); int operationCount = 0, addCount = 0, remCount = 0; - var maxProbeCount = Mathf.Max(bakedProbes.Count, m_HDProbeBakedStates.Length); + var maxProbeCount = Mathf.Max(bakedProbeCount, m_HDProbeBakedStates.Length); var addIndices = stackalloc int[maxProbeCount]; var remIndices = stackalloc int[maxProbeCount]; if (m_HDProbeBakedStates.Length == 0) { - for (int i = 0; i < bakedProbes.Count; ++i) + for (int i = 0; i < bakedProbeCount; ++i) addIndices[addCount++] = i; operationCount = addCount; } @@ -165,7 +166,7 @@ IScriptableBakedReflectionSystemStageNotifier handle HDProbeBakingState, HDProbeBakingState.ProbeBakingHash > ( m_HDProbeBakedStates.Length, oldBakedStates, // old hashes - bakedProbes.Count, states, // new hashes + bakedProbeCount, states, // new hashes addIndices, remIndices, out addCount, out remCount ); @@ -202,7 +203,7 @@ IScriptableBakedReflectionSystemStageNotifier handle // Get from cache or render the probe if (!File.Exists(cacheFile)) RenderAndWriteToFile(probe, cacheFile, cubeRT, planarRT); - + planarRT.Release(); } cubeRT.Release(); @@ -232,7 +233,7 @@ IScriptableBakedReflectionSystemStageNotifier handle for (int j = 0; j < 2; ++j) { AssetDatabase.StartAssetEditing(); - for (int i = 0; i < bakedProbes.Count; ++i) + for (int i = 0; i < bakedProbeCount; ++i) { var index = addIndices[i]; var instanceId = states[index].instanceID; @@ -312,7 +313,7 @@ IScriptableBakedReflectionSystemStageNotifier handle handle.SetIsDone(true); } - public static bool BakeProbes(IList bakedProbes) + public static bool BakeProbes(IEnumerable bakedProbes) { if (!(RenderPipelineManager.currentPipeline is HDRenderPipeline hdPipeline)) { @@ -326,9 +327,8 @@ public static bool BakeProbes(IList bakedProbes) var cubeRT = HDRenderUtilities.CreateReflectionProbeRenderTarget(cubemapSize); // Render and write the result to disk - for (int i = 0; i < bakedProbes.Count; ++i) + foreach (var probe in bakedProbes) { - var probe = bakedProbes[i]; var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe); var planarRT = HDRenderUtilities.CreatePlanarProbeRenderTarget((int)probe.resolution); RenderAndWriteToFile(probe, bakedTexturePath, cubeRT, planarRT); @@ -342,9 +342,8 @@ public static bool BakeProbes(IList bakedProbes) for (int j = 0; j < 2; ++j) { AssetDatabase.StartAssetEditing(); - for (int i = 0; i < bakedProbes.Count; ++i) + foreach (var probe in bakedProbes) { - var probe = bakedProbes[i]; var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe); AssetDatabase.ImportAsset(bakedTexturePath); ImportAssetAt(probe, bakedTexturePath); @@ -353,9 +352,8 @@ public static bool BakeProbes(IList bakedProbes) } AssetDatabase.StartAssetEditing(); - for (int i = 0; i < bakedProbes.Count; ++i) + foreach (var probe in bakedProbes) { - var probe = bakedProbes[i]; var bakedTexturePath = HDBakingUtilities.GetBakedTextureFilePath(probe); // Get or create the baked texture asset for the probe @@ -379,9 +377,8 @@ public static bool BakeProbes(IList bakedProbes) // updateCount is a transient data, so don't execute this code before the asset reload. { UnityEngine.Random.InitState((int)(1000 * hdPipeline.GetTime())); - for (int i = 0; i < bakedProbes.Count; ++i) + foreach (var probe in bakedProbes) { - var probe = bakedProbes[i]; var c = UnityEngine.Random.Range(2, 10); while (probe.texture.updateCount < c) probe.texture.IncrementUpdateCount(); } @@ -663,23 +660,28 @@ string GetGICacheFileForHDProbe(Hash128 hash) return Path.Combine(hashFolder, string.Format("HDProbe-{0}.exr", hash)); } - static void ComputeProbeInstanceID(IList probes, HDProbeBakingState* states) + static void ComputeProbeInstanceID(IEnumerable probes, HDProbeBakingState* states) { - for (int i = 0; i < probes.Count; ++i) - states[i].instanceID = probes[i].GetInstanceID(); + var i = 0; + foreach (var probe in probes) + { + states[i].instanceID = probe.GetInstanceID(); + ++i; + } } - static void ComputeProbeSettingsHashes(IList probes, HDProbeBakingState* states) + static void ComputeProbeSettingsHashes(IEnumerable probes, HDProbeBakingState* states) { - for (int i = 0; i < probes.Count; ++i) + var i = 0; + foreach (var probe in probes) { - var probe = probes[i]; var positionSettings = ProbeCapturePositionSettings.ComputeFrom(probe, null); var positionSettingsHash = positionSettings.ComputeHash(); // TODO: make ProbeSettings and unmanaged type so its hash can be the hash of its memory var probeSettingsHash = probe.settings.ComputeHash(); HashUtilities.AppendHash(ref positionSettingsHash, ref probeSettingsHash); states[i].probeSettingsHash = probeSettingsHash; + ++i; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeCullingResults.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeCullingResults.cs index 6ca43e2b60f..4fa75f24e34 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeCullingResults.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeCullingResults.cs @@ -10,7 +10,6 @@ struct HDProbeCullingResults List m_VisibleProbes; public IReadOnlyList visibleProbes => m_VisibleProbes ?? s_EmptyList; - internal List writeableVisibleProbes => m_VisibleProbes; internal void Reset() { @@ -20,11 +19,11 @@ internal void Reset() m_VisibleProbes.Clear(); } - internal void Set(List visibleProbes) + internal void AddProbe(HDProbe visibleProbes) { Assert.IsNotNull(m_VisibleProbes); - m_VisibleProbes.AddRange(visibleProbes); + m_VisibleProbes.Add(visibleProbes); } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs index 5a2bcc6dac5..4f17ce5df33 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbeSystem.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using Unity.Collections.LowLevel.Unsafe; using UnityEngine.Assertions; @@ -30,9 +31,10 @@ public static ReflectionSystemParameters Parameters set => s_Instance.Parameters = value; } - public static IList realtimeViewDependentProbes => s_Instance.realtimeViewDependentProbes; - public static IList realtimeViewIndependentProbes => s_Instance.realtimeViewIndependentProbes; - public static IList bakedProbes => s_Instance.bakedProbes; + public static IEnumerable realtimeViewDependentProbes => s_Instance.realtimeViewDependentProbes; + public static IEnumerable realtimeViewIndependentProbes => s_Instance.realtimeViewIndependentProbes; + public static IEnumerable bakedProbes => s_Instance.bakedProbes; + public static int bakedProbeCount => s_Instance.bakedProbeCount; public static void RegisterProbe(HDProbe probe) => s_Instance.RegisterProbe(probe); public static void UnregisterProbe(HDProbe probe) => s_Instance.UnregisterProbe(probe); @@ -143,21 +145,25 @@ static Texture CreateAndSetRenderTargetIfRequired(HDProbe probe, ProbeSettings.M class HDProbeSystemInternal : IDisposable { - List m_BakedProbes = new List(); - List m_RealtimeViewDependentProbes = new List(); - List m_RealtimeViewIndependentProbes = new List(); + HashSet m_BakedProbes = new HashSet(); + HashSet m_RealtimeViewDependentProbes = new HashSet(); + HashSet m_RealtimeViewIndependentProbes = new HashSet(); int m_PlanarProbeCount = 0; - PlanarReflectionProbe[] m_PlanarProbes = new PlanarReflectionProbe[32]; + bool m_RebuildPlanarProbeArray; + HashSet m_PlanarProbes = new HashSet(); + PlanarReflectionProbe[] m_PlanarProbesArray = new PlanarReflectionProbe[32]; BoundingSphere[] m_PlanarProbeBounds = new BoundingSphere[32]; CullingGroup m_PlanarProbeCullingGroup = new CullingGroup(); - public IList bakedProbes + public IEnumerable bakedProbes { get { RemoveDestroyedProbes(m_BakedProbes); return m_BakedProbes; } } - public IList realtimeViewDependentProbes + public IEnumerable realtimeViewDependentProbes { get { RemoveDestroyedProbes(m_RealtimeViewDependentProbes); return m_RealtimeViewDependentProbes; } } - public IList realtimeViewIndependentProbes + public IEnumerable realtimeViewIndependentProbes { get { RemoveDestroyedProbes(m_RealtimeViewIndependentProbes); return m_RealtimeViewIndependentProbes; } } + public int bakedProbeCount => m_BakedProbes.Count; + public ReflectionSystemParameters Parameters; public void Dispose() @@ -172,12 +178,7 @@ internal void RegisterProbe(HDProbe probe) switch (settings.mode) { case ProbeSettings.Mode.Baked: - // TODO: Remove the duplicate check - // In theory, register/unregister are called by pair, never twice register in a row - // So there should not any "duplicate" calls. still it happens and we must prevent - // duplicate entries. - if (!m_BakedProbes.Contains(probe)) - m_BakedProbes.Add(probe); + m_BakedProbes.Add(probe); break; case ProbeSettings.Mode.Realtime: switch (settings.type) @@ -198,22 +199,19 @@ internal void RegisterProbe(HDProbe probe) { case ProbeSettings.ProbeType.PlanarProbe: { - // TODO: Remove the duplicate check - // In theory, register/unregister are called by pair, never twice register in a row - // So there should not any "duplicate" calls. still it happens and we must prevent - // duplicate entries. - if (Array.IndexOf(m_PlanarProbes, (PlanarReflectionProbe) probe) != -1) - break; - - // Grow the arrays - if (m_PlanarProbeCount == m_PlanarProbes.Length) + if (m_PlanarProbes.Add((PlanarReflectionProbe)probe)) { - Array.Resize(ref m_PlanarProbes, m_PlanarProbes.Length * 2); - Array.Resize(ref m_PlanarProbeBounds, m_PlanarProbeBounds.Length * 2); + // Insert in the array + // Grow the arrays + if (m_PlanarProbeCount == m_PlanarProbesArray.Length) + { + Array.Resize(ref m_PlanarProbesArray, m_PlanarProbes.Count * 2); + Array.Resize(ref m_PlanarProbeBounds, m_PlanarProbeBounds.Length * 2); + } + m_PlanarProbesArray[m_PlanarProbeCount] = (PlanarReflectionProbe)probe; + m_PlanarProbeBounds[m_PlanarProbeCount] = ((PlanarReflectionProbe)probe).boundingSphere; + ++m_PlanarProbeCount; } - m_PlanarProbes[m_PlanarProbeCount] = (PlanarReflectionProbe)probe; - m_PlanarProbeBounds[m_PlanarProbeCount] = ((PlanarReflectionProbe)probe).boundingSphere; - ++m_PlanarProbeCount; break; } } @@ -226,16 +224,11 @@ internal void UnregisterProbe(HDProbe probe) m_RealtimeViewIndependentProbes.Remove(probe); // Remove swap back - var index = Array.IndexOf(m_PlanarProbes, probe); - if (index != -1) + if (m_PlanarProbes.Remove(probe)) { - if (index < m_PlanarProbeCount) - { - m_PlanarProbes[index] = m_PlanarProbes[m_PlanarProbeCount - 1]; - m_PlanarProbeBounds[index] = m_PlanarProbeBounds[m_PlanarProbeCount - 1]; - m_PlanarProbes[m_PlanarProbeCount - 1] = null; - } - --m_PlanarProbeCount; + // It is best to rebuild the full array when we need it instead of doing it at each unregister. + // So we mark it as dirty. + m_RebuildPlanarProbeArray = true; } } @@ -246,15 +239,34 @@ internal HDProbeCullState PrepareCull(Camera camera) if (m_PlanarProbeCullingGroup == null) return default; - UpdateBoundsAndRemoveDestroyedProbes(m_PlanarProbes, m_PlanarProbeBounds, ref m_PlanarProbeCount); + RebuildPlanarProbeArrayIfRequired(); + + UpdateBoundsAndRemoveDestroyedProbes(m_PlanarProbesArray, m_PlanarProbeBounds, ref m_PlanarProbeCount); m_PlanarProbeCullingGroup.targetCamera = camera; m_PlanarProbeCullingGroup.SetBoundingSpheres(m_PlanarProbeBounds); m_PlanarProbeCullingGroup.SetBoundingSphereCount(m_PlanarProbeCount); - var stateHash = ComputeStateHashDebug(m_PlanarProbeBounds, m_PlanarProbes, m_PlanarProbeCount); + var stateHash = ComputeStateHashDebug(m_PlanarProbeBounds, m_PlanarProbesArray, m_PlanarProbeCount); - return new HDProbeCullState(m_PlanarProbeCullingGroup, m_PlanarProbes, stateHash); + return new HDProbeCullState(m_PlanarProbeCullingGroup, m_PlanarProbesArray, stateHash); + } + + void RebuildPlanarProbeArrayIfRequired() + { + if (m_RebuildPlanarProbeArray) + { + RemoveDestroyedProbes(m_PlanarProbes); + + m_RebuildPlanarProbeArray = false; + var i = 0; + foreach (var probe in m_PlanarProbes) + { + m_PlanarProbesArray[i] = (PlanarReflectionProbe)probe; + ++i; + } + m_PlanarProbeCount = m_PlanarProbes.Count; + } } int[] m_QueryCullResults_Indices; @@ -262,29 +274,22 @@ internal void QueryCullResults(HDProbeCullState state, ref HDProbeCullingResults { Assert.IsNotNull(state.cullingGroup, "Culling was not prepared, please prepare cull before performing it."); Assert.IsNotNull(state.hdProbes, "Culling was not prepared, please prepare cull before performing it."); - var stateHash = ComputeStateHashDebug(m_PlanarProbeBounds, m_PlanarProbes, m_PlanarProbeCount); + var stateHash = ComputeStateHashDebug(m_PlanarProbeBounds, m_PlanarProbesArray, m_PlanarProbeCount); Assert.AreEqual(stateHash, state.stateHash, "HDProbes changes since culling was prepared, this will lead to incorrect results."); results.Reset(); - var probes = results.writeableVisibleProbes; Array.Resize( ref m_QueryCullResults_Indices, Parameters.maxActivePlanarReflectionProbe + Parameters.maxActiveReflectionProbe ); var indexCount = state.cullingGroup.QueryIndices(true, m_QueryCullResults_Indices, 0); - for (int i = 0; i < indexCount; ++i) - probes.Add(state.hdProbes[m_QueryCullResults_Indices[i]]); + for (var i = 0; i < indexCount; ++i) + results.AddProbe(state.hdProbes[m_QueryCullResults_Indices[i]]); } - static void RemoveDestroyedProbes(List probes) - { - for (int i = probes.Count - 1; i >= 0; --i) - { - if (probes[i] == null || probes[i].Equals(null)) - probes.RemoveAt(i); - } - } + static void RemoveDestroyedProbes(HashSet probes) + => probes.RemoveWhere(p => p == null || p.Equals(null)); static void UpdateBoundsAndRemoveDestroyedProbes(PlanarReflectionProbe[] probes, BoundingSphere[] bounds, ref int count) { From 8632bf45ff4dcb4d1010ee81305ce515426256ae Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Fri, 24 Apr 2020 21:15:10 +0200 Subject: [PATCH 151/200] Add missing documentation for AOV API params #254 --- .../Runtime/RenderPipeline/RenderPass/AOV/AOVRequestData.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/AOV/AOVRequestData.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/AOV/AOVRequestData.cs index c2e29e0ba08..93fdbe10c13 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/AOV/AOVRequestData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/AOV/AOVRequestData.cs @@ -70,7 +70,8 @@ FramePassCallback callback } /// Allocate texture if required. - /// A buffer of texture ready to use. + /// A buffer of textures ready to use. + /// A buffer of textures ready to use for custom pass AOVs. public void AllocateTargetTexturesIfRequired(ref List textures) { if (!isValid || textures == null) @@ -154,6 +155,7 @@ List targets /// Execute the frame pass callback. It assumes that the textures are properly initialized and filled. /// The command buffer to use. /// The textures to use. + /// The custom pass AOV textures to use. /// The properties computed for this frame. public void Execute(CommandBuffer cmd, List framePassTextures, RenderOutputProperties outputProperties) { From cd4e03dc4ed2b34b9e93cfbeb210010e61669d97 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Sat, 25 Apr 2020 13:56:29 +0200 Subject: [PATCH 152/200] Update HDAdditionalLightData.Migration.cs (#269) --- .../Light/HDAdditionalLightData.Migration.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs index 5901520b37c..af0f8ca6b1c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.Migration.cs @@ -23,6 +23,7 @@ enum Version AreaLightShapeTypeLogicIsolation, PCSSUIUpdate, MoveEmissionMesh, + EnableApplyRangeAttenuationOnBoxLight, } /// @@ -163,6 +164,19 @@ private static readonly MigrationDescription k_H data.m_AreaLightEmissiveMeshShadowCastingMode = oldShadowCastingMode; data.m_AreaLightEmissiveMeshMotionVectorGenerationMode = oldMotionVectorMode; } + }), + MigrationStep.New(Version.EnableApplyRangeAttenuationOnBoxLight, (HDAdditionalLightData data) => + { + // When enabling range attenuation for box light, the default value was "true" + // causing a migration issue. So when we migrate we setup applyRangeAttenuation to false + // if we are a box light to keep the previous behavior + if (data.type == HDLightType.Spot) + { + if (data.spotLightShape == SpotLightShape.Box) + { + data.applyRangeAttenuation = false; + } + } }) ); #pragma warning restore 0618, 0612 From a6a989ef47b4f79377349b204534756528e104e9 Mon Sep 17 00:00:00 2001 From: slunity <37302815+slunity@users.noreply.github.com> Date: Thu, 7 May 2020 07:25:04 -0400 Subject: [PATCH 153/200] [9.x.x] Axf measurements into tilings #289 --- .../Common/Textures/bushalpha.gif | 3 + .../Common/Textures/bushalpha.gif.meta | 94 ++ .../Scenes/1x_Materials/1451_AxF_SVBRDF.unity | 1489 +++++++++++++---- .../1451_AxF_SVBRDF/AxF_aniso/AxF_aniso.mat | 15 + .../AxF_displacement/AxF_displacement.mat | 17 +- .../CHANGELOG.md | 1 + .../Documentation~/AxF-Shader.md | 3 +- .../UIBlocks/AxfSurfaceInputsUIBlock.cs | 75 +- .../Runtime/Material/AxF/AxF.shader | 18 +- .../Runtime/Material/AxF/AxFData.hlsl | 59 +- .../Runtime/Material/AxF/AxFProperties.hlsl | 18 +- 11 files changed, 1448 insertions(+), 344 deletions(-) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif b/TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif new file mode 100644 index 00000000000..119aa447a2c --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53847770c80865ea05e06d3aa3d31802d608ca2521e77a6d0fb078bba5ab153b +size 118738 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif.meta new file mode 100644 index 00000000000..cf0a5a4f8c8 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Common/Textures/bushalpha.gif.meta @@ -0,0 +1,94 @@ +fileFormatVersion: 2 +guid: ba79e8f27cb96c4478d73e1dc76663a6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + 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: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF.unity index 229863e9ebc..a7d0b177ba3 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF.unity @@ -43,7 +43,7 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 @@ -98,7 +98,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 0} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -118,6 +118,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -182,6 +184,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -206,6 +209,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1704810 MeshFilter: m_ObjectHideFlags: 0 @@ -275,6 +279,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -299,6 +304,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &20353147 MeshFilter: m_ObjectHideFlags: 0 @@ -368,6 +374,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -392,6 +399,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &37278073 MeshFilter: m_ObjectHideFlags: 0 @@ -455,6 +463,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -479,6 +488,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &38485855 Transform: m_ObjectHideFlags: 0 @@ -540,6 +550,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -564,6 +575,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &41917319 MeshFilter: m_ObjectHideFlags: 0 @@ -759,6 +771,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -849,17 +862,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -874,6 +888,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -888,9 +903,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -899,12 +916,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &47768815 GameObject: m_ObjectHideFlags: 0 @@ -976,6 +1005,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1000,6 +1030,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &49616981 GameObject: m_ObjectHideFlags: 0 @@ -1061,6 +1092,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1085,6 +1117,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &49616985 MeshFilter: m_ObjectHideFlags: 0 @@ -1190,7 +1223,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 6 + m_Version: 7 m_ObsoleteRenderingPath: 0 m_ObsoleteFrameSettings: overrides: 0 @@ -1248,6 +1281,12 @@ MonoBehaviour: SMAAQuality: 2 dithering: 0 stopNaNs: 0 + taaSharpenStrength: 0.5 + TAAQuality: 1 + taaHistorySharpening: 0.35 + taaAntiFlicker: 0.5 + taaMotionVectorRejection: 0 + taaAntiHistoryRinging: 0 physicalParameters: m_Iso: 200 m_ShutterSpeed: 0.005 @@ -1257,6 +1296,7 @@ MonoBehaviour: m_BarrelClipping: 0.25 m_Anamorphism: 0 flipYMode: 0 + xrRendering: 1 fullscreenPassthrough: 0 allowDynamicResolution: 0 customRenderingSettings: 0 @@ -1264,14 +1304,21 @@ MonoBehaviour: probeLayerMask: serializedVersion: 2 m_Bits: 4294967295 + hasPersistentHistory: 0 m_RenderingPathCustomFrameSettings: bitDatas: - data1: 69456063627037 + data1: 70005819440989 data2: 4539628424926265344 lodBias: 1 lodBiasMode: 0 + lodBiasQualityLevel: 0 maximumLODLevel: 0 maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + materialQuality: 0 renderingPathCustomFrameSettingsOverrideMask: mask: data1: 0 @@ -1294,11 +1341,15 @@ MonoBehaviour: TargetHeight: 560 PerPixelCorrectnessThreshold: 0.001 AverageCorrectnessThreshold: 0.0001 + UseHDR: 0 doBeforeTest: m_PersistentCalls: m_Calls: [] captureFramerate: 0 waitFrames: 0 + xrCompatible: 1 + xrThresholdMultiplier: 1 + checkMemoryAllocation: 1 renderPipelineAsset: {fileID: 11400000, guid: d7fe5f39d2c099a4ea1f1f610af309d7, type: 2} --- !u!1 &82468730 @@ -1372,6 +1423,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1396,6 +1448,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &102081030 GameObject: m_ObjectHideFlags: 0 @@ -1465,6 +1518,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1489,6 +1543,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &115985703 GameObject: m_ObjectHideFlags: 0 @@ -1558,6 +1613,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1582,6 +1638,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &126187769 GameObject: m_ObjectHideFlags: 0 @@ -1643,6 +1700,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1667,6 +1725,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &126187773 MeshFilter: m_ObjectHideFlags: 0 @@ -1848,6 +1907,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -1938,17 +1998,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -1963,6 +2024,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -1977,9 +2039,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -1988,12 +2052,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &140724492 GameObject: m_ObjectHideFlags: 0 @@ -2063,6 +2139,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2087,6 +2164,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!21 &153968511 Material: serializedVersion: 6 @@ -2260,6 +2338,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -2350,17 +2429,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -2375,6 +2455,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -2389,9 +2470,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -2400,12 +2483,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &164541262 GameObject: m_ObjectHideFlags: 0 @@ -2463,6 +2558,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2487,6 +2583,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &164541265 Transform: m_ObjectHideFlags: 0 @@ -2556,6 +2653,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2580,6 +2678,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &167047107 Transform: m_ObjectHideFlags: 0 @@ -2767,6 +2866,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -2857,17 +2957,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -2882,6 +2983,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -2896,9 +2998,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -2907,12 +3011,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &214093414 GameObject: m_ObjectHideFlags: 0 @@ -2956,9 +3072,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &214093417 MeshRenderer: @@ -2975,6 +3091,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -2999,6 +3116,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &214093418 MeshFilter: m_ObjectHideFlags: 0 @@ -3068,6 +3186,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3092,6 +3211,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &225496980 MeshFilter: m_ObjectHideFlags: 0 @@ -3273,6 +3393,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -3363,17 +3484,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -3388,6 +3510,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -3402,9 +3525,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -3413,12 +3538,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &265609860 GameObject: m_ObjectHideFlags: 0 @@ -3474,6 +3611,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3498,6 +3636,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &265609863 Transform: m_ObjectHideFlags: 0 @@ -3567,6 +3706,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3591,6 +3731,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &275760672 Transform: m_ObjectHideFlags: 0 @@ -3674,6 +3815,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3698,6 +3840,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &318085184 GameObject: m_ObjectHideFlags: 0 @@ -3741,9 +3884,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &318085187 MeshRenderer: @@ -3760,6 +3903,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3784,6 +3928,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &318085188 MeshFilter: m_ObjectHideFlags: 0 @@ -3849,6 +3994,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3873,6 +4019,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &322748704 Transform: m_ObjectHideFlags: 0 @@ -3942,6 +4089,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3966,6 +4114,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &323809367 Transform: m_ObjectHideFlags: 0 @@ -4023,9 +4172,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &335810560 MeshRenderer: @@ -4042,6 +4191,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4066,6 +4216,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &335810561 MeshFilter: m_ObjectHideFlags: 0 @@ -4129,6 +4280,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4153,6 +4305,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &350477504 Transform: m_ObjectHideFlags: 0 @@ -4340,6 +4493,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -4430,17 +4584,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -4455,6 +4610,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -4469,9 +4625,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -4480,12 +4638,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &410583931 GameObject: m_ObjectHideFlags: 0 @@ -4547,6 +4717,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4571,6 +4742,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &410583935 MeshFilter: m_ObjectHideFlags: 0 @@ -4752,6 +4924,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -4842,17 +5015,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -4867,6 +5041,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -4881,9 +5056,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -4892,12 +5069,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &433309750 GameObject: m_ObjectHideFlags: 0 @@ -4959,6 +5148,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4983,6 +5173,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &433309754 MeshFilter: m_ObjectHideFlags: 0 @@ -5060,6 +5251,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5084,6 +5276,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &451336651 GameObject: m_ObjectHideFlags: 0 @@ -5145,6 +5338,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5169,6 +5363,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &451336655 MeshFilter: m_ObjectHideFlags: 0 @@ -5220,9 +5415,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &466757110 MeshRenderer: @@ -5239,6 +5434,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5263,6 +5459,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &466757111 MeshFilter: m_ObjectHideFlags: 0 @@ -5318,6 +5515,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5342,6 +5540,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &474425942 MeshFilter: m_ObjectHideFlags: 0 @@ -5421,6 +5620,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5445,6 +5645,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &497040035 Transform: m_ObjectHideFlags: 0 @@ -5530,6 +5731,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5554,6 +5756,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &502626299 GameObject: m_ObjectHideFlags: 0 @@ -5615,6 +5818,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5639,6 +5843,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &502626303 MeshFilter: m_ObjectHideFlags: 0 @@ -5820,6 +6025,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -5910,17 +6116,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -5935,6 +6142,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -5949,9 +6157,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -5960,12 +6170,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &583448485 GameObject: m_ObjectHideFlags: 0 @@ -6009,9 +6231,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &583448488 MeshRenderer: @@ -6028,6 +6250,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6052,6 +6275,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &583448489 MeshFilter: m_ObjectHideFlags: 0 @@ -6107,6 +6331,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6131,6 +6356,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &591089169 MeshFilter: m_ObjectHideFlags: 0 @@ -6326,6 +6552,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -6416,17 +6643,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -6441,6 +6669,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -6455,9 +6684,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -6466,12 +6697,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &610798095 GameObject: m_ObjectHideFlags: 0 @@ -6533,6 +6776,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6557,6 +6801,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &610798099 MeshFilter: m_ObjectHideFlags: 0 @@ -6620,6 +6865,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6644,6 +6890,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &611714892 Transform: m_ObjectHideFlags: 0 @@ -6831,6 +7078,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -6921,17 +7169,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -6946,6 +7195,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -6960,9 +7210,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -6971,12 +7223,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &668861981 GameObject: m_ObjectHideFlags: 0 @@ -7166,11 +7430,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 5 - directionalIntensity: 3.1415927 - punctualIntensity: 600 - areaIntensity: 200 - lightLayers: 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 m_Intensity: 3.1415927 m_EnableSpotReflector: 0 m_LuxAtDistance: 1 @@ -7182,12 +7449,11 @@ MonoBehaviour: m_AffectDiffuse: 1 m_AffectSpecular: 1 m_NonLightmappedOnly: 0 - m_LightTypeExtent: 0 - m_SpotLightShape: 0 m_ShapeWidth: 0.5 m_ShapeHeight: 0.5 m_AspectRatio: 1 m_ShapeRadius: 0 + m_SoftnessScale: 1 m_UseCustomSpotLightShadowCone: 0 m_CustomSpotLightShadowCone: 30 m_MaxSmoothness: 0.99 @@ -7198,7 +7464,21 @@ MonoBehaviour: m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 m_AngularDiameter: 0 + 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: 150000000 + 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 @@ -7206,24 +7486,31 @@ MonoBehaviour: m_LightlayersMask: 1 m_LinkShadowLayers: 1 m_ShadowNearPlane: 0.1 - m_ShadowSoftness: 0.5 m_BlockerSampleCount: 24 m_FilterSampleCount: 16 - m_MinFilterSize: 0.00001 + m_MinFilterSize: 0.01 m_KernelSize: 5 m_LightAngle: 1 m_MaxDepthBias: 0.001 - m_ShadowResolutionTier: 1 - m_UseShadowQualitySettings: 0 - m_CustomShadowResolution: 512 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 m_ShadowDimmer: 1 m_VolumetricShadowDimmer: 1 m_ShadowFadeDistance: 10000 - m_ContactShadows: 0 + 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_ConstantBias: 0.15 + m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 m_ShadowCascadeRatios: - 0.05 - 0.2 @@ -7240,6 +7527,8 @@ MonoBehaviour: useVolumetric: 1 featuresFoldout: 1 showAdditionalSettings: 0 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 --- !u!1 &696014281 GameObject: m_ObjectHideFlags: 0 @@ -7295,6 +7584,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7319,6 +7609,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &696014284 Transform: m_ObjectHideFlags: 0 @@ -7394,6 +7685,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7418,6 +7710,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &705745959 MeshFilter: m_ObjectHideFlags: 0 @@ -7487,6 +7780,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7511,6 +7805,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &706354889 MeshFilter: m_ObjectHideFlags: 0 @@ -7576,6 +7871,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7600,6 +7896,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &723713429 Transform: m_ObjectHideFlags: 0 @@ -7787,6 +8084,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -7877,17 +8175,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -7902,6 +8201,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -7916,9 +8216,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -7927,12 +8229,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &738453219 GameObject: m_ObjectHideFlags: 0 @@ -7976,9 +8290,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &738453222 MeshRenderer: @@ -7995,6 +8309,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8019,6 +8334,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &738453223 MeshFilter: m_ObjectHideFlags: 0 @@ -8096,6 +8412,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8120,6 +8437,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &761290108 GameObject: m_ObjectHideFlags: 0 @@ -8181,6 +8499,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8205,6 +8524,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &761290112 MeshFilter: m_ObjectHideFlags: 0 @@ -8386,6 +8706,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -8476,17 +8797,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -8501,6 +8823,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -8515,9 +8838,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -8526,12 +8851,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &777732689 Material: serializedVersion: 6 @@ -8705,6 +9042,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -8795,17 +9133,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -8820,6 +9159,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -8834,9 +9174,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -8845,12 +9187,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &799881712 GameObject: m_ObjectHideFlags: 0 @@ -8912,6 +9266,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -8936,6 +9291,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &799881716 MeshFilter: m_ObjectHideFlags: 0 @@ -9013,6 +9369,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9037,6 +9394,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &822023385 GameObject: m_ObjectHideFlags: 0 @@ -9084,6 +9442,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9108,6 +9467,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &822023388 MeshFilter: m_ObjectHideFlags: 0 @@ -9199,6 +9559,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9223,6 +9584,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &840064229 GameObject: m_ObjectHideFlags: 0 @@ -9284,6 +9646,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9308,6 +9671,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &840064233 MeshFilter: m_ObjectHideFlags: 0 @@ -9377,6 +9741,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9401,6 +9766,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &842240211 MeshFilter: m_ObjectHideFlags: 0 @@ -9464,6 +9830,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9488,6 +9855,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &856014138 Transform: m_ObjectHideFlags: 0 @@ -9563,6 +9931,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9587,6 +9956,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &865144764 MeshFilter: m_ObjectHideFlags: 0 @@ -9768,6 +10138,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -9858,17 +10229,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -9883,6 +10255,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -9897,9 +10270,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -9908,12 +10283,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &936093829 GameObject: m_ObjectHideFlags: 0 @@ -9957,9 +10344,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &936093832 MeshRenderer: @@ -9976,6 +10363,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10000,6 +10388,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &936093833 MeshFilter: m_ObjectHideFlags: 0 @@ -10063,6 +10452,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10087,6 +10477,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &970190522 Transform: m_ObjectHideFlags: 0 @@ -10172,6 +10563,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10196,6 +10588,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &980233703 GameObject: m_ObjectHideFlags: 0 @@ -10251,6 +10644,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10275,6 +10669,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &980233706 Transform: m_ObjectHideFlags: 0 @@ -10462,6 +10857,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -10552,17 +10948,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -10577,6 +10974,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -10591,9 +10989,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -10602,12 +11002,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1003179268 GameObject: m_ObjectHideFlags: 0 @@ -10669,6 +11081,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10693,6 +11106,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1003179272 MeshFilter: m_ObjectHideFlags: 0 @@ -10874,6 +11288,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -10964,17 +11379,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -10989,6 +11405,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -11003,9 +11420,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -11014,12 +11433,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1020602144 GameObject: m_ObjectHideFlags: 0 @@ -11081,6 +11512,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11105,6 +11537,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1020602148 MeshFilter: m_ObjectHideFlags: 0 @@ -11182,6 +11615,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11206,6 +11640,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1056248094 GameObject: m_ObjectHideFlags: 0 @@ -11275,6 +11710,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11299,6 +11735,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!21 &1082360504 Material: serializedVersion: 6 @@ -11472,6 +11909,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -11562,17 +12000,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -11587,6 +12026,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -11601,9 +12041,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -11612,12 +12054,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1082854018 GameObject: m_ObjectHideFlags: 0 @@ -11679,6 +12133,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11703,6 +12158,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1082854022 MeshFilter: m_ObjectHideFlags: 0 @@ -11766,6 +12222,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11790,6 +12247,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1100767636 Transform: m_ObjectHideFlags: 0 @@ -11977,6 +12435,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -12067,17 +12526,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -12092,6 +12552,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -12106,9 +12567,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -12117,12 +12580,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1110235904 GameObject: m_ObjectHideFlags: 0 @@ -12184,6 +12659,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -12208,6 +12684,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1110235908 MeshFilter: m_ObjectHideFlags: 0 @@ -12285,6 +12762,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -12309,6 +12787,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1130594298 GameObject: m_ObjectHideFlags: 0 @@ -12352,9 +12831,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &1130594301 MeshRenderer: @@ -12371,6 +12850,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -12395,6 +12875,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1130594302 MeshFilter: m_ObjectHideFlags: 0 @@ -12458,6 +12939,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -12482,6 +12964,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1150080096 Transform: m_ObjectHideFlags: 0 @@ -12551,6 +13034,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -12575,6 +13059,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1159515358 Transform: m_ObjectHideFlags: 0 @@ -12694,6 +13179,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -12718,6 +13204,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1201919807 MeshFilter: m_ObjectHideFlags: 0 @@ -12899,6 +13386,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -12989,17 +13477,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -13014,6 +13503,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -13028,9 +13518,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -13039,12 +13531,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 2, g: 2, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1237308185 GameObject: m_ObjectHideFlags: 0 @@ -13106,6 +13610,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13130,6 +13635,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1237308189 MeshFilter: m_ObjectHideFlags: 0 @@ -13311,6 +13817,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -13401,17 +13908,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -13426,6 +13934,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -13440,9 +13949,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -13451,12 +13962,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1258990983 GameObject: m_ObjectHideFlags: 0 @@ -13518,6 +14041,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13542,6 +14066,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1258990987 MeshFilter: m_ObjectHideFlags: 0 @@ -13619,6 +14144,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13643,6 +14169,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1288075099 GameObject: m_ObjectHideFlags: 0 @@ -13714,6 +14241,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13738,6 +14266,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1322064150 GameObject: m_ObjectHideFlags: 0 @@ -13793,6 +14322,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13817,6 +14347,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1322064153 Transform: m_ObjectHideFlags: 0 @@ -13838,11 +14369,21 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 6004892619064504655, guid: adc7a3141c583ce49b9022be98bd5d96, + - target: {fileID: 198941061589059314, guid: adc7a3141c583ce49b9022be98bd5d96, type: 3} - propertyPath: m_Name - value: BrokenTestText + propertyPath: m_CharacterSize + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2366749451762349873, guid: adc7a3141c583ce49b9022be98bd5d96, + type: 3} + propertyPath: m_Enabled + value: 0 objectReference: {fileID: 0} + - target: {fileID: 2366749451762349873, guid: adc7a3141c583ce49b9022be98bd5d96, + type: 3} + propertyPath: targetCamera + value: + objectReference: {fileID: 75293432} - target: {fileID: 5489785850083597078, guid: adc7a3141c583ce49b9022be98bd5d96, type: 3} propertyPath: m_LocalPosition.x @@ -13913,21 +14454,11 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 0.59329414 objectReference: {fileID: 0} - - target: {fileID: 198941061589059314, guid: adc7a3141c583ce49b9022be98bd5d96, - type: 3} - propertyPath: m_CharacterSize - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2366749451762349873, guid: adc7a3141c583ce49b9022be98bd5d96, + - target: {fileID: 6004892619064504655, guid: adc7a3141c583ce49b9022be98bd5d96, type: 3} - propertyPath: m_Enabled - value: 0 + propertyPath: m_Name + value: BrokenTestText objectReference: {fileID: 0} - - target: {fileID: 2366749451762349873, guid: adc7a3141c583ce49b9022be98bd5d96, - type: 3} - propertyPath: targetCamera - value: - objectReference: {fileID: 75293432} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: adc7a3141c583ce49b9022be98bd5d96, type: 3} --- !u!1 &1369571295 @@ -13985,6 +14516,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14009,6 +14541,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1369571298 Transform: m_ObjectHideFlags: 0 @@ -14084,6 +14617,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14108,6 +14642,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1390785807 MeshFilter: m_ObjectHideFlags: 0 @@ -14289,6 +14824,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -14379,17 +14915,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -14404,6 +14941,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -14418,9 +14956,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -14429,12 +14969,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1418023247 GameObject: m_ObjectHideFlags: 0 @@ -14504,6 +15056,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14528,6 +15081,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1426059128 GameObject: m_ObjectHideFlags: 0 @@ -14589,6 +15143,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14613,6 +15168,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1426059132 MeshFilter: m_ObjectHideFlags: 0 @@ -14682,6 +15238,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14706,6 +15263,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1426758647 MeshFilter: m_ObjectHideFlags: 0 @@ -14775,6 +15333,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14799,6 +15358,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1439520866 MeshFilter: m_ObjectHideFlags: 0 @@ -14868,6 +15428,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14892,6 +15453,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1461010173 MeshFilter: m_ObjectHideFlags: 0 @@ -15073,6 +15635,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -15163,17 +15726,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -15188,6 +15752,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -15202,9 +15767,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -15213,12 +15780,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1498536033 GameObject: m_ObjectHideFlags: 0 @@ -15274,6 +15853,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -15298,6 +15878,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1498536036 Transform: m_ObjectHideFlags: 0 @@ -15485,6 +16066,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -15575,17 +16157,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -15600,6 +16183,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -15614,9 +16198,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -15625,12 +16211,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1508597291 GameObject: m_ObjectHideFlags: 0 @@ -15674,9 +16272,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &1508597294 MeshRenderer: @@ -15693,6 +16291,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -15717,6 +16316,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1508597295 MeshFilter: m_ObjectHideFlags: 0 @@ -15768,9 +16368,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &1509512978 MeshRenderer: @@ -15787,6 +16387,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -15811,6 +16412,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1509512979 MeshFilter: m_ObjectHideFlags: 0 @@ -15992,6 +16594,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -16082,17 +16685,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -16107,6 +16711,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -16121,9 +16726,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -16132,12 +16739,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &1582081110 Material: serializedVersion: 6 @@ -16311,6 +16930,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -16401,17 +17021,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -16426,6 +17047,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -16440,9 +17062,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -16451,12 +17075,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1613179979 GameObject: m_ObjectHideFlags: 0 @@ -16512,6 +17148,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -16536,6 +17173,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1613179982 Transform: m_ObjectHideFlags: 0 @@ -16605,6 +17243,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -16629,6 +17268,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1628155542 Transform: m_ObjectHideFlags: 0 @@ -16686,9 +17326,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &1657802540 MeshRenderer: @@ -16705,6 +17345,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -16729,6 +17370,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1657802541 MeshFilter: m_ObjectHideFlags: 0 @@ -16910,6 +17552,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -17000,17 +17643,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -17025,6 +17669,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -17039,9 +17684,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -17050,12 +17697,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1680095224 GameObject: m_ObjectHideFlags: 0 @@ -17125,6 +17784,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17149,6 +17809,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1693924828 GameObject: m_ObjectHideFlags: 0 @@ -17192,9 +17853,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &1693924831 MeshRenderer: @@ -17211,6 +17872,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17235,6 +17897,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1693924832 MeshFilter: m_ObjectHideFlags: 0 @@ -17312,6 +17975,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17336,6 +18000,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1752131080 GameObject: m_ObjectHideFlags: 0 @@ -17405,6 +18070,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17429,6 +18095,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1762925362 GameObject: m_ObjectHideFlags: 0 @@ -17472,9 +18139,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &1762925365 MeshRenderer: @@ -17491,6 +18158,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17515,6 +18183,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1762925366 MeshFilter: m_ObjectHideFlags: 0 @@ -17696,6 +18365,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -17786,17 +18456,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -17811,6 +18482,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -17825,9 +18497,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -17836,12 +18510,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1786551326 GameObject: m_ObjectHideFlags: 0 @@ -17903,6 +18589,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17927,6 +18614,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1786551330 MeshFilter: m_ObjectHideFlags: 0 @@ -18108,6 +18796,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -18198,17 +18887,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -18223,6 +18913,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -18237,9 +18928,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -18248,12 +18941,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &1794769461 Material: serializedVersion: 6 @@ -18427,6 +19132,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -18517,17 +19223,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -18542,6 +19249,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -18556,9 +19264,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -18567,12 +19277,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &1806450501 Material: serializedVersion: 6 @@ -18746,6 +19468,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -18836,17 +19559,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -18861,6 +19585,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -18875,9 +19600,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -18886,12 +19613,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &1806901691 Material: serializedVersion: 6 @@ -19065,6 +19804,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -19155,17 +19895,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -19180,6 +19921,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -19194,9 +19936,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -19205,12 +19949,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1822534184 GameObject: m_ObjectHideFlags: 0 @@ -19272,6 +20028,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -19296,6 +20053,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1822534188 MeshFilter: m_ObjectHideFlags: 0 @@ -19477,6 +20235,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -19567,17 +20326,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -19592,6 +20352,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -19606,9 +20367,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -19617,12 +20380,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &1847923393 Material: serializedVersion: 6 @@ -19796,6 +20571,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -19886,17 +20662,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -19911,6 +20688,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -19925,9 +20703,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -19936,12 +20716,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1852201115 GameObject: m_ObjectHideFlags: 0 @@ -20011,6 +20803,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -20035,6 +20828,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!21 &1865601234 Material: serializedVersion: 6 @@ -20208,6 +21002,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -20298,17 +21093,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -20323,6 +21119,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -20337,9 +21134,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -20348,12 +21147,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &1888583710 Material: serializedVersion: 6 @@ -20527,6 +21338,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -20617,17 +21429,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -20642,6 +21455,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -20656,9 +21470,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -20667,12 +21483,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!21 &1894177490 Material: serializedVersion: 6 @@ -20846,6 +21674,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -20936,17 +21765,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -20961,6 +21791,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -20975,9 +21806,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -20986,12 +21819,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1894567276 GameObject: m_ObjectHideFlags: 0 @@ -21061,6 +21906,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21085,6 +21931,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1909660569 GameObject: m_ObjectHideFlags: 0 @@ -21146,6 +21993,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21170,6 +22018,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1909660573 MeshFilter: m_ObjectHideFlags: 0 @@ -21233,6 +22082,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21257,6 +22107,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &1916000110 Transform: m_ObjectHideFlags: 0 @@ -21332,6 +22183,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21356,6 +22208,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1919108762 MeshFilter: m_ObjectHideFlags: 0 @@ -21537,6 +22390,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -21627,17 +22481,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -21652,6 +22507,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -21666,9 +22522,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -21677,12 +22535,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 5, g: 5, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &1943596800 GameObject: m_ObjectHideFlags: 0 @@ -21814,6 +22684,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21838,6 +22709,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &2011602049 MeshFilter: m_ObjectHideFlags: 0 @@ -21915,6 +22787,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21939,6 +22812,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &2022497119 GameObject: m_ObjectHideFlags: 0 @@ -21996,6 +22870,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22020,6 +22895,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &2022497122 Transform: m_ObjectHideFlags: 0 @@ -22089,6 +22965,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22113,6 +22990,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &2026519736 Transform: m_ObjectHideFlags: 0 @@ -22188,6 +23066,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22212,6 +23091,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &2066681238 MeshFilter: m_ObjectHideFlags: 0 @@ -22393,6 +23273,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -22444,7 +23325,7 @@ Material: - _EnableGeometricSpecularAA: 0 - _EnableSpecularOcclusion: 0 - _EnergyConservingSpecularColor: 1 - - _Flags: 8 + - _Flags: 0 - _HdrpVersion: 2 - _HeightAmplitude: 0.02 - _HeightCenter: 0.5 @@ -22483,17 +23364,18 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - - _StencilRef: 2 - - _StencilRefDepth: 16 + - _StencilRef: 0 + - _StencilRefDepth: 8 - _StencilRefDistortionVec: 64 - _StencilRefGBuffer: 2 - - _StencilRefMV: 144 - - _StencilWriteMask: 3 - - _StencilWriteMaskDepth: 48 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 64 - _StencilWriteMaskGBuffer: 3 - - _StencilWriteMaskMV: 176 + - _StencilWriteMaskMV: 40 - _SubsurfaceMask: 1 - _SupportDecals: 1 - _SurfaceType: 0 @@ -22508,6 +23390,7 @@ Material: - _TransparentDepthPrepassEnable: 0 - _TransparentSortPriority: 0 - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 - _UVBase: 0 - _UVDetail: 0 - _UVEmissive: 0 @@ -22522,9 +23405,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -22533,12 +23418,24 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 2, g: 2, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] --- !u!1 &2103592705 GameObject: m_ObjectHideFlags: 0 @@ -22608,6 +23505,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22632,6 +23530,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &2111968800 GameObject: m_ObjectHideFlags: 0 @@ -22689,6 +23588,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22713,6 +23613,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &2111968803 Transform: m_ObjectHideFlags: 0 @@ -22798,6 +23699,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22822,6 +23724,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &2138308295 GameObject: m_ObjectHideFlags: 0 @@ -22865,9 +23768,9 @@ MeshCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 3 + serializedVersion: 4 m_Convex: 0 - m_CookingOptions: 14 + m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!23 &2138308298 MeshRenderer: @@ -22884,6 +23787,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22908,6 +23812,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &2138308299 MeshFilter: m_ObjectHideFlags: 0 @@ -22971,6 +23876,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22995,6 +23901,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!4 &2147273450 Transform: m_ObjectHideFlags: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_aniso/AxF_aniso.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_aniso/AxF_aniso.mat index a2e68b3ddbe..734b3db1523 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_aniso/AxF_aniso.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_aniso/AxF_aniso.mat @@ -173,6 +173,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -263,6 +264,7 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - _StencilRef: 0 - _StencilRefDepth: 8 @@ -303,9 +305,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -314,6 +318,17 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 2, g: 2, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_displacement/AxF_displacement.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_displacement/AxF_displacement.mat index 36e419b4302..46a78f24e72 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_displacement/AxF_displacement.mat +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1451_AxF_SVBRDF/AxF_displacement/AxF_displacement.mat @@ -173,6 +173,7 @@ Material: - _AlphaCutoffShadow: 0.5 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 - _Anisotropy: 0 - _AxF_BRDFType: 0 - _BlendMode: 0 @@ -224,7 +225,7 @@ Material: - _EnableGeometricSpecularAA: 0 - _EnableSpecularOcclusion: 0 - _EnergyConservingSpecularColor: 1 - - _Flags: 8 + - _Flags: 0 - _HdrpVersion: 2 - _HeightAmplitude: 0.02 - _HeightCenter: 0.5 @@ -263,6 +264,7 @@ Material: - _SmoothnessRemapMin: 0 - _SpecularAAScreenSpaceVariance: 0.1 - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 - _SrcBlend: 1 - _StencilRef: 0 - _StencilRefDepth: 8 @@ -303,9 +305,11 @@ Material: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - _CarPaint2_BRDFColorMapUVScale: {r: 1, g: 1, b: 0, a: 0} + - _CarPaint2_BTFFlakeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _CarPaint2_CTCoeffs: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTF0s: {r: 1, g: 1, b: 1, a: 1} - _CarPaint2_CTSpreads: {r: 1, g: 1, b: 1, a: 1} + - _ClearcoatNormalMap_SO: {r: 1, g: 1, b: 0, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} @@ -314,6 +318,17 @@ Material: - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _Material_SO: {r: 2, g: 2, b: 0, a: 0} + - _SVBRDF_AlphaMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_AnisoRotationMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_ClearcoatIORMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_DiffuseColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_FresnelMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_HeightMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_NormalMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularColorMap_SO: {r: 1, g: 1, b: 0, a: 0} + - _SVBRDF_SpecularLobeMap_SO: {r: 1, g: 1, b: 0, a: 0} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c1543360fe1..e3a8d53bd54 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Added a function (HDRenderPipeline.ResetRTHandleReferenceSize) to reset the reference size of RTHandle systems. +- Added support for AxF measurements importing into texture resources tilings. ### Fixed - Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). diff --git a/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md b/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md index 5a346878a38..116b81ce63b 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/AxF-Shader.md @@ -58,8 +58,7 @@ Note: The AxF Importer imports every Texture as half float, linear, sRGB gamut ( | **Property** | **Description** | | --------------------- | ------------------------------------------------------------ | -| **Material Tiling U** | Sets the tile rate along the x-axis for every Texture in the **Surface Inputs** section. HDRP uses this value to tile the Textures along the x-axis of the Material’s surface, in object space. | -| **Material Tiling V** | Sets the tile rate along the y-axis for every Texture in the **Surface Inputs** section. HDRP uses this value to tile the Textures along the y-axis of the Material’s surface, in object space. | +| **Main Tiling & Offset** | Sets the tiling rate (xy) and offsets (zw) for every Texture in the **Surface Inputs** section. HDRP uses these values to tile the Textures along the xy-axes of the Material’s surface, in the object's tangent space. Each texture property can also specify additional tiling and offset values that are applied on top of these main values (Texture property-specific tiling rates are multiplied and offsets are added to the main values set here) | | **BRDF Type** | Controls the main AxF Material representation.
• **SVBRDF**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - SVBRDF](#SVBRDF).
•**CAR_PAINT**: For information on the properties Unity makes visible when you select this option, see [BRDF Type - CAR_PAINT](#CAR_PAINT). | diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AxfSurfaceInputsUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AxfSurfaceInputsUIBlock.cs index 3b379fa186c..55b8ab0f75d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AxfSurfaceInputsUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/AxfSurfaceInputsUIBlock.cs @@ -113,10 +113,23 @@ enum SvbrdfFresnelVariant ///////////////////////////////////////////////////////////////////////////////////////////////// // Generic Parameters - static string m_MaterialTilingUText = "_MaterialTilingU"; - MaterialProperty m_MaterialTilingU; - static string m_MaterialTilingVText = "_MaterialTilingV"; - MaterialProperty m_MaterialTilingV; + + MaterialProperty m_MaterialTilingOffset = null; + MaterialProperty m_DiffuseColorMapST = null; + MaterialProperty m_SpecularColorMapST = null; + MaterialProperty m_NormalMapST = null; + MaterialProperty m_SpecularLobeMapST = null; + MaterialProperty m_AlphaMapST = null; + MaterialProperty m_FresnelMapST = null; + MaterialProperty m_AnisoRotationMapST = null; + MaterialProperty m_HeightMapST = null; + MaterialProperty m_ClearcoatColorMapST = null; + MaterialProperty m_ClearcoatNormalMapST = null; + MaterialProperty m_ClearcoatIORMapST = null; + MaterialProperty m_CarPaint2_BTFFlakeMapST = null; + + static string tilingOffsetPropNameSuffix = "_SO"; + static string m_MaterialTilingOffsetText = "_Material_SO"; static string m_AxF_BRDFTypeText = "_AxF_BRDFType"; MaterialProperty m_AxF_BRDFType = null; @@ -179,9 +192,6 @@ enum SvbrdfFresnelVariant static string m_CarPaint2_BTFFlakeMapScaleText = "_CarPaint2_BTFFlakeMapScale"; MaterialProperty m_CarPaint2_BTFFlakeMapScale; - static string m_CarPaint2_FlakeTilingText = "_CarPaint2_FlakeTiling"; - MaterialProperty m_CarPaint2_FlakeTiling; - static string m_CarPaint2_FlakeThetaFISliceLUTMapText = "_CarPaint2_FlakeThetaFISliceLUTMap"; MaterialProperty m_CarPaint2_FlakeThetaFISliceLUTMap; @@ -224,8 +234,20 @@ public AxfSurfaceInputsUIBlock(Expandable expandableBit) public override void LoadMaterialProperties() { - m_MaterialTilingU = FindProperty(m_MaterialTilingUText); - m_MaterialTilingV = FindProperty(m_MaterialTilingVText); + m_MaterialTilingOffset = FindProperty(m_MaterialTilingOffsetText); + + m_DiffuseColorMapST = FindProperty(m_DiffuseColorMapText + tilingOffsetPropNameSuffix); + m_SpecularColorMapST = FindProperty(m_SpecularColorMapText + tilingOffsetPropNameSuffix); + m_NormalMapST = FindProperty(m_NormalMapText + tilingOffsetPropNameSuffix); + m_SpecularLobeMapST = FindProperty(m_SpecularLobeMapText + tilingOffsetPropNameSuffix); + m_AlphaMapST = FindProperty(m_AlphaMapText + tilingOffsetPropNameSuffix); + m_FresnelMapST = FindProperty(m_FresnelMapText + tilingOffsetPropNameSuffix); + m_AnisoRotationMapST = FindProperty(m_AnisoRotationMapText + tilingOffsetPropNameSuffix); + m_HeightMapST = FindProperty(m_HeightMapText + tilingOffsetPropNameSuffix); + m_ClearcoatColorMapST = FindProperty(m_ClearcoatColorMapText + tilingOffsetPropNameSuffix); + m_ClearcoatNormalMapST = FindProperty(m_ClearcoatNormalMapText + tilingOffsetPropNameSuffix); + m_ClearcoatIORMapST = FindProperty(m_ClearcoatIORMapText + tilingOffsetPropNameSuffix); + m_CarPaint2_BTFFlakeMapST = FindProperty(m_CarPaint2_BTFFlakeMapText + tilingOffsetPropNameSuffix); m_AxF_BRDFType = FindProperty(m_AxF_BRDFTypeText); @@ -264,7 +286,6 @@ public override void LoadMaterialProperties() m_CarPaint2_BRDFColorMapScale = FindProperty(m_CarPaint2_BRDFColorMapScaleText); m_CarPaint2_BRDFColorMapUVScale = FindProperty(m_CarPaint2_BRDFColorMapUVScaleText); m_CarPaint2_BTFFlakeMapScale = FindProperty(m_CarPaint2_BTFFlakeMapScaleText); - m_CarPaint2_FlakeTiling = FindProperty(m_CarPaint2_FlakeTilingText); m_CarPaint2_FlakeMaxThetaI = FindProperty(m_CarPaint2_FlakeMaxThetaIText); m_CarPaint2_FlakeNumThetaF = FindProperty(m_CarPaint2_FlakeNumThetaFText); @@ -323,8 +344,7 @@ public static void ExtractFlags(uint flags, void DrawAxfSurfaceOptionsGUI() { - materialEditor.ShaderProperty(m_MaterialTilingU, "Material Tiling U"); - materialEditor.ShaderProperty(m_MaterialTilingV, "Material Tiling V"); + materialEditor.ShaderProperty(m_MaterialTilingOffset, "Main Tiling & Offset"); AxfBrdfType AxF_BRDFType = (AxfBrdfType)m_AxF_BRDFType.floatValue; AxF_BRDFType = (AxfBrdfType)EditorGUILayout.Popup("BRDF Type", (int)AxF_BRDFType, AxfBrdfTypeNames); @@ -372,15 +392,15 @@ void DrawAxfSurfaceOptionsGUI() } // Regular maps - materialEditor.TexturePropertySingleLine(Styles.diffuseColorMapText, m_DiffuseColorMap); - materialEditor.TexturePropertySingleLine(Styles.specularColorMapText, m_SpecularColorMap); - materialEditor.TexturePropertySingleLine(Styles.specularLobeMapText, m_SpecularLobeMap); + materialEditor.TexturePropertySingleLine(Styles.diffuseColorMapText, m_DiffuseColorMap, m_DiffuseColorMapST); + materialEditor.TexturePropertySingleLine(Styles.specularColorMapText, m_SpecularColorMap, m_SpecularColorMapST); + materialEditor.TexturePropertySingleLine(Styles.specularLobeMapText, m_SpecularLobeMap, m_SpecularLobeMapST); m_SpecularLobeMapScale.floatValue = EditorGUILayout.FloatField(Styles.specularLobeMapScaleText, m_SpecularLobeMapScale.floatValue); - materialEditor.TexturePropertySingleLine(Styles.fresnelMapText, m_FresnelMap); - materialEditor.TexturePropertySingleLine(Styles.normalMapText, m_NormalMap); + materialEditor.TexturePropertySingleLine(Styles.fresnelMapText, m_FresnelMap, m_FresnelMapST); + materialEditor.TexturePropertySingleLine(Styles.normalMapText, m_NormalMap, m_NormalMapST); // Alpha - materialEditor.TexturePropertySingleLine(Styles.alphaMapText, m_AlphaMap); + materialEditor.TexturePropertySingleLine(Styles.alphaMapText, m_AlphaMap, m_AlphaMapST); // Displacement //TODO: unsupported for now @@ -389,7 +409,7 @@ void DrawAxfSurfaceOptionsGUI() if (useHeightMap) { ++EditorGUI.indentLevel; - materialEditor.TexturePropertySingleLine(Styles.heightMapText, m_HeightMap); + materialEditor.TexturePropertySingleLine(Styles.heightMapText, m_HeightMap, m_HeightMapST); materialEditor.ShaderProperty(m_SVBRDF_HeightMapMaxMM, "Max Displacement (mm)"); --EditorGUI.indentLevel; } @@ -399,7 +419,7 @@ void DrawAxfSurfaceOptionsGUI() if (anisotropy) { ++EditorGUI.indentLevel; - materialEditor.TexturePropertySingleLine(Styles.anisoRotationMapText, m_AnisoRotationMap); + materialEditor.TexturePropertySingleLine(Styles.anisoRotationMapText, m_AnisoRotationMap, m_AnisoRotationMapST); --EditorGUI.indentLevel; } @@ -408,12 +428,12 @@ void DrawAxfSurfaceOptionsGUI() if (clearcoat) { ++EditorGUI.indentLevel; - materialEditor.TexturePropertySingleLine(Styles.clearcoatColorMapText, m_ClearcoatColorMap); - materialEditor.TexturePropertySingleLine(Styles.clearcoatNormalMapText, m_ClearcoatNormalMap); + materialEditor.TexturePropertySingleLine(Styles.clearcoatColorMapText, m_ClearcoatColorMap, m_ClearcoatColorMapST); + materialEditor.TexturePropertySingleLine(Styles.clearcoatNormalMapText, m_ClearcoatNormalMap, m_ClearcoatNormalMapST); clearcoatRefraction = EditorGUILayout.Toggle("Enable Refraction", clearcoatRefraction); // The IOR map is always required for the coat F0, while in the CAR_PAINT model, the IOR // is given by a scalar value. - materialEditor.TexturePropertySingleLine(Styles.clearcoatIORMapText, m_ClearcoatIORMap); + materialEditor.TexturePropertySingleLine(Styles.clearcoatIORMapText, m_ClearcoatIORMap, m_ClearcoatIORMapST); --EditorGUI.indentLevel; } @@ -456,11 +476,11 @@ void DrawAxfSurfaceOptionsGUI() } - materialEditor.TexturePropertySingleLine(Styles.BTFFlakesMapText, m_CarPaint2_BTFFlakeMap); + //materialEditor.TexturePropertySingleLine(Styles.BTFFlakesMapText, m_CarPaint2_BTFFlakeMap, m_CarPaint2_BTFFlakeMapST); + materialEditor.TexturePropertySingleLine(Styles.BTFFlakesMapText, m_CarPaint2_BTFFlakeMap, m_CarPaint2_BTFFlakeMapST); //EditorGUILayout.LabelField( "Texture Dimension = " + m_CarPaint_BTFFlakesMap_sRGB.textureDimension ); //EditorGUILayout.LabelField( "Texture Format = " + m_CarPaint_BTFFlakesMap_sRGB.textureValue. ); m_CarPaint2_BTFFlakeMapScale.floatValue = EditorGUILayout.FloatField(Styles.BTFFlakesMapScaleText, m_CarPaint2_BTFFlakeMapScale.floatValue); - m_CarPaint2_FlakeTiling.floatValue = EditorGUILayout.FloatField(Styles.FlakesTilingText, m_CarPaint2_FlakeTiling.floatValue); materialEditor.TexturePropertySingleLine(Styles.thetaFI_sliceLUTMapText, m_CarPaint2_FlakeThetaFISliceLUTMap); @@ -481,7 +501,10 @@ void DrawAxfSurfaceOptionsGUI() { ++EditorGUI.indentLevel; // materialEditor.TexturePropertySingleLine( Styles.clearcoatColorMapText, m_ClearcoatColorMap ); - materialEditor.TexturePropertySingleLine(Styles.clearcoatNormalMapText, m_ClearcoatNormalMap); + //materialEditor.TexturePropertySingleLine(Styles.clearcoatNormalMapText, m_ClearcoatNormalMap); + materialEditor.TexturePropertySingleLine(Styles.clearcoatNormalMapText, m_ClearcoatNormalMap, m_ClearcoatNormalMapST); + //materialEditor.TexturePropertySingleLine(Styles.clearcoatNormalMapText, m_ClearcoatNormalMap, m_ClearcoatNormalMapST); + // materialEditor.TexturePropertySingleLine( Styles.clearcoatIORMapText, m_ClearcoatIORMap ); m_CarPaint2_ClearcoatIOR.floatValue = EditorGUILayout.FloatField(Styles.CarPaintIORText, m_CarPaint2_ClearcoatIOR.floatValue); --EditorGUI.indentLevel; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader index c125cc62582..a52d3de21c7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader @@ -7,8 +7,21 @@ Shader "HDRP/AxF" ///////////////////////////////////////////////////////////////////////////// // General Parameters - _MaterialTilingU( "Material U Tiling", Float ) = 1 - _MaterialTilingV( "Material V Tiling", Float ) = 1 + + // Tilings and offsets + _Material_SO( "Main Material Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_DiffuseColorMap_SO( "_SVBRDF_DiffuseColorMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_SpecularColorMap_SO( "_SVBRDF_SpecularColorMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_NormalMap_SO( "_SVBRDF_NormalMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_SpecularLobeMap_SO( "_SVBRDF_SpecularLobeMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_AlphaMap_SO( "_SVBRDF_AlphaMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_FresnelMap_SO( "_SVBRDF_FresnelMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_AnisoRotationMap_SO( "_SVBRDF_AnisoRotationMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_HeightMap_SO( "_SVBRDF_HeightMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_ClearcoatColorMap_SO( "_SVBRDF_ClearcoatColorMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _ClearcoatNormalMap_SO( "_ClearcoatNormalMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _SVBRDF_ClearcoatIORMap_SO( "_SVBRDF_ClearcoatIORMap Tiling & Offset", Vector) = (1, 1, 0, 0) + _CarPaint2_BTFFlakeMap_SO( "_CarPaint2_BTFFlakeMap Tiling & Offset", Vector) = (1, 1, 0, 0) [Enum(SVBRDF, 0, CarPaint, 1, BTF, 2)] _AxF_BRDFType("_AxF_BRDFType", Float) = 0 @@ -48,7 +61,6 @@ Shader "HDRP/AxF" _CarPaint2_BRDFColorMapUVScale("_CarPaint2_BRDFColorMapUVScale", Vector) = (1,1,0,0) // To be used when we have the bit BRDFColorUseDiagonalClamp set in _Flags // Flakes - _CarPaint2_FlakeTiling("_CarPaint2_FlakeTiling", Float) = 1 _CarPaint2_BTFFlakeMapScale("_CarPaint2_BTFFlakeMapScale", Float) = 1 // Scale is useless if we're directly provided a RGBA16F format _CarPaint2_BTFFlakeMap("_CarPaint2_BTFFlakeMap", 2DArray) = "black" {} _CarPaint2_FlakeThetaFISliceLUTMap( "_CarPaint2_FlakeThetaFISliceLUTMap", 2D ) = "black" {} diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl index b40ae677c35..e1ee3e925bc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl @@ -5,6 +5,9 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalUtilities.hlsl" +// Note: the scaling _Material_SO.xy should already be in texuv, but NOT the bias. +#define AXF_TRANSFORM_TEXUV(texuv, name) ((texuv.xy) * name##_SO.xy + name##_SO.zw + _Material_SO.zw) + void ApplyDecalToSurfaceData(DecalSurfaceData decalSurfaceData, inout SurfaceData surfaceData) { #if defined(_AXF_BRDF_TYPE_SVBRDF) || defined(_AXF_BRDF_TYPE_CAR_PAINT) // Not implemented for BTF @@ -55,7 +58,7 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p ApplyDoubleSidedFlipOrMirror(input, doubleSidedConstants); // Apply double sided flip on the vertex normal - float2 UV0 = input.texCoord0.xy * float2(_MaterialTilingU, _MaterialTilingV); + float2 UV0 = input.texCoord0.xy * _Material_SO.xy; //----------------------------------------------------------------------------- // _AXF_BRDF_TYPE_SVBRDF @@ -69,28 +72,44 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p #ifdef _AXF_BRDF_TYPE_SVBRDF - surfaceData.diffuseColor = SAMPLE_TEXTURE2D(_SVBRDF_DiffuseColorMap, sampler_SVBRDF_DiffuseColorMap, UV0).xyz; - surfaceData.specularColor = SAMPLE_TEXTURE2D(_SVBRDF_SpecularColorMap, sampler_SVBRDF_SpecularColorMap, UV0).xyz; - surfaceData.specularLobe.xy = _SVBRDF_SpecularLobeMapScale * SAMPLE_TEXTURE2D(_SVBRDF_SpecularLobeMap, sampler_SVBRDF_SpecularLobeMap, UV0).xy; + surfaceData.diffuseColor = + SAMPLE_TEXTURE2D(_SVBRDF_DiffuseColorMap, sampler_SVBRDF_DiffuseColorMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_DiffuseColorMap)).xyz; + surfaceData.specularColor = + SAMPLE_TEXTURE2D(_SVBRDF_SpecularColorMap, sampler_SVBRDF_SpecularColorMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_SpecularColorMap)).xyz; + surfaceData.specularLobe.xy = + _SVBRDF_SpecularLobeMapScale * SAMPLE_TEXTURE2D(_SVBRDF_SpecularLobeMap, sampler_SVBRDF_SpecularLobeMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_SpecularLobeMap)).xy; // The AxF models include both a general coloring term that they call "specular color" while the f0 is actually another term, // seemingly always scalar: - surfaceData.fresnelF0 = SAMPLE_TEXTURE2D(_SVBRDF_FresnelMap, sampler_SVBRDF_FresnelMap, UV0).x; - surfaceData.height_mm = SAMPLE_TEXTURE2D(_SVBRDF_HeightMap, sampler_SVBRDF_HeightMap, UV0).x * _SVBRDF_HeightMapMaxMM; + surfaceData.fresnelF0 = SAMPLE_TEXTURE2D(_SVBRDF_FresnelMap, sampler_SVBRDF_FresnelMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_FresnelMap)).x; + surfaceData.height_mm = SAMPLE_TEXTURE2D(_SVBRDF_HeightMap, sampler_SVBRDF_HeightMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_HeightMap)).x * _SVBRDF_HeightMapMaxMM; // Our importer range remaps the [-HALF_PI, HALF_PI) range to [0,1). We map back here: - surfaceData.anisotropyAngle = HALF_PI * (2.0 * SAMPLE_TEXTURE2D(_SVBRDF_AnisoRotationMap, sampler_SVBRDF_AnisoRotationMap, UV0).x - 1.0); - surfaceData.clearcoatColor = SAMPLE_TEXTURE2D(_SVBRDF_ClearcoatColorMap, sampler_SVBRDF_ClearcoatColorMap, UV0).xyz; + surfaceData.anisotropyAngle = + HALF_PI * (2.0 * SAMPLE_TEXTURE2D(_SVBRDF_AnisoRotationMap, sampler_SVBRDF_AnisoRotationMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_AnisoRotationMap)).x - 1.0); + surfaceData.clearcoatColor = + SAMPLE_TEXTURE2D(_SVBRDF_ClearcoatColorMap, sampler_SVBRDF_ClearcoatColorMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_ClearcoatColorMap)).xyz; + // The importer transforms the IOR to an f0, we map it back here as an IOR clamped under at 1.0 // TODO: if we're reusing float textures anyway, we shouldn't need the normalization that transforming to an f0 provides. - float clearcoatF0 = SAMPLE_TEXTURE2D(_SVBRDF_ClearcoatIORMap, sampler_SVBRDF_ClearcoatIORMap, UV0).x; + float clearcoatF0 = SAMPLE_TEXTURE2D(_SVBRDF_ClearcoatIORMap, sampler_SVBRDF_ClearcoatIORMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_ClearcoatIORMap)).x; float sqrtF0 = sqrt(clearcoatF0); surfaceData.clearcoatIOR = max(1.0, (1.0 + sqrtF0) / (1.00001 - sqrtF0)); // We make sure it's working for F0=1 // TBN - GetNormalWS(input, 2.0 * SAMPLE_TEXTURE2D(_SVBRDF_NormalMap, sampler_SVBRDF_NormalMap, UV0).xyz - 1.0, surfaceData.normalWS, doubleSidedConstants); - GetNormalWS(input, 2.0 * SAMPLE_TEXTURE2D(_ClearcoatNormalMap, sampler_ClearcoatNormalMap, UV0).xyz - 1.0, surfaceData.clearcoatNormalWS, doubleSidedConstants); - - alpha = SAMPLE_TEXTURE2D(_SVBRDF_AlphaMap, sampler_SVBRDF_AlphaMap, UV0).x; + GetNormalWS( + input, + 2.0 * SAMPLE_TEXTURE2D(_SVBRDF_NormalMap, sampler_SVBRDF_NormalMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_NormalMap)).xyz - 1.0, + surfaceData.normalWS, + doubleSidedConstants + ); + GetNormalWS( + input, + 2.0 * SAMPLE_TEXTURE2D(_ClearcoatNormalMap, sampler_ClearcoatNormalMap, AXF_TRANSFORM_TEXUV(UV0, _ClearcoatNormalMap)).xyz - 1.0, + surfaceData.clearcoatNormalWS, + doubleSidedConstants + ); + + alpha = SAMPLE_TEXTURE2D(_SVBRDF_AlphaMap, sampler_SVBRDF_AlphaMap, AXF_TRANSFORM_TEXUV(UV0, _SVBRDF_AlphaMap)).x; // Useless for SVBRDF surfaceData.flakesUV = input.texCoord0.xy; @@ -108,13 +127,17 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p surfaceData.specularLobe = _CarPaint2_CTSpreads.xyz; // We may want to modify these (eg for Specular AA) surfaceData.normalWS = input.tangentToWorld[2].xyz; - GetNormalWS(input, 2.0 * SAMPLE_TEXTURE2D(_ClearcoatNormalMap, sampler_ClearcoatNormalMap, UV0).xyz - 1.0, surfaceData.clearcoatNormalWS, doubleSidedConstants); - - // Create mirrored UVs to hide flakes tiling - surfaceData.flakesUV = _CarPaint2_FlakeTiling * UV0; - + GetNormalWS( + input, + 2.0 * SAMPLE_TEXTURE2D(_ClearcoatNormalMap, sampler_ClearcoatNormalMap, AXF_TRANSFORM_TEXUV(UV0, _ClearcoatNormalMap)).xyz - 1.0, + surfaceData.clearcoatNormalWS, + doubleSidedConstants + ); + + surfaceData.flakesUV = AXF_TRANSFORM_TEXUV(UV0, _CarPaint2_BTFFlakeMap); surfaceData.flakesMipLevel = CALCULATE_TEXTURE2D_LOD(_CarPaint2_BTFFlakeMap, sampler_CarPaint2_BTFFlakeMap, surfaceData.flakesUV); + // Create mirrored UVs to hide flakes tiling // TODO_FLAKES: this isn't really tiling if ((int(surfaceData.flakesUV.y) & 1) == 0) surfaceData.flakesUV.x += 0.5; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl index 9c3383f73da..d19ba0e0cad 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFProperties.hlsl @@ -51,8 +51,21 @@ SAMPLER(sampler_SVBRDF_ClearcoatIORMap); CBUFFER_START(UnityPerMaterial) - float _MaterialTilingU; // Size of the U range, in millimeters (currently used as UV scale factor) - float _MaterialTilingV; // Size of the V range, in millimeters (currently used as UV scale factor) + // Scale/Offsets: + float4 _Material_SO; // Main scale, TODO: scale - but not offset - could be moved to vertex shader and applied to uv0 + + float4 _SVBRDF_DiffuseColorMap_SO; + float4 _SVBRDF_SpecularColorMap_SO; + float4 _SVBRDF_NormalMap_SO; + float4 _SVBRDF_SpecularLobeMap_SO; + float4 _SVBRDF_AlphaMap_SO; + float4 _SVBRDF_FresnelMap_SO; + float4 _SVBRDF_AnisoRotationMap_SO; + float4 _SVBRDF_HeightMap_SO; + float4 _SVBRDF_ClearcoatColorMap_SO; + float4 _ClearcoatNormalMap_SO; + float4 _SVBRDF_ClearcoatIORMap_SO; + float4 _CarPaint2_BTFFlakeMap_SO; uint _Flags; // Bit 0 = Anisotropic. If true, specular lobe map contains 2 channels and the _AnisotropicRotationAngleMap needs to be read // Bit 1 = HasClearcoat. If true, the clearcoat must be applied. The _ClearcoatNormalMap must be valid and contain clearcoat normal data. @@ -94,7 +107,6 @@ CBUFFER_START(UnityPerMaterial) float4 _CarPaint2_CTSpreads; // Description of multi-lobes spread values // Flakes - float _CarPaint2_FlakeTiling; // Tiling factor for flakes uint _CarPaint2_FlakeMaxThetaI; // Maximum thetaI index uint _CarPaint2_FlakeNumThetaF; // Amount of thetaF entries (in litterature, that's called thetaH, the angle between the normal and the half vector) uint _CarPaint2_FlakeNumThetaI; // Amount of thetaI entries (in litterature, that's called thetaD, the angle between the light/view and the half vector) From 97b9eb1a99e781abc95d8b5e8328787aaf3fa572 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Wed, 6 May 2020 12:31:05 +0200 Subject: [PATCH 154/200] Fix cookie srgb #297 --- .../CHANGELOG.md | 1 + .../RenderPipeline/Utility/Texture2DAtlas.cs | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e3a8d53bd54..dfa518e92d8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with light layers bigger than 8 (and above the supported range). - Fixed an issue where decals were duplicated in prefab isolation mode. - Fixed the valid TRS test failing due to variable not being initialized to the identity matrix in RTShadows (1220600). +- Fixed cookie texture not updated when changing an import settings (srgb for example). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/Texture2DAtlas.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/Texture2DAtlas.cs index cca6204af96..32567a11dc3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/Texture2DAtlas.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/Texture2DAtlas.cs @@ -141,6 +141,7 @@ class Texture2DAtlas private AtlasAllocator m_AtlasAllocator = null; private Dictionary m_AllocationCache = new Dictionary(); private Dictionary m_IsGPUTextureUpToDate = new Dictionary(); + private Dictionary m_TextureHashes = new Dictionary(); static readonly Vector4 fullScaleOffset = new Vector4(1, 1, 0, 0); @@ -278,6 +279,7 @@ public virtual bool AllocateTextureWithoutBlit(int instanceId, int width, int he scaleOffset.Scale(new Vector4(1.0f / m_Width, 1.0f / m_Height, 1.0f / m_Width, 1.0f / m_Height)); m_AllocationCache.Add(instanceId, scaleOffset); MarkGPUTextureInvalid(instanceId); // the texture data haven't been uploaded + m_TextureHashes[instanceId] = -1; return true; } else @@ -289,10 +291,29 @@ public virtual bool AllocateTextureWithoutBlit(int instanceId, int width, int he public bool IsCached(out Vector4 scaleOffset, Texture texture) => m_AllocationCache.TryGetValue(texture.GetInstanceID(), out scaleOffset); + protected int GetTextureHash(Texture texture) + { + int hash = texture.GetHashCode(); + + unchecked + { + hash = hash * 23 + texture.graphicsFormat.GetHashCode(); + hash = hash * 23 + texture.wrapMode.GetHashCode(); + hash = hash * 23 + texture.width.GetHashCode(); + hash = hash * 23 + texture.height.GetHashCode(); + hash = hash * 23 + texture.filterMode.GetHashCode(); + hash = hash * 23 + texture.anisoLevel.GetHashCode(); + hash = hash * 23 + texture.mipmapCount.GetHashCode(); + } + + return hash; + } + public virtual bool NeedsUpdate(Texture texture, bool needMips = false) { RenderTexture rt = texture as RenderTexture; int key = texture.GetInstanceID(); + int textureHash = GetTextureHash(texture); // Update the render texture if needed if (rt != null) @@ -309,6 +330,12 @@ public virtual bool NeedsUpdate(Texture texture, bool needMips = false) m_IsGPUTextureUpToDate[key] = rt.updateCount; } } + // In case the texture settings/import settings have changed, we need to update it + else if (m_TextureHashes.TryGetValue(key, out int hash) && hash != textureHash) + { + m_TextureHashes[key] = textureHash; + return true; + } // For regular textures, values == 0 means that their GPU data needs to be updated (either because // the atlas have been re-layouted or the texture have never been uploaded. We also check if the mips // are valid for the texture if we need them From 21e3e76511bccf1fc13b92dbd0084028c1696b21 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 6 May 2020 20:27:48 +0200 Subject: [PATCH 155/200] Fix Motion Vectors written by transparent when rendering with MSAA #315 --- .../CHANGELOG.md | 1 + .../Runtime/Material/SharedRTManager.cs | 17 + .../Runtime/RenderPipeline/HDProfileId.cs | 1 + .../HDRenderPipeline.RenderGraph.cs | 47 + .../RenderPipeline/HDRenderPipeline.cs | 8 + .../RenderPipeline/HDRenderPipeline.cs.orig | 4633 +++++++++++++++++ .../RenderPass/MSAA/MotionVecResolve.shader | 143 + .../MSAA/MotionVecResolve.shader.meta | 10 + .../RenderPipeline/RenderPipelineResources.cs | 2 + 9 files changed, 4862 insertions(+) create mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig create mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader create mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader.meta diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index dfa518e92d8..689bf5f5db7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an issue where decals were duplicated in prefab isolation mode. - Fixed the valid TRS test failing due to variable not being initialized to the identity matrix in RTShadows (1220600). - Fixed cookie texture not updated when changing an import settings (srgb for example). +- Fixed transparent motion vectors not working when in MSAA. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs index 4c261ced47d..643a69138e3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs @@ -29,6 +29,7 @@ class SharedRTManager // MSAA resolve materials Material m_DepthResolveMaterial = null; Material m_ColorResolveMaterial = null; + Material m_MotionVectorResolve = null; // Flags that defines if we are using a local texture or external bool m_ReuseGBufferMemory = false; @@ -94,6 +95,7 @@ public void InitSharedBuffers(GBufferManager gbufferManager, RenderPipelineSetti // Create the required resolve materials m_DepthResolveMaterial = CoreUtils.CreateEngineMaterial(resources.shaders.depthValuesPS); m_ColorResolveMaterial = CoreUtils.CreateEngineMaterial(resources.shaders.colorResolvePS); + m_MotionVectorResolve = CoreUtils.CreateEngineMaterial(resources.shaders.resolveMotionVecPS); CoreUtils.SetKeyword(m_DepthResolveMaterial, "_HAS_MOTION_VECTORS", m_MotionVectorsSupport); } @@ -310,6 +312,7 @@ public void Cleanup() // Do not forget to release the materials CoreUtils.Destroy(m_DepthResolveMaterial); CoreUtils.Destroy(m_ColorResolveMaterial); + CoreUtils.Destroy(m_MotionVectorResolve); } } @@ -372,6 +375,20 @@ public void ResolveSharedRT(CommandBuffer cmd, HDCamera hdCamera) } } } + + public void ResolveMotionVectorTexture(CommandBuffer cmd, HDCamera hdCamera) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA) && m_MotionVectorsSupport) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ResolveMSAAMotionVector))) + { + CoreUtils.SetRenderTarget(cmd, m_MotionVectorsRT, m_CameraDepthStencilBuffer); + Shader.SetGlobalTexture(HDShaderIDs._MotionVectorTextureMS, m_MotionVectorsMSAART); + cmd.DrawProcedural(Matrix4x4.identity, m_MotionVectorResolve, SampleCountToPassIndex(m_MSAASamples), MeshTopology.Triangles, 3, 1); + } + } + } + public void ResolveMSAAColor(CommandBuffer cmd, HDCamera hdCamera, RTHandle msaaTarget, RTHandle simpleTarget) { if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs index 71b595144f0..8959bcbc944 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDProfileId.cs @@ -75,6 +75,7 @@ internal enum HDProfileId RenderWireFrame, PushToColorPicker, ResolveMSAAColor, + ResolveMSAAMotionVector, ResolveMSAADepth, ConvolveReflectionProbe, ConvolvePlanarReflectionProbe, diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index 0ec08f3bb35..4c28c45e2a7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -137,6 +137,11 @@ void ExecuteWithRenderGraph( RenderRequest renderRequest, colorBuffer = RenderTransparency(m_RenderGraph, hdCamera, colorBuffer, prepassOutput.depthBuffer, prepassOutput.motionVectorsBuffer, currentColorPyramid, prepassOutput.depthPyramidTexture, shadowResult, cullingResults); + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector)) + { + prepassOutput.motionVectorsBuffer = ResolveMotionVector(m_RenderGraph, hdCamera, prepassOutput.motionVectorsBuffer); + } + // TODO RENDERGRAPH : Move this to the end after we do move semantic and graph pruning to avoid doing the rest of the frame for nothing // Transparent objects may write to the depth and motion vectors buffers. aovRequest.PushCameraTexture(m_RenderGraph, AOVBuffers.DepthStencil, hdCamera, prepassOutput.resolvedDepthBuffer, aovBuffers); @@ -988,6 +993,48 @@ RenderGraphMutableResource ResolveMSAAColor(RenderGraph renderGraph, HDCamera hd } } + class ResolveMotionVectorData + { + public TextureHandle input; + public TextureHandle output; + public Material resolveMaterial; + public int passIndex; + } + + TextureHandle ResolveMotionVector(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle input) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) + { + using (var builder = renderGraph.AddRenderPass("ResolveMotionVector", out var passData)) + { + var outputDesc = renderGraph.GetTextureDesc(input); + outputDesc.enableMSAA = false; + outputDesc.enableRandomWrite = true; + outputDesc.bindTextureMS = false; + outputDesc.name = string.Format("{0}Resolved", outputDesc.name); + + passData.input = builder.ReadTexture(input); + passData.output = builder.UseColorBuffer(renderGraph.CreateTexture(outputDesc), 0); + passData.resolveMaterial = m_MotionVectorResolve; + passData.passIndex = SampleCountToPassIndex(m_MSAASamples); + + builder.SetRenderFunc( + (ResolveColorData data, RenderGraphContext context) => + { + var res = context.resources; + var mpb = context.renderGraphPool.GetTempMaterialPropertyBlock(); + mpb.SetTexture(HDShaderIDs._MotionVectorTextureMS, res.GetTexture(data.input)); + context.cmd.DrawProcedural(Matrix4x4.identity, data.resolveMaterial, data.passIndex, MeshTopology.Triangles, 3, 1, mpb); + }); + + return passData.output; + } + } + else + { + return input; + } + } #if UNITY_EDITOR class RenderGizmosPassData { 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 b7678a90b1b..7cd9b9412ea 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -315,6 +315,7 @@ internal bool showCascade // MSAA resolve materials Material m_ColorResolveMaterial = null; + Material m_MotionVectorResolve = null; // Flag that defines if ray tracing is supported by the current asset and platform bool m_RayTracingSupported = false; @@ -504,6 +505,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defau InitializePrepass(m_Asset); m_ColorResolveMaterial = CoreUtils.CreateEngineMaterial(asset.renderPipelineResources.shaders.colorResolvePS); + m_MotionVectorResolve = CoreUtils.CreateEngineMaterial(asset.renderPipelineResources.shaders.resolveMotionVecPS); } #if UNITY_EDITOR @@ -942,6 +944,7 @@ protected override void Dispose(bool disposing) m_RenderGraph.UnRegisterDebug(); CleanupPrepass(); CoreUtils.Destroy(m_ColorResolveMaterial); + CoreUtils.Destroy(m_MotionVectorResolve); #if UNITY_EDITOR @@ -2392,6 +2395,11 @@ void Callback(CommandBuffer c, HDCamera cam) // Render all type of transparent forward (unlit, lit, complex (hair...)) to keep the sorting between transparent objects. RenderForwardTransparent(cullingResults, hdCamera, false, renderContext, cmd); + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector)) + { + m_SharedRTManager.ResolveMotionVectorTexture(cmd, hdCamera); + } + // We push the motion vector debug texture here as transparent object can overwrite the motion vector texture content. if(m_Asset.currentPlatformRenderPipelineSettings.supportMotionVectors) PushFullScreenDebugTexture(hdCamera, cmd, m_SharedRTManager.GetMotionVectorsBuffer(), FullScreenDebugMode.MotionVectors); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig new file mode 100644 index 00000000000..1507370c5f8 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig @@ -0,0 +1,4633 @@ +using System.Collections.Generic; +using UnityEngine.VFX; +using System; +using System.Diagnostics; +using System.Linq; +using UnityEngine.Experimental.GlobalIllumination; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Experimental.Rendering.RenderGraphModule; +using Utilities; + +namespace UnityEngine.Rendering.HighDefinition +{ + /// + /// High Definition Render Pipeline class. + /// + public partial class HDRenderPipeline : RenderPipeline + { + #region Default Settings + internal static HDRenderPipelineAsset defaultAsset + => GraphicsSettings.renderPipelineAsset is HDRenderPipelineAsset hdrpAsset ? hdrpAsset : null; + + internal static HDRenderPipelineAsset currentAsset + => GraphicsSettings.currentRenderPipeline is HDRenderPipelineAsset hdrpAsset ? hdrpAsset : null; + + internal static HDRenderPipeline currentPipeline + => RenderPipelineManager.currentPipeline is HDRenderPipeline hdrp ? hdrp : null; + + internal static bool pipelineSupportsRayTracing => HDRenderPipeline.currentPipeline != null && HDRenderPipeline.currentPipeline.rayTracingSupported; + + + private static Volume s_DefaultVolume = null; + static VolumeProfile defaultVolumeProfile + => defaultAsset?.defaultVolumeProfile; + + static HDRenderPipeline() + { +#if UNITY_EDITOR + UnityEditor.AssemblyReloadEvents.beforeAssemblyReload += () => + { + if (s_DefaultVolume != null && !s_DefaultVolume.Equals(null)) + { + CoreUtils.Destroy(s_DefaultVolume.gameObject); + s_DefaultVolume = null; + } + }; +#endif + } + + internal static Volume GetOrCreateDefaultVolume() + { + if (s_DefaultVolume == null || s_DefaultVolume.Equals(null)) + { + var go = new GameObject("Default Volume") { hideFlags = HideFlags.HideAndDontSave }; + s_DefaultVolume = go.AddComponent(); + s_DefaultVolume.isGlobal = true; + s_DefaultVolume.priority = float.MinValue; + s_DefaultVolume.sharedProfile = defaultVolumeProfile; + } + + if ( + // In case the asset was deleted or the reference removed + s_DefaultVolume.sharedProfile == null || s_DefaultVolume.sharedProfile.Equals(null) +#if UNITY_EDITOR + + // In case the serialization recreated an empty volume sharedProfile + + || !UnityEditor.AssetDatabase.Contains(s_DefaultVolume.sharedProfile) +#endif + ) + { + s_DefaultVolume.sharedProfile = defaultVolumeProfile; + } + + if (s_DefaultVolume.sharedProfile != defaultVolumeProfile) + { + s_DefaultVolume.sharedProfile = defaultVolumeProfile; + } + + return s_DefaultVolume; + } + #endregion + + /// + /// Shader Tag for the High Definition Render Pipeline. + /// + public const string k_ShaderTagName = "HDRenderPipeline"; + + readonly HDRenderPipelineAsset m_Asset; + internal HDRenderPipelineAsset asset { get { return m_Asset; } } + readonly HDRenderPipelineAsset m_DefaultAsset; + internal RenderPipelineResources defaultResources { get { return m_DefaultAsset.renderPipelineResources; } } + + internal RenderPipelineSettings currentPlatformRenderPipelineSettings { get { return m_Asset.currentPlatformRenderPipelineSettings; } } + + readonly RenderPipelineMaterial m_DeferredMaterial; + readonly List m_MaterialList = new List(); + + readonly GBufferManager m_GbufferManager; + readonly DBufferManager m_DbufferManager; + readonly SharedRTManager m_SharedRTManager = new SharedRTManager(); + internal SharedRTManager sharedRTManager { get { return m_SharedRTManager; } } + + readonly PostProcessSystem m_PostProcessSystem; + readonly XRSystem m_XRSystem; + + // Keep track of previous Graphic and QualitySettings value to reset when switching to another pipeline + bool m_PreviousLightsUseLinearIntensity; + bool m_PreviousLightsUseColorTemperature; + bool m_PreviousSRPBatcher; + ShadowmaskMode m_PreviousShadowMaskMode; + + bool m_FrameSettingsHistoryEnabled = false; +#if UNITY_EDITOR + bool m_PreviousEnableCookiesInLightmapper = false; +#endif + + /// + /// This functions allows the user to have an approximation of the number of rays that were traced for a given frame. + /// + /// Specifes which ray count value should be returned. + /// The approximated ray count for a frame + public uint GetRaysPerFrame(RayCountValues rayValues) { return m_RayCountManager.GetRaysPerFrame(rayValues); } + + // Renderer Bake configuration can vary depends on if shadow mask is enabled or no + PerObjectData m_CurrentRendererConfigurationBakedLighting = HDUtils.k_RendererConfigurationBakedLighting; + MaterialPropertyBlock m_CopyDepthPropertyBlock = new MaterialPropertyBlock(); + Material m_CopyDepth; + Material m_DownsampleDepthMaterial; + Material m_UpsampleTransparency; + GPUCopy m_GPUCopy; + MipGenerator m_MipGenerator; + BlueNoise m_BlueNoise; + + IBLFilterBSDF[] m_IBLFilterArray = null; + + ComputeShader m_ScreenSpaceReflectionsCS { get { return defaultResources.shaders.screenSpaceReflectionsCS; } } + int m_SsrTracingKernel = -1; + int m_SsrReprojectionKernel = -1; + + Material m_ApplyDistortionMaterial; + + Material m_CameraMotionVectorsMaterial; + Material m_DecalNormalBufferMaterial; + + Material m_ClearStencilBufferMaterial; + + // Debug material + Material m_DebugViewMaterialGBuffer; + Material m_DebugViewMaterialGBufferShadowMask; + Material m_currentDebugViewMaterialGBuffer; + Material m_DebugDisplayLatlong; + Material m_DebugFullScreen; + MaterialPropertyBlock m_DebugFullScreenPropertyBlock = new MaterialPropertyBlock(); + Material m_DebugColorPicker; + Material m_ErrorMaterial; + + Material m_Blit; + Material m_BlitTexArray; + Material m_BlitTexArraySingleSlice; + MaterialPropertyBlock m_BlitPropertyBlock = new MaterialPropertyBlock(); + + + RenderTargetIdentifier[] m_MRTCache2 = new RenderTargetIdentifier[2]; + + // 'm_CameraColorBuffer' does not contain diffuse lighting of SSS materials until the SSS pass. It is stored within 'm_CameraSssDiffuseLightingBuffer'. + RTHandle m_CameraColorBuffer; + RTHandle m_OpaqueAtmosphericScatteringBuffer; // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity + RTHandle m_CameraSssDiffuseLightingBuffer; + + RTHandle m_ContactShadowBuffer; + RTHandle m_ScreenSpaceShadowsBuffer; + RTHandle m_DistortionBuffer; + + RTHandle m_LowResTransparentBuffer; + + // TODO: remove me, I am just a temporary debug texture. :-) + // RTHandle m_SsrDebugTexture; + RTHandle m_SsrHitPointTexture; + RTHandle m_SsrLightingTexture; + // MSAA Versions of regular textures + RTHandle m_CameraColorMSAABuffer; + RTHandle m_OpaqueAtmosphericScatteringMSAABuffer; // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity + RTHandle m_CameraSssDiffuseLightingMSAABuffer; + + Lazy m_CustomPassColorBuffer; + Lazy m_CustomPassDepthBuffer; + + // The current MSAA count + MSAASamples m_MSAASamples; + + // The pass "SRPDefaultUnlit" is a fall back to legacy unlit rendering and is required to support unity 2d + unity UI that render in the scene. + ShaderTagId[] m_ForwardAndForwardOnlyPassNames = { HDShaderPassNames.s_ForwardOnlyName, HDShaderPassNames.s_ForwardName, HDShaderPassNames.s_SRPDefaultUnlitName }; + ShaderTagId[] m_ForwardOnlyPassNames = { HDShaderPassNames.s_ForwardOnlyName, HDShaderPassNames.s_SRPDefaultUnlitName }; + + ShaderTagId[] m_AllTransparentPassNames = { HDShaderPassNames.s_TransparentBackfaceName, + HDShaderPassNames.s_ForwardOnlyName, + HDShaderPassNames.s_ForwardName, + HDShaderPassNames.s_SRPDefaultUnlitName }; + + ShaderTagId[] m_TransparentNoBackfaceNames = { HDShaderPassNames.s_ForwardOnlyName, + HDShaderPassNames.s_ForwardName, + HDShaderPassNames.s_SRPDefaultUnlitName }; + + + ShaderTagId[] m_AllForwardOpaquePassNames = { HDShaderPassNames.s_ForwardOnlyName, + HDShaderPassNames.s_ForwardName, + HDShaderPassNames.s_SRPDefaultUnlitName }; + + ShaderTagId[] m_DepthOnlyAndDepthForwardOnlyPassNames = { HDShaderPassNames.s_DepthForwardOnlyName, HDShaderPassNames.s_DepthOnlyName }; + ShaderTagId[] m_DepthForwardOnlyPassNames = { HDShaderPassNames.s_DepthForwardOnlyName }; + ShaderTagId[] m_DepthOnlyPassNames = { HDShaderPassNames.s_DepthOnlyName }; + ShaderTagId[] m_TransparentDepthPrepassNames = { HDShaderPassNames.s_TransparentDepthPrepassName }; + ShaderTagId[] m_TransparentDepthPostpassNames = { HDShaderPassNames.s_TransparentDepthPostpassName }; + ShaderTagId[] m_ForwardErrorPassNames = { HDShaderPassNames.s_AlwaysName, HDShaderPassNames.s_ForwardBaseName, HDShaderPassNames.s_DeferredName, HDShaderPassNames.s_PrepassBaseName, HDShaderPassNames.s_VertexName, HDShaderPassNames.s_VertexLMRGBMName, HDShaderPassNames.s_VertexLMName }; + ShaderTagId[] m_DecalsEmissivePassNames = { HDShaderPassNames.s_MeshDecalsForwardEmissiveName, HDShaderPassNames.s_ShaderGraphMeshDecalsForwardEmissiveName }; + ShaderTagId[] m_SinglePassName = new ShaderTagId[1]; + ShaderTagId[] m_Decals4RTPassNames = { HDShaderPassNames.s_MeshDecalsMName , HDShaderPassNames.s_MeshDecalsAOName , HDShaderPassNames.s_MeshDecalsMAOName, HDShaderPassNames.s_MeshDecalsSName , + HDShaderPassNames.s_MeshDecalsMSName, HDShaderPassNames.s_MeshDecalsAOSName, HDShaderPassNames.s_MeshDecalsMAOSName, HDShaderPassNames.s_ShaderGraphMeshDecalsName4RT}; + ShaderTagId[] m_Decals3RTPassNames = { HDShaderPassNames.s_MeshDecals3RTName , HDShaderPassNames.s_ShaderGraphMeshDecalsName3RT }; + + RenderStateBlock m_DepthStateOpaque; + + readonly List m_ActivePassVolumes = new List(6); + + // Detect when windows size is changing + int m_MaxCameraWidth; + int m_MaxCameraHeight; + + // Use to detect frame changes + int m_FrameCount; + float m_LastTime, m_Time; // Do NOT take the 'animateMaterials' setting into account. + + internal int GetFrameCount() { return m_FrameCount; } + internal float GetLastTime() { return m_LastTime; } + internal float GetTime() { return m_Time; } + + GraphicsFormat GetColorBufferFormat() + => (GraphicsFormat)m_Asset.currentPlatformRenderPipelineSettings.colorBufferFormat; + + GraphicsFormat GetCustomBufferFormat() + => (GraphicsFormat)m_Asset.currentPlatformRenderPipelineSettings.customBufferFormat; + + internal int GetDecalAtlasMipCount() + { + int highestDim = Math.Max(currentPlatformRenderPipelineSettings.decalSettings.atlasWidth, currentPlatformRenderPipelineSettings.decalSettings.atlasHeight); + return (int)Math.Log(highestDim, 2); + } + + internal int GetCookieAtlasMipCount() => (int)Mathf.Log((int)currentPlatformRenderPipelineSettings.lightLoopSettings.cookieAtlasSize, 2); + internal int GetCookieCubeArraySize() => currentPlatformRenderPipelineSettings.lightLoopSettings.cubeCookieTexArraySize; + + internal int GetPlanarReflectionProbeMipCount() + { + int size = (int)currentPlatformRenderPipelineSettings.lightLoopSettings.planarReflectionAtlasSize; + return (int)Mathf.Log(size, 2); + } + + internal int GetMaxScreenSpaceShadows() + { + return currentPlatformRenderPipelineSettings.hdShadowInitParams.supportScreenSpaceShadows ? currentPlatformRenderPipelineSettings.hdShadowInitParams.maxScreenSpaceShadowSlots : 0; + } + + readonly SkyManager m_SkyManager = new SkyManager(); + internal SkyManager skyManager { get { return m_SkyManager; } } + readonly AmbientOcclusionSystem m_AmbientOcclusionSystem; + + // Debugging + MaterialPropertyBlock m_SharedPropertyBlock = new MaterialPropertyBlock(); + DebugDisplaySettings m_DebugDisplaySettings = new DebugDisplaySettings(); + /// + /// Debug display settings. + /// + public DebugDisplaySettings debugDisplaySettings { get { return m_DebugDisplaySettings; } } + static DebugDisplaySettings s_NeutralDebugDisplaySettings = new DebugDisplaySettings(); + internal DebugDisplaySettings m_CurrentDebugDisplaySettings; + RTHandle m_DebugColorPickerBuffer; + RTHandle m_DebugFullScreenTempBuffer; + // This target is only used in Dev builds as an intermediate destination for post process and where debug rendering will be done. + RTHandle m_IntermediateAfterPostProcessBuffer; + // We need this flag because otherwise if no full screen debug is pushed (like for example if the corresponding pass is disabled), when we render the result in RenderDebug m_DebugFullScreenTempBuffer will contain potential garbage + bool m_FullScreenDebugPushed; + bool m_ValidAPI; // False by default mean we render normally, true mean we don't render anything + bool m_IsDepthBufferCopyValid; + RenderTexture m_TemporaryTargetForCubemaps; + + private CameraCache<(Transform viewer, HDProbe probe, int face)> m_ProbeCameraCache = new + CameraCache<(Transform viewer, HDProbe probe, int face)>(); + + RenderTargetIdentifier[] m_MRTTransparentMotionVec; + RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3]; // Specular, diffuse, sss buffer; + RenderTargetIdentifier[] mMRTSingle = new RenderTargetIdentifier[1]; + string m_ForwardPassProfileName; + + internal Material GetBlitMaterial(bool useTexArray, bool singleSlice) { return useTexArray ? (singleSlice ? m_BlitTexArraySingleSlice : m_BlitTexArray) : m_Blit; } + + ComputeBuffer m_DepthPyramidMipLevelOffsetsBuffer = null; + + ScriptableCullingParameters frozenCullingParams; + bool frozenCullingParamAvailable = false; + + internal bool showCascade + { + get => m_CurrentDebugDisplaySettings.GetDebugLightingMode() == DebugLightingMode.VisualizeCascade; + set + { + if (value) + m_CurrentDebugDisplaySettings.SetDebugLightingMode(DebugLightingMode.VisualizeCascade); + else + m_CurrentDebugDisplaySettings.SetDebugLightingMode(DebugLightingMode.None); + } + } + + // RENDER GRAPH + RenderGraph m_RenderGraph; + + // MSAA resolve materials + Material m_ColorResolveMaterial = null; + Material m_MotionVectorResolve = null; + + // Flag that defines if ray tracing is supported by the current asset and platform + bool m_RayTracingSupported = false; + /// + /// Flag that defines if ray tracing is supported by the current HDRP asset and platform + /// + public bool rayTracingSupported { get { return m_RayTracingSupported; } } + + +#if UNITY_EDITOR + bool m_ResourcesInitialized = false; +#endif + + /// + /// HDRenderPipeline constructor. + /// + /// Source HDRenderPipelineAsset. + /// Defauklt HDRenderPipelineAsset. + public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defaultAsset) + { + m_Asset = asset; + m_DefaultAsset = defaultAsset; + HDProbeSystem.Parameters = asset.reflectionSystemParameters; + + DebugManager.instance.RefreshEditor(); + + m_ValidAPI = true; + + SetRenderingFeatures(); + + // The first thing we need to do is to set the defines that depend on the render pipeline settings + m_RayTracingSupported = GatherRayTracingSupport(m_Asset.currentPlatformRenderPipelineSettings); + +#if UNITY_EDITOR + m_Asset.EvaluateSettings(); + + UpgradeResourcesIfNeeded(); + + //In case we are loading element in the asset pipeline (occurs when library is not fully constructed) the creation of the HDRenderPipeline is done at a time we cannot access resources. + //So in this case, the reloader would fail and the resources cannot be validated. So skip validation here. + //The HDRenderPipeline will be reconstructed in a few frame which will fix this issue. + if (HDRenderPipeline.defaultAsset.renderPipelineResources == null + || HDRenderPipeline.defaultAsset.renderPipelineEditorResources == null + || (m_RayTracingSupported && HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources == null)) + return; + else + m_ResourcesInitialized = true; + + ValidateResources(); +#endif + + // We need to call this after the resource initialization as we attempt to use them in checking the supported API. + if (!CheckAPIValidity()) + { + m_ValidAPI = false; + + return; + } + + // Initial state of the RTHandle system. + // Tells the system that we will require MSAA or not so that we can avoid wasteful render texture allocation. + // TODO: Might want to initialize to at least the window resolution to avoid un-necessary re-alloc in the player + RTHandles.Initialize(1, 1, m_Asset.currentPlatformRenderPipelineSettings.supportMSAA, m_Asset.currentPlatformRenderPipelineSettings.msaaSampleCount); + + m_XRSystem = new XRSystem(asset.renderPipelineResources.shaders); + m_GPUCopy = new GPUCopy(defaultResources.shaders.copyChannelCS); + + m_MipGenerator = new MipGenerator(defaultResources); + m_BlueNoise = new BlueNoise(defaultResources); + + EncodeBC6H.DefaultInstance = EncodeBC6H.DefaultInstance ?? new EncodeBC6H(defaultResources.shaders.encodeBC6HCS); + + // Scan material list and assign it + m_MaterialList = HDUtils.GetRenderPipelineMaterialList(); + // Find first material that have non 0 Gbuffer count and assign it as deferredMaterial + m_DeferredMaterial = null; + foreach (var material in m_MaterialList) + { + if (material.IsDefferedMaterial()) + m_DeferredMaterial = material; + } + + // TODO: Handle the case of no Gbuffer material + // TODO: I comment the assert here because m_DeferredMaterial for whatever reasons contain the correct class but with a "null" in the name instead of the real name and then trigger the assert + // whereas it work. Don't know what is happening, DebugDisplay use the same code and name is correct there. + // Debug.Assert(m_DeferredMaterial != null); + + m_GbufferManager = new GBufferManager(asset, m_DeferredMaterial); + m_DbufferManager = new DBufferManager(); + m_DbufferManager.InitializeHDRPResouces(asset); + + m_SharedRTManager.Build(asset); + m_PostProcessSystem = new PostProcessSystem(asset, defaultResources); + m_AmbientOcclusionSystem = new AmbientOcclusionSystem(asset, defaultResources); + + // Initialize various compute shader resources + m_SsrTracingKernel = m_ScreenSpaceReflectionsCS.FindKernel("ScreenSpaceReflectionsTracing"); + m_SsrReprojectionKernel = m_ScreenSpaceReflectionsCS.FindKernel("ScreenSpaceReflectionsReprojection"); + + // General material + m_CameraMotionVectorsMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.cameraMotionVectorsPS); + m_DecalNormalBufferMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.decalNormalBufferPS); + + m_CopyDepth = CoreUtils.CreateEngineMaterial(defaultResources.shaders.copyDepthBufferPS); + m_DownsampleDepthMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.downsampleDepthPS); + m_UpsampleTransparency = CoreUtils.CreateEngineMaterial(defaultResources.shaders.upsampleTransparentPS); + + m_ApplyDistortionMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.applyDistortionPS); + + m_ClearStencilBufferMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.clearStencilBufferPS); + + InitializeDebugMaterials(); + + m_MaterialList.ForEach(material => material.Build(asset, defaultResources)); + + if (m_Asset.currentPlatformRenderPipelineSettings.lightLoopSettings.supportFabricConvolution) + { + m_IBLFilterArray = new IBLFilterBSDF[2]; + m_IBLFilterArray[0] = new IBLFilterGGX(defaultResources, m_MipGenerator); + m_IBLFilterArray[1] = new IBLFilterCharlie(defaultResources, m_MipGenerator); + } + else + { + m_IBLFilterArray = new IBLFilterBSDF[1]; + m_IBLFilterArray[0] = new IBLFilterGGX(defaultResources, m_MipGenerator); + } + + InitializeLightLoop(m_IBLFilterArray); + + m_SkyManager.Build(asset, defaultResources, m_IBLFilterArray); + + InitializeVolumetricLighting(); + InitializeSubsurfaceScattering(); + + m_DebugDisplaySettings.RegisterDebug(); +#if UNITY_EDITOR + // We don't need the debug of Scene View at runtime (each camera have its own debug settings) + // All scene view will share the same FrameSettings for now as sometimes Dispose is called after + // another instance of HDRenderPipeline constructor is called. + + Camera firstSceneViewCamera = UnityEditor.SceneView.sceneViews.Count > 0 ? (UnityEditor.SceneView.sceneViews[0] as UnityEditor.SceneView).camera : null; + if (firstSceneViewCamera != null) + { + var history = FrameSettingsHistory.RegisterDebug(null, true); + DebugManager.instance.RegisterData(history); + } +#endif + + m_DepthPyramidMipLevelOffsetsBuffer = new ComputeBuffer(15, sizeof(int) * 2); + + InitializeRenderTextures(); + + // For debugging + MousePositionDebug.instance.Build(); + + InitializeRenderStateBlocks(); + + // Keep track of the original msaa sample value + // TODO : Bind this directly to the debug menu instead of having an intermediate value + m_MSAASamples = m_Asset ? m_Asset.currentPlatformRenderPipelineSettings.msaaSampleCount : MSAASamples.None; + + // Propagate it to the debug menu + m_DebugDisplaySettings.data.msaaSamples = m_MSAASamples; + + m_MRTTransparentMotionVec = new RenderTargetIdentifier[2]; + + if (m_RayTracingSupported) + { + InitRayTracingManager(); + InitRayTracedReflections(); + InitRayTracedIndirectDiffuse(); + InitRaytracingDeferred(); + InitRecursiveRenderer(); + InitPathTracing(); + + m_AmbientOcclusionSystem.InitRaytracing(this); + } + + // Initialize screen space shadows + InitializeScreenSpaceShadows(); + + CameraCaptureBridge.enabled = true; + + // Render Graph + m_RenderGraph = new RenderGraph(m_Asset.currentPlatformRenderPipelineSettings.supportMSAA, m_MSAASamples); + m_RenderGraph.RegisterDebug(); + + InitializePrepass(m_Asset); + m_ColorResolveMaterial = CoreUtils.CreateEngineMaterial(asset.renderPipelineResources.shaders.colorResolvePS); +<<<<<<< HEAD +======= + m_MotionVectorResolve = CoreUtils.CreateEngineMaterial(asset.renderPipelineResources.shaders.resolveMotionVecPS); + + InitializeProbeVolumes(); +>>>>>>> 579f009136... Fix Motion Vectors written by transparent when rendering with MSAA (#315) + } + +#if UNITY_EDITOR + void UpgradeResourcesIfNeeded() + { + // The first thing we need to do is to set the defines that depend on the render pipeline settings + m_Asset.EvaluateSettings(); + + // Check that the serialized Resources are not broken + if (HDRenderPipeline.defaultAsset.renderPipelineResources == null) + HDRenderPipeline.defaultAsset.renderPipelineResources + = UnityEditor.AssetDatabase.LoadAssetAtPath(HDUtils.GetHDRenderPipelinePath() + "Runtime/RenderPipelineResources/HDRenderPipelineResources.asset"); + ResourceReloader.ReloadAllNullIn(HDRenderPipeline.defaultAsset.renderPipelineResources, HDUtils.GetHDRenderPipelinePath()); + + if (m_RayTracingSupported) + { + if (HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources == null) + HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources + = UnityEditor.AssetDatabase.LoadAssetAtPath(HDUtils.GetHDRenderPipelinePath() + "Runtime/RenderPipelineResources/HDRenderPipelineRayTracingResources.asset"); + ResourceReloader.ReloadAllNullIn(HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources, HDUtils.GetHDRenderPipelinePath()); + } + else + { + // If ray tracing is not enabled we do not want to have ray tracing resources referenced + HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources = null; + } + + if (HDRenderPipeline.defaultAsset.renderPipelineEditorResources == null) + HDRenderPipeline.defaultAsset.renderPipelineEditorResources + = UnityEditor.AssetDatabase.LoadAssetAtPath(HDUtils.GetHDRenderPipelinePath() + "Editor/RenderPipelineResources/HDRenderPipelineEditorResources.asset"); + ResourceReloader.ReloadAllNullIn(HDRenderPipeline.defaultAsset.renderPipelineEditorResources, HDUtils.GetHDRenderPipelinePath()); + + // Upgrade the resources (re-import every references in RenderPipelineResources) if the resource version mismatches + // It's done here because we know every HDRP assets have been imported before + HDRenderPipeline.defaultAsset.renderPipelineResources?.UpgradeIfNeeded(); + } + + void ValidateResources() + { + var resources = HDRenderPipeline.defaultAsset.renderPipelineResources; + + // We iterate over all compute shader to verify if they are all compiled, if it's not the case + // then we throw an exception to avoid allocating resources and crashing later on by using a null + // compute kernel. + foreach (var computeShader in resources.shaders.GetAllComputeShaders()) + { + foreach (var message in UnityEditor.ShaderUtil.GetComputeShaderMessages(computeShader)) + { + if (message.severity == UnityEditor.Rendering.ShaderCompilerMessageSeverity.Error) + { + // Will be catched by the try in HDRenderPipelineAsset.CreatePipeline() + throw new Exception(String.Format( + "Compute Shader compilation error on platform {0} in file {1}:{2}: {3}{4}\n" + + "HDRP will not run until the error is fixed.\n", + message.platform, message.file, message.line, message.message, message.messageDetails + )); + } + } + } + } + +#endif + + /// + /// Resets the reference size of the internal RTHandle System. + /// This allows users to reduce the memory footprint of render textures after doing a super sampled rendering pass for example. + /// + /// New width of the internal RTHandle System. + /// New height of the internal RTHandle System. + public void ResetRTHandleReferenceSize(int width, int height) + { + RTHandles.ResetReferenceSize(width, height); + HDCamera.ResetAllHistoryRTHandleSystems(width, height); + if (m_RenderGraph != null) + m_RenderGraph.ResetRTHandleReferenceSize(width, height); + } + + void InitializeRenderTextures() + { + RenderPipelineSettings settings = m_Asset.currentPlatformRenderPipelineSettings; + + if (settings.supportedLitShaderMode != RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) + m_GbufferManager.CreateBuffers(); + + if (settings.supportDecals) + m_DbufferManager.CreateBuffers(); + + InitSSSBuffers(); + m_SharedRTManager.InitSharedBuffers(m_GbufferManager, m_Asset.currentPlatformRenderPipelineSettings, defaultResources); + + m_CameraColorBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), enableRandomWrite: true, useMipMap: false, useDynamicScale: true, name: "CameraColor"); + m_OpaqueAtmosphericScatteringBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), enableRandomWrite: true, useMipMap: false, useDynamicScale: true, name: "OpaqueAtmosphericScattering"); + m_CameraSssDiffuseLightingBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.B10G11R11_UFloatPack32, enableRandomWrite: true, useDynamicScale: true, name: "CameraSSSDiffuseLighting"); + + m_CustomPassColorBuffer = new Lazy(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetCustomBufferFormat(), enableRandomWrite: true, useDynamicScale: true, name: "CustomPassColorBuffer")); + m_CustomPassDepthBuffer = new Lazy(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R32_UInt, enableRandomWrite: true, useDynamicScale: true, isShadowMap: true, name: "CustomPassDepthBuffer", depthBufferBits: DepthBits.Depth32)); + + m_DistortionBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: Builtin.GetDistortionBufferFormat(), useDynamicScale: true, name: "Distortion"); + + m_ContactShadowBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R32_UInt, enableRandomWrite: true, useDynamicScale: true, name: "ContactShadowsBuffer"); + + if (m_Asset.currentPlatformRenderPipelineSettings.lowresTransparentSettings.enabled) + { + // We need R16G16B16A16_SFloat as we need a proper alpha channel for compositing. + m_LowResTransparentBuffer = RTHandles.Alloc(Vector2.one * 0.5f, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite: true, useDynamicScale: true, name: "Low res transparent"); + } + + if (settings.supportSSR) + { + // m_SsrDebugTexture = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: RenderTextureFormat.ARGBFloat, sRGB: false, enableRandomWrite: true, useDynamicScale: true, name: "SSR_Debug_Texture"); + m_SsrHitPointTexture = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16_UNorm, enableRandomWrite: true, useDynamicScale: true, name: "SSR_Hit_Point_Texture"); + m_SsrLightingTexture = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite: true, useDynamicScale: true, name: "SSR_Lighting_Texture"); + } + + // Let's create the MSAA textures + if (m_Asset.currentPlatformRenderPipelineSettings.supportMSAA && m_Asset.currentPlatformRenderPipelineSettings.supportedLitShaderMode != RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly) + { + m_CameraColorMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "CameraColorMSAA"); + m_OpaqueAtmosphericScatteringMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "OpaqueAtmosphericScatteringMSAA"); + m_CameraSssDiffuseLightingMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "CameraSSSDiffuseLightingMSAA"); + } + } + + void GetOrCreateDebugTextures() + { + //Debug.isDebugBuild can be changed during DoBuildPlayer, these allocation has to be check on every frames + //TODO : Clean this with the RenderGraph system + if (Debug.isDebugBuild && m_DebugColorPickerBuffer == null && m_DebugFullScreenTempBuffer == null) + { + m_DebugColorPickerBuffer = RTHandles.Alloc(Vector2.one, filterMode: FilterMode.Point, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, useDynamicScale: true, name: "DebugColorPicker"); + m_DebugFullScreenTempBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, useDynamicScale: true, name: "DebugFullScreen"); + } + + if (m_IntermediateAfterPostProcessBuffer == null) + { + // We always need this target because there could be a custom pass in after post process mode. + // In that case, we need to do the flip y after this pass. + m_IntermediateAfterPostProcessBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), useDynamicScale: true, name: "AfterPostProcess"); // Needs to be FP16 because output target might be HDR + } + } + + void DestroyRenderTextures() + { + m_GbufferManager.DestroyBuffers(); + m_DbufferManager.DestroyBuffers(); + m_MipGenerator.Release(); + + RTHandles.Release(m_CameraColorBuffer); + if (m_CustomPassColorBuffer.IsValueCreated) + RTHandles.Release(m_CustomPassColorBuffer.Value); + if (m_CustomPassDepthBuffer.IsValueCreated) + RTHandles.Release(m_CustomPassDepthBuffer.Value); + RTHandles.Release(m_OpaqueAtmosphericScatteringBuffer); + RTHandles.Release(m_CameraSssDiffuseLightingBuffer); + + RTHandles.Release(m_DistortionBuffer); + RTHandles.Release(m_ContactShadowBuffer); + + RTHandles.Release(m_LowResTransparentBuffer); + + // RTHandles.Release(m_SsrDebugTexture); + RTHandles.Release(m_SsrHitPointTexture); + RTHandles.Release(m_SsrLightingTexture); + + RTHandles.Release(m_DebugColorPickerBuffer); + RTHandles.Release(m_DebugFullScreenTempBuffer); + RTHandles.Release(m_IntermediateAfterPostProcessBuffer); + + RTHandles.Release(m_CameraColorMSAABuffer); + RTHandles.Release(m_OpaqueAtmosphericScatteringMSAABuffer); + RTHandles.Release(m_CameraSssDiffuseLightingMSAABuffer); + } + + void SetRenderingFeatures() + { + // Set sub-shader pipeline tag + Shader.globalRenderPipeline = "HDRenderPipeline"; + + // HD use specific GraphicsSettings + m_PreviousLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; + GraphicsSettings.lightsUseLinearIntensity = true; + m_PreviousLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; + GraphicsSettings.lightsUseColorTemperature = true; + m_PreviousSRPBatcher = GraphicsSettings.useScriptableRenderPipelineBatching; + GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; + + // In case shadowmask mode isn't setup correctly, force it to correct usage (as there is no UI to fix it) + m_PreviousShadowMaskMode = QualitySettings.shadowmaskMode; + QualitySettings.shadowmaskMode = ShadowmaskMode.DistanceShadowmask; + + SupportedRenderingFeatures.active = new SupportedRenderingFeatures() + { + reflectionProbeModes = SupportedRenderingFeatures.ReflectionProbeModes.Rotation, + defaultMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly, + mixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly | (m_Asset.currentPlatformRenderPipelineSettings.supportShadowMask ? SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask : 0), + lightmapBakeTypes = LightmapBakeType.Baked | LightmapBakeType.Mixed | LightmapBakeType.Realtime, + lightmapsModes = LightmapsMode.NonDirectional | LightmapsMode.CombinedDirectional, + lightProbeProxyVolumes = true, + motionVectors = true, + receiveShadows = false, + reflectionProbes = false, + rendererPriority = true, + overridesFog = true, + overridesOtherLightingSettings = true, + editableMaterialRenderQueue = false + // Enlighten is deprecated in 2019.3 and above + , enlighten = false + , overridesLODBias = true + , overridesMaximumLODLevel = true + , terrainDetailUnsupported = true + , overridesShadowmask = true // Don't display the shadow mask UI in Quality Settings + , overridesRealtimeReflectionProbes = true // Don't display the real time reflection probes checkbox UI in Quality Settings + }; + + Lightmapping.SetDelegate(GlobalIlluminationUtils.hdLightsDelegate); + +#if UNITY_EDITOR + // HDRP always enable baking of cookie by default + m_PreviousEnableCookiesInLightmapper = UnityEditor.EditorSettings.enableCookiesInLightmapper; + UnityEditor.EditorSettings.enableCookiesInLightmapper = true; + + SceneViewDrawMode.SetupDrawMode(); + + if (UnityEditor.PlayerSettings.colorSpace == ColorSpace.Gamma) + { + Debug.LogError("High Definition Render Pipeline doesn't support Gamma mode, change to Linear mode (HDRP isn't set up properly. Go to Windows > RenderPipeline > HDRP Wizard to fix your settings)."); + } +#endif + } + + bool CheckAPIValidity() + { + GraphicsDeviceType unsupportedDeviceType; + if (!IsSupportedPlatform(out unsupportedDeviceType)) + { + HDUtils.DisplayUnsupportedAPIMessage(unsupportedDeviceType.ToString()); + + // Display more information to the users when it should have use Metal instead of OpenGL + if (SystemInfo.graphicsDeviceType.ToString().StartsWith("OpenGL")) + { + if (SystemInfo.operatingSystem.StartsWith("Mac")) + HDUtils.DisplayUnsupportedMessage("Use Metal API instead."); + else if (SystemInfo.operatingSystem.StartsWith("Windows")) + HDUtils.DisplayUnsupportedMessage("Use Vulkan API instead."); + } + + return false; + } + + return true; + } + + // Note: If you add new platform in this function, think about adding support when building the player to in HDRPCustomBuildProcessor.cs + bool IsSupportedPlatform(out GraphicsDeviceType unsupportedGraphicDevice) + { + unsupportedGraphicDevice = SystemInfo.graphicsDeviceType; + + if (!SystemInfo.supportsComputeShaders) + return false; + + if (!(defaultResources?.shaders.defaultPS?.isSupported ?? true)) + return false; + +#if UNITY_EDITOR + UnityEditor.BuildTarget activeBuildTarget = UnityEditor.EditorUserBuildSettings.activeBuildTarget; + // If the build target matches the operating system of the editor + if (SystemInfo.operatingSystemFamily == HDUtils.BuildTargetToOperatingSystemFamily(activeBuildTarget)) + { + bool autoAPI = UnityEditor.PlayerSettings.GetUseDefaultGraphicsAPIs(activeBuildTarget); + + // then, there is two configuration possible: + if (autoAPI) + { + // if the graphic api is chosen automatically, then only the system's graphic device type matters + if (!HDUtils.IsSupportedGraphicDevice(SystemInfo.graphicsDeviceType)) + return false; + } + else + { + // otherwise, we need to iterate over every graphic api available in the list to track every non-supported APIs + return HDUtils.AreGraphicsAPIsSupported(activeBuildTarget, out unsupportedGraphicDevice); + } + } + else // if the build target does not match the editor OS, then we have to check using the graphic api list + { + return HDUtils.AreGraphicsAPIsSupported(activeBuildTarget, out unsupportedGraphicDevice); + } + + if (!HDUtils.IsSupportedBuildTarget(activeBuildTarget)) + return false; +#else + if (!HDUtils.IsSupportedGraphicDevice(SystemInfo.graphicsDeviceType)) + return false; +#endif + + if (!HDUtils.IsOperatingSystemSupported(SystemInfo.operatingSystem)) + return false; + + return true; + } + + void UnsetRenderingFeatures() + { + Shader.globalRenderPipeline = ""; + + GraphicsSettings.lightsUseLinearIntensity = m_PreviousLightsUseLinearIntensity; + GraphicsSettings.lightsUseColorTemperature = m_PreviousLightsUseColorTemperature; + GraphicsSettings.useScriptableRenderPipelineBatching = m_PreviousSRPBatcher; + QualitySettings.shadowmaskMode = m_PreviousShadowMaskMode; + + SupportedRenderingFeatures.active = new SupportedRenderingFeatures(); + + Lightmapping.ResetDelegate(); + +#if UNITY_EDITOR + UnityEditor.EditorSettings.enableCookiesInLightmapper = m_PreviousEnableCookiesInLightmapper; +#endif + } + + void InitializeDebugMaterials() + { + m_DebugViewMaterialGBuffer = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugViewMaterialGBufferPS); + m_DebugViewMaterialGBufferShadowMask = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugViewMaterialGBufferPS); + m_DebugViewMaterialGBufferShadowMask.EnableKeyword("SHADOWS_SHADOWMASK"); + m_DebugDisplayLatlong = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugDisplayLatlongPS); + m_DebugFullScreen = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugFullScreenPS); + m_DebugColorPicker = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugColorPickerPS); + m_Blit = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitPS); + m_ErrorMaterial = CoreUtils.CreateEngineMaterial("Hidden/InternalErrorShader"); + + // With texture array enabled, we still need the normal blit version for other systems like atlas + if (TextureXR.useTexArray) + { + m_Blit.EnableKeyword("DISABLE_TEXTURE2D_X_ARRAY"); + m_BlitTexArray = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitPS); + m_BlitTexArraySingleSlice = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitPS); + m_BlitTexArraySingleSlice.EnableKeyword("BLIT_SINGLE_SLICE"); + } + } + + void InitializeRenderStateBlocks() + { + m_DepthStateOpaque = new RenderStateBlock + { + depthState = new DepthState(true, CompareFunction.LessEqual), + mask = RenderStateMask.Depth + }; + } + + /// + /// Disposable pattern implementation. + /// + /// Is disposing. + protected override void Dispose(bool disposing) + { + DisposeProbeCameraPool(); + + UnsetRenderingFeatures(); + + if (!m_ValidAPI) + return; + +#if UNITY_EDITOR + if (!m_ResourcesInitialized) + return; +#endif + + base.Dispose(disposing); + + ReleaseScreenSpaceShadows(); + + if (m_RayTracingSupported) + { + ReleaseRecursiveRenderer(); + ReleaseRayTracingDeferred(); + ReleaseRayTracedIndirectDiffuse(); + ReleaseRayTracedReflections(); + ReleasePathTracing(); + ReleaseRayTracingManager(); + } + m_DebugDisplaySettings.UnregisterDebug(); + + CleanupLightLoop(); + + // For debugging + MousePositionDebug.instance.Cleanup(); + + DecalSystem.instance.Cleanup(); + + m_MaterialList.ForEach(material => material.Cleanup()); + + CoreUtils.Destroy(m_CameraMotionVectorsMaterial); + CoreUtils.Destroy(m_DecalNormalBufferMaterial); + + CoreUtils.Destroy(m_DebugViewMaterialGBuffer); + CoreUtils.Destroy(m_DebugViewMaterialGBufferShadowMask); + CoreUtils.Destroy(m_DebugDisplayLatlong); + CoreUtils.Destroy(m_DebugFullScreen); + CoreUtils.Destroy(m_DebugColorPicker); + CoreUtils.Destroy(m_Blit); + CoreUtils.Destroy(m_BlitTexArray); + CoreUtils.Destroy(m_BlitTexArraySingleSlice); + CoreUtils.Destroy(m_CopyDepth); + CoreUtils.Destroy(m_ErrorMaterial); + CoreUtils.Destroy(m_DownsampleDepthMaterial); + CoreUtils.Destroy(m_UpsampleTransparency); + CoreUtils.Destroy(m_ApplyDistortionMaterial); + CoreUtils.Destroy(m_ClearStencilBufferMaterial); + + CleanupSubsurfaceScattering(); + m_SharedRTManager.Cleanup(); + m_XRSystem.Cleanup(); + m_SkyManager.Cleanup(); + CleanupVolumetricLighting(); + + for(int bsdfIdx = 0; bsdfIdx < m_IBLFilterArray.Length; ++bsdfIdx) + { + m_IBLFilterArray[bsdfIdx].Cleanup(); + } + + m_PostProcessSystem.Cleanup(); + m_AmbientOcclusionSystem.Cleanup(); + m_BlueNoise.Cleanup(); + + HDCamera.ClearAll(); + + DestroyRenderTextures(); + CullingGroupManager.instance.Cleanup(); + + CoreUtils.SafeRelease(m_DepthPyramidMipLevelOffsetsBuffer); + + CustomPassVolume.Cleanup(); + + // RenderGraph + m_RenderGraph.Cleanup(); + m_RenderGraph.UnRegisterDebug(); + CleanupPrepass(); + CoreUtils.Destroy(m_ColorResolveMaterial); + CoreUtils.Destroy(m_MotionVectorResolve); + + +#if UNITY_EDITOR + SceneViewDrawMode.ResetDrawMode(); + + // Do not attempt to unregister SceneView FrameSettings. It is shared amongst every scene view and take only a little place. + // For removing it, you should be sure that Dispose could never be called after the constructor of another instance of this SRP. + // Also, at the moment, applying change to hdrpAsset cause the SRP to be Disposed and Constructed again. + // Not always in that order. +#endif + + // Dispose m_ProbeCameraPool properly + void DisposeProbeCameraPool() + { +#if UNITY_EDITOR + // Special case here: when the HDRP asset is modified in the Editor, + // it is disposed during an `OnValidate` call. + // But during `OnValidate` call, game object must not be destroyed. + // So, only when this method was called during an `OnValidate` call, the destruction of the + // pool is delayed, otherwise, it is destroyed as usual with `CoreUtils.Destroy` + var isInOnValidate = false; + isInOnValidate = new StackTrace().ToString().Contains("OnValidate"); + if (isInOnValidate) + { + var pool = m_ProbeCameraCache; + UnityEditor.EditorApplication.delayCall += () => pool.Dispose(); + m_ProbeCameraCache = null; + } + else + { +#endif + m_ProbeCameraCache.Dispose(); + m_ProbeCameraCache = null; +#if UNITY_EDITOR + } +#endif + } + + CameraCaptureBridge.enabled = false; + + // Dispose of Render Pipeline can be call either by OnValidate() or by OnDisable(). + // Inside an OnValidate() call we can't call a DestroyImmediate(). + // Here we are releasing our singleton to not leak while doing a domain reload. + // However this is doing a call to DestroyImmediate(). + // To workaround this, and was we only leak with Singleton while doing domain reload (and not in OnValidate) + // we are detecting if we are in an OnValidate call and releasing the Singleton only if it is not the case. + if (!m_Asset.isInOnValidateCall) + HDUtils.ReleaseComponentSingletons(); + } + + + void Resize(HDCamera hdCamera) + { + bool resolutionChanged = (hdCamera.actualWidth > m_MaxCameraWidth) || (hdCamera.actualHeight > m_MaxCameraHeight); + + if (resolutionChanged || LightLoopNeedResize(hdCamera, m_TileAndClusterData)) + { + // update recorded window resolution + m_MaxCameraWidth = Mathf.Max(m_MaxCameraWidth, hdCamera.actualWidth); + m_MaxCameraHeight = Mathf.Max(m_MaxCameraHeight, hdCamera.actualHeight); + + if (m_MaxCameraWidth > 0 && m_MaxCameraHeight > 0) + { + LightLoopReleaseResolutionDependentBuffers(); + m_DbufferManager.ReleaseResolutionDependentBuffers(); + m_SharedRTManager.DisposeCoarseStencilBuffer(); + } + + LightLoopAllocResolutionDependentBuffers(hdCamera, m_MaxCameraWidth, m_MaxCameraHeight); + m_DbufferManager.AllocResolutionDependentBuffers(hdCamera, m_MaxCameraWidth, m_MaxCameraHeight); + m_SharedRTManager.AllocateCoarseStencilBuffer(m_MaxCameraWidth, m_MaxCameraHeight, hdCamera.viewCount); + } + } + + void PushGlobalParams(HDCamera hdCamera, CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.PushGlobalParameters))) + { + // Set up UnityPerFrame CBuffer. + PushSubsurfaceScatteringGlobalParams(hdCamera, cmd); + + PushDecalsGlobalParams(hdCamera, cmd); + + Fog.PushFogShaderParameters(hdCamera, cmd); + + PushVolumetricLightingGlobalParams(hdCamera, cmd, m_FrameCount); + + SetMicroShadowingSettings(hdCamera, cmd); + + HDShadowSettings shadowSettings = hdCamera.volumeStack.GetComponent(); + cmd.SetGlobalFloat(HDShaderIDs._DirectionalTransmissionMultiplier, shadowSettings.directionalTransmissionMultiplier.value); + + m_AmbientOcclusionSystem.PushGlobalParameters(hdCamera, cmd); + + var ssRefraction = hdCamera.volumeStack.GetComponent() + ?? ScreenSpaceRefraction.defaultInstance; + ssRefraction.PushShaderParameters(cmd); + + // Set up UnityPerView CBuffer. + hdCamera.SetupGlobalParams(cmd, m_FrameCount); + + cmd.SetGlobalVector(HDShaderIDs._IndirectLightingMultiplier, new Vector4(hdCamera.volumeStack.GetComponent().indirectDiffuseIntensity.value, 0, 0, 0)); + + // It will be overridden for transparent pass. + cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, (int)UnityEngine.Rendering.ColorWriteMask.All); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors)) + { + var buf = m_SharedRTManager.GetMotionVectorsBuffer(); + + cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, buf); + cmd.SetGlobalVector( HDShaderIDs._CameraMotionVectorsSize, new Vector4(buf.referenceSize.x, + buf.referenceSize.y, + 1.0f / buf.referenceSize.x, + 1.0f / buf.referenceSize.y)); + cmd.SetGlobalVector(HDShaderIDs._CameraMotionVectorsScale, new Vector4(buf.referenceSize.x / (float)buf.rt.width, + buf.referenceSize.y / (float)buf.rt.height)); + } + else + { + cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, TextureXR.GetBlackTexture()); + } + + // Light loop stuff... + if (hdCamera.IsSSREnabled()) + cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, m_SsrLightingTexture); + else + cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, TextureXR.GetClearTexture()); + + // Off screen rendering is disabled for most of the frame by default. + cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 0); + cmd.SetGlobalFloat(HDShaderIDs._ReplaceDiffuseForIndirect, hdCamera.frameSettings.IsEnabled(FrameSettingsField.ReplaceDiffuseForIndirect) ? 1.0f : 0.0f); + cmd.SetGlobalInt(HDShaderIDs._EnableSkyReflection, hdCamera.frameSettings.IsEnabled(FrameSettingsField.SkyReflection) ? 1 : 0); + + m_SkyManager.SetGlobalSkyData(cmd, hdCamera); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) + { + bool validIndirectDiffuse = ValidIndirectDiffuseState(hdCamera); + cmd.SetGlobalInt(HDShaderIDs._RaytracedIndirectDiffuse, validIndirectDiffuse ? 1 : 0); + + // Bind the camera's ray tracing frame index + cmd.SetGlobalInt(HDShaderIDs._RaytracingFrameIndex, RayTracingFrameIndex(hdCamera)); + } + else + { + cmd.SetGlobalInt(HDShaderIDs._RaytracedIndirectDiffuse, 0); + } + cmd.SetGlobalFloat(HDShaderIDs._ContactShadowOpacity, m_ContactShadows.opacity.value); + } + } + + void CopyDepthBufferIfNeeded(HDCamera hdCamera, CommandBuffer cmd) + { + if (!m_IsDepthBufferCopyValid) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CopyDepthBuffer))) + { + // TODO: maybe we don't actually need the top MIP level? + // That way we could avoid making the copy, and build the MIP hierarchy directly. + // The downside is that our SSR tracing accuracy would decrease a little bit. + // But since we never render SSR at full resolution, this may be acceptable. + + // TODO: reading the depth buffer with a compute shader will cause it to decompress in place. + // On console, to preserve the depth test performance, we must NOT decompress the 'm_CameraDepthStencilBuffer' in place. + // We should call decompressDepthSurfaceToCopy() and decompress it to 'm_CameraDepthBufferMipChain'. + m_GPUCopy.SampleCopyChannel_xyzw2x(cmd, m_SharedRTManager.GetDepthStencilBuffer(), m_SharedRTManager.GetDepthTexture(), new RectInt(0, 0, hdCamera.actualWidth, hdCamera.actualHeight)); + // Depth texture is now ready, bind it. + cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthTexture()); + } + m_IsDepthBufferCopyValid = true; + } + } + + void BuildCoarseStencilAndResolveIfNeeded(HDCamera hdCamera, RTHandle depthStencilBuffer, RTHandle resolvedStencilBuffer, ComputeBuffer coarseStencilBuffer, CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CoarseStencilGeneration))) + { + bool MSAAEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + + // The following features require a copy of the stencil, if none are active, no need to do the resolve. + bool resolveIsNecessary = GetFeatureVariantsEnabled(hdCamera.frameSettings); + resolveIsNecessary = resolveIsNecessary || hdCamera.IsSSREnabled(); + + // We need the resolve only with msaa + resolveIsNecessary = resolveIsNecessary && MSAAEnabled; + + ComputeShader cs = defaultResources.shaders.resolveStencilCS; + int kernel = SampleCountToPassIndex(MSAAEnabled ? hdCamera.msaaSamples : MSAASamples.None); + kernel = resolveIsNecessary ? kernel + 3 : kernel; // We have a different variant if we need to resolve to non-MSAA stencil + int coarseStencilWidth = HDUtils.DivRoundUp(hdCamera.actualWidth, 8); + int coarseStencilHeight = HDUtils.DivRoundUp(hdCamera.actualHeight, 8); + cmd.SetGlobalVector(HDShaderIDs._CoarseStencilBufferSize, new Vector4(coarseStencilWidth, coarseStencilHeight, 1.0f / coarseStencilWidth, 1.0f / coarseStencilHeight)); + cmd.SetComputeBufferParam(cs, kernel, HDShaderIDs._CoarseStencilBuffer, coarseStencilBuffer); + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._StencilTexture, depthStencilBuffer, 0, RenderTextureSubElement.Stencil); + + if (resolveIsNecessary) + { + cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputStencilBuffer, resolvedStencilBuffer); + } + + cmd.DispatchCompute(cs, kernel, coarseStencilWidth, coarseStencilHeight, hdCamera.viewCount); + } + } + + void SetMicroShadowingSettings(HDCamera hdCamera, CommandBuffer cmd) + { + MicroShadowing microShadowingSettings = hdCamera.volumeStack.GetComponent(); + cmd.SetGlobalFloat(HDShaderIDs._MicroShadowOpacity, microShadowingSettings.enable.value ? microShadowingSettings.opacity.value : 0.0f); + } + + void ConfigureKeywords(bool enableBakeShadowMask, HDCamera hdCamera, CommandBuffer cmd) + { + // Globally enable (for GBuffer shader and forward lit (opaque and transparent) the keyword SHADOWS_SHADOWMASK + CoreUtils.SetKeyword(cmd, "SHADOWS_SHADOWMASK", enableBakeShadowMask); + // Configure material to use depends on shadow mask option + m_CurrentRendererConfigurationBakedLighting = enableBakeShadowMask ? HDUtils.k_RendererConfigurationBakedLightingWithShadowMask : HDUtils.k_RendererConfigurationBakedLighting; + m_currentDebugViewMaterialGBuffer = enableBakeShadowMask ? m_DebugViewMaterialGBufferShadowMask : m_DebugViewMaterialGBuffer; + + CoreUtils.SetKeyword(cmd, "LIGHT_LAYERS", hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers)); + cmd.SetGlobalInt(HDShaderIDs._EnableLightLayers, hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers) ? 1 : 0); + + // configure keyword for both decal.shader and material + if (m_Asset.currentPlatformRenderPipelineSettings.supportDecals) + { + CoreUtils.SetKeyword(cmd, "DECALS_OFF", false); + CoreUtils.SetKeyword(cmd, "DECALS_3RT", !m_Asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask); + CoreUtils.SetKeyword(cmd, "DECALS_4RT", m_Asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask); + } + else + { + CoreUtils.SetKeyword(cmd, "DECALS_OFF", true); + CoreUtils.SetKeyword(cmd, "DECALS_3RT", false); + CoreUtils.SetKeyword(cmd, "DECALS_4RT", false); + } + + // Raise the normal buffer flag only if we are in forward rendering + CoreUtils.SetKeyword(cmd, "WRITE_NORMAL_BUFFER", hdCamera.frameSettings.litShaderMode == LitShaderMode.Forward); + + // Raise or remove the depth msaa flag based on the frame setting + CoreUtils.SetKeyword(cmd, "WRITE_MSAA_DEPTH", hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)); + } + + struct RenderRequest + { + public struct Target + { + public RenderTargetIdentifier id; + public CubemapFace face; + public RenderTexture copyToTarget; + } + public HDCamera hdCamera; + public bool clearCameraSettings; + public Target target; + public HDCullingResults cullingResults; + public int index; + // Indices of render request to render before this one + public List dependsOnRenderRequestIndices; + public CameraSettings cameraSettings; + public List<(HDProbe.RenderData, HDProbe)> viewDependentProbesData; + } + struct HDCullingResults + { + public CullingResults cullingResults; + public CullingResults? customPassCullingResults; + public HDProbeCullingResults hdProbeCullingResults; + public DecalSystem.CullResult decalCullResults; + // TODO: DecalCullResults + + internal void Reset() + { + hdProbeCullingResults.Reset(); + if (decalCullResults != null) + decalCullResults.Clear(); + else + decalCullResults = GenericPool.Get(); + } + } + + /// + /// RenderPipeline Render implementation. + /// + /// Current ScriptableRenderContext. + /// List of cameras to render. + protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras) + { +#if UNITY_EDITOR + if (!m_ResourcesInitialized) + return; +#endif + + if (!m_ValidAPI || cameras.Length == 0) + return; + + GetOrCreateDefaultVolume(); + GetOrCreateDebugTextures(); + + // This function should be called once every render (once for all camera) + LightLoopNewRender(); + + BeginFrameRendering(renderContext, cameras); + + // Check if we can speed up FrameSettings process by skiping history + // or go in detail if debug is activated. Done once for all renderer. + m_FrameSettingsHistoryEnabled = FrameSettingsHistory.enabled; + + int newCount = Time.frameCount; + bool newFrame = newCount != m_FrameCount; + m_FrameCount = newCount; + + if (newFrame) + { + m_LastTime = m_Time; // Only update time once per frame. + m_Time = Time.time; // Does NOT take the 'animateMaterials' setting into account. + m_LastTime = Mathf.Min(m_Time, m_LastTime); // Guard against broken Unity behavior. Should not be necessary. + + m_ProbeCameraCache.ClearCamerasUnusedFor(2, m_FrameCount); + HDCamera.CleanUnused(); + } + + var dynResHandler = DynamicResolutionHandler.instance; + dynResHandler.Update(m_Asset.currentPlatformRenderPipelineSettings.dynamicResolutionSettings, () => + { + var hdrp = (RenderPipelineManager.currentPipeline as HDRenderPipeline); + var stencilBuffer = hdrp.m_SharedRTManager.GetDepthStencilBuffer().rt; + var stencilBufferSize = new Vector2Int(stencilBuffer.width, stencilBuffer.height); + hdrp.m_SharedRTManager.ComputeDepthBufferMipChainSize(DynamicResolutionHandler.instance.GetScaledSize(stencilBufferSize)); + } + ); + + // This syntax is awful and hostile to debugging, please don't use it... + using (ListPool.Get(out List renderRequests)) + using (ListPool.Get(out List rootRenderRequestIndices)) + using (HashSetPool.Get(out HashSet skipClearCullingResults)) + using (DictionaryPool>.Get(out Dictionary> renderRequestIndicesWhereTheProbeIsVisible)) + using (ListPool.Get(out List cameraSettings)) + using (ListPool.Get(out List cameraPositionSettings)) + { + // With XR multi-pass enabled, each camera can be rendered multiple times with different parameters + var multipassCameras = m_XRSystem.SetupFrame(cameras, m_Asset.currentPlatformRenderPipelineSettings.xrSettings.singlePass, m_DebugDisplaySettings.data.xrSinglePassTestMode); + +#if UNITY_EDITOR + // See comment below about the preview camera workaround + bool hasGameViewCamera = false; + foreach (var c in cameras) + { + if (c.cameraType == CameraType.Game) + { + hasGameViewCamera = true; + break; + } + } +#endif + + // Culling loop + foreach ((Camera camera, XRPass xrPass) in multipassCameras) + { + if (camera == null) + continue; + +#if UNITY_EDITOR + // We selecting a camera in the editor, we have a preview that is drawn. + // For legacy reasons, Unity will render all preview cameras when rendering the GameView + // Actually, we don't need this here because we call explicitly Camera.Render when we + // need a preview + // + // This is an issue, because at some point, you end up with 2 cameras to render: + // - Main Camera (game view) + // - Preview Camera (preview) + // If the preview camera is rendered last, it will alter the "GameView RT" RenderTexture + // that was previously rendered by the Main Camera. + // This is an issue. + // + // Meanwhile, skipping all preview camera when rendering the game views is sane, + // and will workaround the aformentionned issue. + if (hasGameViewCamera && camera.cameraType == CameraType.Preview) + continue; +#endif + + bool cameraRequestedDynamicRes = false; + HDAdditionalCameraData hdCam; + if (camera.TryGetComponent(out hdCam)) + { + cameraRequestedDynamicRes = hdCam.allowDynamicResolution; + + // We are in a case where the platform does not support hw dynamic resolution, so we force the software fallback. + // TODO: Expose the graphics caps info on whether the platform supports hw dynamic resolution or not. + // Temporarily disable HW Dynamic resolution on metal until the problems we have with it are fixed + bool isMetal = (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal); + if (isMetal || (dynResHandler.RequestsHardwareDynamicResolution() && cameraRequestedDynamicRes && !camera.allowDynamicResolution)) + { + dynResHandler.ForceSoftwareFallback(); + } + } + + dynResHandler.SetCurrentCameraRequest(cameraRequestedDynamicRes); + RTHandles.SetHardwareDynamicResolutionState(dynResHandler.HardwareDynamicResIsEnabled()); + + VFXManager.PrepareCamera(camera); + + // Reset pooled variables + cameraSettings.Clear(); + cameraPositionSettings.Clear(); + skipClearCullingResults.Clear(); + + var cullingResults = UnsafeGenericPool.Get(); + cullingResults.Reset(); + + // Try to compute the parameters of the request or skip the request + var skipRequest = !TryCalculateFrameParameters( + camera, + xrPass, + out var additionalCameraData, + out var hdCamera, + out var cullingParameters); + + // Note: In case of a custom render, we have false here and 'TryCull' is not executed + if (!skipRequest) + { + var needCulling = true; + + // In XR multipass, culling results can be shared if the pass has the same culling id + if (xrPass.multipassId > 0) + { + foreach (var req in renderRequests) + { + if (camera == req.hdCamera.camera && req.hdCamera.xr.cullingPassId == xrPass.cullingPassId) + { + UnsafeGenericPool.Release(cullingResults); + cullingResults = req.cullingResults; + skipClearCullingResults.Add(req.index); + needCulling = false; + } + } + } + + if (needCulling) + skipRequest = !TryCull(camera, hdCamera, renderContext, m_SkyManager, cullingParameters, m_Asset, ref cullingResults); + } + + if (additionalCameraData != null && additionalCameraData.hasCustomRender) + { + skipRequest = true; + // Execute custom render + additionalCameraData.ExecuteCustomRender(renderContext, hdCamera); + } + + if (skipRequest) + { + // Submit render context and free pooled resources for this request + renderContext.Submit(); + UnsafeGenericPool.Release(cullingResults); + UnityEngine.Rendering.RenderPipeline.EndCameraRendering(renderContext, camera); + continue; + } + + // Select render target + RenderTargetIdentifier targetId = camera.targetTexture ?? new RenderTargetIdentifier(BuiltinRenderTextureType.CameraTarget); + if (camera.targetTexture != null) + { + camera.targetTexture.IncrementUpdateCount(); // Necessary if the texture is used as a cookie. + } + + // Render directly to XR render target if active + if (hdCamera.xr.enabled && hdCamera.xr.renderTargetValid) + targetId = hdCamera.xr.renderTarget; + + // Add render request + var request = new RenderRequest + { + hdCamera = hdCamera, + cullingResults = cullingResults, + target = new RenderRequest.Target + { + id = targetId, + face = CubemapFace.Unknown + }, + dependsOnRenderRequestIndices = ListPool.Get(), + index = renderRequests.Count, + cameraSettings = CameraSettings.From(hdCamera), + viewDependentProbesData = ListPool<(HDProbe.RenderData, HDProbe)>.Get() + // TODO: store DecalCullResult + }; + renderRequests.Add(request); + // This is a root render request + rootRenderRequestIndices.Add(request.index); + + // Add visible probes to list + for (var i = 0; i < cullingResults.cullingResults.visibleReflectionProbes.Length; ++i) + { + var visibleProbe = cullingResults.cullingResults.visibleReflectionProbes[i]; + + // TODO: The following fix is temporary. + // We should investigate why we got null cull result when we change scene + if (visibleProbe == null || visibleProbe.Equals(null) || visibleProbe.reflectionProbe == null || visibleProbe.reflectionProbe.Equals(null)) + continue; + + HDAdditionalReflectionData additionalReflectionData; + if (!visibleProbe.reflectionProbe.TryGetComponent(out additionalReflectionData)) + additionalReflectionData = visibleProbe.reflectionProbe.gameObject.AddComponent(); + + AddVisibleProbeVisibleIndexIfUpdateIsRequired(additionalReflectionData, request.index); + } + for (var i = 0; i < cullingResults.hdProbeCullingResults.visibleProbes.Count; ++i) + AddVisibleProbeVisibleIndexIfUpdateIsRequired(cullingResults.hdProbeCullingResults.visibleProbes[i], request.index); + + // local function to help insertion of visible probe + void AddVisibleProbeVisibleIndexIfUpdateIsRequired(HDProbe probe, int visibleInIndex) + { + // Don't add it if it has already been updated this frame or not a real time probe + // TODO: discard probes that are baked once per frame and already baked this frame + if (!probe.requiresRealtimeUpdate) + return; + + // Notify that we render the probe at this frame + probe.SetIsRendered(m_FrameCount); + + float visibility = ComputeVisibility(visibleInIndex, probe); + + if (!renderRequestIndicesWhereTheProbeIsVisible.TryGetValue(probe, out var visibleInIndices)) + { + visibleInIndices = ListPool<(int index, float weight)>.Get(); + renderRequestIndicesWhereTheProbeIsVisible.Add(probe, visibleInIndices); + } + if (!visibleInIndices.Contains((visibleInIndex, visibility))) + visibleInIndices.Add((visibleInIndex, visibility)); + } + + float ComputeVisibility(int visibleInIndex, HDProbe visibleProbe) + { + var visibleInRenderRequest = renderRequests[visibleInIndex]; + var viewerTransform = visibleInRenderRequest.hdCamera.camera.transform; + return HDUtils.ComputeWeightedLinearFadeDistance(visibleProbe.transform.position, viewerTransform.position, visibleProbe.weight, visibleProbe.fadeDistance); + } + } + + foreach (var probeToRenderAndDependencies in renderRequestIndicesWhereTheProbeIsVisible) + { + var visibleProbe = probeToRenderAndDependencies.Key; + var visibilities = probeToRenderAndDependencies.Value; + + // Two cases: + // - If the probe is view independent, we add only one render request per face that is + // a dependency for all its 'visibleIn' render requests + // - If the probe is view dependent, we add one render request per face per 'visibleIn' + // render requests + var isViewDependent = visibleProbe.type == ProbeSettings.ProbeType.PlanarProbe; + + Camera parentCamera; + + if (isViewDependent) + { + for (int i = 0; i < visibilities.Count; ++i) + { + var visibility = visibilities[i]; + if (visibility.weight <= 0f) + continue; + + var visibleInIndex = visibility.index; + var visibleInRenderRequest = renderRequests[visibleInIndex]; + var viewerTransform = visibleInRenderRequest.hdCamera.camera.transform; + + parentCamera = visibleInRenderRequest.hdCamera.camera; + + var renderDatas = ListPool.Get(); + + AddHDProbeRenderRequests( + visibleProbe, + viewerTransform, + new List<(int index, float weight)>{visibility}, + HDUtils.GetSceneCullingMaskFromCamera(visibleInRenderRequest.hdCamera.camera), + parentCamera, + visibleInRenderRequest.hdCamera.camera.fieldOfView, + visibleInRenderRequest.hdCamera.camera.aspect, + ref renderDatas + ); + + foreach (var renderData in renderDatas) + { + visibleInRenderRequest.viewDependentProbesData.Add((renderData, visibleProbe)); + } + + ListPool.Release(renderDatas); + } + } + else + { + // No single parent camera for view dependent probes. + parentCamera = null; + + bool visibleInOneViewer = false; + for (int i = 0; i < visibilities.Count && !visibleInOneViewer; ++i) + { + if (visibilities[i].weight > 0f) + visibleInOneViewer = true; + } + if (visibleInOneViewer) + { + var renderDatas = ListPool.Get(); + AddHDProbeRenderRequests(visibleProbe, null, visibilities, 0, parentCamera, referenceFieldOfView: 90, referenceAspect: 1, ref renderDatas); + ListPool.Release(renderDatas); + } + } + } + foreach (var pair in renderRequestIndicesWhereTheProbeIsVisible) + ListPool<(int index, float weight)>.Release(pair.Value); + renderRequestIndicesWhereTheProbeIsVisible.Clear(); + + // Local function to share common code between view dependent and view independent requests + void AddHDProbeRenderRequests( + HDProbe visibleProbe, + Transform viewerTransform, + List<(int index, float weight)> visibilities, + ulong overrideSceneCullingMask, + Camera parentCamera, + float referenceFieldOfView, + float referenceAspect, + ref List renderDatas + ) + { + var position = ProbeCapturePositionSettings.ComputeFrom( + visibleProbe, + viewerTransform + ); + cameraSettings.Clear(); + cameraPositionSettings.Clear(); + HDRenderUtilities.GenerateRenderingSettingsFor( + visibleProbe.settings, position, + cameraSettings, cameraPositionSettings, overrideSceneCullingMask, + referenceFieldOfView: referenceFieldOfView, + referenceAspect: referenceAspect + ); + + switch (visibleProbe.type) + { + case ProbeSettings.ProbeType.ReflectionProbe: + int desiredProbeSize = (int)((HDRenderPipeline)RenderPipelineManager.currentPipeline).currentPlatformRenderPipelineSettings.lightLoopSettings.reflectionCubemapSize; + if (visibleProbe.realtimeTexture == null || visibleProbe.realtimeTexture.width != desiredProbeSize) + { + visibleProbe.SetTexture(ProbeSettings.Mode.Realtime, HDRenderUtilities.CreateReflectionProbeRenderTarget(desiredProbeSize)); + } + break; + case ProbeSettings.ProbeType.PlanarProbe: + int desiredPlanarProbeSize = (int)visibleProbe.resolution; + if (visibleProbe.realtimeTexture == null || visibleProbe.realtimeTexture.width != desiredPlanarProbeSize) + { + visibleProbe.SetTexture(ProbeSettings.Mode.Realtime, HDRenderUtilities.CreatePlanarProbeRenderTarget(desiredPlanarProbeSize)); + } + // Set the viewer's camera as the default camera anchor + for (var i = 0; i < cameraSettings.Count; ++i) + { + var v = cameraSettings[i]; + if (v.volumes.anchorOverride == null) + { + v.volumes.anchorOverride = viewerTransform; + cameraSettings[i] = v; + } + } + break; + } + + for (int j = 0; j < cameraSettings.Count; ++j) + { + var camera = m_ProbeCameraCache.GetOrCreate((viewerTransform, visibleProbe, j), m_FrameCount, CameraType.Reflection); + var additionalCameraData = camera.GetComponent(); + + if (additionalCameraData == null) + additionalCameraData = camera.gameObject.AddComponent(); + additionalCameraData.hasPersistentHistory = true; + + // We need to set a targetTexture with the right otherwise when setting pixelRect, it will be rescaled internally to the size of the screen + camera.targetTexture = visibleProbe.realtimeTexture; + camera.gameObject.hideFlags = HideFlags.HideAndDontSave; + camera.gameObject.SetActive(false); + + // Warning: accessing Object.name generate 48B of garbage at each frame here + // camera.name = HDUtils.ComputeProbeCameraName(visibleProbe.name, j, viewerTransform?.name); + // Non Alloc version of ComputeProbeCameraName but without the viewerTransform name part + camera.name = visibleProbe.probeName[j]; + + camera.ApplySettings(cameraSettings[j]); + camera.ApplySettings(cameraPositionSettings[j]); + camera.cameraType = CameraType.Reflection; + camera.pixelRect = new Rect(0, 0, visibleProbe.realtimeTexture.width, visibleProbe.realtimeTexture.height); + + var _cullingResults = UnsafeGenericPool.Get(); + _cullingResults.Reset(); + + if (!(TryCalculateFrameParameters( + camera, + m_XRSystem.emptyPass, + out _, + out var hdCamera, + out var cullingParameters + ) + && TryCull( + camera, hdCamera, renderContext, m_SkyManager, cullingParameters, m_Asset, + ref _cullingResults + ))) + { + // Skip request and free resources + UnsafeGenericPool.Release(_cullingResults); + continue; + } + + // HACK! We render the probe until we know the ambient probe for the associated sky context is ready. + // For one-off rendering the dynamic ambient probe will be set to black until they are not processed, leading to faulty rendering. + // So we enqueue another rendering and then we will not set the probe texture until we have rendered with valid ambient probe. + if (!m_SkyManager.HasSetValidAmbientProbe(hdCamera)) + { + visibleProbe.ForceRenderingNextUpdate(); + } + + hdCamera.parentCamera = parentCamera; // Used to inherit the properties of the view + + HDAdditionalCameraData hdCam; + camera.TryGetComponent(out hdCam); + hdCam.flipYMode = visibleProbe.type == ProbeSettings.ProbeType.ReflectionProbe + ? HDAdditionalCameraData.FlipYMode.ForceFlipY + : HDAdditionalCameraData.FlipYMode.Automatic; + + if (!visibleProbe.realtimeTexture.IsCreated()) + visibleProbe.realtimeTexture.Create(); + + var renderData = new HDProbe.RenderData( + camera.worldToCameraMatrix, + camera.projectionMatrix, + camera.transform.position, + camera.transform.rotation, + cameraSettings[j].frustum.fieldOfView, + cameraSettings[j].frustum.aspect + ); + + renderDatas.Add(renderData); + + visibleProbe.SetRenderData( + ProbeSettings.Mode.Realtime, + renderData + ); + + // TODO: Assign the actual final target to render to. + // Currently, we use a target for each probe, and then copy it into the cache before using it + // during the lighting pass. + // But what we actually want here, is to render directly into the cache (either CubeArray, + // or Texture2DArray) + // To do so, we need to first allocate in the cache the location of the target and then assign + // it here. + var request = new RenderRequest + { + hdCamera = hdCamera, + cullingResults = _cullingResults, + clearCameraSettings = true, + dependsOnRenderRequestIndices = ListPool.Get(), + index = renderRequests.Count, + cameraSettings = cameraSettings[j], + viewDependentProbesData = ListPool<(HDProbe.RenderData, HDProbe)>.Get() + // TODO: store DecalCullResult + }; + + if (m_SkyManager.HasSetValidAmbientProbe(hdCamera)) + { + // As we render realtime texture on GPU side, we must tag the texture so our texture array cache detect that something have change + visibleProbe.realtimeTexture.IncrementUpdateCount(); + + if (cameraSettings.Count > 1) + { + var face = (CubemapFace)j; + request.target = new RenderRequest.Target + { + copyToTarget = visibleProbe.realtimeTexture, + face = face + }; + } + else + { + request.target = new RenderRequest.Target + { + id = visibleProbe.realtimeTexture, + face = CubemapFace.Unknown + }; + } + } + + renderRequests.Add(request); + + + foreach (var visibility in visibilities) + renderRequests[visibility.index].dependsOnRenderRequestIndices.Add(request.index); + } + } + + // TODO: Refactor into a method. If possible remove the intermediate target + // Find max size for Cubemap face targets and resize/allocate if required the intermediate render target + { + var size = Vector2Int.zero; + for (int i = 0; i < renderRequests.Count; ++i) + { + var renderRequest = renderRequests[i]; + var isCubemapFaceTarget = renderRequest.target.face != CubemapFace.Unknown; + if (!isCubemapFaceTarget) + continue; + + var width = renderRequest.hdCamera.actualWidth; + var height = renderRequest.hdCamera.actualHeight; + size.x = Mathf.Max(width, size.x); + size.y = Mathf.Max(height, size.y); + } + + if (size != Vector2.zero) + { + if (m_TemporaryTargetForCubemaps != null) + { + if (m_TemporaryTargetForCubemaps.width != size.x + || m_TemporaryTargetForCubemaps.height != size.y) + { + m_TemporaryTargetForCubemaps.Release(); + m_TemporaryTargetForCubemaps = null; + } + } + if (m_TemporaryTargetForCubemaps == null) + { + m_TemporaryTargetForCubemaps = new RenderTexture( + size.x, size.y, 1, GraphicsFormat.R16G16B16A16_SFloat + ) + { + autoGenerateMips = false, + useMipMap = false, + name = "Temporary Target For Cubemap Face", + volumeDepth = 1, + useDynamicScale = false + }; + } + } + } + + using (ListPool.Get(out List renderRequestIndicesToRender)) + { + // Flatten the render requests graph in an array that guarantee dependency constraints + { + using (GenericPool>.Get(out Stack stack)) + { + stack.Clear(); + for (int i = rootRenderRequestIndices.Count -1; i >= 0; --i) + { + stack.Push(rootRenderRequestIndices[i]); + while (stack.Count > 0) + { + var index = stack.Pop(); + if (!renderRequestIndicesToRender.Contains(index)) + renderRequestIndicesToRender.Add(index); + + var request = renderRequests[index]; + for (int j = 0; j < request.dependsOnRenderRequestIndices.Count; ++j) + stack.Push(request.dependsOnRenderRequestIndices[j]); + } + } + } + } + + using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.HDRenderPipelineAllRenderRequest))) + { + // Execute render request graph, in reverse order + for (int i = renderRequestIndicesToRender.Count - 1; i >= 0; --i) + { + var renderRequestIndex = renderRequestIndicesToRender[i]; + var renderRequest = renderRequests[renderRequestIndex]; + + var cmd = CommandBufferPool.Get(""); + + // TODO: Avoid the intermediate target and render directly into final target + // CommandBuffer.Blit does not work on Cubemap faces + // So we use an intermediate RT to perform a CommandBuffer.CopyTexture in the target Cubemap face + if (renderRequest.target.face != CubemapFace.Unknown) + { + if (!m_TemporaryTargetForCubemaps.IsCreated()) + m_TemporaryTargetForCubemaps.Create(); + + var hdCamera = renderRequest.hdCamera; + ref var target = ref renderRequest.target; + target.id = m_TemporaryTargetForCubemaps; + } + + // The HDProbe store only one RenderData per probe, however RenderData can be view dependent (e.g. planar probes). + // To avoid that the render data for the wrong view is used, we previously store a copy of the render data + // for each viewer and we are going to set it on the probe right before said viewer is rendered. + foreach (var probeDataPair in renderRequest.viewDependentProbesData) + { + var probe = probeDataPair.Item2; + var probeRenderData = probeDataPair.Item1; + probe.SetRenderData(ProbeSettings.Mode.Realtime, probeRenderData); + } + + // var aovRequestIndex = 0; + foreach (var aovRequest in renderRequest.hdCamera.aovRequests) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.HDRenderPipelineRenderAOV))) + { + cmd.SetInvertCulling(renderRequest.cameraSettings.invertFaceCulling); + ExecuteRenderRequest(renderRequest, renderContext, cmd, aovRequest); + cmd.SetInvertCulling(false); + } + renderContext.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + renderContext.Submit(); + cmd = CommandBufferPool.Get(); + } + + using (new ProfilingScope(cmd, renderRequest.hdCamera.profilingSampler)) + { + cmd.SetInvertCulling(renderRequest.cameraSettings.invertFaceCulling); + ExecuteRenderRequest(renderRequest, renderContext, cmd, AOVRequestData.defaultAOVRequestDataNonAlloc); + cmd.SetInvertCulling(false); + UnityEngine.Rendering.RenderPipeline.EndCameraRendering(renderContext, renderRequest.hdCamera.camera); + } + + { + var target = renderRequest.target; + // Handle the copy if requested + if (target.copyToTarget != null) + { + cmd.CopyTexture( + target.id, 0, 0, 0, 0, renderRequest.hdCamera.actualWidth, renderRequest.hdCamera.actualHeight, + target.copyToTarget, (int)target.face, 0, 0, 0 + ); + } + if (renderRequest.clearCameraSettings) + // release reference because the RenderTexture might be destroyed before the camera + renderRequest.hdCamera.camera.targetTexture = null; + + ListPool.Release(renderRequest.dependsOnRenderRequestIndices); + ListPool<(HDProbe.RenderData, HDProbe)>.Release(renderRequest.viewDependentProbesData); + + // Culling results can be shared between render requests: clear only when required + if (!skipClearCullingResults.Contains(renderRequest.index)) + { + renderRequest.cullingResults.decalCullResults?.Clear(); + UnsafeGenericPool.Release(renderRequest.cullingResults); + } + } + + // Render XR mirror view once all render requests have been completed + if (i == 0 && renderRequest.hdCamera.camera.cameraType == CameraType.Game && renderRequest.hdCamera.camera.targetTexture == null) + { + HDAdditionalCameraData acd; + if (renderRequest.hdCamera.camera.TryGetComponent(out acd) && acd.xrRendering) + { + m_XRSystem.RenderMirrorView(cmd); + } + } + + // Now that all cameras have been rendered, let's propagate the data required for screen space shadows + PropagateScreenSpaceShadowData(); + + renderContext.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + renderContext.Submit(); + } + } + } + } + + m_XRSystem.ReleaseFrame(); + UnityEngine.Rendering.RenderPipeline.EndFrameRendering(renderContext, cameras); + } + + + void PropagateScreenSpaceShadowData() + { + // For every unique light that has been registered, update the previous transform + foreach (HDAdditionalLightData lightData in m_ScreenSpaceShadowsUnion) + { + lightData.previousTransform = lightData.transform.localToWorldMatrix; + } + } + + void ExecuteRenderRequest( + RenderRequest renderRequest, + ScriptableRenderContext renderContext, + CommandBuffer cmd, + AOVRequestData aovRequest + ) + { + InitializeGlobalResources(renderContext); + + var hdCamera = renderRequest.hdCamera; + var camera = hdCamera.camera; + var cullingResults = renderRequest.cullingResults.cullingResults; + var customPassCullingResults = renderRequest.cullingResults.customPassCullingResults ?? cullingResults; + var hdProbeCullingResults = renderRequest.cullingResults.hdProbeCullingResults; + var decalCullingResults = renderRequest.cullingResults.decalCullResults; + var target = renderRequest.target; + + // Updates RTHandle + hdCamera.BeginRender(cmd); + + if (m_RayTracingSupported) + { + // This call need to happen once per camera + // TODO: This can be wasteful for "compatible" cameras. + // We need to determine the minimum set of feature used by all the camera and build the minimum number of acceleration structures. + BuildRayTracingAccelerationStructure(hdCamera); + } + + using (ListPool.Get(out var aovBuffers)) + { + aovRequest.AllocateTargetTexturesIfRequired(ref aovBuffers); + + // If we render a reflection view or a preview we should not display any debug information + // This need to be call before ApplyDebugDisplaySettings() + if (camera.cameraType == CameraType.Reflection || camera.cameraType == CameraType.Preview) + { + // Neutral allow to disable all debug settings + m_CurrentDebugDisplaySettings = s_NeutralDebugDisplaySettings; + } + else + { + // Make sure we are in sync with the debug menu for the msaa count + m_MSAASamples = m_DebugDisplaySettings.data.msaaSamples; + m_SharedRTManager.SetNumMSAASamples(m_MSAASamples); + + m_DebugDisplaySettings.UpdateCameraFreezeOptions(); + + m_CurrentDebugDisplaySettings = m_DebugDisplaySettings; + } + + aovRequest.SetupDebugData(ref m_CurrentDebugDisplaySettings); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) + { + // Must update after getting DebugDisplaySettings + m_RayCountManager.ClearRayCount(cmd, hdCamera, m_CurrentDebugDisplaySettings.data.countRays); + } + + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DBufferPrepareDrawData))) + { + // TODO: update singleton with DecalCullResults + DecalSystem.instance.CurrentCamera = hdCamera.camera; // Singletons are extremely dangerous... + DecalSystem.instance.LoadCullResults(decalCullingResults); + DecalSystem.instance.UpdateCachedMaterialData(); // textures, alpha or fade distances could've changed + DecalSystem.instance.CreateDrawData(); // prepare data is separate from draw + DecalSystem.instance.UpdateTextureAtlas(cmd); // as this is only used for transparent pass, would've been nice not to have to do this if no transparent renderers are visible, needs to happen after CreateDrawData + } + } + + using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.CustomPassVolumeUpdate))) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) + CustomPassVolume.Update(hdCamera); + } + + // Do anything we need to do upon a new frame. + // The NewFrame must be after the VolumeManager update and before Resize because it uses properties set in NewFrame + LightLoopNewFrame(hdCamera); + + // Apparently scissor states can leak from editor code. As it is not used currently in HDRP (apart from VR). We disable scissor at the beginning of the frame. + cmd.DisableScissorRect(); + + Resize(hdCamera); + m_PostProcessSystem.BeginFrame(cmd, hdCamera, this); + + ApplyDebugDisplaySettings(hdCamera, cmd); + + SetupCameraProperties(hdCamera, renderContext, cmd); + + // TODO: Find a correct place to bind these material textures + // We have to bind the material specific global parameters in this mode + foreach (var material in m_MaterialList) + material.Bind(cmd); + + // Frustum cull density volumes on the CPU. Can be performed as soon as the camera is set up. + DensityVolumeList densityVolumes = PrepareVisibleDensityVolumeList(hdCamera, cmd, hdCamera.time); + + // Note: Legacy Unity behave like this for ShadowMask + // When you select ShadowMask in Lighting panel it recompile shaders on the fly with the SHADOW_MASK keyword. + // However there is no C# function that we can query to know what mode have been select in Lighting Panel and it will be wrong anyway. Lighting Panel setup what will be the next bake mode. But until light is bake, it is wrong. + // Currently to know if you need shadow mask you need to go through all visible lights (of CullResult), check the LightBakingOutput struct and look at lightmapBakeType/mixedLightingMode. If one light have shadow mask bake mode, then you need shadow mask features (i.e extra Gbuffer). + // It mean that when we build a standalone player, if we detect a light with bake shadow mask, we generate all shader variant (with and without shadow mask) and at runtime, when a bake shadow mask light is visible, we dynamically allocate an extra GBuffer and switch the shader. + // So the first thing to do is to go through all the light: PrepareLightsForGPU + bool enableBakeShadowMask = PrepareLightsForGPU(cmd, hdCamera, cullingResults, hdProbeCullingResults, densityVolumes, m_CurrentDebugDisplaySettings, aovRequest); + + // Let's bind as soon as possible the light data + BindLightDataParameters(hdCamera, cmd); + + // Configure all the keywords + ConfigureKeywords(enableBakeShadowMask, hdCamera, cmd); + + // Caution: We require sun light here as some skies use the sun light to render, it means that UpdateSkyEnvironment must be called after PrepareLightsForGPU. + // TODO: Try to arrange code so we can trigger this call earlier and use async compute here to run sky convolution during other passes (once we move convolution shader to compute). + if (!m_CurrentDebugDisplaySettings.IsMatcapViewEnabled(hdCamera)) + UpdateSkyEnvironment(hdCamera, renderContext, m_FrameCount, cmd); + else + cmd.SetGlobalTexture(HDShaderIDs._SkyTexture, CoreUtils.magentaCubeTextureArray); + + // PushGlobalParams must be call after UpdateSkyEnvironment so AmbientProbe is correctly setup for volumetric + PushGlobalParams(hdCamera, cmd); + VFXManager.ProcessCameraCommand(camera, cmd); + + + if (GL.wireframe) + { + RenderWireFrame(cullingResults, hdCamera, target.id, renderContext, cmd); + return; + } + + if (m_RenderGraph.enabled) + { + ExecuteWithRenderGraph(renderRequest, aovRequest, aovBuffers, renderContext, cmd); + return; + } + + hdCamera.xr.StartSinglePass(cmd); + + ClearBuffers(hdCamera, cmd); + + // Render XR occlusion mesh to depth buffer early in the frame to improve performance + if (hdCamera.xr.enabled && m_Asset.currentPlatformRenderPipelineSettings.xrSettings.occlusionMesh) + { + hdCamera.xr.StopSinglePass(cmd); + hdCamera.xr.RenderOcclusionMeshes(cmd, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); + hdCamera.xr.StartSinglePass(cmd); + } + + // Bind the custom color/depth before the first custom pass + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) + { + if (m_CustomPassColorBuffer.IsValueCreated) + cmd.SetGlobalTexture(HDShaderIDs._CustomColorTexture, m_CustomPassColorBuffer.Value); + if (m_CustomPassDepthBuffer.IsValueCreated) + cmd.SetGlobalTexture(HDShaderIDs._CustomDepthTexture, m_CustomPassDepthBuffer.Value); + } + + RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforeRendering); + + // This is always false in forward and if it is true, is equivalent of saying we have a partial depth prepass. + bool shouldRenderMotionVectorAfterGBuffer = RenderDepthPrepass(cullingResults, hdCamera, renderContext, cmd); + if (!shouldRenderMotionVectorAfterGBuffer) + { + // If objects motion vectors if enabled, this will render the objects with motion vector into the target buffers (in addition to the depth) + // Note: An object with motion vector must not be render in the prepass otherwise we can have motion vector write that should have been rejected + RenderObjectsMotionVectors(cullingResults, hdCamera, renderContext, cmd); + } + // If we have MSAA, we need to complete the motion vector buffer before buffer resolves, hence we need to run camera mv first. + // This is always fine since shouldRenderMotionVectorAfterGBuffer is always false for forward. + bool needCameraMVBeforeResolve = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + if (needCameraMVBeforeResolve) + { + RenderCameraMotionVectors(cullingResults, hdCamera, renderContext, cmd); + } + + PreRenderSky(hdCamera, cmd); + + // Now that all depths have been rendered, resolve the depth buffer + m_SharedRTManager.ResolveSharedRT(cmd, hdCamera); + + RenderDBuffer(hdCamera, cmd, renderContext, cullingResults); + + RenderGBuffer(cullingResults, hdCamera, renderContext, cmd); + + DecalNormalPatch(hdCamera, cmd, renderContext); + + // We can now bind the normal buffer to be use by any effect + m_SharedRTManager.BindNormalBuffer(cmd); + + // After Depth and Normals/roughness including decals + bool depthBufferModified = RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.AfterOpaqueDepthAndNormal); + + // If the depth was already copied in RenderDBuffer, we force the copy again because the custom pass modified the depth. + if (depthBufferModified) + m_IsDepthBufferCopyValid = false; + + // In both forward and deferred, everything opaque should have been rendered at this point so we can safely copy the depth buffer for later processing. + GenerateDepthPyramid(hdCamera, cmd, FullScreenDebugMode.DepthPyramid); + + // Depth texture is now ready, bind it (Depth buffer could have been bind before if DBuffer is enable) + cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthTexture()); + + if (shouldRenderMotionVectorAfterGBuffer) + { + // See the call RenderObjectsMotionVectors() above and comment + RenderObjectsMotionVectors(cullingResults, hdCamera, renderContext, cmd); + } + + // In case we don't have MSAA, we always run camera motion vectors when is safe to assume Object MV are rendered + if(!needCameraMVBeforeResolve) + { + RenderCameraMotionVectors(cullingResults, hdCamera, renderContext, cmd); + } + +#if UNITY_EDITOR + var showGizmos = camera.cameraType == CameraType.SceneView || + (camera.targetTexture == null && camera.cameraType == CameraType.Game); +#endif + + RenderTransparencyOverdraw(cullingResults, hdCamera, renderContext, cmd); + + if (m_CurrentDebugDisplaySettings.IsDebugMaterialDisplayEnabled() || m_CurrentDebugDisplaySettings.IsMaterialValidationEnabled() || CoreUtils.IsSceneLightingDisabled(hdCamera.camera)) + { + RenderDebugViewMaterial(cullingResults, hdCamera, renderContext, cmd); + } + else if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && + hdCamera.volumeStack.GetComponent().enable.value && + hdCamera.camera.cameraType != CameraType.Preview) + { + // Update the light clusters that we need to update + BuildRayTracingLightCluster(cmd, hdCamera); + + // We only request the light cluster if we are gonna use it for debug mode + if (FullScreenDebugMode.LightCluster == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode && GetRayTracingClusterState()) + { + HDRaytracingLightCluster lightCluster = RequestLightCluster(); + lightCluster.EvaluateClusterDebugView(cmd, hdCamera); + } + + RenderPathTracing(hdCamera, cmd, m_CameraColorBuffer, renderContext, m_FrameCount); + } + else + { + + // When debug is enabled we need to clear otherwise we may see non-shadows areas with stale values. + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.ContactShadows) && m_CurrentDebugDisplaySettings.data.fullScreenDebugMode == FullScreenDebugMode.ContactShadows) + { + CoreUtils.SetRenderTarget(cmd, m_ContactShadowBuffer, ClearFlag.Color, Color.clear); + } + + bool msaaEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + BuildCoarseStencilAndResolveIfNeeded(hdCamera, m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled), + msaaEnabled ? m_SharedRTManager.GetStencilBuffer(msaaEnabled) : null, + m_SharedRTManager.GetCoarseStencilBuffer(), cmd); + + hdCamera.xr.StopSinglePass(cmd); + + var buildLightListTask = new HDGPUAsyncTask("Build light list", ComputeQueueType.Background); + // It is important that this task is in the same queue as the build light list due to dependency it has on it. If really need to move it, put an extra fence to make sure buildLightListTask has finished. + var volumeVoxelizationTask = new HDGPUAsyncTask("Volumetric voxelization", ComputeQueueType.Background); + var SSRTask = new HDGPUAsyncTask("Screen Space Reflection", ComputeQueueType.Background); + var SSAOTask = new HDGPUAsyncTask("SSAO", ComputeQueueType.Background); + + // Avoid garbage by explicitely passing parameters to the lambdas + var asyncParams = new HDGPUAsyncTaskParams + { + renderContext = renderContext, + hdCamera = hdCamera, + frameCount = m_FrameCount, + }; + + var haveAsyncTaskWithShadows = false; + if (hdCamera.frameSettings.BuildLightListRunsAsync()) + { + buildLightListTask.Start(cmd, asyncParams, Callback, !haveAsyncTaskWithShadows); + + haveAsyncTaskWithShadows = true; + + void Callback(CommandBuffer c, HDGPUAsyncTaskParams a) + => BuildGPULightListsCommon(a.hdCamera, c); + } + + if (hdCamera.frameSettings.VolumeVoxelizationRunsAsync()) + { + volumeVoxelizationTask.Start(cmd, asyncParams, Callback, !haveAsyncTaskWithShadows); + + haveAsyncTaskWithShadows = true; + + void Callback(CommandBuffer c, HDGPUAsyncTaskParams a) + => VolumeVoxelizationPass(a.hdCamera, c); + } + + if (hdCamera.frameSettings.SSRRunsAsync()) + { + SSRTask.Start(cmd, asyncParams, Callback, !haveAsyncTaskWithShadows); + + haveAsyncTaskWithShadows = true; + + void Callback(CommandBuffer c, HDGPUAsyncTaskParams a) + => RenderSSR(a.hdCamera, c, a.renderContext); + } + + if (hdCamera.frameSettings.SSAORunsAsync()) + { + SSAOTask.Start(cmd, asyncParams, AsyncSSAODispatch, !haveAsyncTaskWithShadows); + haveAsyncTaskWithShadows = true; + + void AsyncSSAODispatch(CommandBuffer c, HDGPUAsyncTaskParams a) + => m_AmbientOcclusionSystem.Dispatch(c, a.hdCamera, a.frameCount); + } + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderShadowMaps))) + { + // This call overwrites camera properties passed to the shader system. + RenderShadowMaps(renderContext, cmd, cullingResults, hdCamera); + + hdCamera.SetupGlobalParams(cmd, m_FrameCount); + } + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) + { + // Update the light clusters that we need to update + BuildRayTracingLightCluster(cmd, hdCamera); + + // We only request the light cluster if we are gonna use it for debug mode + if (FullScreenDebugMode.LightCluster == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode && GetRayTracingClusterState()) + { + HDRaytracingLightCluster lightCluster = RequestLightCluster(); + lightCluster.EvaluateClusterDebugView(cmd, hdCamera); + } + + bool validIndirectDiffuse = ValidIndirectDiffuseState(hdCamera); + if (validIndirectDiffuse) + { + RenderIndirectDiffuse(hdCamera, cmd, renderContext, m_FrameCount); + } + } + + if (!hdCamera.frameSettings.SSRRunsAsync()) + { + // Needs the depth pyramid and motion vectors, as well as the render of the previous frame. + RenderSSR(hdCamera, cmd, renderContext); + } + + // Contact shadows needs the light loop so we do them after the build light list + if (hdCamera.frameSettings.BuildLightListRunsAsync()) + { + buildLightListTask.EndWithPostWork(cmd, hdCamera, Callback); + + void Callback(CommandBuffer c, HDCamera cam) + { + var hdrp = (RenderPipelineManager.currentPipeline as HDRenderPipeline); + var globalParams = hdrp.PrepareLightLoopGlobalParameters(cam); + PushLightLoopGlobalParams(globalParams, c); + } + } + else + { + BuildGPULightLists(hdCamera, cmd); + } + + if (!hdCamera.frameSettings.SSAORunsAsync()) + m_AmbientOcclusionSystem.Render(cmd, hdCamera, renderContext, m_FrameCount); + + // Run the contact shadows here as they the light list + HDUtils.CheckRTCreated(m_ContactShadowBuffer); + RenderContactShadows(hdCamera, cmd); + PushFullScreenDebugTexture(hdCamera, cmd, m_ContactShadowBuffer, FullScreenDebugMode.ContactShadows); + + hdCamera.xr.StartSinglePass(cmd); + RenderScreenSpaceShadows(hdCamera, cmd); + hdCamera.xr.StopSinglePass(cmd); + + if (hdCamera.frameSettings.VolumeVoxelizationRunsAsync()) + { + volumeVoxelizationTask.End(cmd, hdCamera); + } + else + { + // Perform the voxelization step which fills the density 3D texture. + VolumeVoxelizationPass(hdCamera, cmd); + } + + // Render the volumetric lighting. + // The pass requires the volume properties, the light list and the shadows, and can run async. + VolumetricLightingPass(hdCamera, cmd, m_FrameCount); + + if (hdCamera.frameSettings.SSAORunsAsync()) + { + SSAOTask.EndWithPostWork(cmd, hdCamera, Callback); + void Callback(CommandBuffer c, HDCamera cam) + { + var hdrp = (RenderPipelineManager.currentPipeline as HDRenderPipeline); + hdrp.m_AmbientOcclusionSystem.PostDispatchWork(c, cam); + } + } + + SetContactShadowsTexture(hdCamera, m_ContactShadowBuffer, cmd); + + + if (hdCamera.frameSettings.SSRRunsAsync()) + { + SSRTask.End(cmd, hdCamera); + } + + hdCamera.xr.StartSinglePass(cmd); + + RenderDeferredLighting(hdCamera, cmd); + + RenderForwardOpaque(cullingResults, hdCamera, renderContext, cmd); + + m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_CameraSssDiffuseLightingMSAABuffer, m_CameraSssDiffuseLightingBuffer); + m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, GetSSSBufferMSAA(), GetSSSBuffer()); + + if(hdCamera.frameSettings.IsEnabled(FrameSettingsField.SubsurfaceScattering)) + { + // We need htile for SSS, but we don't need to resolve again + BuildCoarseStencilAndResolveIfNeeded(hdCamera, m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled), + msaaEnabled ? m_SharedRTManager.GetStencilBuffer(msaaEnabled) : null, + m_SharedRTManager.GetCoarseStencilBuffer(), cmd); + } + + // SSS pass here handle both SSS material from deferred and forward + RenderSubsurfaceScattering(hdCamera, cmd, hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA) ? m_CameraColorMSAABuffer : m_CameraColorBuffer, + m_CameraSssDiffuseLightingBuffer, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), m_SharedRTManager.GetDepthTexture()); + + RenderForwardEmissive(cullingResults, hdCamera, renderContext, cmd); + + RenderSky(hdCamera, cmd); + + // Send all the geometry graphics buffer to client systems if required (must be done after the pyramid and before the transparent depth pre-pass) + SendGeometryGraphicsBuffers(cmd, hdCamera); + + m_PostProcessSystem.DoUserAfterOpaqueAndSky(cmd, hdCamera, m_CameraColorBuffer); + + // No need for old stencil values here since from transparent on different features are tagged + ClearStencilBuffer(hdCamera, cmd); + + RenderTransparentDepthPrepass(cullingResults, hdCamera, renderContext, cmd); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) + { + RaytracingRecursiveRender(hdCamera, cmd, renderContext, cullingResults); + } + + // To allow users to fetch the current color buffer, we temporarily bind the camera color buffer + cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, m_CameraColorBuffer); + RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforePreRefraction); + + // Render pre refraction objects + RenderForwardTransparent(cullingResults, hdCamera, true, renderContext, cmd); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction)) + { + // First resolution of the color buffer for the color pyramid + m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_CameraColorMSAABuffer, m_CameraColorBuffer); + + RenderColorPyramid(hdCamera, cmd, true); + + // Bind current color pyramid for shader graph SceneColorNode on transparent objects + cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain)); + } + else + { + cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, TextureXR.GetBlackTexture()); + } + + // We don't have access to the color pyramid with transparent if rough refraction is disabled + RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforeTransparent); + + // Render all type of transparent forward (unlit, lit, complex (hair...)) to keep the sorting between transparent objects. + RenderForwardTransparent(cullingResults, hdCamera, false, renderContext, cmd); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector)) + { + m_SharedRTManager.ResolveMotionVectorTexture(cmd, hdCamera); + } + + // We push the motion vector debug texture here as transparent object can overwrite the motion vector texture content. + if(m_Asset.currentPlatformRenderPipelineSettings.supportMotionVectors) + PushFullScreenDebugTexture(hdCamera, cmd, m_SharedRTManager.GetMotionVectorsBuffer(), FullScreenDebugMode.MotionVectors); + + // Second resolve the color buffer for finishing the frame + m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_CameraColorMSAABuffer, m_CameraColorBuffer); + + // Render All forward error + RenderForwardError(cullingResults, hdCamera, renderContext, cmd); + + DownsampleDepthForLowResTransparency(hdCamera, cmd); + + RenderLowResTransparent(cullingResults, hdCamera, renderContext, cmd); + + UpsampleTransparent(hdCamera, cmd); + + // Fill depth buffer to reduce artifact for transparent object during postprocess + RenderTransparentDepthPostpass(cullingResults, hdCamera, renderContext, cmd); + + RenderColorPyramid(hdCamera, cmd, false); + + AccumulateDistortion(cullingResults, hdCamera, renderContext, cmd); + RenderDistortion(hdCamera, cmd); + + PushFullScreenDebugTexture(hdCamera, cmd, m_CameraColorBuffer, FullScreenDebugMode.NanTracker); + PushFullScreenLightingDebugTexture(hdCamera, cmd, m_CameraColorBuffer); + +#if UNITY_EDITOR + // Render gizmos that should be affected by post processes + if (showGizmos) + { + if(m_CurrentDebugDisplaySettings.GetDebugLightingMode() == DebugLightingMode.MatcapView) + { + Gizmos.exposure = Texture2D.blackTexture; + } + else + { + Gizmos.exposure = m_PostProcessSystem.GetExposureTexture(hdCamera).rt; + } + + RenderGizmos(cmd, camera, renderContext, GizmoSubset.PreImageEffects); + } +#endif + } + + + // At this point, m_CameraColorBuffer has been filled by either debug views are regular rendering so we can push it here. + PushColorPickerDebugTexture(cmd, hdCamera, m_CameraColorBuffer); + + RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforePostProcess); + + bool hasAfterPostProcessCustomPass = HDUtils.WillCustomPassBeExecuted(hdCamera, CustomPassInjectionPoint.AfterPostProcess); + + aovRequest.PushCameraTexture(cmd, AOVBuffers.Color, hdCamera, m_CameraColorBuffer, aovBuffers); + RenderPostProcess(cullingResults, hdCamera, target.id, renderContext, cmd, !hasAfterPostProcessCustomPass); + + RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.AfterPostProcess); + + // Copy and rescale depth buffer for XR devices + if (hdCamera.xr.enabled && hdCamera.xr.copyDepth) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.XRDepthCopy))) + { + var depthBuffer = m_SharedRTManager.GetDepthStencilBuffer(); + var rtScale = depthBuffer.rtHandleProperties.rtHandleScale / DynamicResolutionHandler.instance.GetCurrentScale(); + + m_CopyDepthPropertyBlock.SetTexture(HDShaderIDs._InputDepth, depthBuffer); + m_CopyDepthPropertyBlock.SetVector(HDShaderIDs._BlitScaleBias, rtScale); + m_CopyDepthPropertyBlock.SetInt("_FlipY", 1); + + cmd.SetRenderTarget(target.id, 0, CubemapFace.Unknown, -1); + cmd.SetViewport(hdCamera.finalViewport); + CoreUtils.DrawFullScreen(cmd, m_CopyDepth, m_CopyDepthPropertyBlock); + } + } + + // In developer build, we always render post process in m_AfterPostProcessBuffer at (0,0) in which we will then render debug. + // Because of this, we need another blit here to the final render target at the right viewport. + if (!HDUtils.PostProcessIsFinalPass() || aovRequest.isValid || hasAfterPostProcessCustomPass) + { + hdCamera.ExecuteCaptureActions(m_IntermediateAfterPostProcessBuffer, cmd); + + RenderDebug(hdCamera, cmd, cullingResults); + + hdCamera.xr.StopSinglePass(cmd); + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.BlitToFinalRTDevBuildOnly))) + { + for (int viewIndex = 0; viewIndex < hdCamera.viewCount; ++viewIndex) + { + var finalBlitParams = PrepareFinalBlitParameters(hdCamera, viewIndex); + BlitFinalCameraTexture(finalBlitParams, m_BlitPropertyBlock, m_IntermediateAfterPostProcessBuffer, target.id, cmd); + } + } + + aovRequest.PushCameraTexture(cmd, AOVBuffers.Output, hdCamera, m_IntermediateAfterPostProcessBuffer, aovBuffers); + } + + // XR mirror view and blit do device + hdCamera.xr.EndCamera(cmd, hdCamera); + + // Send all the color graphics buffer to client systems if required. + SendColorGraphicsBuffer(cmd, hdCamera); + + // Due to our RT handle system we don't write into the backbuffer depth buffer (as our depth buffer can be bigger than the one provided) + // So we need to do a copy of the corresponding part of RT depth buffer in the target depth buffer in various situation: + // - RenderTexture (camera.targetTexture != null) has a depth buffer (camera.targetTexture.depth != 0) + // - We are rendering into the main game view (i.e not a RenderTexture camera.cameraType == CameraType.Game && hdCamera.camera.targetTexture == null) in the editor for allowing usage of Debug.DrawLine and Debug.Ray. + // - We draw Gizmo/Icons in the editor (hdCamera.camera.targetTexture != null && camera.targetTexture.depth != 0 - The Scene view has a targetTexture and a depth texture) + // TODO: If at some point we get proper render target aliasing, we will be able to use the provided depth texture directly with our RT handle system + // Note: Debug.DrawLine and Debug.Ray only work in editor, not in player + var copyDepth = hdCamera.camera.targetTexture != null && hdCamera.camera.targetTexture.depth != 0; +#if UNITY_EDITOR + copyDepth = copyDepth || hdCamera.isMainGameView; // Specific case of Debug.DrawLine and Debug.Ray +#endif + if (copyDepth && !hdCamera.xr.enabled) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CopyDepthInTargetTexture))) + { + cmd.SetRenderTarget(target.id); + cmd.SetViewport(hdCamera.finalViewport); + m_CopyDepthPropertyBlock.SetTexture(HDShaderIDs._InputDepth, m_SharedRTManager.GetDepthStencilBuffer()); + // When we are Main Game View we need to flip the depth buffer ourselves as we are after postprocess / blit that have already flipped the screen + m_CopyDepthPropertyBlock.SetInt("_FlipY", hdCamera.isMainGameView ? 1 : 0); + m_CopyDepthPropertyBlock.SetVector(HDShaderIDs._BlitScaleBias, new Vector4(1.0f, 1.0f, 0.0f, 0.0f)); + CoreUtils.DrawFullScreen(cmd, m_CopyDepth, m_CopyDepthPropertyBlock); + } + } + aovRequest.PushCameraTexture(cmd, AOVBuffers.DepthStencil, hdCamera, m_SharedRTManager.GetDepthStencilBuffer(), aovBuffers); + aovRequest.PushCameraTexture(cmd, AOVBuffers.Normals, hdCamera, m_SharedRTManager.GetNormalBuffer(), aovBuffers); + if (m_Asset.currentPlatformRenderPipelineSettings.supportMotionVectors) + aovRequest.PushCameraTexture(cmd, AOVBuffers.MotionVectors, hdCamera, m_SharedRTManager.GetMotionVectorsBuffer(), aovBuffers); + +#if UNITY_EDITOR + // We need to make sure the viewport is correctly set for the editor rendering. It might have been changed by debug overlay rendering just before. + cmd.SetViewport(hdCamera.finalViewport); + + // Render overlay Gizmos + if (showGizmos) + RenderGizmos(cmd, camera, renderContext, GizmoSubset.PostImageEffects); +#endif + + aovRequest.Execute(cmd, aovBuffers, RenderOutputProperties.From(hdCamera)); + } + + // This is required so that all commands up to here are executed before EndCameraRendering is called for the user. + // Otherwise command would not be rendered in order. + renderContext.ExecuteCommandBuffer(cmd); + cmd.Clear(); + } + + struct BlitFinalCameraTextureParameters + { + public bool flip; + public int srcTexArraySlice; + public int dstTexArraySlice; + public Rect viewport; + public Material blitMaterial; + } + + internal RTHandle GetExposureTexture(HDCamera hdCamera) => + m_PostProcessSystem.GetExposureTexture(hdCamera); + + BlitFinalCameraTextureParameters PrepareFinalBlitParameters(HDCamera hdCamera, int viewIndex) + { + var parameters = new BlitFinalCameraTextureParameters(); + + if (hdCamera.xr.enabled) + { + parameters.viewport = hdCamera.xr.GetViewport(viewIndex); + parameters.srcTexArraySlice = viewIndex; + parameters.dstTexArraySlice = hdCamera.xr.GetTextureArraySlice(viewIndex); + } + else + { + parameters.viewport = hdCamera.finalViewport; + parameters.srcTexArraySlice = -1; + parameters.dstTexArraySlice = -1; + } + + parameters.flip = hdCamera.flipYMode == HDAdditionalCameraData.FlipYMode.ForceFlipY || hdCamera.isMainGameView; + parameters.blitMaterial = HDUtils.GetBlitMaterial(TextureXR.useTexArray ? TextureDimension.Tex2DArray : TextureDimension.Tex2D, singleSlice: parameters.srcTexArraySlice >= 0); + + return parameters; + } + + static void BlitFinalCameraTexture(BlitFinalCameraTextureParameters parameters, MaterialPropertyBlock propertyBlock, RTHandle source, RenderTargetIdentifier destination, CommandBuffer cmd) + { + // Here we can't use the viewport scale provided in hdCamera. The reason is that this scale is for internal rendering before post process with dynamic resolution factored in. + // Here the input texture is already at the viewport size but may be smaller than the RT itself (because of the RTHandle system) so we compute the scale specifically here. + var scaleBias = new Vector4((float)parameters.viewport.width / source.rt.width, (float)parameters.viewport.height / source.rt.height, 0.0f, 0.0f); + + if (parameters.flip) + { + scaleBias.w = scaleBias.y; + scaleBias.y *= -1; + } + + propertyBlock.SetTexture(HDShaderIDs._BlitTexture, source); + propertyBlock.SetVector(HDShaderIDs._BlitScaleBias, scaleBias); + propertyBlock.SetFloat(HDShaderIDs._BlitMipLevel, 0); + propertyBlock.SetInt(HDShaderIDs._BlitTexArraySlice, parameters.srcTexArraySlice); + HDUtils.DrawFullScreen(cmd, parameters.viewport, parameters.blitMaterial, destination, propertyBlock, 0, parameters.dstTexArraySlice); + } + + void SetupCameraProperties(HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + // The next 2 functions are required to flush the command buffer before calling functions directly on the render context. + // This way, the commands will execute in the order specified by the C# code. + renderContext.ExecuteCommandBuffer(cmd); + cmd.Clear(); + + renderContext.SetupCameraProperties(hdCamera.camera, hdCamera.xr.enabled); + } + + void InitializeGlobalResources(ScriptableRenderContext renderContext) + { + // Global resources initialization + var cmd = CommandBufferPool.Get(""); + // Init material if needed + for (int bsdfIdx = 0; bsdfIdx < m_IBLFilterArray.Length; ++bsdfIdx) + { + if (!m_IBLFilterArray[bsdfIdx].IsInitialized()) + m_IBLFilterArray[bsdfIdx].Initialize(cmd); + } + + foreach (var material in m_MaterialList) + material.RenderInit(cmd); + + TextureXR.Initialize(cmd, defaultResources.shaders.clearUIntTextureCS); + + renderContext.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + } + + bool TryCalculateFrameParameters( + Camera camera, + XRPass xrPass, + out HDAdditionalCameraData additionalCameraData, + out HDCamera hdCamera, + out ScriptableCullingParameters cullingParams + ) + { + // First, get aggregate of frame settings base on global settings, camera frame settings and debug settings + // Note: the SceneView camera will never have additionalCameraData + additionalCameraData = HDUtils.TryGetAdditionalCameraDataOrDefault(camera); + hdCamera = default; + cullingParams = default; + + FrameSettings currentFrameSettings = new FrameSettings(); + // Compute the FrameSettings actually used to draw the frame + // FrameSettingsHistory do the same while keeping all step of FrameSettings aggregation in memory for DebugMenu + if (m_FrameSettingsHistoryEnabled && camera.cameraType != CameraType.Preview && camera.cameraType != CameraType.Reflection) + FrameSettingsHistory.AggregateFrameSettings(ref currentFrameSettings, camera, additionalCameraData, m_Asset, m_DefaultAsset); + else + FrameSettings.AggregateFrameSettings(ref currentFrameSettings, camera, additionalCameraData, m_Asset, m_DefaultAsset); + + // Specific pass to simply display the content of the camera buffer if users have fill it themselves (like video player) + if (additionalCameraData.fullscreenPassthrough) + return false; + + // Retrieve debug display settings to init FrameSettings, unless we are a reflection and in this case we don't have debug settings apply. + DebugDisplaySettings debugDisplaySettings = (camera.cameraType == CameraType.Reflection || camera.cameraType == CameraType.Preview) ? s_NeutralDebugDisplaySettings : m_DebugDisplaySettings; + + // Disable post process if we enable debug mode or if the post process layer is disabled + if (debugDisplaySettings.IsDebugDisplayEnabled()) + { + if (debugDisplaySettings.IsDebugDisplayRemovePostprocess()) + { + currentFrameSettings.SetEnabled(FrameSettingsField.Postprocess, false); + currentFrameSettings.SetEnabled(FrameSettingsField.CustomPass, false); + } + + // Disable exposure if required + if (!debugDisplaySettings.DebugNeedsExposure()) + { + currentFrameSettings.SetEnabled(FrameSettingsField.ExposureControl, false); + } + + // Disable SSS if luxmeter is enabled + if (debugDisplaySettings.data.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter) + { + currentFrameSettings.SetEnabled(FrameSettingsField.SubsurfaceScattering, false); + } + } + + if(CoreUtils.IsSceneLightingDisabled(camera)) + { + currentFrameSettings.SetEnabled(FrameSettingsField.ExposureControl, false); + } + + // Disable object-motion vectors in everything but the game view + if (camera.cameraType != CameraType.Game) + { + currentFrameSettings.SetEnabled(FrameSettingsField.ObjectMotionVectors, false); + } + + hdCamera = HDCamera.GetOrCreate(camera, xrPass.multipassId); + + // From this point, we should only use frame settings from the camera + hdCamera.Update(currentFrameSettings, this, m_MSAASamples, xrPass); + + // Custom Render requires a proper HDCamera, so we return after the HDCamera was setup + if (additionalCameraData != null && additionalCameraData.hasCustomRender) + return false; + + if (hdCamera.xr.enabled) + { + cullingParams = hdCamera.xr.cullingParams; + } + else + { + if (!camera.TryGetCullingParameters(camera.stereoEnabled, out cullingParams)) + return false; + } + + if (m_DebugDisplaySettings.IsCameraFreezeEnabled()) + { + if (m_DebugDisplaySettings.IsCameraFrozen(camera)) + { + if (!frozenCullingParamAvailable) + { + frozenCullingParams = cullingParams; + frozenCullingParamAvailable = true; + } + cullingParams = frozenCullingParams; + } + } + else + { + frozenCullingParamAvailable = false; + } + + LightLoopUpdateCullingParameters(ref cullingParams, hdCamera); + + // If we don't use environment light (like when rendering reflection probes) + // we don't have to cull them. + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.ReflectionProbe)) + cullingParams.cullingOptions |= CullingOptions.NeedsReflectionProbes; + else + cullingParams.cullingOptions &= ~CullingOptions.NeedsReflectionProbes; + + return true; + } + + static bool TryCull( + Camera camera, + HDCamera hdCamera, + ScriptableRenderContext renderContext, + SkyManager skyManager, + ScriptableCullingParameters cullingParams, + HDRenderPipelineAsset hdrp, + ref HDCullingResults cullingResults + ) + { +#if UNITY_EDITOR + // emit scene view UI + if (camera.cameraType == CameraType.SceneView) + { + ScriptableRenderContext.EmitWorldGeometryForSceneView(camera); + } +#endif + + // Set the LOD bias and store current value to be able to restore it. + // Use a try/finalize pattern to be sure to restore properly the qualitySettings.lodBias + var initialLODBias = QualitySettings.lodBias; + var initialMaximumLODLevel = QualitySettings.maximumLODLevel; + try + { + QualitySettings.lodBias = hdCamera.frameSettings.GetResolvedLODBias(hdrp); + QualitySettings.maximumLODLevel = hdCamera.frameSettings.GetResolvedMaximumLODLevel(hdrp); + + // This needs to be called before culling, otherwise in the case where users generate intermediate renderers, it can provoke crashes. + BeginCameraRendering(renderContext, camera); + + DecalSystem.CullRequest decalCullRequest = null; + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) + { + // decal system needs to be updated with current camera, it needs it to set up culling and light list generation parameters + decalCullRequest = GenericPool.Get(); + DecalSystem.instance.CurrentCamera = camera; + DecalSystem.instance.BeginCull(decalCullRequest); + } + + // TODO: use a parameter to select probe types to cull depending on what is enabled in framesettings + var hdProbeCullState = new HDProbeCullState(); + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.PlanarProbe)) + hdProbeCullState = HDProbeSystem.PrepareCull(camera); + + // We need to set the ambient probe here because it's passed down to objects during the culling process. + skyManager.UpdateCurrentSkySettings(hdCamera); + skyManager.SetupAmbientProbe(hdCamera); + + using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.CullResultsCull))) + { + cullingResults.cullingResults = renderContext.Cull(ref cullingParams); + } + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) + { + using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.CustomPassCullResultsCull))) + { + cullingResults.customPassCullingResults = CustomPassVolume.Cull(renderContext, hdCamera); + } + } + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.PlanarProbe)) + HDProbeSystem.QueryCullResults(hdProbeCullState, ref cullingResults.hdProbeCullingResults); + else + cullingResults.hdProbeCullingResults = default; + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) + { + using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.DBufferPrepareDrawData))) + { + DecalSystem.instance.EndCull(decalCullRequest, cullingResults.decalCullResults); + } + } + + if (decalCullRequest != null) + { + decalCullRequest.Clear(); + GenericPool.Release(decalCullRequest); + } + + return true; + } + finally + { + QualitySettings.lodBias = initialLODBias; + QualitySettings.maximumLODLevel = initialMaximumLODLevel; + } + } + + void RenderGizmos(CommandBuffer cmd, Camera camera, ScriptableRenderContext renderContext, GizmoSubset gizmoSubset) + { +#if UNITY_EDITOR + if (UnityEditor.Handles.ShouldRenderGizmos()) + { + bool renderPrePostprocessGizmos = (gizmoSubset == GizmoSubset.PreImageEffects); + + using (new ProfilingScope(cmd, renderPrePostprocessGizmos ? ProfilingSampler.Get(HDProfileId.GizmosPrePostprocess) : ProfilingSampler.Get(HDProfileId.Gizmos))) + { + renderContext.ExecuteCommandBuffer(cmd); + cmd.Clear(); + renderContext.DrawGizmos(camera, gizmoSubset); + } + } +#endif + } + + static RendererListDesc CreateOpaqueRendererListDesc( + CullingResults cull, + Camera camera, + ShaderTagId passName, + PerObjectData rendererConfiguration = 0, + RenderQueueRange? renderQueueRange = null, + RenderStateBlock? stateBlock = null, + Material overrideMaterial = null, + bool excludeObjectMotionVectors = false + ) + { + var result = new RendererListDesc(passName, cull, camera) + { + rendererConfiguration = rendererConfiguration, + renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllOpaque, + sortingCriteria = SortingCriteria.CommonOpaque, + stateBlock = stateBlock, + overrideMaterial = overrideMaterial, + excludeObjectMotionVectors = excludeObjectMotionVectors + }; + return result; + } + + static RendererListDesc CreateOpaqueRendererListDesc( + CullingResults cull, + Camera camera, + ShaderTagId[] passNames, + PerObjectData rendererConfiguration = 0, + RenderQueueRange? renderQueueRange = null, + RenderStateBlock? stateBlock = null, + Material overrideMaterial = null, + bool excludeObjectMotionVectors = false + ) + { + var result = new RendererListDesc(passNames, cull, camera) + { + rendererConfiguration = rendererConfiguration, + renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllOpaque, + sortingCriteria = SortingCriteria.CommonOpaque, + stateBlock = stateBlock, + overrideMaterial = overrideMaterial, + excludeObjectMotionVectors = excludeObjectMotionVectors + }; + return result; + } + + static RendererListDesc CreateTransparentRendererListDesc( + CullingResults cull, + Camera camera, + ShaderTagId passName, + PerObjectData rendererConfiguration = 0, + RenderQueueRange? renderQueueRange = null, + RenderStateBlock? stateBlock = null, + Material overrideMaterial = null, + bool excludeObjectMotionVectors = false + ) + { + var result = new RendererListDesc(passName, cull, camera) + { + rendererConfiguration = rendererConfiguration, + renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllTransparent, + sortingCriteria = SortingCriteria.CommonTransparent | SortingCriteria.RendererPriority, + stateBlock = stateBlock, + overrideMaterial = overrideMaterial, + excludeObjectMotionVectors = excludeObjectMotionVectors + }; + return result; + } + + static RendererListDesc CreateTransparentRendererListDesc( + CullingResults cull, + Camera camera, + ShaderTagId[] passNames, + PerObjectData rendererConfiguration = 0, + RenderQueueRange? renderQueueRange = null, + RenderStateBlock? stateBlock = null, + Material overrideMaterial = null, + bool excludeObjectMotionVectors = false + ) + { + var result = new RendererListDesc(passNames, cull, camera) + { + rendererConfiguration = rendererConfiguration, + renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllTransparent, + sortingCriteria = SortingCriteria.CommonTransparent | SortingCriteria.RendererPriority, + stateBlock = stateBlock, + overrideMaterial = overrideMaterial, + excludeObjectMotionVectors = excludeObjectMotionVectors + }; + return result; + } + + static void DrawOpaqueRendererList(in ScriptableRenderContext renderContext, CommandBuffer cmd, in FrameSettings frameSettings, RendererList rendererList) + { + if (!frameSettings.IsEnabled(FrameSettingsField.OpaqueObjects)) + return; + + HDUtils.DrawRendererList(renderContext, cmd, rendererList); + } + + static void DrawTransparentRendererList(in ScriptableRenderContext renderContext, CommandBuffer cmd, in FrameSettings frameSettings, RendererList rendererList) + { + if (!frameSettings.IsEnabled(FrameSettingsField.TransparentObjects)) + return; + + HDUtils.DrawRendererList(renderContext, cmd, rendererList); + } + + void AccumulateDistortion(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Distortion)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.Distortion))) + { + CoreUtils.SetRenderTarget(cmd, m_DistortionBuffer, m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); + + // Only transparent object can render distortion vectors + var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_DistortionVectorsName)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + } + } + + void RenderDistortion(HDCamera hdCamera, CommandBuffer cmd) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Distortion)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ApplyDistortion))) + { + var currentColorPyramid = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); + + CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer); + // TODO: Set stencil stuff via parameters rather than hardcoding it in shader. + m_ApplyDistortionMaterial.SetTexture(HDShaderIDs._DistortionTexture, m_DistortionBuffer); + m_ApplyDistortionMaterial.SetTexture(HDShaderIDs._ColorPyramidTexture, currentColorPyramid); + + var size = new Vector4(hdCamera.actualWidth, hdCamera.actualHeight, 1f / hdCamera.actualWidth, 1f / hdCamera.actualHeight); + m_ApplyDistortionMaterial.SetVector(HDShaderIDs._Size, size); + m_ApplyDistortionMaterial.SetInt(HDShaderIDs._StencilMask, (int)StencilUsage.DistortionVectors); + m_ApplyDistortionMaterial.SetInt(HDShaderIDs._StencilRef, (int)StencilUsage.DistortionVectors); + + HDUtils.DrawFullScreen(cmd, m_ApplyDistortionMaterial, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(), null, 0); + } + } + + struct DepthPrepassParameters + { + public string passName; + public HDProfileId profilingId; + public RendererListDesc depthOnlyRendererListDesc; + public RendererListDesc mrtRendererListDesc; + public bool hasDepthOnlyPass; + public bool shouldRenderMotionVectorAfterGBuffer; + public RendererListDesc rayTracingOpaqueRLDesc; + public RendererListDesc rayTracingTransparentRLDesc; + public bool renderRayTracingPrepass; + } + + DepthPrepassParameters PrepareDepthPrepass(CullingResults cull, HDCamera hdCamera) + { + // Guidelines: + // Lit shader can be in deferred or forward mode. In this case we use "DepthOnly" pass with "GBuffer" or "Forward" pass name + // Other shader, including unlit are always forward and use "DepthForwardOnly" with "ForwardOnly" pass. + // Those pass are exclusive so use only "DepthOnly" or "DepthForwardOnly" but not both at the same time, same for "Forward" and "DepthForwardOnly" + // Any opaque material rendered in forward should have a depth prepass. If there is no depth prepass the lighting will be incorrect (deferred shadowing, contact shadow, SSAO), this may be acceptable depends on usage + + // Whatever the configuration we always render first opaque object then opaque alpha tested as they are more costly to render and could be reject by early-z + // (but no Hi-z as it is disable with clip instruction). This is handled automatically with the RenderQueue value (OpaqueAlphaTested have a different value and thus are sorted after Opaque) + + // Forward material always output normal buffer. + // Deferred material never output normal buffer. + // Caution: Unlit material let normal buffer untouch. Caution as if people try to filter normal buffer, it can result in weird result. + // TODO: Do we need a stencil bit to identify normal buffer not fill by unlit? So don't execute SSAO / SRR ? + + // Additional guidelines for motion vector: + // We render object motion vector at the same time than depth prepass with MRT to save drawcall. Depth buffer is then fill with combination of depth prepass + motion vector. + // For this we render first all objects that render depth only, then object that require object motion vector. + // We use the excludeMotion filter option of DrawRenderer to gather object without object motion vector (only C++ can know if an object have object motion vector). + // Caution: if there is no depth prepass we must render object motion vector after GBuffer pass otherwise some depth only objects can hide objects with motion vector and overwrite depth buffer but not update + // the motion vector buffer resulting in artifacts + + var result = new DepthPrepassParameters(); + + bool decalsEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals); + // To avoid rendering objects twice (once in the depth pre-pass and once in the motion vector pass when the motion vector pass is enabled) we exclude the objects that have motion vectors. + bool fullDeferredPrepass = hdCamera.frameSettings.IsEnabled(FrameSettingsField.DepthPrepassWithDeferredRendering) || decalsEnabled; + // To avoid rendering objects twice (once in the depth pre-pass and once in the motion vector pass when the motion vector pass is enabled) we exclude the objects that have motion vectors. + bool objectMotionEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.ObjectMotionVectors); + + result.shouldRenderMotionVectorAfterGBuffer = (hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred) && !fullDeferredPrepass; + result.hasDepthOnlyPass = false; + + switch (hdCamera.frameSettings.litShaderMode) + { + case LitShaderMode.Forward: + result.passName = "Depth Prepass (forward)"; + result.profilingId = HDProfileId.DepthPrepassForward; + result.mrtRendererListDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthOnlyAndDepthForwardOnlyPassNames, excludeObjectMotionVectors: objectMotionEnabled); + break; + case LitShaderMode.Deferred: + result.passName = fullDeferredPrepass ? (decalsEnabled ? "Depth Prepass (deferred) forced by Decals" : "Depth Prepass (deferred)") : "Depth Prepass (deferred incomplete)"; + result.profilingId = fullDeferredPrepass ? (decalsEnabled ? HDProfileId.DepthPrepassDeferredForDecals : HDProfileId.DepthPrepassDeferred) : HDProfileId.DepthPrepassDeferredIncomplete; + bool excludeMotion = fullDeferredPrepass ? objectMotionEnabled : false; + + // First deferred alpha tested materials. Alpha tested object have always a prepass even if enableDepthPrepassWithDeferredRendering is disabled + var partialPrepassRenderQueueRange = new RenderQueueRange { lowerBound = (int)RenderQueue.AlphaTest, upperBound = (int)RenderQueue.GeometryLast - 1 }; + + result.hasDepthOnlyPass = true; + + // First deferred material + result.depthOnlyRendererListDesc = CreateOpaqueRendererListDesc( + cull, hdCamera.camera, m_DepthOnlyPassNames, + renderQueueRange: fullDeferredPrepass ? HDRenderQueue.k_RenderQueue_AllOpaque : partialPrepassRenderQueueRange, + excludeObjectMotionVectors: excludeMotion); + + // Then forward only material that output normal buffer + result.mrtRendererListDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthForwardOnlyPassNames, excludeObjectMotionVectors: excludeMotion); + break; + default: + throw new ArgumentOutOfRangeException("Unknown ShaderLitMode"); + } + + result.renderRayTracingPrepass = false; + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) + { + RecursiveRendering recursiveRendering = hdCamera.volumeStack.GetComponent(); + if (recursiveRendering.enable.value) + { + result.renderRayTracingPrepass = true; + result.rayTracingOpaqueRLDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthOnlyAndDepthForwardOnlyPassNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AllOpaqueRaytracing); + result.rayTracingTransparentRLDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthOnlyAndDepthForwardOnlyPassNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AllTransparentRaytracing); + } + } + + return result; + } + + static void RenderDepthPrepass( ScriptableRenderContext renderContext, + CommandBuffer cmd, + FrameSettings frameSettings, + RenderTargetIdentifier[] mrt, + RTHandle depthBuffer, + in RendererList depthOnlyRendererList, + in RendererList mrtRendererList, + bool hasDepthOnlyPass, + in RendererList rayTracingOpaqueRL, + in RendererList rayTracingTransparentRL, + bool renderRayTracingPrepass + ) + { + CoreUtils.SetRenderTarget(cmd, depthBuffer); + + if (hasDepthOnlyPass) + { + DrawOpaqueRendererList(renderContext, cmd, frameSettings, depthOnlyRendererList); + } + + CoreUtils.SetRenderTarget(cmd, mrt, depthBuffer); + DrawOpaqueRendererList(renderContext, cmd, frameSettings, mrtRendererList); + + // We want the opaque objects to be in the prepass so that we avoid rendering uselessly the pixels before ray tracing them + if (renderRayTracingPrepass) + { + HDUtils.DrawRendererList(renderContext, cmd, rayTracingOpaqueRL); + HDUtils.DrawRendererList(renderContext, cmd, rayTracingTransparentRL); + } + } + + // RenderDepthPrepass render both opaque and opaque alpha tested based on engine configuration. + // Lit Forward only: We always render all materials + // Lit Deferred: We always render depth prepass for alpha tested (optimization), other deferred material are render based on engine configuration. + // Forward opaque with deferred renderer (DepthForwardOnly pass): We always render all materials + // True is return if motion vector must be render after GBuffer pass + bool RenderDepthPrepass(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + var depthPrepassParameters = PrepareDepthPrepass(cull, hdCamera); + var depthOnlyRendererList = RendererList.Create(depthPrepassParameters.depthOnlyRendererListDesc); + var mrtDepthRendererList = RendererList.Create(depthPrepassParameters.mrtRendererListDesc); + + var rayTracingOpaqueRendererList = RendererList.Create(depthPrepassParameters.rayTracingOpaqueRLDesc); + var rayTracingTransparentRendererList = RendererList.Create(depthPrepassParameters.rayTracingTransparentRLDesc); + + using (new ProfilingScope(cmd, ProfilingSampler.Get(depthPrepassParameters.profilingId))) + { + RenderDepthPrepass(renderContext, cmd, hdCamera.frameSettings, + m_SharedRTManager.GetPrepassBuffersRTI(hdCamera.frameSettings), + m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), + depthOnlyRendererList, + mrtDepthRendererList, + depthPrepassParameters.hasDepthOnlyPass, + rayTracingOpaqueRendererList, + rayTracingTransparentRendererList, + depthPrepassParameters.renderRayTracingPrepass + ); + } + + return depthPrepassParameters.shouldRenderMotionVectorAfterGBuffer; + } + + // RenderGBuffer do the gbuffer pass. This is solely call with deferred. If we use a depth prepass, then the depth prepass will perform the alpha testing for opaque alpha tested and we don't need to do it anymore + // during Gbuffer pass. This is handled in the shader and the depth test (equal and no depth write) is done here. + void RenderGBuffer(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (hdCamera.frameSettings.litShaderMode != LitShaderMode.Deferred) + return; + + using (new ProfilingScope(cmd, m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() ? ProfilingSampler.Get(HDProfileId.GBufferDebug) : ProfilingSampler.Get(HDProfileId.GBuffer))) + { + // setup GBuffer for rendering + CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffersRTI(hdCamera.frameSettings), m_SharedRTManager.GetDepthStencilBuffer()); + + var rendererList = RendererList.Create(CreateOpaqueRendererListDesc(cull, hdCamera.camera, HDShaderPassNames.s_GBufferName, m_CurrentRendererConfigurationBakedLighting)); + DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + + m_GbufferManager.BindBufferAsTextures(cmd); + } + } + + void RenderDBuffer(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext, CullingResults cullingResults) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) + { + // We still bind black textures to make sure that something is bound (can be a problem on some platforms) + m_DbufferManager.BindBlackTextures(cmd); + + // Bind buffer to make sure that something is bound . + cmd.SetGlobalBuffer(HDShaderIDs._DecalPropertyMaskBufferSRV, m_DbufferManager.propertyMaskBuffer); + + return; + } + + // We need to copy depth buffer texture if we want to bind it at this stage + CopyDepthBufferIfNeeded(hdCamera, cmd); + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DBufferRender))) + { + bool use4RTs = m_Asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask; + RenderDBuffer( use4RTs, + m_DbufferManager.GetBuffersRTI(), + m_DbufferManager.GetRTHandles(), + m_SharedRTManager.GetDepthStencilBuffer(), + m_DbufferManager.propertyMaskBuffer, + m_DbufferManager.clearPropertyMaskBufferShader, + m_DbufferManager.clearPropertyMaskBufferKernel, + m_DbufferManager.propertyMaskBufferSize, + RendererList.Create(PrepareMeshDecalsRendererList(cullingResults, hdCamera, use4RTs)), + renderContext, cmd); + + cmd.SetGlobalBuffer(HDShaderIDs._DecalPropertyMaskBufferSRV, m_DbufferManager.propertyMaskBuffer); + + m_DbufferManager.BindBufferAsTextures(cmd); + } + } + + void DecalNormalPatch(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals) && + !hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) // MSAA not supported + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DBufferNormal))) + { + var parameters = PrepareDBufferNormalPatchParameters(hdCamera); + parameters.decalNormalBufferMaterial.SetInt(HDShaderIDs._DecalNormalBufferStencilReadMask, parameters.stencilMask); + parameters.decalNormalBufferMaterial.SetInt(HDShaderIDs._DecalNormalBufferStencilRef, parameters.stencilRef); + + CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthStencilBuffer()); + cmd.SetRandomWriteTarget(1, m_SharedRTManager.GetNormalBuffer()); + cmd.DrawProcedural(Matrix4x4.identity, parameters.decalNormalBufferMaterial, 0, MeshTopology.Triangles, 3, 1); + cmd.ClearRandomWriteTargets(); + } + } + } + + RendererListDesc PrepareMeshDecalsRendererList(CullingResults cullingResults, HDCamera hdCamera, bool use4RTs) + { + var desc = new RendererListDesc(use4RTs ? m_Decals4RTPassNames : m_Decals3RTPassNames, cullingResults, hdCamera.camera) + { + sortingCriteria = SortingCriteria.CommonOpaque, + rendererConfiguration = PerObjectData.None, + renderQueueRange = HDRenderQueue.k_RenderQueue_AllOpaque + }; + + return desc; + } + + static void PushDecalsGlobalParams(HDCamera hdCamera, CommandBuffer cmd) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) + { + cmd.SetGlobalInt(HDShaderIDs._EnableDecals, 1); + cmd.SetGlobalVector(HDShaderIDs._DecalAtlasResolution, new Vector2(HDUtils.hdrpSettings.decalSettings.atlasWidth, HDUtils.hdrpSettings.decalSettings.atlasHeight)); + } + else + { + cmd.SetGlobalInt(HDShaderIDs._EnableDecals, 0); + } + } + + static RenderTargetIdentifier[] m_Dbuffer3RtIds = new RenderTargetIdentifier[3]; + + static void RenderDBuffer( bool use4RTs, + RenderTargetIdentifier[] mrt, + RTHandle[] rtHandles, + RTHandle depthStencilBuffer, + ComputeBuffer propertyMaskBuffer, + ComputeShader propertyMaskClearShader, + int propertyMaskClearShaderKernel, + int propertyMaskBufferSize, + RendererList meshDecalsRendererList, + ScriptableRenderContext renderContext, + CommandBuffer cmd) + { + // for alpha compositing, color is cleared to 0, alpha to 1 + // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html + + // this clears the targets + // TODO: Once we move to render graph, move this to render targets initialization parameters and remove rtHandles parameters + Color clearColor = new Color(0.0f, 0.0f, 0.0f, 1.0f); + Color clearColorNormal = new Color(0.5f, 0.5f, 0.5f, 1.0f); // for normals 0.5 is neutral + Color clearColorAOSBlend = new Color(1.0f, 1.0f, 1.0f, 1.0f); + CoreUtils.SetRenderTarget(cmd, rtHandles[0], ClearFlag.Color, clearColor); + CoreUtils.SetRenderTarget(cmd, rtHandles[1], ClearFlag.Color, clearColorNormal); + CoreUtils.SetRenderTarget(cmd, rtHandles[2], ClearFlag.Color, clearColor); + + if (use4RTs) + { + CoreUtils.SetRenderTarget(cmd, rtHandles[3], ClearFlag.Color, clearColorAOSBlend); + // this actually sets the MRTs and HTile RWTexture, this is done separately because we do not have an api to clear MRTs to different colors + CoreUtils.SetRenderTarget(cmd, mrt, depthStencilBuffer); // do not clear anymore + } + else + { + for (int rtindex = 0; rtindex < 3; rtindex++) + { + m_Dbuffer3RtIds[rtindex] = mrt[rtindex]; + } + // this actually sets the MRTs and HTile RWTexture, this is done separately because we do not have an api to clear MRTs to different colors + CoreUtils.SetRenderTarget(cmd, m_Dbuffer3RtIds, depthStencilBuffer); // do not clear anymore + } + + // clear decal property mask buffer + cmd.SetComputeBufferParam(propertyMaskClearShader, propertyMaskClearShaderKernel, HDShaderIDs._DecalPropertyMaskBuffer, propertyMaskBuffer); + cmd.DispatchCompute(propertyMaskClearShader, propertyMaskClearShaderKernel, propertyMaskBufferSize / 64, 1, 1); + cmd.SetRandomWriteTarget(use4RTs ? 4 : 3, propertyMaskBuffer); + + HDUtils.DrawRendererList(renderContext, cmd, meshDecalsRendererList); + DecalSystem.instance.RenderIntoDBuffer(cmd); + + cmd.ClearRandomWriteTargets(); + } + + struct DBufferNormalPatchParameters + { + public Material decalNormalBufferMaterial; + public int stencilRef; + public int stencilMask; + } + + DBufferNormalPatchParameters PrepareDBufferNormalPatchParameters(HDCamera hdCamera) + { + var parameters = new DBufferNormalPatchParameters(); + parameters.decalNormalBufferMaterial = m_DecalNormalBufferMaterial; + switch (hdCamera.frameSettings.litShaderMode) + { + case LitShaderMode.Forward: // in forward rendering all pixels that decals wrote into have to be composited + parameters.stencilMask = (int)StencilUsage.Decals; + parameters.stencilRef = (int)StencilUsage.Decals; + break; + case LitShaderMode.Deferred: // in deferred rendering only pixels affected by both forward materials and decals need to be composited + parameters.stencilMask = (int)StencilUsage.Decals | (int)StencilUsage.RequiresDeferredLighting; + parameters.stencilRef = (int)StencilUsage.Decals; + break; + default: + throw new ArgumentOutOfRangeException("Unknown ShaderLitMode"); + } + + return parameters; + } + + RendererListDesc PrepareForwardEmissiveRendererList(CullingResults cullResults, HDCamera hdCamera) + { + var result = new RendererListDesc(m_DecalsEmissivePassNames, cullResults, hdCamera.camera) + { + renderQueueRange = HDRenderQueue.k_RenderQueue_AllOpaque, + sortingCriteria = SortingCriteria.CommonOpaque, + rendererConfiguration = PerObjectData.None + }; + + return result; + } + + void RenderForwardEmissive(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ForwardEmissive))) + { + bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(msaa)); + HDUtils.DrawRendererList(renderContext, cmd, RendererList.Create(PrepareForwardEmissiveRendererList(cullResults, hdCamera))); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) + DecalSystem.instance.RenderForwardEmissive(cmd); + } + } + + void RenderWireFrame(CullingResults cull, HDCamera hdCamera, RenderTargetIdentifier backbuffer, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderWireFrame))) + { + CoreUtils.SetRenderTarget(cmd, backbuffer, ClearFlag.Color, GetColorBufferClearColor(hdCamera)); + + var rendererListOpaque = RendererList.Create(CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_AllForwardOpaquePassNames)); + DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListOpaque); + + // Render forward transparent + var rendererListTransparent = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_AllTransparentPassNames)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListTransparent); + } + } + + void RenderDebugViewMaterial(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DisplayDebugViewMaterial))) + { + if (m_CurrentDebugDisplaySettings.data.materialDebugSettings.IsDebugGBufferEnabled() && hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DebugViewMaterialGBuffer))) + { + HDUtils.DrawFullScreen(cmd, m_currentDebugViewMaterialGBuffer, m_CameraColorBuffer); + } + } + else + { + // When rendering debug material we shouldn't rely on a depth prepass for optimizing the alpha clip test. As it is control on the material inspector side + // we must override the state here. + + CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.All, Color.clear); + // Render Opaque forward + var rendererListOpaque = RendererList.Create(CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_AllForwardOpaquePassNames, m_CurrentRendererConfigurationBakedLighting, stateBlock: m_DepthStateOpaque)); + DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListOpaque); + + // Render forward transparent + var rendererListTransparent = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_AllTransparentPassNames, m_CurrentRendererConfigurationBakedLighting)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListTransparent); + } + } + } + + void RenderTransparencyOverdraw(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() && m_CurrentDebugDisplaySettings.data.fullScreenDebugMode == FullScreenDebugMode.TransparencyOverdraw) + { + + CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(), clearFlag: ClearFlag.Color, clearColor: Color.black); + var stateBlock = new RenderStateBlock + { + mask = RenderStateMask.Blend, + blendState = new BlendState + { + blendState0 = new RenderTargetBlendState + { + + destinationColorBlendMode = BlendMode.One, + sourceColorBlendMode = BlendMode.One, + destinationAlphaBlendMode = BlendMode.One, + sourceAlphaBlendMode = BlendMode.One, + colorBlendOperation = BlendOp.Add, + alphaBlendOperation = BlendOp.Add, + writeMask = ColorWriteMask.All + } + } + }; + + // High res transparent objects, drawing in m_DebugFullScreenTempBuffer + cmd.SetGlobalFloat(HDShaderIDs._DebugTransparencyOverdrawWeight, 1.0f); + + var passNames = m_Asset.currentPlatformRenderPipelineSettings.supportTransparentBackface ? m_AllTransparentPassNames : m_TransparentNoBackfaceNames; + m_DebugFullScreenPropertyBlock.SetFloat(HDShaderIDs._TransparencyOverdrawMaxPixelCost, (float)m_DebugDisplaySettings.data.transparencyDebugSettings.maxPixelCost); + var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, passNames, stateBlock: stateBlock)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, passNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessTransparent, stateBlock: stateBlock)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + + // Low res transparent objects, copying result m_DebugTranparencyLowRes + cmd.SetGlobalFloat(HDShaderIDs._DebugTransparencyOverdrawWeight, 0.25f); + rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, passNames, renderQueueRange: HDRenderQueue.k_RenderQueue_LowTransparent, stateBlock: stateBlock)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + PushFullScreenDebugTexture(hdCamera, cmd, m_CameraColorBuffer, FullScreenDebugMode.TransparencyOverdraw); + + // weighted sum of m_DebugFullScreenTempBuffer and m_DebugTranparencyLowRes done in DebugFullScreen.shader + + } + } + + void UpdateSkyEnvironment(HDCamera hdCamera, ScriptableRenderContext renderContext, int frameIndex, CommandBuffer cmd) + { + m_SkyManager.UpdateEnvironment(hdCamera, renderContext, GetCurrentSunLight(), frameIndex, cmd); + } + + /// + /// Request an update of the environment lighting. + /// + public void RequestSkyEnvironmentUpdate() + { + m_SkyManager.RequestEnvironmentUpdate(); + } + + internal void RequestStaticSkyUpdate() + { + m_SkyManager.RequestStaticEnvironmentUpdate(); + } + + void PreRenderSky(HDCamera hdCamera, CommandBuffer cmd) + { + if (m_CurrentDebugDisplaySettings.DebugHideSky(hdCamera)) + { + return; + } + + bool msaaEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + var colorBuffer = msaaEnabled ? m_CameraColorMSAABuffer : m_CameraColorBuffer; + var depthBuffer = m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled); + var normalBuffer = m_SharedRTManager.GetNormalBuffer(msaaEnabled); + + var visualEnv = hdCamera.volumeStack.GetComponent(); + m_SkyManager.PreRenderSky(hdCamera, GetCurrentSunLight(), colorBuffer, normalBuffer, depthBuffer, m_CurrentDebugDisplaySettings, m_FrameCount, cmd); + } + + void RenderSky(HDCamera hdCamera, CommandBuffer cmd) + { + if (m_CurrentDebugDisplaySettings.DebugHideSky(hdCamera)) + { + return; + } + + // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity. + // We load from the color buffer, perform blending manually, and store to the atmospheric scattering buffer. + // Then we perform a copy from the atmospheric scattering buffer back to the color buffer. + bool msaaEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + var colorBuffer = msaaEnabled ? m_CameraColorMSAABuffer : m_CameraColorBuffer; + var intermediateBuffer = msaaEnabled ? m_OpaqueAtmosphericScatteringMSAABuffer : m_OpaqueAtmosphericScatteringBuffer; + var depthBuffer = m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled); + + var visualEnv = hdCamera.volumeStack.GetComponent(); + m_SkyManager.RenderSky(hdCamera, GetCurrentSunLight(), colorBuffer, depthBuffer, m_CurrentDebugDisplaySettings, m_FrameCount, cmd); + + if (Fog.IsFogEnabled(hdCamera) || Fog.IsPBRFogEnabled(hdCamera)) + { + var pixelCoordToViewDirWS = hdCamera.mainViewConstants.pixelCoordToViewDirWS; + m_SkyManager.RenderOpaqueAtmosphericScattering(cmd, hdCamera, colorBuffer, m_LightingBufferHandle, intermediateBuffer, depthBuffer, pixelCoordToViewDirWS, hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)); + } + } + + /// + /// Export the provided camera's sky to a flattened cubemap. + /// + /// Requested camera. + /// Result texture. + public Texture2D ExportSkyToTexture(Camera camera) + { + return m_SkyManager.ExportSkyToTexture(camera); + } + + RendererListDesc PrepareForwardOpaqueRendererList(CullingResults cullResults, HDCamera hdCamera) + { + var passNames = hdCamera.frameSettings.litShaderMode == LitShaderMode.Forward + ? m_ForwardAndForwardOnlyPassNames + : m_ForwardOnlyPassNames; + return CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, passNames, m_CurrentRendererConfigurationBakedLighting); + } + + // Guidelines: In deferred by default there is no opaque in forward. However it is possible to force an opaque material to render in forward + // by using the pass "ForwardOnly". In this case the .shader should not have "Forward" but only a "ForwardOnly" pass. + // It must also have a "DepthForwardOnly" and no "DepthOnly" pass as forward material (either deferred or forward only rendering) have always a depth pass. + // The RenderForward pass will render the appropriate pass depends on the engine settings. In case of forward only rendering, both "Forward" pass and "ForwardOnly" pass + // material will be render for both transparent and opaque. In case of deferred, both path are used for transparent but only "ForwardOnly" is use for opaque. + // (Thus why "Forward" and "ForwardOnly" are exclusive, else they will render two times" + void RenderForwardOpaque(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + bool debugDisplay = m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled(); + using (new ProfilingScope(cmd, debugDisplay ? ProfilingSampler.Get(HDProfileId.ForwardOpaqueDebug) : ProfilingSampler.Get(HDProfileId.ForwardOpaque))) + { + bool useFptl = hdCamera.frameSettings.IsEnabled(FrameSettingsField.FPTLForForwardOpaque); + bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + + RenderTargetIdentifier[] renderTarget = null; + + // In case of forward SSS we will bind all the required target. It is up to the shader to write into it or not. + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.SubsurfaceScattering)) + { + renderTarget = m_MRTWithSSS; + renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; // Store the specular color + renderTarget[1] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; + renderTarget[2] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); + } + else + { + renderTarget = mMRTSingle; + renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; + } + + RenderForwardRendererList(hdCamera.frameSettings, + RendererList.Create(PrepareForwardOpaqueRendererList(cullResults, hdCamera)), + renderTarget, + m_SharedRTManager.GetDepthStencilBuffer(msaa), + useFptl ? m_TileAndClusterData.lightList : m_TileAndClusterData.perVoxelLightLists, + true, renderContext, cmd); + } + } + + static bool NeedMotionVectorForTransparent(FrameSettings frameSettings) + { + return frameSettings.IsEnabled(FrameSettingsField.MotionVectors) && frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector); + } + + RendererListDesc PrepareForwardTransparentRendererList(CullingResults cullResults, HDCamera hdCamera, bool preRefraction) + { + RenderQueueRange transparentRange; + if (preRefraction) + { + transparentRange = HDRenderQueue.k_RenderQueue_PreRefraction; + } + else if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) + { + transparentRange = HDRenderQueue.k_RenderQueue_Transparent; + } + else // Low res transparent disabled + { + transparentRange = HDRenderQueue.k_RenderQueue_TransparentWithLowRes; + } + + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction)) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) + transparentRange = HDRenderQueue.k_RenderQueue_AllTransparent; + else + transparentRange = HDRenderQueue.k_RenderQueue_AllTransparentWithLowRes; + } + + if (NeedMotionVectorForTransparent(hdCamera.frameSettings)) + { + m_CurrentRendererConfigurationBakedLighting |= PerObjectData.MotionVectors; // This will enable the flag for low res transparent as well + } + + var passNames = m_Asset.currentPlatformRenderPipelineSettings.supportTransparentBackface ? m_AllTransparentPassNames : m_TransparentNoBackfaceNames; + return CreateTransparentRendererListDesc(cullResults, hdCamera.camera, passNames, m_CurrentRendererConfigurationBakedLighting, transparentRange); + } + + + void RenderForwardTransparent(CullingResults cullResults, HDCamera hdCamera, bool preRefraction, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + // If rough refraction are turned off, we render all transparents in the Transparent pass and we skip the PreRefraction one. + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction) && preRefraction) + { + return; + } + + HDProfileId passName; + bool debugDisplay = m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled(); + if (debugDisplay) + passName = preRefraction ? HDProfileId.ForwardPreRefractionDebug : HDProfileId.ForwardTransparentDebug; + else + passName = preRefraction ? HDProfileId.ForwardPreRefraction : HDProfileId.ForwardTransparent; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(passName))) + { + bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + bool renderMotionVecForTransparent = NeedMotionVectorForTransparent(hdCamera.frameSettings); + cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, renderMotionVecForTransparent ? (int)ColorWriteMask.All : 0); + + m_MRTTransparentMotionVec[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; + m_MRTTransparentMotionVec[1] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) + // It doesn't really matter what gets bound here since the color mask state set will prevent this from ever being written to. However, we still need to bind something + // to avoid warnings about unbound render targets. The following rendertarget could really be anything if renderVelocitiesForTransparent, here the normal buffer + // as it is guaranteed to exist and to have the same size. + // to avoid warnings about unbound render targets. + : m_SharedRTManager.GetNormalBuffer(msaa); + + if ((hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) && (DecalSystem.m_DecalDatasCount > 0)) // enable d-buffer flag value is being interpreted more like enable decals in general now that we have clustered + // decal datas count is 0 if no decals affect transparency + { + DecalSystem.instance.SetAtlas(cmd); // for clustered decals + } + + RenderForwardRendererList(hdCamera.frameSettings, + RendererList.Create(PrepareForwardTransparentRendererList(cullResults, hdCamera, preRefraction)), + m_MRTTransparentMotionVec, + m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), + m_TileAndClusterData.perVoxelLightLists, + false, renderContext, cmd); + } + } + + static void RenderForwardRendererList( FrameSettings frameSettings, + RendererList rendererList, + RenderTargetIdentifier[] renderTarget, + RTHandle depthBuffer, + ComputeBuffer lightListBuffer, + bool opaque, + ScriptableRenderContext renderContext, + CommandBuffer cmd) + { + // Note: SHADOWS_SHADOWMASK keyword is enabled in HDRenderPipeline.cs ConfigureForShadowMask + bool useFptl = opaque && frameSettings.IsEnabled(FrameSettingsField.FPTLForForwardOpaque); + + // say that we want to use tile/cluster light loop + CoreUtils.SetKeyword(cmd, "USE_FPTL_LIGHTLIST", useFptl); + CoreUtils.SetKeyword(cmd, "USE_CLUSTERED_LIGHTLIST", !useFptl); + cmd.SetGlobalBuffer(HDShaderIDs.g_vLightListGlobal, lightListBuffer); + + CoreUtils.SetRenderTarget(cmd, renderTarget, depthBuffer); + if (opaque) + DrawOpaqueRendererList(renderContext, cmd, frameSettings, rendererList); + else + DrawTransparentRendererList(renderContext, cmd, frameSettings, rendererList); + } + + // This is use to Display legacy shader with an error shader + [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] + void RenderForwardError(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderForwardError))) + { + CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer()); + var rendererList = RendererList.Create(CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, m_ForwardErrorPassNames, renderQueueRange: RenderQueueRange.all, overrideMaterial: m_ErrorMaterial)); + HDUtils.DrawRendererList(renderContext, cmd, rendererList); + } + } + + bool RenderCustomPass(ScriptableRenderContext context, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResults, CustomPassInjectionPoint injectionPoint) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) + return false; + + bool executed = false; + CustomPassVolume.GetActivePassVolumes(injectionPoint, m_ActivePassVolumes); + foreach (var customPass in m_ActivePassVolumes) + { + if (customPass == null) + return false; + + var customPassTargets = new CustomPass.RenderTargets + { + cameraColorMSAABuffer = m_CameraColorMSAABuffer, + cameraColorBuffer = (injectionPoint == CustomPassInjectionPoint.AfterPostProcess) ? m_IntermediateAfterPostProcessBuffer : m_CameraColorBuffer, + customColorBuffer = m_CustomPassColorBuffer, + customDepthBuffer = m_CustomPassDepthBuffer, + }; + executed |= customPass.Execute(context, cmd, hdCamera, cullingResults, m_SharedRTManager, customPassTargets); + } + + return executed; + } + + void RenderTransparentDepthPrepass(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentPrepass)) + { + // Render transparent depth prepass after opaque one + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.TransparentDepthPrepass))) + { + CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthStencilBuffer()); + var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_TransparentDepthPrepassNames)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + } + } + } + + void RenderTransparentDepthPostpass(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentPostpass)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.TransparentDepthPostpass))) + { + CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthStencilBuffer()); + var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, m_TransparentDepthPostpassNames)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) + { + // If there is a ray-tracing environment and the feature is enabled we want to push these objects to the transparent postpass (they are not rendered in the first call because they are not in the generic transparent render queue) + var rrSettings = hdCamera.volumeStack.GetComponent(); + if (rrSettings.enable.value) + { + var rendererListRT = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, m_TransparentDepthPostpassNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AllTransparentRaytracing)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListRT); + } + } + } + } + + void RenderLowResTransparent(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.LowResTransparent))) + { + cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 1); + cmd.SetGlobalInt(HDShaderIDs._OffScreenDownsampleFactor, 2); + CoreUtils.SetRenderTarget(cmd, m_LowResTransparentBuffer, m_SharedRTManager.GetLowResDepthBuffer(), clearFlag: ClearFlag.Color, Color.black); + RenderQueueRange transparentRange = HDRenderQueue.k_RenderQueue_LowTransparent; + var passNames = m_Asset.currentPlatformRenderPipelineSettings.supportTransparentBackface ? m_AllTransparentPassNames : m_TransparentNoBackfaceNames; + var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, passNames, m_CurrentRendererConfigurationBakedLighting, HDRenderQueue.k_RenderQueue_LowTransparent)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 0); + cmd.SetGlobalInt(HDShaderIDs._OffScreenDownsampleFactor, 1); + } + } + + void RenderObjectsMotionVectors(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.ObjectMotionVectors)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ObjectsMotionVector))) + { + // These flags are still required in SRP or the engine won't compute previous model matrices... + // If the flag hasn't been set yet on this camera, motion vectors will skip a frame. + hdCamera.camera.depthTextureMode |= DepthTextureMode.MotionVectors | DepthTextureMode.Depth; + + CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetMotionVectorsPassBuffersRTI(hdCamera.frameSettings), m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); + var rendererList = RendererList.Create(CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_MotionVectorsName, PerObjectData.MotionVectors)); + DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); + } + } + + void RenderCameraMotionVectors(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CameraMotionVectors))) + { + bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + + // These flags are still required in SRP or the engine won't compute previous model matrices... + // If the flag hasn't been set yet on this camera, motion vectors will skip a frame. + hdCamera.camera.depthTextureMode |= DepthTextureMode.MotionVectors | DepthTextureMode.Depth; + m_CameraMotionVectorsMaterial.SetInt(HDShaderIDs._StencilMask, (int)StencilUsage.ObjectMotionVector); + m_CameraMotionVectorsMaterial.SetInt(HDShaderIDs._StencilRef, (int)StencilUsage.ObjectMotionVector); + + HDUtils.DrawFullScreen(cmd, m_CameraMotionVectorsMaterial, m_SharedRTManager.GetMotionVectorsBuffer(msaa), m_SharedRTManager.GetDepthStencilBuffer(msaa), null, 0); + +#if UNITY_EDITOR + // In scene view there is no motion vector, so we clear the RT to black + if (hdCamera.camera.cameraType == CameraType.SceneView && !hdCamera.animateMaterials) + { + CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetMotionVectorsBuffer(msaa), m_SharedRTManager.GetDepthStencilBuffer(msaa), ClearFlag.Color, Color.clear); + } +#endif + } + } + + struct RenderSSRParameters + { + public ComputeShader ssrCS; + public int tracingKernel; + public int reprojectionKernel; + + public int width, height, viewCount; + public int maxIteration; + public bool reflectSky; + public float thicknessScale; + public float thicknessBias; + public float roughnessFadeEnd; + public float roughnessFadeEndTimesRcpLength; + public float roughnessFadeRcpLength; + public float edgeFadeRcpLength; + + public int depthPyramidMipCount; + public ComputeBuffer offsetBufferData; + public ComputeBuffer coarseStencilBuffer; + + public Vector4 colorPyramidUVScaleAndLimit; + public int colorPyramidMipCount; + } + + RenderSSRParameters PrepareSSRParameters(HDCamera hdCamera) + { + var volumeSettings = hdCamera.volumeStack.GetComponent(); + var parameters = new RenderSSRParameters(); + + parameters.ssrCS = m_ScreenSpaceReflectionsCS; + parameters.tracingKernel = m_SsrTracingKernel; + parameters.reprojectionKernel = m_SsrReprojectionKernel; + + parameters.width = hdCamera.actualWidth; + parameters.height = hdCamera.actualHeight; + parameters.viewCount = hdCamera.viewCount; + + float n = hdCamera.camera.nearClipPlane; + float f = hdCamera.camera.farClipPlane; + + parameters.maxIteration = volumeSettings.rayMaxIterations; + parameters.reflectSky = volumeSettings.reflectSky.value; + + float thickness = volumeSettings.depthBufferThickness.value; + parameters.thicknessScale = 1.0f / (1.0f + thickness); + parameters.thicknessBias = -n / (f - n) * (thickness * parameters.thicknessScale); + + var info = m_SharedRTManager.GetDepthBufferMipChainInfo(); + parameters.depthPyramidMipCount = info.mipLevelCount; + parameters.offsetBufferData = info.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); + parameters.coarseStencilBuffer = m_SharedRTManager.GetCoarseStencilBuffer(); + + float roughnessFadeStart = 1 - volumeSettings.smoothnessFadeStart.value; + parameters.roughnessFadeEnd = 1 - volumeSettings.minSmoothness.value; + float roughnessFadeLength = parameters.roughnessFadeEnd - roughnessFadeStart; + parameters.roughnessFadeEndTimesRcpLength = (roughnessFadeLength != 0) ? (parameters.roughnessFadeEnd * (1.0f / roughnessFadeLength)) : 1; + parameters.roughnessFadeRcpLength = (roughnessFadeLength != 0) ? (1.0f / roughnessFadeLength) : 0; + parameters.edgeFadeRcpLength = Mathf.Min(1.0f / volumeSettings.screenFadeDistance.value, float.MaxValue); + + parameters.colorPyramidUVScaleAndLimit = HDUtils.ComputeUvScaleAndLimit(hdCamera.historyRTHandleProperties.previousViewportSize, hdCamera.historyRTHandleProperties.previousRenderTargetSize); + parameters.colorPyramidMipCount = hdCamera.colorPyramidHistoryMipCount; + + return parameters; + } + + static void RenderSSR( in RenderSSRParameters parameters, + RTHandle depthPyramid, + RTHandle SsrHitPointTexture, + RTHandle stencilBuffer, + RTHandle clearCoatMask, + RTHandle previousColorPyramid, + RTHandle ssrLightingTexture, + CommandBuffer cmd, + ScriptableRenderContext renderContext) + { + var cs = parameters.ssrCS; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.SsrTracing))) + { + cmd.SetComputeIntParam(cs, HDShaderIDs._SsrIterLimit, parameters.maxIteration); + cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrThicknessScale, parameters.thicknessScale); + cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrThicknessBias, parameters.thicknessBias); + cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrRoughnessFadeEnd, parameters.roughnessFadeEnd); + cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrRoughnessFadeRcpLength, parameters.roughnessFadeRcpLength); + cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrRoughnessFadeEndTimesRcpLength, parameters.roughnessFadeEndTimesRcpLength); + cmd.SetComputeIntParam(cs, HDShaderIDs._SsrDepthPyramidMaxMip, parameters.depthPyramidMipCount - 1); + cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrEdgeFadeRcpLength, parameters.edgeFadeRcpLength); + cmd.SetComputeIntParam(cs, HDShaderIDs._SsrReflectsSky, parameters.reflectSky ? 1 : 0); + cmd.SetComputeIntParam(cs, HDShaderIDs._SsrStencilBit, (int)StencilUsage.TraceReflectionRay); + + // cmd.SetComputeTextureParam(cs, kernel, "_SsrDebugTexture", m_SsrDebugTexture); + cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._CameraDepthTexture, depthPyramid); + cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._SsrClearCoatMaskTexture, clearCoatMask); + cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._SsrHitPointTexture, SsrHitPointTexture); + + if (stencilBuffer.rt.stencilFormat == GraphicsFormat.None) // We are accessing MSAA resolved version and not the depth stencil buffer directly. + { + cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._StencilTexture, stencilBuffer); + } + else + { + cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._StencilTexture, stencilBuffer, 0, RenderTextureSubElement.Stencil); + } + + cmd.SetComputeBufferParam(cs, parameters.tracingKernel, HDShaderIDs._CoarseStencilBuffer, parameters.coarseStencilBuffer); + + cmd.SetComputeBufferParam(cs, parameters.tracingKernel, HDShaderIDs._DepthPyramidMipLevelOffsets, parameters.offsetBufferData); + + cmd.DispatchCompute(cs, parameters.tracingKernel, HDUtils.DivRoundUp(parameters.width, 8), HDUtils.DivRoundUp(parameters.height, 8), parameters.viewCount); + } + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.SsrReprojection))) + { + // cmd.SetComputeTextureParam(cs, kernel, "_SsrDebugTexture", m_SsrDebugTexture); + cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._SsrHitPointTexture, SsrHitPointTexture); + cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._SsrLightingTextureRW, ssrLightingTexture); + cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._ColorPyramidTexture, previousColorPyramid); + cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._SsrClearCoatMaskTexture, clearCoatMask); + + cmd.SetComputeVectorParam(cs, HDShaderIDs._ColorPyramidUvScaleAndLimitPrevFrame, parameters.colorPyramidUVScaleAndLimit); + cmd.SetComputeIntParam(cs, HDShaderIDs._SsrColorPyramidMaxMip, parameters.colorPyramidMipCount - 1); + + cmd.DispatchCompute(cs, parameters.reprojectionKernel, HDUtils.DivRoundUp(parameters.width, 8), HDUtils.DivRoundUp(parameters.height, 8), parameters.viewCount); + } + } + + void RenderSSR(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext) + { + if (!hdCamera.IsSSREnabled()) + return; + + var settings = hdCamera.volumeStack.GetComponent(); + bool usesRaytracedReflections = hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && settings.rayTracing.value; + if (usesRaytracedReflections) + { + hdCamera.xr.StartSinglePass(cmd); + RenderRayTracedReflections(hdCamera, cmd, m_SsrLightingTexture, renderContext, m_FrameCount); + hdCamera.xr.StopSinglePass(cmd); + } + else + { + var previousColorPyramid = hdCamera.GetPreviousFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); + + // Evaluate the clear coat mask texture based on the lit shader mode + RTHandle clearCoatMask = hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred ? m_GbufferManager.GetBuffer(2) : TextureXR.GetBlackTexture(); + + var parameters = PrepareSSRParameters(hdCamera); + RenderSSR(parameters, m_SharedRTManager.GetDepthTexture(), m_SsrHitPointTexture, + m_SharedRTManager.GetStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), clearCoatMask, previousColorPyramid, + m_SsrLightingTexture, cmd, renderContext); + + if (!hdCamera.colorPyramidHistoryIsValid) + { + cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, TextureXR.GetClearTexture()); + hdCamera.colorPyramidHistoryIsValid = true; // For the next frame... + } + } + cmd.SetGlobalInt(HDShaderIDs._UseRayTracedReflections, usesRaytracedReflections ? 1 : 0); + + PushFullScreenDebugTexture(hdCamera, cmd, m_SsrLightingTexture, FullScreenDebugMode.ScreenSpaceReflections); + } + + void RenderColorPyramid(HDCamera hdCamera, CommandBuffer cmd, bool isPreRefraction) + { + if (isPreRefraction) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction)) + return; + } + else + { + // This final Gaussian pyramid can be reused by SSR, so disable it only if there is no distortion + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Distortion) && !hdCamera.IsSSREnabled()) + return; + } + + var currentColorPyramid = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); + + int lodCount; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ColorPyramid))) + { + Vector2Int pyramidSizeV2I = new Vector2Int(hdCamera.actualWidth, hdCamera.actualHeight); + lodCount = m_MipGenerator.RenderColorGaussianPyramid(cmd, pyramidSizeV2I, m_CameraColorBuffer, currentColorPyramid); + hdCamera.colorPyramidHistoryMipCount = lodCount; + } + + float scaleX = hdCamera.actualWidth / (float)currentColorPyramid.rt.width; + float scaleY = hdCamera.actualHeight / (float)currentColorPyramid.rt.height; + Vector4 pyramidScaleLod = new Vector4(scaleX, scaleY, lodCount, 0.0f); + Vector4 pyramidScale = new Vector4(scaleX, scaleY, 0f, 0f); + // Warning! Danger! + // The color pyramid scale is only correct for the most detailed MIP level. + // For the other MIP levels, due to truncation after division by 2, a row or + // column of texels may be lost. Since this can happen to BOTH the texture + // size AND the viewport, (uv * _ColorPyramidScale.xy) can be off by a texel + // unless the scale is 1 (and it will not be 1 if the texture was resized + // and is of greater size compared to the viewport). + cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, currentColorPyramid); + cmd.SetGlobalVector(HDShaderIDs._ColorPyramidScale, pyramidScaleLod); + PushFullScreenDebugTextureMip(hdCamera, cmd, currentColorPyramid, lodCount, pyramidScale, isPreRefraction ? FullScreenDebugMode.PreRefractionColorPyramid : FullScreenDebugMode.FinalColorPyramid); + } + + void GenerateDepthPyramid(HDCamera hdCamera, CommandBuffer cmd, FullScreenDebugMode debugMode) + { + CopyDepthBufferIfNeeded(hdCamera, cmd); + + int mipCount = m_SharedRTManager.GetDepthBufferMipChainInfo().mipLevelCount; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DepthPyramid))) + { + m_MipGenerator.RenderMinDepthPyramid(cmd, m_SharedRTManager.GetDepthTexture(), m_SharedRTManager.GetDepthBufferMipChainInfo()); + } + + float scaleX = hdCamera.actualWidth / (float)m_SharedRTManager.GetDepthTexture().rt.width; + float scaleY = hdCamera.actualHeight / (float)m_SharedRTManager.GetDepthTexture().rt.height; + Vector4 pyramidScaleLod = new Vector4(scaleX, scaleY, mipCount, 0.0f); + Vector4 pyramidScale = new Vector4(scaleX, scaleY, 0f, 0f); + cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthTexture()); + cmd.SetGlobalVector(HDShaderIDs._DepthPyramidScale, pyramidScaleLod); + PushFullScreenDebugTextureMip(hdCamera, cmd, m_SharedRTManager.GetDepthTexture(), mipCount, pyramidScale, debugMode); + } + + void DownsampleDepthForLowResTransparency(HDCamera hdCamera, CommandBuffer cmd) + { + var settings = m_Asset.currentPlatformRenderPipelineSettings.lowresTransparentSettings; + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DownsampleDepth))) + { + CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetLowResDepthBuffer()); + cmd.SetViewport(new Rect(0, 0, hdCamera.actualWidth * 0.5f, hdCamera.actualHeight * 0.5f)); + // TODO: Add option to switch modes at runtime + if(settings.checkerboardDepthBuffer) + { + m_DownsampleDepthMaterial.EnableKeyword("CHECKERBOARD_DOWNSAMPLE"); + } + cmd.DrawProcedural(Matrix4x4.identity, m_DownsampleDepthMaterial, 0, MeshTopology.Triangles, 3, 1, null); + } + } + + void UpsampleTransparent(HDCamera hdCamera, CommandBuffer cmd) + { + var settings = m_Asset.currentPlatformRenderPipelineSettings.lowresTransparentSettings; + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.UpsampleLowResTransparent))) + { + CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer); + if(settings.upsampleType == LowResTransparentUpsample.Bilinear) + { + m_UpsampleTransparency.EnableKeyword("BILINEAR"); + } + else if (settings.upsampleType == LowResTransparentUpsample.NearestDepth) + { + m_UpsampleTransparency.EnableKeyword("NEAREST_DEPTH"); + } + m_UpsampleTransparency.SetTexture(HDShaderIDs._LowResTransparent, m_LowResTransparentBuffer); + m_UpsampleTransparency.SetTexture(HDShaderIDs._LowResDepthTexture, m_SharedRTManager.GetLowResDepthBuffer()); + cmd.DrawProcedural(Matrix4x4.identity, m_UpsampleTransparency, 0, MeshTopology.Triangles, 3, 1, null); + } + } + + void ApplyDebugDisplaySettings(HDCamera hdCamera, CommandBuffer cmd) + { + // See ShaderPassForward.hlsl: for forward shaders, if DEBUG_DISPLAY is enabled and no DebugLightingMode or DebugMipMapMod + // modes have been set, lighting is automatically skipped (To avoid some crashed due to lighting RT not set on console). + // However debug mode like colorPickerModes and false color don't need DEBUG_DISPLAY and must work with the lighting. + // So we will enabled DEBUG_DISPLAY independently + + bool debugDisplayEnabledOrSceneLightingDisabled = m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() || CoreUtils.IsSceneLightingDisabled(hdCamera.camera); + // Enable globally the keyword DEBUG_DISPLAY on shader that support it with multi-compile + CoreUtils.SetKeyword(cmd, "DEBUG_DISPLAY", debugDisplayEnabledOrSceneLightingDisabled); + + // Setting this all the time due to a strange bug that either reports a (globally) bound texture as not bound or where SetGlobalTexture doesn't behave as expected. + // As a workaround we bind it regardless of debug display. Eventually with + cmd.SetGlobalTexture(HDShaderIDs._DebugMatCapTexture, defaultResources.textures.matcapTex); + + if (debugDisplayEnabledOrSceneLightingDisabled || + m_CurrentDebugDisplaySettings.data.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None) + { + // This is for texture streaming + m_CurrentDebugDisplaySettings.UpdateMaterials(); + + var lightingDebugSettings = m_CurrentDebugDisplaySettings.data.lightingDebugSettings; + var materialDebugSettings = m_CurrentDebugDisplaySettings.data.materialDebugSettings; + var debugAlbedo = new Vector4(lightingDebugSettings.overrideAlbedo ? 1.0f : 0.0f, lightingDebugSettings.overrideAlbedoValue.r, lightingDebugSettings.overrideAlbedoValue.g, lightingDebugSettings.overrideAlbedoValue.b); + var debugSmoothness = new Vector4(lightingDebugSettings.overrideSmoothness ? 1.0f : 0.0f, lightingDebugSettings.overrideSmoothnessValue, 0.0f, 0.0f); + var debugNormal = new Vector4(lightingDebugSettings.overrideNormal ? 1.0f : 0.0f, 0.0f, 0.0f, 0.0f); + var debugAmbientOcclusion = new Vector4(lightingDebugSettings.overrideAmbientOcclusion ? 1.0f : 0.0f, lightingDebugSettings.overrideAmbientOcclusionValue, 0.0f, 0.0f); + var debugSpecularColor = new Vector4(lightingDebugSettings.overrideSpecularColor ? 1.0f : 0.0f, lightingDebugSettings.overrideSpecularColorValue.r, lightingDebugSettings.overrideSpecularColorValue.g, lightingDebugSettings.overrideSpecularColorValue.b); + var debugEmissiveColor = new Vector4(lightingDebugSettings.overrideEmissiveColor ? 1.0f : 0.0f, lightingDebugSettings.overrideEmissiveColorValue.r, lightingDebugSettings.overrideEmissiveColorValue.g, lightingDebugSettings.overrideEmissiveColorValue.b); + var debugTrueMetalColor = new Vector4(materialDebugSettings.materialValidateTrueMetal ? 1.0f : 0.0f, materialDebugSettings.materialValidateTrueMetalColor.r, materialDebugSettings.materialValidateTrueMetalColor.g, materialDebugSettings.materialValidateTrueMetalColor.b); + + DebugLightingMode debugLightingMode = m_CurrentDebugDisplaySettings.GetDebugLightingMode(); + if (CoreUtils.IsSceneLightingDisabled(hdCamera.camera)) + { + debugLightingMode = DebugLightingMode.MatcapView; + } + + cmd.SetGlobalFloatArray(HDShaderIDs._DebugViewMaterial, m_CurrentDebugDisplaySettings.GetDebugMaterialIndexes()); + cmd.SetGlobalInt(HDShaderIDs._DebugLightingMode, (int)debugLightingMode); + cmd.SetGlobalInt(HDShaderIDs._DebugShadowMapMode, (int)m_CurrentDebugDisplaySettings.GetDebugShadowMapMode()); + cmd.SetGlobalInt(HDShaderIDs._DebugMipMapMode, (int)m_CurrentDebugDisplaySettings.GetDebugMipMapMode()); + cmd.SetGlobalInt(HDShaderIDs._DebugMipMapModeTerrainTexture, (int)m_CurrentDebugDisplaySettings.GetDebugMipMapModeTerrainTexture()); + cmd.SetGlobalInt(HDShaderIDs._ColorPickerMode, (int)m_CurrentDebugDisplaySettings.GetDebugColorPickerMode()); + cmd.SetGlobalInt(HDShaderIDs._DebugFullScreenMode, (int)m_CurrentDebugDisplaySettings.data.fullScreenDebugMode); + +#if UNITY_EDITOR + cmd.SetGlobalInt(HDShaderIDs._MatcapMixAlbedo, HDRenderPipelinePreferences.matcapViewMixAlbedo ? 1 : 0); + cmd.SetGlobalFloat(HDShaderIDs._MatcapViewScale, HDRenderPipelinePreferences.matcapViewScale); +#else + cmd.SetGlobalInt(HDShaderIDs._MatcapMixAlbedo, 0); + cmd.SetGlobalFloat(HDShaderIDs._MatcapViewScale, 1.0f); +#endif + cmd.SetGlobalVector(HDShaderIDs._DebugLightingAlbedo, debugAlbedo); + cmd.SetGlobalVector(HDShaderIDs._DebugLightingSmoothness, debugSmoothness); + cmd.SetGlobalVector(HDShaderIDs._DebugLightingNormal, debugNormal); + cmd.SetGlobalVector(HDShaderIDs._DebugLightingAmbientOcclusion, debugAmbientOcclusion); + cmd.SetGlobalVector(HDShaderIDs._DebugLightingSpecularColor, debugSpecularColor); + cmd.SetGlobalVector(HDShaderIDs._DebugLightingEmissiveColor, debugEmissiveColor); + cmd.SetGlobalColor(HDShaderIDs._DebugLightingMaterialValidateHighColor, materialDebugSettings.materialValidateHighColor); + cmd.SetGlobalColor(HDShaderIDs._DebugLightingMaterialValidateLowColor, materialDebugSettings.materialValidateLowColor); + cmd.SetGlobalColor(HDShaderIDs._DebugLightingMaterialValidatePureMetalColor, debugTrueMetalColor); + + cmd.SetGlobalVector(HDShaderIDs._MousePixelCoord, HDUtils.GetMouseCoordinates(hdCamera)); + cmd.SetGlobalVector(HDShaderIDs._MouseClickPixelCoord, HDUtils.GetMouseClickCoordinates(hdCamera)); + cmd.SetGlobalTexture(HDShaderIDs._DebugFont, defaultResources.textures.debugFontTex); + + + } + } + + static bool NeedColorPickerDebug(DebugDisplaySettings debugSettings) + { + return debugSettings.data.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None + || debugSettings.data.falseColorDebugSettings.falseColor + || debugSettings.data.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuminanceMeter; + } + + void PushColorPickerDebugTexture(CommandBuffer cmd, HDCamera hdCamera, RTHandle textureID) + { + if (NeedColorPickerDebug(m_CurrentDebugDisplaySettings)) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.PushToColorPicker))) + { + HDUtils.BlitCameraTexture(cmd, textureID, m_DebugColorPickerBuffer); + } + } + } + + bool NeedsFullScreenDebugMode() + { + bool fullScreenDebugEnabled = m_CurrentDebugDisplaySettings.data.fullScreenDebugMode != FullScreenDebugMode.None; + bool lightingDebugEnabled = m_CurrentDebugDisplaySettings.data.lightingDebugSettings.shadowDebugMode == ShadowMapDebugMode.SingleShadow; + + return fullScreenDebugEnabled || lightingDebugEnabled; + } + + void PushFullScreenLightingDebugTexture(HDCamera hdCamera, CommandBuffer cmd, RTHandle textureID) + { + // In practice, this is only useful for the SingleShadow debug view. + // TODO: See how we can make this nicer than a specific functions just for one case. + if (NeedsFullScreenDebugMode() && m_FullScreenDebugPushed == false) + { + m_FullScreenDebugPushed = true; + HDUtils.BlitCameraTexture(cmd, textureID, m_DebugFullScreenTempBuffer); + } + } + + internal void PushFullScreenDebugTexture(HDCamera hdCamera, CommandBuffer cmd, RTHandle textureID, FullScreenDebugMode debugMode) + { + if (debugMode == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode) + { + m_FullScreenDebugPushed = true; // We need this flag because otherwise if no full screen debug is pushed (like for example if the corresponding pass is disabled), when we render the result in RenderDebug m_DebugFullScreenTempBuffer will contain potential garbage + HDUtils.BlitCameraTexture(cmd, textureID, m_DebugFullScreenTempBuffer); + } + } + + void PushFullScreenDebugTextureMip(HDCamera hdCamera, CommandBuffer cmd, RTHandle texture, int lodCount, Vector4 scaleBias, FullScreenDebugMode debugMode) + { + if (debugMode == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode) + { + var mipIndex = Mathf.FloorToInt(m_CurrentDebugDisplaySettings.data.fullscreenDebugMip * (lodCount)); + + m_FullScreenDebugPushed = true; // We need this flag because otherwise if no full screen debug is pushed (like for example if the corresponding pass is disabled), when we render the result in RenderDebug m_DebugFullScreenTempBuffer will contain potential garbage + HDUtils.BlitCameraTexture(cmd, texture, m_DebugFullScreenTempBuffer, scaleBias, mipIndex); + } + } + + struct DebugParameters + { + public DebugDisplaySettings debugDisplaySettings; + public HDCamera hdCamera; + + // Full screen debug + public bool resolveFullScreenDebug; + public Material debugFullScreenMaterial; + public int depthPyramidMip; + public ComputeBuffer depthPyramidOffsets; + + // Sky + public Texture skyReflectionTexture; + public Material debugLatlongMaterial; + + public bool rayTracingSupported; + public RayCountManager rayCountManager; + + // Lighting + public LightLoopDebugOverlayParameters lightingOverlayParameters; + + // Color picker + public bool colorPickerEnabled; + public Material colorPickerMaterial; + } + + DebugParameters PrepareDebugParameters(HDCamera hdCamera, HDUtils.PackedMipChainInfo depthMipInfo) + { + var parameters = new DebugParameters(); + + parameters.debugDisplaySettings = m_CurrentDebugDisplaySettings; + parameters.hdCamera = hdCamera; + + parameters.resolveFullScreenDebug = NeedsFullScreenDebugMode() && m_FullScreenDebugPushed; + parameters.debugFullScreenMaterial = m_DebugFullScreen; + parameters.depthPyramidMip = (int)(parameters.debugDisplaySettings.data.fullscreenDebugMip * depthMipInfo.mipLevelCount); + parameters.depthPyramidOffsets = depthMipInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); + + parameters.skyReflectionTexture = m_SkyManager.GetSkyReflection(hdCamera); + parameters.debugLatlongMaterial = m_DebugDisplayLatlong; + parameters.lightingOverlayParameters = PrepareLightLoopDebugOverlayParameters(); + + parameters.rayTracingSupported = hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing); + parameters.rayCountManager = m_RayCountManager; + + parameters.colorPickerEnabled = NeedColorPickerDebug(parameters.debugDisplaySettings); + parameters.colorPickerMaterial = m_DebugColorPicker; + + return parameters; + } + + static void ResolveFullScreenDebug( in DebugParameters parameters, + MaterialPropertyBlock mpb, + RTHandle inputFullScreenDebug, + RTHandle inputDepthPyramid, + RTHandle output, + CommandBuffer cmd) + { + mpb.SetTexture(HDShaderIDs._DebugFullScreenTexture, inputFullScreenDebug); + mpb.SetTexture(HDShaderIDs._CameraDepthTexture, inputDepthPyramid); + mpb.SetFloat(HDShaderIDs._FullScreenDebugMode, (float)parameters.debugDisplaySettings.data.fullScreenDebugMode); + mpb.SetInt(HDShaderIDs._DebugDepthPyramidMip, parameters.depthPyramidMip); + mpb.SetBuffer(HDShaderIDs._DebugDepthPyramidOffsets, parameters.depthPyramidOffsets); + mpb.SetInt(HDShaderIDs._DebugContactShadowLightIndex, parameters.debugDisplaySettings.data.fullScreenContactShadowLightIndex); + + HDUtils.DrawFullScreen(cmd, parameters.debugFullScreenMaterial, output, mpb, 0); + } + + static void ResolveColorPickerDebug(in DebugParameters parameters, + RTHandle debugColorPickerBuffer, + RTHandle output, + CommandBuffer cmd) + { + ColorPickerDebugSettings colorPickerDebugSettings = parameters.debugDisplaySettings.data.colorPickerDebugSettings; + FalseColorDebugSettings falseColorDebugSettings = parameters.debugDisplaySettings.data.falseColorDebugSettings; + var falseColorThresholds = new Vector4(falseColorDebugSettings.colorThreshold0, falseColorDebugSettings.colorThreshold1, falseColorDebugSettings.colorThreshold2, falseColorDebugSettings.colorThreshold3); + + // Here we have three cases: + // - Material debug is enabled, this is the buffer we display + // - Otherwise we display the HDR buffer before postprocess and distortion + // - If fullscreen debug is enabled we always use it + parameters.colorPickerMaterial.SetTexture(HDShaderIDs._DebugColorPickerTexture, debugColorPickerBuffer); + parameters.colorPickerMaterial.SetColor(HDShaderIDs._ColorPickerFontColor, colorPickerDebugSettings.fontColor); + parameters.colorPickerMaterial.SetInt(HDShaderIDs._FalseColorEnabled, falseColorDebugSettings.falseColor ? 1 : 0); + parameters.colorPickerMaterial.SetVector(HDShaderIDs._FalseColorThresholds, falseColorThresholds); + // The material display debug perform sRGBToLinear conversion as the final blit currently hardcodes a linearToSrgb conversion. As when we read with color picker this is not done, + // we perform it inside the color picker shader. But we shouldn't do it for HDR buffer. + parameters.colorPickerMaterial.SetFloat(HDShaderIDs._ApplyLinearToSRGB, parameters.debugDisplaySettings.IsDebugMaterialDisplayEnabled() ? 1.0f : 0.0f); + + HDUtils.DrawFullScreen(cmd, parameters.colorPickerMaterial, output); + } + + static void RenderSkyReflectionOverlay(in DebugParameters debugParameters, CommandBuffer cmd, MaterialPropertyBlock mpb, ref float x, ref float y, float overlaySize) + { + var lightingDebug = debugParameters.debugDisplaySettings.data.lightingDebugSettings; + if (lightingDebug.displaySkyReflection) + { + mpb.SetTexture(HDShaderIDs._InputCubemap, debugParameters.skyReflectionTexture); + mpb.SetFloat(HDShaderIDs._Mipmap, lightingDebug.skyReflectionMipmap); + mpb.SetFloat(HDShaderIDs._ApplyExposure, 1.0f); + mpb.SetFloat(HDShaderIDs._SliceIndex, lightingDebug.cookieCubeArraySliceIndex); + cmd.SetViewport(new Rect(x, y, overlaySize, overlaySize)); + cmd.DrawProcedural(Matrix4x4.identity, debugParameters.debugLatlongMaterial, 0, MeshTopology.Triangles, 3, 1, mpb); + HDUtils.NextOverlayCoord(ref x, ref y, overlaySize, overlaySize, debugParameters.hdCamera); + } + } + + static void RenderRayCountOverlay(in DebugParameters debugParameters, CommandBuffer cmd, ref float x, ref float y, float overlaySize) + { + if (debugParameters.rayTracingSupported) + debugParameters.rayCountManager.EvaluateRayCount(cmd, debugParameters.hdCamera); + } + + void RenderDebug(HDCamera hdCamera, CommandBuffer cmd, CullingResults cullResults) + { + // We don't want any overlay for these kind of rendering + if (hdCamera.camera.cameraType == CameraType.Reflection || hdCamera.camera.cameraType == CameraType.Preview) + return; + + // Render Debug are only available in dev builds and we always render them in the same RT + CoreUtils.SetRenderTarget(cmd, m_IntermediateAfterPostProcessBuffer, m_SharedRTManager.GetDepthStencilBuffer()); + + var debugParams = PrepareDebugParameters(hdCamera, m_SharedRTManager.GetDepthBufferMipChainInfo()); + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderDebug))) + { + // First render full screen debug texture + if (debugParams.resolveFullScreenDebug) + { + m_FullScreenDebugPushed = false; + ResolveFullScreenDebug(debugParams, m_DebugFullScreenPropertyBlock, m_DebugFullScreenTempBuffer, m_SharedRTManager.GetDepthTexture(), m_IntermediateAfterPostProcessBuffer, cmd); + PushColorPickerDebugTexture(cmd, hdCamera, m_IntermediateAfterPostProcessBuffer); + } + + // First resolve color picker + if (debugParams.colorPickerEnabled) + ResolveColorPickerDebug(debugParams, m_DebugColorPickerBuffer, m_IntermediateAfterPostProcessBuffer, cmd); + + // Light volumes + var lightingDebug = debugParams.debugDisplaySettings.data.lightingDebugSettings; + if (lightingDebug.displayLightVolumes) + { + s_lightVolumes.RenderLightVolumes(cmd, hdCamera, cullResults, lightingDebug, m_IntermediateAfterPostProcessBuffer); + } + + // Then overlays + HDUtils.ResetOverlay(); + float debugPanelWidth = HDUtils.GetRuntimeDebugPanelWidth(debugParams.hdCamera); + float x = 0.0f; + float overlayRatio = debugParams.debugDisplaySettings.data.debugOverlayRatio; + float overlaySize = Math.Min(debugParams.hdCamera.actualHeight, debugParams.hdCamera.actualWidth - debugPanelWidth) * overlayRatio; + float y = debugParams.hdCamera.actualHeight - overlaySize; + + // Add the width of the debug display if enabled on the camera + x += debugPanelWidth; + + RenderSkyReflectionOverlay(debugParams, cmd, m_SharedPropertyBlock, ref x, ref y, overlaySize); + RenderRayCountOverlay(debugParams, cmd, ref x, ref y, overlaySize); + RenderLightLoopDebugOverlay(debugParams, cmd, ref x, ref y, overlaySize, m_SharedRTManager.GetDepthTexture()); + + HDShadowManager.ShadowDebugAtlasTextures atlases = debugParams.lightingOverlayParameters.shadowManager.GetDebugAtlasTextures(); + RenderShadowsDebugOverlay(debugParams, atlases, cmd, ref x, ref y, overlaySize, m_SharedPropertyBlock); + + DecalSystem.instance.RenderDebugOverlay(debugParams.hdCamera, cmd, debugParams.debugDisplaySettings, ref x, ref y, overlaySize, debugParams.hdCamera.actualWidth); + } + } + + void ClearStencilBuffer(HDCamera hdCamera, CommandBuffer cmd) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearStencil))) + { + m_ClearStencilBufferMaterial.SetInt(HDShaderIDs._StencilMask, (int)StencilUsage.HDRPReservedBits); + HDUtils.DrawFullScreen(cmd, m_ClearStencilBufferMaterial, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer()); + } + } + + void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) + { + bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearBuffers))) + { + // We clear only the depth buffer, no need to clear the various color buffer as we overwrite them. + // Clear depth/stencil and init buffers + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearDepthStencil))) + { + if (hdCamera.clearDepth) + { + CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(msaa), ClearFlag.Depth); + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) + { + CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthTexture(true), m_SharedRTManager.GetDepthStencilBuffer(true), ClearFlag.Color, Color.black); + } + } + m_IsDepthBufferCopyValid = false; + } + + // Clear the HDR target + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearHDRTarget))) + { + if (hdCamera.clearColorMode == HDAdditionalCameraData.ClearColorMode.Color || + // If the luxmeter is enabled, the sky isn't rendered so we clear the background color + m_CurrentDebugDisplaySettings.data.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter || + // If the matcap view is enabled, the sky isn't updated so we clear the background color + m_CurrentDebugDisplaySettings.DebugHideSky(hdCamera) || + // If we want the sky but the sky don't exist, still clear with background color + (hdCamera.clearColorMode == HDAdditionalCameraData.ClearColorMode.Sky && !m_SkyManager.IsVisualSkyValid(hdCamera)) || + // Special handling for Preview we force to clear with background color (i.e black) + // Note that the sky use in this case is the last one setup. If there is no scene or game, there is no sky use as reflection in the preview + HDUtils.IsRegularPreviewCamera(hdCamera.camera) + ) + { + CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(msaa), ClearFlag.Color, GetColorBufferClearColor(hdCamera)); + } + } + + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.SubsurfaceScattering)) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearSssLightingBuffer))) + { + CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer, ClearFlag.Color, Color.clear); + } + } + + if (hdCamera.IsSSREnabled()) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearSsrBuffers))) + { + // In practice, these textures are sparse (mostly black). Therefore, clearing them is fast (due to CMASK), + // and much faster than fully overwriting them from within SSR shaders. + // CoreUtils.SetRenderTarget(cmd, hdCamera, m_SsrDebugTexture, ClearFlag.Color, Color.clear); + CoreUtils.SetRenderTarget(cmd, m_SsrHitPointTexture, ClearFlag.Color, Color.clear); + CoreUtils.SetRenderTarget(cmd, m_SsrLightingTexture, ClearFlag.Color, Color.clear); + } + } + + // We don't need to clear the GBuffers as scene is rewrite and we are suppose to only access valid data (invalid data are tagged with StencilUsage.Clear in the stencil), + // This is to save some performance + if (hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred) + { + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearGBuffer))) + { + // We still clear in case of debug mode or on demand + if (m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() || hdCamera.frameSettings.IsEnabled(FrameSettingsField.ClearGBuffers)) + { + // On PS4 we don't have working MRT clear, so need to clear buffers one by one + // https://fogbugz.unity3d.com/f/cases/1182018/ + if (Application.platform == RuntimePlatform.PS4) + { + var GBuffers = m_GbufferManager.GetBuffersRTI(); + foreach (var gbuffer in GBuffers) + { + CoreUtils.SetRenderTarget(cmd, gbuffer, m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); + } + } + else + { + CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffersRTI(), m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); + } + } + + // If we are in deferred mode and the ssr is enabled, we need to make sure that the second gbuffer is cleared given that we are using that information for + // clear coat selection + if (hdCamera.IsSSREnabled()) + { + CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffer(2), m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); + } + } + } + } + } + + void RenderPostProcess(CullingResults cullResults, HDCamera hdCamera, RenderTargetIdentifier finalRT, ScriptableRenderContext renderContext, CommandBuffer cmd, bool isFinalPass) + { + // Y-Flip needs to happen during the post process pass only if it's the final pass and is the regular game view + // SceneView flip is handled by the editor internal code and GameView rendering into render textures should not be flipped in order to respect Unity texture coordinates convention + bool flipInPostProcesses = HDUtils.PostProcessIsFinalPass() && isFinalPass && (hdCamera.flipYMode == HDAdditionalCameraData.FlipYMode.ForceFlipY || hdCamera.isMainGameView); + RenderTargetIdentifier destination = HDUtils.PostProcessIsFinalPass() && isFinalPass ? finalRT : m_IntermediateAfterPostProcessBuffer; + + + // We render AfterPostProcess objects first into a separate buffer that will be composited in the final post process pass + RenderAfterPostProcess(cullResults, hdCamera, renderContext, cmd); + + // Set the depth buffer to the main one to avoid missing out on transparent depth for post process. + cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthStencilBuffer()); + + // Post-processes output straight to the backbuffer + m_PostProcessSystem.Render( + cmd: cmd, + camera: hdCamera, + blueNoise: m_BlueNoise, + colorBuffer: m_CameraColorBuffer, + afterPostProcessTexture: GetAfterPostProcessOffScreenBuffer(), + lightingBuffer: null, + finalRT: destination, + depthBuffer: m_SharedRTManager.GetDepthStencilBuffer(), + flipY: flipInPostProcesses + ); + } + + + RTHandle GetAfterPostProcessOffScreenBuffer() + { + if (currentPlatformRenderPipelineSettings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) + return GetSSSBuffer(); + else + return m_GbufferManager.GetBuffer(0); + } + + + void RenderAfterPostProcess(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) + { + if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.AfterPostprocess)) + return; + + using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.AfterPostProcessing))) + { + // Note about AfterPostProcess and TAA: + // When TAA is enabled rendering is jittered and then resolved during the post processing pass. + // It means that any rendering done after post processing need to disable jittering. This is what we do with hdCamera.UpdateViewConstants(false); + // The issue is that the only available depth buffer is jittered so pixels would wobble around depth tested edges. + // In order to avoid that we decide that objects rendered after Post processes while TAA is active will not benefit from the depth buffer so we disable it. + bool taaEnabled = hdCamera.IsTAAEnabled(); + hdCamera.UpdateAllViewConstants(false); + hdCamera.SetupGlobalParams(cmd, m_FrameCount); + + // Here we share GBuffer albedo buffer since it's not needed anymore + // Note: We bind the depth only if the ZTest for After Post Process is enabled. It is disabled by + // default so we're consistent in the behavior: no ZTest for After Post Process materials). + if (taaEnabled || !hdCamera.frameSettings.IsEnabled(FrameSettingsField.ZTestAfterPostProcessTAA)) + CoreUtils.SetRenderTarget(cmd, GetAfterPostProcessOffScreenBuffer(), clearFlag: ClearFlag.Color, clearColor: Color.black); + else + CoreUtils.SetRenderTarget(cmd, GetAfterPostProcessOffScreenBuffer(), m_SharedRTManager.GetDepthStencilBuffer(), clearFlag: ClearFlag.Color, clearColor: Color.black); + + cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 1); + var opaqueRendererList = RendererList.Create(CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_ForwardOnlyName, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessOpaque)); + DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, opaqueRendererList); + // Setup off-screen transparency here + var transparentRendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_ForwardOnlyName, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessTransparent)); + DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, transparentRendererList); + cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 0); + } + } + + void SendGeometryGraphicsBuffers(CommandBuffer cmd, HDCamera hdCamera) + { + bool needNormalBuffer = false; + Texture normalBuffer = null; + bool needDepthBuffer = false; + Texture depthBuffer = null; + + HDAdditionalCameraData acd = null; + hdCamera.camera.TryGetComponent(out acd); + + HDAdditionalCameraData.BufferAccessType externalAccess = new HDAdditionalCameraData.BufferAccessType(); + if (acd != null) + externalAccess = acd.GetBufferAccess(); + + // Figure out which client systems need which buffers + // Only VFX systems for now + VFXCameraBufferTypes neededVFXBuffers = VFXManager.IsCameraBufferNeeded(hdCamera.camera); + needNormalBuffer |= ((neededVFXBuffers & VFXCameraBufferTypes.Normal) != 0 || (externalAccess & HDAdditionalCameraData.BufferAccessType.Normal) != 0); + needDepthBuffer |= ((neededVFXBuffers & VFXCameraBufferTypes.Depth) != 0 || (externalAccess & HDAdditionalCameraData.BufferAccessType.Depth) != 0); + if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && GetRayTracingState()) + { + needNormalBuffer = true; + needDepthBuffer = true; + } + + // Here if needed for this particular camera, we allocate history buffers. + // Only one is needed here because the main buffer used for rendering is separate. + // Ideally, we should double buffer the main rendering buffer but since we don't know in advance if history is going to be needed, it would be a big waste of memory. + if (needNormalBuffer) + { + RTHandle mainNormalBuffer = m_SharedRTManager.GetNormalBuffer(); + RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) + { + return rtHandleSystem.Alloc(Vector2.one, TextureXR.slices, colorFormat: mainNormalBuffer.rt.graphicsFormat, dimension: TextureXR.dimension, enableRandomWrite: mainNormalBuffer.rt.enableRandomWrite, name: $"Normal History Buffer" + ); + } + + normalBuffer = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.Normal) ?? hdCamera.AllocHistoryFrameRT((int)HDCameraFrameHistoryType.Normal, Allocator, 1); + + for (int i = 0; i < hdCamera.viewCount; i++) + cmd.CopyTexture(mainNormalBuffer, i, 0, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight, normalBuffer, i, 0, 0, 0); + } + + if (needDepthBuffer) + { + RTHandle mainDepthBuffer = m_SharedRTManager.GetDepthTexture(); + RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) + { + return rtHandleSystem.Alloc(Vector2.one, TextureXR.slices, colorFormat: mainDepthBuffer.rt.graphicsFormat, dimension: TextureXR.dimension, enableRandomWrite: mainDepthBuffer.rt.enableRandomWrite, name: $"Depth History Buffer" + ); + } + + depthBuffer = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.Depth) ?? hdCamera.AllocHistoryFrameRT((int)HDCameraFrameHistoryType.Depth, Allocator, 1); + + for (int i = 0; i < hdCamera.viewCount; i++) + cmd.CopyTexture(mainDepthBuffer, i, 0, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight, depthBuffer, i, 0, 0, 0); + } + + // Send buffers to client. + // For now, only VFX systems + if ((neededVFXBuffers & VFXCameraBufferTypes.Depth) != 0) + { + VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Depth, depthBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); + } + + if ((neededVFXBuffers & VFXCameraBufferTypes.Normal) != 0) + { + VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Normal, normalBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); + } + } + + void SendColorGraphicsBuffer(CommandBuffer cmd, HDCamera hdCamera) + { + // Figure out which client systems need which buffers + VFXCameraBufferTypes neededVFXBuffers = VFXManager.IsCameraBufferNeeded(hdCamera.camera); + + if ((neededVFXBuffers & VFXCameraBufferTypes.Color) != 0) + { + var colorBuffer = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); + VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Color, colorBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); + } + } + } +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader new file mode 100644 index 00000000000..09246ce23c3 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader @@ -0,0 +1,143 @@ +Shader "Hidden/HDRP/MotionVecResolve" +{ + HLSLINCLUDE + #pragma target 4.5 + #pragma only_renderers d3d11 playstation xboxone vulkan metal switch + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" + // #pragma enable_d3d11_debug_symbols + + // Target multisampling textures + TEXTURE2D_X_MSAA(float2, _MotionVectorTextureMS); + + struct Attributes + { + uint vertexID : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 texcoord : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct FragOut + { + float2 motionVectors : SV_Target0; + }; + + Varyings Vert(Attributes input) + { + Varyings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); + output.texcoord = GetFullScreenTriangleTexCoord(input.vertexID) * _ScreenSize.xy; + return output; + } + + FragOut Frag1X(Varyings input) + { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + FragOut fragO; + int2 pixelCoords = int2(input.texcoord); + fragO.motionVectors = LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, 0); + return fragO; + } + + FragOut Frag2X(Varyings input) + { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + FragOut fragO; + int2 pixelCoords = int2(input.texcoord); + float2 outMotionVec = 0; + for(int sampleIdx = 0; sampleIdx < 2; ++sampleIdx) + { + outMotionVec += LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, sampleIdx); + } + fragO.motionVectors = outMotionVec * 0.5f; + return fragO; + } + + FragOut Frag4X(Varyings input) + { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + FragOut fragO; + int2 pixelCoords = int2(input.texcoord); + float2 outMotionVec = 0; + for(int sampleIdx = 0; sampleIdx < 4; ++sampleIdx) + { + outMotionVec += LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, sampleIdx); + } + fragO.motionVectors = outMotionVec * 0.25f; + + return fragO; + } + + FragOut Frag8X(Varyings input) + { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + FragOut fragO; + int2 pixelCoords = int2(input.texcoord); + float2 outMotionVec = 0; + for(int sampleIdx = 0; sampleIdx < 8; ++sampleIdx) + { + outMotionVec += LOAD_TEXTURE2D_X_MSAA(_MotionVectorTextureMS, pixelCoords, sampleIdx); + } + fragO.motionVectors = outMotionVec * 0.125f; + return fragO; + } + ENDHLSL + SubShader + { + Tags{ "RenderPipeline" = "HDRenderPipeline" } + + // 0: MSAA 1x + Pass + { + ZWrite On ZTest Always Blend Off Cull Off + + HLSLPROGRAM + #pragma vertex Vert + #pragma fragment Frag1X + ENDHLSL + } + + // 1: MSAA 2x + Pass + { + ZWrite On ZTest Always Blend Off Cull Off + + HLSLPROGRAM + #pragma vertex Vert + #pragma fragment Frag2X + ENDHLSL + } + + // 2: MSAA 4X + Pass + { + ZWrite On ZTest Always Blend Off Cull Off + + HLSLPROGRAM + #pragma vertex Vert + #pragma fragment Frag4X + ENDHLSL + } + + // 3: MSAA 8X + Pass + { + ZWrite On ZTest Always Blend Off Cull Off + + HLSLPROGRAM + #pragma vertex Vert + #pragma fragment Frag8X + ENDHLSL + } + } + Fallback Off +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader.meta b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader.meta new file mode 100644 index 00000000000..b65eb06c832 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ea18ca9826385e943979c46cf98968cc +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs index 0f410a2d5df..60fd31b8e5a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPipelineResources.cs @@ -188,6 +188,8 @@ public sealed class ShaderResources public Shader depthValuesPS; [Reload("Runtime/RenderPipeline/RenderPass/MSAA/ColorResolve.shader")] public Shader colorResolvePS; + [Reload("Runtime/RenderPipeline/RenderPass/MSAA/MotionVecResolve.shader")] + public Shader resolveMotionVecPS; // Post-processing [Reload("Runtime/PostProcessing/Shaders/AlphaCopy.compute")] From 6f5ade638dc9932eb550d9d0b1916d8a905cc61a Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Thu, 14 May 2020 15:00:33 +0200 Subject: [PATCH 156/200] =?UTF-8?q?Makes=20sure=20quaternion=20is=20normal?= =?UTF-8?q?ized=20and=20valid=20before=20converting=20to=20ma=E2=80=A6=20#?= =?UTF-8?q?331?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 689bf5f5db7..79c1104b708 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the valid TRS test failing due to variable not being initialized to the identity matrix in RTShadows (1220600). - Fixed cookie texture not updated when changing an import settings (srgb for example). - Fixed transparent motion vectors not working when in MSAA. +- Fixed an invalid rotation in Planar Reflection Probe editor display, that was causing an error message (case 1182022) ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs index cbece4f9ae9..4a37f1c8492 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs @@ -273,7 +273,7 @@ static void DrawCapturePositionGizmo(PlanarReflectionProbe probe) var mirrorPositionProxySpace = settings.proxySettings.mirrorPositionProxySpace + Vector3.up * 0.001f; var mirrorPosition = proxyToWorld.MultiplyPoint(mirrorPositionProxySpace); - var mirrorRotation = proxyToWorld.rotation * settings.proxySettings.mirrorRotationProxySpace * Quaternion.Euler(0, 180, 0); + var mirrorRotation = (proxyToWorld.rotation * settings.proxySettings.mirrorRotationProxySpace * Quaternion.Euler(0, 180, 0)).normalized; var renderData = probe.renderData; var gpuProj = GL.GetGPUProjectionMatrix(renderData.projectionMatrix, true); From fa17711459fbb6b95c0fafdf6ca7c541427b668f Mon Sep 17 00:00:00 2001 From: TomasKiniulis <50582134+TomasKiniulis@users.noreply.github.com> Date: Fri, 22 May 2020 15:41:02 +0300 Subject: [PATCH 157/200] Enable "MSAA Within Forward" Camera Frame Setting by default when new Render Pipeline asset is created #348 --- .../CHANGELOG.md | 1 + .../RenderPipeline/Settings/FrameSettings.cs | 1 + .../Settings/HDRenderPipelineAsset.asset | 53 ++++++++++++++----- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 79c1104b708..0d5601bd0f4 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Made the StaticLightingSky class public so that users can change it by script for baking purpose. - Changed default exposure compensation to 0. - Improved performance of reflection probe management when using a lot of probes. +- MSAA Within Forward Frame Setting is now enabled by default on Cameras when new Render Pipeline Asset is created ## [8.1.0] - 2020-04-21 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 b0757bcbf66..3c1d84f7ea6 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 @@ -395,6 +395,7 @@ partial struct FrameSettings (uint)FrameSettingsField.SkyReflection, (uint)FrameSettingsField.DirectSpecularLighting, (uint)FrameSettingsField.RayTracing, + (uint)FrameSettingsField.MSAA }), lodBias = 1, }; diff --git a/com.unity.template-hd/Assets/Settings/HDRenderPipelineAsset.asset b/com.unity.template-hd/Assets/Settings/HDRenderPipelineAsset.asset index c69fe0f3ba7..d317e4963cc 100644 --- a/com.unity.template-hd/Assets/Settings/HDRenderPipelineAsset.asset +++ b/com.unity.template-hd/Assets/Settings/HDRenderPipelineAsset.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3} m_Name: HDRenderPipelineAsset m_EditorClassIdentifier: - m_Version: 11 + m_Version: 15 m_ObsoleteFrameSettings: overrides: 0 enableShadow: 0 @@ -153,21 +153,25 @@ MonoBehaviour: m_RenderPipelineRayTracingResources: {fileID: 0} m_DefaultVolumeProfile: {fileID: 11400000, guid: 582adbd84082fdb4faf7cd4beb1ccd14, type: 2} - m_DefaultLookDevProfile: {fileID: 0} + m_DefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, + type: 2} m_RenderingPathDefaultCameraFrameSettings: bitDatas: - data1: 70297877217117 - data2: 4539628424926265344 + data1: 140668768878429 + data2: 4539628425463136256 lodBias: 1 lodBiasMode: 0 lodBiasQualityLevel: 0 maximumLODLevel: 0 maximumLODLevelMode: 0 maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 materialQuality: 0 m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings: bitDatas: - data1: 69373911135005 + data1: 139742655312669 data2: 4539628424389459968 lodBias: 1 lodBiasMode: 0 @@ -175,10 +179,13 @@ MonoBehaviour: maximumLODLevel: 0 maximumLODLevelMode: 0 maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 materialQuality: 0 m_RenderingPathDefaultRealtimeReflectionFrameSettings: bitDatas: - data1: 69622750778125 + data1: 139991494955789 data2: 4539628424389459968 lodBias: 1 lodBiasMode: 0 @@ -186,15 +193,21 @@ MonoBehaviour: maximumLODLevel: 0 maximumLODLevelMode: 0 maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 materialQuality: 0 m_RenderPipelineSettings: supportShadowMask: 1 supportSSR: 0 + supportSSRTransparent: 0 supportSSAO: 1 supportSubsurfaceScattering: 1 - increaseSssSampleCount: 0 + sssSampleBudget: + m_Values: 140000002800000050000000 + m_SchemaId: + m_Id: With3Levels supportVolumetrics: 1 - increaseResolutionOfVolumetrics: 0 supportLightLayers: 0 lightLayerName0: Light Layer default lightLayerName1: Light Layer 1 @@ -218,15 +231,23 @@ MonoBehaviour: supportRuntimeDebugDisplay: 1 supportDitheringCrossFade: 1 supportTerrainHole: 0 + supportProbeVolume: 0 supportRayTracing: 0 - supportedRaytracingTier: 2 + supportedRayTracingMode: 3 + probeVolumeSettings: + atlasWidth: 128 + atlasHeight: 128 + atlasDepth: 512 + atlasOctahedralDepthWidth: 2048 + atlasOctahedralDepthHeight: 2048 lightLoopSettings: - cookieSize: 128 - cookieTexArraySize: 16 + cookieAtlasSize: 512 + cookieFormat: 74 pointCookieSize: 128 cubeCookieTexArraySize: 16 - planarReflectionProbeCacheSize: 2 - planarReflectionTextureSize: 1024 + cookieAtlasLastValidMip: 0 + cookieTexArraySize: 16 + planarReflectionAtlasSize: 4096 reflectionProbeCacheSize: 64 reflectionCubemapSize: 256 reflectionCacheCompressed: 0 @@ -241,6 +262,7 @@ MonoBehaviour: maxAreaLightsOnScreen: 64 maxEnvLightsOnScreen: 64 maxDecalsOnScreen: 512 + maxPlanarReflectionOnScreen: 16 hdShadowInitParams: maxShadowRequests: 128 directionalShadowsDepthBits: 16 @@ -269,7 +291,8 @@ MonoBehaviour: maxPunctualShadowMapResolution: 2048 maxAreaShadowMapResolution: 2048 supportScreenSpaceShadows: 0 - maxScreenSpaceShadows: 2 + maxScreenSpaceShadowSlots: 4 + screenSpaceShadowBufferFormat: 48 decalSettings: drawDistance: 1000 atlasWidth: 4096 @@ -278,6 +301,7 @@ MonoBehaviour: postProcessSettings: m_LutSize: 32 lutFormat: 48 + bufferFormat: 74 dynamicResolutionSettings: enabled: 0 maxPercentage: 100 @@ -293,6 +317,7 @@ MonoBehaviour: xrSettings: singlePass: 1 occlusionMesh: 1 + cameraJitter: 0 postProcessQualitySettings: NearBlurSampleCount: 030000000500000008000000 NearBlurMaxRadius: From 4d365b79bad13edc8bbbf4d76fd9726cbe00e06a Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Mon, 4 May 2020 12:44:34 +0100 Subject: [PATCH 158/200] Updated forward and deferred rendering definitions (#350) * Update Forward-And-Deferred-Rendering.md * Update Forward-And-Deferred-Rendering.md --- .../Documentation~/Forward-And-Deferred-Rendering.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Forward-And-Deferred-Rendering.md b/com.unity.render-pipelines.high-definition/Documentation~/Forward-And-Deferred-Rendering.md index 3ac208d453b..17daafbdd19 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Forward-And-Deferred-Rendering.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Forward-And-Deferred-Rendering.md @@ -15,8 +15,8 @@ You can choose between three rendering modes: | **Lit Shader Mode** | **Description** | | ------------------- | ------------------------------------------------------------ | -| **Forward** | HDRP calculates the lighting in a single pass when rendering each individual Material. | -| **Deferred** | HDRP renders all GameObjects into a GBuffer that stores the Material properties that are visible on the screen. HDRP then processes the lighting for every GameObject in the Scene. | +| **Forward** | HDRP calculates the lighting in a single pass when rendering each individual GameObject. | +| **Deferred** | HDRP renders the Material properties of every GameObject visible on screen into a GBuffer. HDRP then processes the lighting for every pixel in the frame. | | **Both** | Use the [Frame Settings](Frame-Settings.html) to change between **Forward** and **Deferred** rendering mode on a per Camera and Reflection Probe basis at runtime. Selecting this increases Project [build time](#BuildTime). | If you select **Both**, you can set a rendering mode for all Cameras to use by default, and also override this default rendering mode at runtime for a specific Camera. For example, you can use Forward mode for a Planar Reflection Probe and then render your main Camera using Deferred mode. From e9e4df1b09eba71bc394b62a83d7af5b53ba0b8b Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 14 May 2020 14:01:26 +0100 Subject: [PATCH 159/200] Update Light-Component.md (#357) --- .../Documentation~/Light-Component.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md index ea857ebb349..cc7d7669fea 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md @@ -55,7 +55,7 @@ To make the Light work with the **Animation window**, when you click on the **Ad | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | | **Type** | Defines the Light’s type. Lights of different Types behave differently, so when you change the **Type**, the properties change in the Inspector. Possible types are:
• Directional
• Point
• Spot
• Area | -| **Mode** | Specify the [Light Mode](https://docs.unity3d.com/Manual/LightModes.html) that HDRP uses to determine how to bake a Light, if at all. Possible modes are:
• [Realtime](https://docs.unity3d.com/Manual/LightMode-Realtime.html)
• [Mixed](https://docs.unity3d.com/Manual/LightMode-Mixed.html)
• [Baked](https://docs.unity3d.com/Manual/LightMode-Baked.html) | +| **Mode** | Specify the [Light Mode](https://docs.unity3d.com/Manual/LightModes.html) that HDRP uses to determine how to bake a Light, if at all. Possible modes are:
• [Realtime](https://docs.unity3d.com/Manual/LightMode-Realtime.html): Unity performs the lighting calculations for Realtime Lights at runtime, once per frame.
• [Mixed](https://docs.unity3d.com/Manual/LightMode-Mixed.html): Mixed Lights combine elements of both realtime and baked lighting.
• [Baked](https://docs.unity3d.com/Manual/LightMode-Baked.html): Unity performs lighting calculations for Baked Lights in the Unity Editor, and saves the results to disk as lighting data. Note that soft falloff/range attenuation is not supported for Baked Area Lights. | | **Light Layer** | A mask that allows you to choose which Light Layers this Light affects. The affected Light only lights up Mesh Renderers with a matching **Rendering Layer Mask**.
This property only appears when you enable [more options](More-Options.html) for this section. | #### Light Types guide From 26f150319ba719ec33fc041fd9173f79ce1b0d94 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Tue, 12 May 2020 01:33:32 +0200 Subject: [PATCH 160/200] Hd/add layer modification on generated emissive mesh for area light #364 --- .../CHANGELOG.md | 1 + .../Editor/Lighting/HDLightUI.Skin.cs | 2 + .../Editor/Lighting/HDLightUI.cs | 66 ++++++++++--- .../Editor/Lighting/SerializedHDLight.cs | 73 ++++++++++++-- .../Lighting/Light/HDAdditionalLightData.cs | 94 ++++++++++++++++++- 5 files changed, 211 insertions(+), 25 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 0d5601bd0f4..1a78cc414ad 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Added a function (HDRenderPipeline.ResetRTHandleReferenceSize) to reset the reference size of RTHandle systems. - Added support for AxF measurements importing into texture resources tilings. +- Added Layer parameter on Area Light to modify Layer of generated Emissive Mesh ### Fixed - Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs index 19986edf466..2dcef35355b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Skin.cs @@ -81,6 +81,8 @@ sealed class Styles public readonly GUIContent displayAreaLightEmissiveMesh = new GUIContent("Display Emissive Mesh", "Generate an emissive mesh using the size, Color and Intensity of the Area Light."); public readonly GUIContent areaLightEmissiveMeshCastShadow = new GUIContent("Cast Shadows", "Specify wether the generated geometry create shadow or not when a shadow casting Light shines on it"); public readonly GUIContent areaLightEmissiveMeshMotionVector = new GUIContent("Motion Vectors", "Specify wether the generated Mesh renders 'Per Object Motion', 'Camera Motion' or 'No Motion' vectors to the Camera Motion Vector Texture."); + public readonly GUIContent areaLightEmissiveMeshSameLayer = new GUIContent("Same Layer", "If checked, use the same Layer than the Light one."); + public readonly GUIContent areaLightEmissiveMeshCustomLayer = new GUIContent("Custom Layer", "Specify on which layer the generated Mesh live."); public readonly GUIContent lightLayer = new GUIContent("Light Layer", "Specifies the current Light Layers that the Light affects. This Light illuminates corresponding Renderers with the same Light Layer flags."); public readonly GUIContent interactsWithSky = new GUIContent("Affect Physically Based Sky", "Check this option to make the light and the Physically Based sky affect one another."); diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index 32d8f3a3816..fa6611e0f33 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -104,17 +104,6 @@ static HDLightUI() CED.FoldoutGroup(s_Styles.shapeHeader, Expandable.Shape, k_ExpandedState, DrawShapeContent), CED.Conditional((serialized, owner) => serialized.type == HDLightType.Directional && !serialized.settings.isCompletelyBaked, CED.FoldoutGroup(s_Styles.celestialBodyHeader, Expandable.CelestialBody, k_ExpandedState, DrawCelestialBodyContent)), - //CED.TernaryConditional((serialized, owner) => serialized.type == HDLightType.Directional && !serialized.settings.isCompletelyBaked, - // CED.AdvancedFoldoutGroup(s_Styles.shapeHeader, Expandable.Shape, k_ExpandedState, - // (serialized, owner) => GetAdvanced(AdvancedMode.Shape, serialized, owner), - // (serialized, owner) => SwitchAdvanced(AdvancedMode.Shape, serialized, owner), - // DrawShapeContent, - // DrawShapeAdvancedContent - // ), - // CED.FoldoutGroup(s_Styles.shapeHeader, Expandable.Shape, k_ExpandedState, - // DrawShapeContent - // ) - //), CED.AdvancedFoldoutGroup(s_Styles.emissionHeader, Expandable.Emission, k_ExpandedState, (serialized, owner) => GetAdvanced(AdvancedMode.Emission, serialized, owner), (serialized, owner) => SwitchAdvanced(AdvancedMode.Emission, serialized, owner), @@ -821,6 +810,7 @@ static void DrawEmissionAdvancedContent(SerializedHDLight serialized, Editor own { serialized.UpdateAreaLightEmissiveMeshCastShadow(newCastShadow); } + EditorGUI.showMixedValue = false; lineRect = EditorGUILayout.GetControlRect(); SerializedHDLight.MotionVector newMotionVector; @@ -834,8 +824,62 @@ static void DrawEmissionAdvancedContent(SerializedHDLight serialized, Editor own { serialized.UpdateAreaLightEmissiveMeshMotionVectorGeneration(newMotionVector); } + EditorGUI.showMixedValue = false; + EditorGUI.showMixedValue = serialized.areaLightEmissiveMeshLayer.hasMultipleDifferentValues || serialized.lightLayer.hasMultipleDifferentValues; + EditorGUI.BeginChangeCheck(); + bool toggle; + using (new SerializedHDLight.AreaLightEmissiveMeshDrawScope(lineRect, s_Styles.areaLightEmissiveMeshSameLayer, showSubArea, serialized.areaLightEmissiveMeshLayer, serialized.deportedAreaLightEmissiveMeshLayer)) + { + toggle = EditorGUILayout.Toggle(s_Styles.areaLightEmissiveMeshSameLayer, serialized.areaLightEmissiveMeshLayer.intValue == -1); + } + if (EditorGUI.EndChangeCheck()) + { + serialized.UpdateAreaLightEmissiveMeshLayer(serialized.lightLayer.intValue); + if (toggle) + serialized.areaLightEmissiveMeshLayer.intValue = -1; + } EditorGUI.showMixedValue = false; + + ++EditorGUI.indentLevel; + if (toggle || serialized.areaLightEmissiveMeshLayer.hasMultipleDifferentValues) + { + using (new EditorGUI.DisabledScope(true)) + { + lineRect = EditorGUILayout.GetControlRect(); + EditorGUI.showMixedValue = serialized.areaLightEmissiveMeshLayer.hasMultipleDifferentValues || serialized.lightLayer.hasMultipleDifferentValues; + EditorGUI.LayerField(lineRect, s_Styles.areaLightEmissiveMeshCustomLayer, serialized.lightLayer.intValue); + EditorGUI.showMixedValue = false; + } + } + else + { + EditorGUI.showMixedValue = serialized.areaLightEmissiveMeshLayer.hasMultipleDifferentValues; + lineRect = EditorGUILayout.GetControlRect(); + int layer; + EditorGUI.BeginChangeCheck(); + using (new SerializedHDLight.AreaLightEmissiveMeshDrawScope(lineRect, s_Styles.areaLightEmissiveMeshCustomLayer, showSubArea, serialized.areaLightEmissiveMeshLayer, serialized.deportedAreaLightEmissiveMeshLayer)) + { + layer = EditorGUI.LayerField(lineRect, s_Styles.areaLightEmissiveMeshCustomLayer, serialized.areaLightEmissiveMeshLayer.intValue); + } + if (EditorGUI.EndChangeCheck()) + { + serialized.UpdateAreaLightEmissiveMeshLayer(layer); + } + // or if the value of layer got changed using the layer change including child mechanism (strangely apply even if object not editable), + // discard the change: the child is not saved anyway so the value in HDAdditionalLightData is the only serialized one. + else if (!EditorGUI.showMixedValue + && serialized.deportedAreaLightEmissiveMeshLayer != null + && !serialized.deportedAreaLightEmissiveMeshLayer.Equals(null) + && serialized.areaLightEmissiveMeshLayer.intValue != serialized.deportedAreaLightEmissiveMeshLayer.intValue) + { + GUI.changed = true; //force register change to handle update and apply later + serialized.UpdateAreaLightEmissiveMeshLayer(layer); + } + EditorGUI.showMixedValue = false; + } + --EditorGUI.indentLevel; + --EditorGUI.indentLevel; } diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/SerializedHDLight.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/SerializedHDLight.cs index d4c5aef2d36..b9cfcea5681 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/SerializedHDLight.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/SerializedHDLight.cs @@ -32,6 +32,8 @@ internal class SerializedHDLight public SerializedProperty deportedAreaLightEmissiveMeshCastShadow; public SerializedProperty areaLightEmissiveMeshMotionVector; public SerializedProperty deportedAreaLightEmissiveMeshMotionVector; + public SerializedProperty areaLightEmissiveMeshLayer; + public SerializedProperty deportedAreaLightEmissiveMeshLayer; public SerializedProperty renderingLayerMask; public SerializedProperty shadowNearPlane; public SerializedProperty blockerSampleCount; @@ -97,12 +99,15 @@ internal class SerializedHDLight private SerializedProperty pointLightHDType; private SerializedProperty areaLightShapeProperty; - private IEnumerable emissiveMeshes; + private GameObject[] emissiveMeshes; public bool needUpdateAreaLightEmissiveMeshComponents = false; public SerializedObject serializedObject; + public SerializedProperty lightLayer; + private SerializedObject lightGameObject; + //contain serialized property that are mainly used to draw inspector public LightEditor.Settings settings; @@ -226,25 +231,50 @@ void System.IDisposable.Dispose() } } + struct AreaLightEmissiveMeshObjectEditionScope : System.IDisposable + { + SerializedHDLight m_Serialized; + public AreaLightEmissiveMeshObjectEditionScope(SerializedHDLight serialized) + { + m_Serialized = serialized; + foreach (GameObject emissiveMesh in m_Serialized.emissiveMeshes) + { + emissiveMesh.hideFlags &= ~HideFlags.NotEditable; + } + m_Serialized.areaLightEmissiveMeshLayer.serializedObject.Update(); + } + + void System.IDisposable.Dispose() + { + m_Serialized.areaLightEmissiveMeshLayer.serializedObject.ApplyModifiedProperties(); + foreach (GameObject emissiveMesh in m_Serialized.emissiveMeshes) + { + emissiveMesh.hideFlags |= HideFlags.NotEditable; + } + m_Serialized.areaLightEmissiveMeshLayer.serializedObject.Update(); + } + } + public struct AreaLightEmissiveMeshDrawScope : System.IDisposable { - int propertyCount; - bool oldEnableState; + SerializedProperty[] m_Properties; + bool m_OldEnableState; public AreaLightEmissiveMeshDrawScope(Rect rect, GUIContent label, bool enabler, params SerializedProperty[] properties) { - propertyCount = properties.Count(p => p != null); - foreach (var property in properties) + m_Properties = properties; + foreach (var property in m_Properties) if (property != null) EditorGUI.BeginProperty(rect, label, property); - oldEnableState = GUI.enabled; + m_OldEnableState = GUI.enabled; GUI.enabled = enabler; } void System.IDisposable.Dispose() { - GUI.enabled = oldEnableState; - for (int i = 0; i < propertyCount; ++i) - EditorGUI.EndProperty(); + GUI.enabled = m_OldEnableState; + foreach (var property in m_Properties) + if (property != null) + EditorGUI.EndProperty(); } } @@ -276,6 +306,16 @@ public void UpdateAreaLightEmissiveMeshMotionVectorGeneration(MotionVector motio } } + public void UpdateAreaLightEmissiveMeshLayer(int layer) + { + using (new AreaLightEmissiveMeshObjectEditionScope(this)) + { + areaLightEmissiveMeshLayer.intValue = layer; + if (deportedAreaLightEmissiveMeshLayer != null) //only possible while editing from prefab + deportedAreaLightEmissiveMeshLayer.intValue = layer; + } + } + public SerializedHDLight(HDAdditionalLightData[] lightDatas, LightEditor.Settings settings) { serializedObject = new SerializedObject(lightDatas); @@ -372,9 +412,13 @@ public SerializedHDLight(HDAdditionalLightData[] lightDatas, LightEditor.Setting // emission mesh areaLightEmissiveMeshCastShadow = o.Find("m_AreaLightEmissiveMeshShadowCastingMode"); areaLightEmissiveMeshMotionVector = o.Find("m_AreaLightEmissiveMeshMotionVectorGenerationMode"); + areaLightEmissiveMeshLayer = o.Find("m_AreaLightEmissiveMeshLayer"); } RefreshEmissiveMeshReference(); + + lightGameObject = new SerializedObject(serializedObject.targetObjects.Select(ld => ((HDAdditionalLightData)ld).gameObject).ToArray()); + lightLayer = lightGameObject.FindProperty("m_Layer"); } void RefreshEmissiveMeshReference() @@ -386,9 +430,11 @@ void RefreshEmissiveMeshReference() SerializedObject meshRendererSerializedObject = new SerializedObject(meshRenderers.ToArray()); deportedAreaLightEmissiveMeshCastShadow = meshRendererSerializedObject.FindProperty("m_CastShadows"); deportedAreaLightEmissiveMeshMotionVector = meshRendererSerializedObject.FindProperty("m_MotionVectors"); + SerializedObject gameObjectSerializedObject = new SerializedObject(emissiveMeshes); + deportedAreaLightEmissiveMeshLayer = gameObjectSerializedObject.FindProperty("m_Layer"); } else - deportedAreaLightEmissiveMeshCastShadow = deportedAreaLightEmissiveMeshMotionVector = null; + deportedAreaLightEmissiveMeshCastShadow = deportedAreaLightEmissiveMeshMotionVector = deportedAreaLightEmissiveMeshLayer = null; } public void FetchAreaLightEmissiveMeshComponents() @@ -416,6 +462,10 @@ public void Update() serializedObject.Update(); settings.Update(); + + lightGameObject.Update(); + deportedAreaLightEmissiveMeshMotionVector?.serializedObject.Update(); + deportedAreaLightEmissiveMeshLayer?.serializedObject.Update(); } void ApplyInternal(bool withDeportedEmissiveMeshData) @@ -423,7 +473,10 @@ void ApplyInternal(bool withDeportedEmissiveMeshData) serializedObject.ApplyModifiedProperties(); settings.ApplyModifiedProperties(); if (withDeportedEmissiveMeshData) + { deportedAreaLightEmissiveMeshMotionVector?.serializedObject.ApplyModifiedProperties(); + deportedAreaLightEmissiveMeshLayer?.serializedObject.ApplyModifiedProperties(); + } } public void Apply() => ApplyInternal(withDeportedEmissiveMeshData: true); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index b9b8ffe8124..2a13aecb773 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -511,7 +511,7 @@ public bool applyRangeAttenuation /// /// If enabled, display an emissive mesh rect synchronized with the intensity and color of the light. /// - internal bool displayAreaLightEmissiveMesh + public bool displayAreaLightEmissiveMesh { get => m_DisplayAreaLightEmissiveMesh; set @@ -1465,9 +1465,53 @@ void CreateChildEmissiveMeshViewerIfNeeded() if (PrefabUtility.IsPartOfPrefabAsset(this)) return; #endif + bool here = m_ChildEmissiveMeshViewer != null && !m_ChildEmissiveMeshViewer.Equals(null); - //if not here, create it - if (m_ChildEmissiveMeshViewer == null || m_ChildEmissiveMeshViewer.Equals(null)) +#if UNITY_EDITOR + //if not parented anymore, destroy it + if (here && m_ChildEmissiveMeshViewer.transform.parent != transform) + { + if (Application.isPlaying) + Destroy(m_ChildEmissiveMeshViewer); + else + DestroyImmediate(m_ChildEmissiveMeshViewer); + m_ChildEmissiveMeshViewer = null; + m_EmissiveMeshFilter = null; + here = false; + } +#endif + + //if not here, try to find it first + if (!here) + { + foreach (Transform child in transform) + { + var test = child.GetComponents(typeof(Component)); + if (child.name == k_EmissiveMeshViewerName + && child.hideFlags == (HideFlags.NotEditable | HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor) + && child.GetComponents(typeof(MeshFilter)).Length == 1 + && child.GetComponents(typeof(MeshRenderer)).Length == 1 + && child.GetComponents(typeof(Component)).Length == 3) // Transform + MeshFilter + MeshRenderer + { + m_ChildEmissiveMeshViewer = child.gameObject; + m_ChildEmissiveMeshViewer.transform.localPosition = Vector3.zero; + m_ChildEmissiveMeshViewer.transform.localRotation = Quaternion.identity; + m_ChildEmissiveMeshViewer.transform.localScale = Vector3.one; + m_ChildEmissiveMeshViewer.layer = areaLightEmissiveMeshLayer == -1 ? gameObject.layer : areaLightEmissiveMeshLayer; + + m_EmissiveMeshFilter = m_ChildEmissiveMeshViewer.GetComponent(); + emissiveMeshRenderer = m_ChildEmissiveMeshViewer.GetComponent(); + emissiveMeshRenderer.shadowCastingMode = m_AreaLightEmissiveMeshShadowCastingMode; + emissiveMeshRenderer.motionVectorGenerationMode = m_AreaLightEmissiveMeshMotionVectorGenerationMode; + + here = true; + break; + } + } + } + + //if still not here, create it + if (!here) { m_ChildEmissiveMeshViewer = new GameObject(k_EmissiveMeshViewerName, typeof(MeshFilter), typeof(MeshRenderer)); m_ChildEmissiveMeshViewer.hideFlags = HideFlags.NotEditable | HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor; @@ -1475,6 +1519,7 @@ void CreateChildEmissiveMeshViewerIfNeeded() m_ChildEmissiveMeshViewer.transform.localPosition = Vector3.zero; m_ChildEmissiveMeshViewer.transform.localRotation = Quaternion.identity; m_ChildEmissiveMeshViewer.transform.localScale = Vector3.one; + m_ChildEmissiveMeshViewer.layer = areaLightEmissiveMeshLayer == -1 ? gameObject.layer : areaLightEmissiveMeshLayer; m_EmissiveMeshFilter = m_ChildEmissiveMeshViewer.GetComponent(); emissiveMeshRenderer = m_ChildEmissiveMeshViewer.GetComponent(); @@ -1498,6 +1543,8 @@ void DestroyChildEmissiveMeshViewer() ShadowCastingMode m_AreaLightEmissiveMeshShadowCastingMode = ShadowCastingMode.Off; [SerializeField] MotionVectorGenerationMode m_AreaLightEmissiveMeshMotionVectorGenerationMode; + [SerializeField] + int m_AreaLightEmissiveMeshLayer = -1; //Special value that means we need to grab the one in the Light for initialization (for migration purpose) /// Change the Shadow Casting Mode of the generated emissive mesh for Area Light public ShadowCastingMode areaLightEmissiveMeshShadowCastingMode @@ -1532,7 +1579,24 @@ public MotionVectorGenerationMode areaLightEmissiveMeshMotionVectorGenerationMod } } } - + + /// Change the Layer of the generated emissive mesh for Area Light + public int areaLightEmissiveMeshLayer + { + get => m_AreaLightEmissiveMeshLayer; + set + { + if (m_AreaLightEmissiveMeshLayer == value) + return; + + m_AreaLightEmissiveMeshLayer = value; + if (emissiveMeshRenderer != null && !emissiveMeshRenderer.Equals(null)) + { + emissiveMeshRenderer.gameObject.layer = m_AreaLightEmissiveMeshLayer; + } + } + } + private void DisableCachedShadowSlot() { if (WillRenderShadowMap() && !ShadowIsUpdatedEveryFrame()) @@ -2087,6 +2151,28 @@ void LateUpdate() return; #endif +#if UNITY_EDITOR + //if not parented anymore, refresh it + if (m_ChildEmissiveMeshViewer != null && !m_ChildEmissiveMeshViewer.Equals(null)) + { + if (m_ChildEmissiveMeshViewer.transform.parent != transform) + { + CreateChildEmissiveMeshViewerIfNeeded(); + UpdateAreaLightEmissiveMesh(); + } + if (m_ChildEmissiveMeshViewer.gameObject.isStatic != gameObject.isStatic) + m_ChildEmissiveMeshViewer.gameObject.isStatic = gameObject.isStatic; + if (GameObjectUtility.GetStaticEditorFlags(m_ChildEmissiveMeshViewer.gameObject) != GameObjectUtility.GetStaticEditorFlags(gameObject)) + GameObjectUtility.SetStaticEditorFlags(m_ChildEmissiveMeshViewer.gameObject, GameObjectUtility.GetStaticEditorFlags(gameObject)); + } +#endif + + //auto change layer on emissive mesh + if (areaLightEmissiveMeshLayer == -1 + && m_ChildEmissiveMeshViewer != null && !m_ChildEmissiveMeshViewer.Equals(null) + && m_ChildEmissiveMeshViewer.gameObject.layer != gameObject.layer) + m_ChildEmissiveMeshViewer.gameObject.layer = gameObject.layer; + // Delayed cleanup when removing emissive mesh from timeline if (needRefreshEmissiveMeshesFromTimeLineUpdate) { From 0c91c39a7336649401f435a87ed4b94d6eca560d Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 14 May 2020 14:01:44 +0100 Subject: [PATCH 161/200] Update Look-Dev-Environment-Library.md (#365) --- .../Documentation~/Look-Dev-Environment-Library.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev-Environment-Library.md b/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev-Environment-Library.md index 0bc2862a183..c1be65fb941 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev-Environment-Library.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev-Environment-Library.md @@ -47,6 +47,7 @@ To add, remove, or duplicate environments, use the toolbar at the bottom of the ## Importing an HDRI Texture -To import an HDRI Texture into the Unity Editor, load an **.hdr** or **.exr** file into your Unity Project like you would any other image. In the Texture Importer Inspector window, set **Texture Type** to **Default**, set **Texture Shape** to **Cube**, and set **Convolution Type** to **Specular (Glossy Reflection)**. +To import an HDRI Texture into the Unity Editor, load an **.hdr** or **.exr** file into your Unity Project like you would any other image. In the Texture Importer Inspector window, set **Texture Type** to **Default**, set **Texture Shape** to **Cube**, and set **Convolution Type** to **None**. + +When you want to test an HDRI Texture Asset or a skybox cube map Material, drag and drop it into the Look Dev view. -When you want to test an HDRI Texture Asset or a skybox cube map Material, drag and drop it into the Look Dev view. \ No newline at end of file From 14c54a6dbff9d2a1b95493e07b60b936d0c9ed14 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Mon, 11 May 2020 11:35:01 +0100 Subject: [PATCH 162/200] Update Volumetric-Lighting.md (#402) Fixes https://fogbugz.unity3d.com/f/cases/1238592 --- .../Documentation~/Volumetric-Lighting.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md b/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md index 50c128176e8..bdf941ed394 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md @@ -1,6 +1,6 @@ # Volumetric Lighting -The High Definition Render Pipeline (HDRP) includes a volumetric lighting system that renders Volumetric Fog. HDRP also implements a unified lighting system, which means that all Scene components (such as Lights, as well as opaque and transparent GameObjects) interact with the fog in order to make it volumetric. +The High Definition Render Pipeline (HDRP) includes a volumetric lighting system that renders Volumetric Fog. HDRP also implements a unified lighting system, which means that all Scene components (such as [Lights](Light-Component.md), as well as opaque and transparent GameObjects) interact with the fog to make it volumetric. ## Enabling Volumetric Lighting @@ -12,3 +12,6 @@ To toggle and customize Volumetric Lighting in an [HDRP Asset](HDRP-Asset.html): 3. In the **Default Frame Settings** section, under the **Lighting** subsection, make sure you enable **Fog** and **Volumetric** if they are not already. ![](Images/VolumetricLighting2.png) 4. If you want to enable reprojection support, check **Reprojection**. This option improves the lighting quality in the Scene by taking previous frames into account when calculating the lighting for the current frame. Currently, this option is not compatible with dynamic lights, so you may encounter ghosting artifacts behind moving Lights. Additionally, using high values for **Global Anisotropy** in the [Fog](Override-Fog.html) Volume override may cause flickering Shadows. + +## Notes +Volumetric fog does not work for Cameras that use oblique projection matrices. If you want a Camera to render volumetric fog, do not assign an off-axis projection to it. \ No newline at end of file From 081c342e54abf9516d13668978da8fcd76b43485 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Wed, 13 May 2020 15:41:13 +0200 Subject: [PATCH 163/200] Hd/fix targets used in ongui in decalcomponent #413 --- .../CHANGELOG.md | 1 + .../Material/Decal/DecalProjectorEditor.cs | 73 +++++++++++-------- .../Runtime/Material/Decal/DecalProjector.cs | 9 ++- 3 files changed, 52 insertions(+), 31 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 1a78cc414ad..ad113ffc6fc 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed cookie texture not updated when changing an import settings (srgb for example). - Fixed transparent motion vectors not working when in MSAA. - Fixed an invalid rotation in Planar Reflection Probe editor display, that was causing an error message (case 1182022) +- Fix conflicts with Handles manipulation when performing a Reset in DecalComponent (case 1238833) ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs index 28842b8128a..2d3e741f9e6 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs @@ -109,7 +109,7 @@ private void OnEnable() UpdateMaterialEditor(); foreach (var decalProjector in targets) { - (decalProjector as DecalProjector).OnMaterialChange += UpdateMaterialEditor; + (decalProjector as DecalProjector).OnMaterialChange += RequireUpdateMaterialEditor; } // Fetch serialized properties @@ -125,9 +125,10 @@ private void OnEnable() private void OnDisable() { - foreach (var decalProjector in targets) + foreach (DecalProjector decalProjector in targets) { - (decalProjector as DecalProjector).OnMaterialChange -= UpdateMaterialEditor; + if (decalProjector != null) + decalProjector.OnMaterialChange -= RequireUpdateMaterialEditor; } s_Owner = null; } @@ -147,6 +148,10 @@ public Bounds OnGetFrameBounds() return new Bounds(decalProjector.transform.position, handle.size); } + private bool m_RequireUpdateMaterialEditor = false; + + private void RequireUpdateMaterialEditor() => m_RequireUpdateMaterialEditor = true; + public void UpdateMaterialEditor() { int validMaterialsCount = 0; @@ -317,41 +322,49 @@ Bounds GetBoundsGetter() public override void OnInspectorGUI() { - EditorGUI.BeginChangeCheck(); + serializedObject.Update(); - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - DoInspectorToolbar(k_EditVolumeModes, editVolumeLabels, GetBoundsGetter, this); + if (m_RequireUpdateMaterialEditor) + { + UpdateMaterialEditor(); + m_RequireUpdateMaterialEditor = false; + } - //[TODO: add editable pivot. Uncomment this when ready] - //DoInspectorToolbar(k_EditPivotModes, editPivotLabels, GetBoundsGetter, this); - GUILayout.FlexibleSpace(); - EditorGUILayout.EndHorizontal(); + EditorGUI.BeginChangeCheck(); + { + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + DoInspectorToolbar(k_EditVolumeModes, editVolumeLabels, GetBoundsGetter, this); - EditorGUILayout.Space(); + //[TODO: add editable pivot. Uncomment this when ready] + //DoInspectorToolbar(k_EditPivotModes, editPivotLabels, GetBoundsGetter, this); + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); - EditorGUILayout.PropertyField(m_Size, k_SizeContent); - EditorGUILayout.PropertyField(m_MaterialProperty, k_MaterialContent); + EditorGUILayout.Space(); - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_DrawDistanceProperty, k_DistanceContent); - if (EditorGUI.EndChangeCheck() && m_DrawDistanceProperty.floatValue < 0f) - m_DrawDistanceProperty.floatValue = 0f; + EditorGUILayout.PropertyField(m_Size, k_SizeContent); + EditorGUILayout.PropertyField(m_MaterialProperty, k_MaterialContent); - EditorGUILayout.PropertyField(m_FadeScaleProperty, k_FadeScaleContent); - EditorGUILayout.PropertyField(m_UVScaleProperty, k_UVScaleContent); - EditorGUILayout.PropertyField(m_UVBiasProperty, k_UVBiasContent); - EditorGUILayout.PropertyField(m_FadeFactor, k_FadeFactorContent); + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_DrawDistanceProperty, k_DistanceContent); + if (EditorGUI.EndChangeCheck() && m_DrawDistanceProperty.floatValue < 0f) + m_DrawDistanceProperty.floatValue = 0f; - // only display the affects transparent property if material is HDRP/decal - if (showAffectTransparencyHaveMultipleDifferentValue) - { - using (new EditorGUI.DisabledScope(true)) - EditorGUILayout.LabelField(EditorGUIUtility.TrTextContent("Multiple material type in selection")); - } - else if (showAffectTransparency) - EditorGUILayout.PropertyField(m_AffectsTransparencyProperty, k_AffectTransparentContent); + EditorGUILayout.PropertyField(m_FadeScaleProperty, k_FadeScaleContent); + EditorGUILayout.PropertyField(m_UVScaleProperty, k_UVScaleContent); + EditorGUILayout.PropertyField(m_UVBiasProperty, k_UVBiasContent); + EditorGUILayout.PropertyField(m_FadeFactor, k_FadeFactorContent); + // only display the affects transparent property if material is HDRP/decal + if (showAffectTransparencyHaveMultipleDifferentValue) + { + using (new EditorGUI.DisabledScope(true)) + EditorGUILayout.LabelField(EditorGUIUtility.TrTextContent("Multiple material type in selection")); + } + else if (showAffectTransparency) + EditorGUILayout.PropertyField(m_AffectsTransparencyProperty, k_AffectTransparentContent); + } if (EditorGUI.EndChangeCheck()) serializedObject.ApplyModifiedProperties(); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs index b27590314f4..3706ba9ff0e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProjector.cs @@ -212,7 +212,7 @@ internal DecalSystem.DecalHandle Handle } } - void OnEnable() + void InitMaterial() { if (m_Material == null) { @@ -223,6 +223,13 @@ void OnEnable() m_Material = null; #endif } + } + + void Reset() => InitMaterial(); + + void OnEnable() + { + InitMaterial(); if (m_Handle != null) { From bedd547f81a5b13c78a3137f17f6701da59b6e29 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Tue, 12 May 2020 17:51:25 +0200 Subject: [PATCH 164/200] Hd/fix nullref while removing decal component #416 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ad113ffc6fc..c7fa3011eba 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed transparent motion vectors not working when in MSAA. - Fixed an invalid rotation in Planar Reflection Probe editor display, that was causing an error message (case 1182022) - Fix conflicts with Handles manipulation when performing a Reset in DecalComponent (case 1238833) +- Fix error when removing DecalProjector from component contextual menu (case 1243960) ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings From e433ac2142c183d549b07d56951bf085e8c9489f Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Wed, 13 May 2020 16:52:00 +0200 Subject: [PATCH 165/200] Fix issue when switching back to custom sensor type in physical camera #417 --- .../CHANGELOG.md | 1 + .../Camera/HDCameraUI.Drawers.cs | 58 ++++++++++++++++--- 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index c7fa3011eba..06502636ca5 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an invalid rotation in Planar Reflection Probe editor display, that was causing an error message (case 1182022) - Fix conflicts with Handles manipulation when performing a Reset in DecalComponent (case 1238833) - Fix error when removing DecalProjector from component contextual menu (case 1243960) +- Fixed issue when switching back to custom sensor type in physical camera settings (case 1244350). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs index 56f220191ce..f90ab8abf7b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Drawers.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using System.Reflection; +using System.Runtime.CompilerServices; using UnityEngine; using UnityEngine.Rendering.HighDefinition; using UnityEngine.Rendering; @@ -62,6 +63,8 @@ enum ShutterSpeedUnit "Custom" }; + static readonly int k_CustomPresetIndex = k_ApertureFormatNames.Length - 1; + static readonly Vector2[] k_ApertureFormatValues = { new Vector2(4.8f, 3.5f), @@ -76,6 +79,10 @@ enum ShutterSpeedUnit new Vector2(70.41f, 52.63f) }; + // Saves the value of the sensor size when the user switches from "custom" size to a preset per camera. + // We use a ConditionalWeakTable instead of a Dictionary to avoid keeping alive (with strong references) deleted cameras + static ConditionalWeakTable s_PerCameraSensorSizeHistory = new ConditionalWeakTable(); + static bool s_FovChanged; static float s_FovLastValue; @@ -298,14 +305,51 @@ static void Drawer_PhysicalCamera(SerializedHDCamera p, Editor owner) using (new EditorGUI.IndentLevelScope()) { EditorGUI.BeginChangeCheck(); - int filmGateIndex = Array.IndexOf(k_ApertureFormatValues, new Vector2((float)Math.Round(cam.sensorSize.vector2Value.x, 3), (float)Math.Round(cam.sensorSize.vector2Value.y, 3))); - if (filmGateIndex == -1) - filmGateIndex = EditorGUILayout.Popup(cameraTypeContent, k_ApertureFormatNames.Length - 1, k_ApertureFormatNames); - else - filmGateIndex = EditorGUILayout.Popup(cameraTypeContent, filmGateIndex, k_ApertureFormatNames); - if (EditorGUI.EndChangeCheck() && filmGateIndex < k_ApertureFormatValues.Length) - cam.sensorSize.vector2Value = k_ApertureFormatValues[filmGateIndex]; + int oldFilmGateIndex = Array.IndexOf(k_ApertureFormatValues, new Vector2((float)Math.Round(cam.sensorSize.vector2Value.x, 3), (float)Math.Round(cam.sensorSize.vector2Value.y, 3))); + + // If it is not one of the preset sizes, set it to custom + oldFilmGateIndex = (oldFilmGateIndex == -1) ? k_CustomPresetIndex: oldFilmGateIndex; + + // Get the new user selection + int newFilmGateIndex = EditorGUILayout.Popup(cameraTypeContent, oldFilmGateIndex, k_ApertureFormatNames); + + if (EditorGUI.EndChangeCheck()) + { + // Retrieve the previous custom size value, if one exists for this camera + object previousCustomValue; + s_PerCameraSensorSizeHistory.TryGetValue((Camera)p.serializedObject.targetObject, out previousCustomValue); + + // When switching from custom to a preset, update the last custom value (to display again, in case the user switches back to custom) + if (oldFilmGateIndex == k_CustomPresetIndex) + { + if (previousCustomValue == null) + { + s_PerCameraSensorSizeHistory.Add((Camera)p.serializedObject.targetObject, cam.sensorSize.vector2Value); + } + else + { + previousCustomValue = cam.sensorSize.vector2Value; + } + } + + if (newFilmGateIndex < k_CustomPresetIndex) + { + cam.sensorSize.vector2Value = k_ApertureFormatValues[newFilmGateIndex]; + } + else + { + // The user switched back to custom, so display by deafulr the previous custom value + if (previousCustomValue != null) + { + cam.sensorSize.vector2Value = (Vector2)previousCustomValue; + } + else + { + cam.sensorSize.vector2Value = new Vector2(36.0f, 24.0f); // this is the value new cameras are created with + } + } + } EditorGUILayout.PropertyField(cam.sensorSize, sensorSizeContent); EditorGUILayout.PropertyField(p.iso, isoContent); From 6610ad2dcd7186b852743c757b1b78988b0ae878 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Tue, 19 May 2020 13:19:26 +0200 Subject: [PATCH 166/200] Fix custom pass prefabs #419 --- .../CHANGELOG.md | 1 + .../CustomPass/CustomPassDrawer.cs | 45 +++++++++------- .../CustomPass/CustomPassVolumeEditor.cs | 40 ++++++++++---- .../DrawRenderersCustomPassDrawer.cs | 54 +++++++++++-------- .../CustomPass/FullScreenCustomPassDrawer.cs | 18 ++++--- 5 files changed, 98 insertions(+), 60 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 06502636ca5..9b1789595c8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix conflicts with Handles manipulation when performing a Reset in DecalComponent (case 1238833) - Fix error when removing DecalProjector from component contextual menu (case 1243960) - Fixed issue when switching back to custom sensor type in physical camera settings (case 1244350). +- Fixed the prefab integration of custom passes (Prefab Override Highlight not working as expected). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs index f9fe32253d7..4921eb510ce 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs @@ -158,36 +158,33 @@ void DoCommonSettingsGUI(ref Rect rect) rect.y += Styles.defaultLineSpace; } -#if true if ((commonPassUIFlags & PassUIFlag.TargetColorBuffer) != 0) { - m_TargetColorBuffer.intValue = (int)(CustomPass.TargetBuffer)EditorGUI.EnumPopup(rect, Styles.targetColorBuffer, (CustomPass.TargetBuffer)m_TargetColorBuffer.intValue); + EditorGUI.BeginProperty(rect, Styles.targetColorBuffer, m_TargetColorBuffer); + // There is still a bug with SerializedReference and PropertyField so we can't use it yet + // EditorGUI.PropertyField(rect, m_TargetColorBuffer, Styles.targetColorBuffer); + m_TargetColorBuffer.intValue = (int)(CustomPass.TargetBuffer)EditorGUI.EnumPopup(rect, Styles.targetColorBuffer, (CustomPass.TargetBuffer)m_TargetColorBuffer.intValue); + EditorGUI.EndProperty(); rect.y += Styles.defaultLineSpace; } if ((commonPassUIFlags & PassUIFlag.TargetDepthBuffer) != 0) { - m_TargetDepthBuffer.intValue = (int)(CustomPass.TargetBuffer)EditorGUI.EnumPopup(rect, Styles.targetDepthBuffer, (CustomPass.TargetBuffer)m_TargetDepthBuffer.intValue); + EditorGUI.BeginProperty(rect, Styles.targetColorBuffer, m_TargetDepthBuffer); + // EditorGUI.PropertyField(rect, m_TargetDepthBuffer, Styles.targetDepthBuffer); + m_TargetDepthBuffer.intValue = (int)(CustomPass.TargetBuffer)EditorGUI.EnumPopup(rect, Styles.targetDepthBuffer, (CustomPass.TargetBuffer)m_TargetDepthBuffer.intValue); + EditorGUI.EndProperty(); rect.y += Styles.defaultLineSpace; } if ((commonPassUIFlags & PassUIFlag.ClearFlags) != 0) { - m_ClearFlags.intValue = (int)(ClearFlag)EditorGUI.EnumPopup(rect, Styles.clearFlags, (ClearFlag)m_ClearFlags.intValue); + EditorGUI.BeginProperty(rect, Styles.clearFlags, m_ClearFlags); + // EditorGUI.PropertyField(rect, m_ClearFlags, Styles.clearFlags); + m_ClearFlags.intValue = (int)(ClearFlag)EditorGUI.EnumPopup(rect, Styles.clearFlags, (ClearFlag)m_ClearFlags.intValue); + EditorGUI.EndProperty(); rect.y += Styles.defaultLineSpace; } - -#else // TODO: remove all this code when the fix for SerializedReference lands - - EditorGUI.PropertyField(rect, m_TargetColorBuffer, Styles.targetColorBuffer); - rect.y += Styles.defaultLineSpace; - - EditorGUI.PropertyField(rect, m_TargetDepthBuffer, Styles.targetDepthBuffer); - rect.y += Styles.defaultLineSpace; - - EditorGUI.PropertyField(rect, m_ClearFlags, Styles.clearFlags); - rect.y += Styles.defaultLineSpace; -#endif } /// @@ -216,10 +213,18 @@ void DoHeaderGUI(ref Rect rect) enabledRect.x = rect.xMax - enabledSize.x; enabledRect.width = enabledSize.x; - m_PassFoldout.boolValue = EditorGUI.Foldout(headerRect, m_PassFoldout.boolValue, $"{m_Name.stringValue} ({m_PassType.Name})", true, EditorStyles.boldLabel); - EditorGUIUtility.labelWidth = enabledRect.width - 14; - m_Enabled.boolValue = EditorGUI.Toggle(enabledRect, Styles.enabled, m_Enabled.boolValue); - EditorGUIUtility.labelWidth = 0; + EditorGUI.BeginProperty(headerRect, GUIContent.none, m_PassFoldout); + { + m_PassFoldout.boolValue = EditorGUI.Foldout(headerRect, m_PassFoldout.boolValue, $"{m_Name.stringValue} ({m_PassType.Name})", true, EditorStyles.boldLabel); + } + EditorGUI.EndProperty(); + EditorGUI.BeginProperty(enabledRect, Styles.enabled, m_Enabled); + { + EditorGUIUtility.labelWidth = enabledRect.width - 14; + m_Enabled.boolValue = EditorGUI.Toggle(enabledRect, Styles.enabled, m_Enabled.boolValue); + EditorGUIUtility.labelWidth = 0; + } + EditorGUI.EndProperty(); } /// diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassVolumeEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassVolumeEditor.cs index 1c22be4c267..19b8e67f528 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassVolumeEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassVolumeEditor.cs @@ -71,7 +71,7 @@ public override void OnInspectorGUI() } List GatherCustomPassesMaterials() - => m_Volume.customPasses.SelectMany(p => p.RegisterMaterialForInspector()).Where(m => m != null).ToList(); + => m_Volume.customPasses.Where(p => p != null).SelectMany(p => p.RegisterMaterialForInspector()).Where(m => m != null).ToList(); void UpdateMaterialEditors() { @@ -113,6 +113,9 @@ CustomPassDrawer GetCustomPassDrawer(SerializedProperty pass, int listIndex) var customPass = m_Volume.customPasses[listIndex]; + if (customPass == null) + return null; + foreach (var drawerType in TypeCache.GetTypesWithAttribute(typeof(CustomPassDrawerAttribute))) { var attr = drawerType.GetCustomAttributes(typeof(CustomPassDrawerAttribute), true)[0] as CustomPassDrawerAttribute; @@ -140,7 +143,12 @@ void DrawSettingsGUI() EditorGUI.BeginChangeCheck(); { - m_SerializedPassVolume.isGlobal.boolValue = EditorGUILayout.Popup(Styles.isGlobal, m_SerializedPassVolume.isGlobal.boolValue ? 0 : 1, Styles.modes) == 0; + Rect isGlobalRect = EditorGUILayout.GetControlRect(); + EditorGUI.BeginProperty(isGlobalRect, Styles.isGlobal, m_SerializedPassVolume.isGlobal); + { + m_SerializedPassVolume.isGlobal.boolValue = EditorGUI.Popup(isGlobalRect, Styles.isGlobal, m_SerializedPassVolume.isGlobal.boolValue ? 0 : 1, Styles.modes) == 0; + } + EditorGUI.EndProperty(); EditorGUILayout.PropertyField(m_SerializedPassVolume.injectionPoint, Styles.injectionPoint); EditorGUILayout.PropertyField(m_SerializedPassVolume.priority, Styles.priority); if (!m_SerializedPassVolume.isGlobal.boolValue) @@ -163,9 +171,15 @@ void DrawCustomPassReorderableList() } } - EditorGUILayout.BeginVertical(); - m_CustomPassList.DoLayoutList(); - EditorGUILayout.EndVertical(); + float customPassListHeight = m_CustomPassList.GetHeight(); + var customPassRect = EditorGUILayout.GetControlRect(false, customPassListHeight); + EditorGUI.BeginProperty(customPassRect, GUIContent.none, m_SerializedPassVolume.customPasses); + { + EditorGUILayout.BeginVertical(); + m_CustomPassList.DoList(customPassRect); + EditorGUILayout.EndVertical(); + } + EditorGUI.EndProperty(); } void CreateReorderableList(SerializedProperty passList) @@ -200,28 +214,34 @@ void CreateReorderableList(SerializedProperty passList) }; m_CustomPassList.onAddCallback += (list) => { - Undo.RegisterCompleteObjectUndo(target, "Remove custom pass"); + Undo.RegisterCompleteObjectUndo(target, "Add custom pass"); var menu = new GenericMenu(); foreach (var customPassType in TypeCache.GetTypesDerivedFrom()) { if (customPassType.IsAbstract) continue; - + menu.AddItem(new GUIContent(customPassType.Name), false, () => { - m_Volume.AddPassOfType(customPassType); passList.serializedObject.Update(); + m_Volume.AddPassOfType(customPassType); UpdateMaterialEditors(); - }); + passList.serializedObject.ApplyModifiedProperties(); + // Notify the prefab that something have changed: + PrefabUtility.RecordPrefabInstancePropertyModifications(target); + }); } menu.ShowAsContext(); }; m_CustomPassList.onRemoveCallback = (list) => { + passList.serializedObject.Update(); Undo.RegisterCompleteObjectUndo(target, "Remove custom pass"); m_Volume.customPasses.RemoveAt(list.index); - passList.serializedObject.Update(); UpdateMaterialEditors(); + passList.serializedObject.ApplyModifiedProperties(); + // Notify the prefab that something have changed: + PrefabUtility.RecordPrefabInstancePropertyModifications(target); }; } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs index 0d28dd585c9..5759a22323c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/DrawRenderersCustomPassDrawer.cs @@ -161,8 +161,7 @@ protected override void DoPassGUI(SerializedProperty customPass, Rect rect) #endif // TODO: remove all this code when the fix for SerializedReference lands - // EditorGUI.PropertyField(rect, m_SortingCriteria, Styles.sortingCriteria); - m_SortingCriteria.intValue = (int)(SortingCriteria)EditorGUI.EnumPopup(rect, Styles.sortingCriteria, (SortingCriteria)m_SortingCriteria.intValue); + EditorGUI.PropertyField(rect, m_SortingCriteria, Styles.sortingCriteria); rect.y += Styles.defaultLineSpace; EditorGUI.indentLevel--; @@ -205,10 +204,11 @@ void DoFilters(ref Rect rect) if (m_FilterFoldout.boolValue) { EditorGUI.indentLevel++; - //Render queue filter + EditorGUI.BeginProperty(rect, Styles.renderQueueFilter, m_RenderQueue); + // There is still a bug with SerializedReference and PropertyField so we can't use it yet // EditorGUI.PropertyField(rect, m_RenderQueue, Styles.renderQueueFilter); - // TODO: remove all this code when the fix for SerializedReference lands m_RenderQueue.intValue = (int)(CustomPass.RenderQueueType)EditorGUI.EnumPopup(rect, Styles.renderQueueFilter, (CustomPass.RenderQueueType)m_RenderQueue.intValue); + EditorGUI.EndProperty(); rect.y += Styles.defaultLineSpace; if (ShowOpaqueObjectWarning()) { @@ -229,9 +229,7 @@ void DoMaterialOverride(ref Rect rect) { //Override material EditorGUI.BeginChangeCheck(); - // TODO: remove all this code when the fix for SerializedReference lands - m_OverrideMaterial.objectReferenceValue = EditorGUI.ObjectField(rect, Styles.overrideMaterial, m_OverrideMaterial.objectReferenceValue, typeof(Material), false); - // EditorGUI.PropertyField(rect, m_OverrideMaterial, Styles.overrideMaterial); + EditorGUI.PropertyField(rect, m_OverrideMaterial, Styles.overrideMaterial); if (EditorGUI.EndChangeCheck()) { var mat = m_OverrideMaterial.objectReferenceValue as Material; @@ -244,37 +242,49 @@ void DoMaterialOverride(ref Rect rect) EditorGUI.indentLevel++; if (m_OverrideMaterial.objectReferenceValue) { - var mat = m_OverrideMaterial.objectReferenceValue as Material; - EditorGUI.BeginChangeCheck(); - int index = mat.FindPass(m_OverrideMaterialPassName.stringValue); - index = EditorGUI.IntPopup(rect, Styles.overrideMaterialPass, index, GetMaterialPassNames(mat), Enumerable.Range(0, mat.passCount).ToArray()); - if (EditorGUI.EndChangeCheck()) - m_OverrideMaterialPassName.stringValue = mat.GetPassName(index); + EditorGUI.BeginProperty(rect, Styles.overrideMaterialPass, m_OverrideMaterialPassName); + { + var mat = m_OverrideMaterial.objectReferenceValue as Material; + EditorGUI.BeginChangeCheck(); + int index = mat.FindPass(m_OverrideMaterialPassName.stringValue); + index = EditorGUI.IntPopup(rect, Styles.overrideMaterialPass, index, GetMaterialPassNames(mat), Enumerable.Range(0, mat.passCount).ToArray()); + if (EditorGUI.EndChangeCheck()) + m_OverrideMaterialPassName.stringValue = mat.GetPassName(index); + } + EditorGUI.EndProperty(); } else { + EditorGUI.BeginProperty(rect, Styles.renderQueueFilter, m_RenderQueue); + // There is still a bug with SerializedReference and PropertyField so we can't use it yet + // EditorGUI.PropertyField(rect, m_ShaderPass, Styles.shaderPass); m_ShaderPass.intValue = (int)(DrawRenderersCustomPass.ShaderPass)EditorGUI.EnumPopup(rect, Styles.shaderPass, (DrawRenderersCustomPass.ShaderPass)m_ShaderPass.intValue); + EditorGUI.EndProperty(); } EditorGUI.indentLevel--; rect.y += Styles.defaultLineSpace; - if (customDepthIsNone) - { - using (new EditorGUI.DisabledScope(true)) - EditorGUI.Toggle(rect, Styles.overrideDepth, false); - } - else + EditorGUI.BeginProperty(rect, Styles.overrideDepth, m_OverrideDepthState); { - m_OverrideDepthState.boolValue = EditorGUI.Toggle(rect, Styles.overrideDepth, m_OverrideDepthState.boolValue); + if (customDepthIsNone) + { + using (new EditorGUI.DisabledScope(true)) + EditorGUI.Toggle(rect, Styles.overrideDepth, false); + } + else + { + EditorGUI.PropertyField(rect, m_OverrideDepthState, Styles.overrideDepth); + } } + EditorGUI.EndProperty(); if (m_OverrideDepthState.boolValue && !customDepthIsNone) { EditorGUI.indentLevel++; rect.y += Styles.defaultLineSpace; - m_DepthCompareFunction.intValue = (int)(CompareFunction)EditorGUI.EnumPopup(rect, Styles.depthCompareFunction, (CompareFunction)m_DepthCompareFunction.intValue); + EditorGUI.PropertyField(rect, m_DepthCompareFunction, Styles.depthCompareFunction); rect.y += Styles.defaultLineSpace; - m_DepthWrite.boolValue = EditorGUI.Toggle(rect, Styles.depthWrite, m_DepthWrite.boolValue); + EditorGUI.PropertyField(rect, m_DepthWrite, Styles.depthWrite); EditorGUI.indentLevel--; } } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/FullScreenCustomPassDrawer.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/FullScreenCustomPassDrawer.cs index 909409738fa..7d52d4b7017 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/FullScreenCustomPassDrawer.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/FullScreenCustomPassDrawer.cs @@ -54,19 +54,21 @@ protected override void DoPassGUI(SerializedProperty customPass, Rect rect) rect.y += Styles.defaultLineSpace; } - // TODO: remove all this code when the fix for SerializedReference lands - m_FullScreenPassMaterial.objectReferenceValue = EditorGUI.ObjectField(rect, Styles.fullScreenPassMaterial, m_FullScreenPassMaterial.objectReferenceValue, typeof(Material), false); - // EditorGUI.PropertyField(rect, m_FullScreenPassMaterial, Styles.fullScreenPassMaterial); + EditorGUI.PropertyField(rect, m_FullScreenPassMaterial, Styles.fullScreenPassMaterial); rect.y += Styles.defaultLineSpace; if (m_FullScreenPassMaterial.objectReferenceValue is Material mat) { using (new EditorGUI.IndentLevelScope()) { - EditorGUI.BeginChangeCheck(); - int index = mat.FindPass(m_MaterialPassName.stringValue); - index = EditorGUI.IntPopup(rect, Styles.materialPassName, index, GetMaterialPassNames(mat), Enumerable.Range(0, mat.passCount).ToArray()); - if (EditorGUI.EndChangeCheck()) - m_MaterialPassName.stringValue = mat.GetPassName(index); + EditorGUI.BeginProperty(rect, Styles.materialPassName, m_MaterialPassName); + { + EditorGUI.BeginChangeCheck(); + int index = mat.FindPass(m_MaterialPassName.stringValue); + index = EditorGUI.IntPopup(rect, Styles.materialPassName, index, GetMaterialPassNames(mat), Enumerable.Range(0, mat.passCount).ToArray()); + if (EditorGUI.EndChangeCheck()) + m_MaterialPassName.stringValue = mat.GetPassName(index); + } + EditorGUI.EndProperty(); } } } From 6afff4bee7ebaf73b3d7314959d18b285820c269 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Wed, 13 May 2020 15:00:04 +0200 Subject: [PATCH 167/200] Fix issue with the resolve of motion vectors (#421) --- .../Runtime/Material/SharedRTManager.cs | 2 +- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs index 643a69138e3..32b3011883a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs @@ -382,7 +382,7 @@ public void ResolveMotionVectorTexture(CommandBuffer cmd, HDCamera hdCamera) { using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ResolveMSAAMotionVector))) { - CoreUtils.SetRenderTarget(cmd, m_MotionVectorsRT, m_CameraDepthStencilBuffer); + CoreUtils.SetRenderTarget(cmd, m_MotionVectorsRT); Shader.SetGlobalTexture(HDShaderIDs._MotionVectorTextureMS, m_MotionVectorsMSAART); cmd.DrawProcedural(Matrix4x4.identity, m_MotionVectorResolve, SampleCountToPassIndex(m_MSAASamples), MeshTopology.Triangles, 3, 1); } 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 7cd9b9412ea..192adb75007 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2398,6 +2398,7 @@ void Callback(CommandBuffer c, HDCamera cam) if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector)) { m_SharedRTManager.ResolveMotionVectorTexture(cmd, hdCamera); + cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, m_SharedRTManager.GetMotionVectorsBuffer()); } // We push the motion vector debug texture here as transparent object can overwrite the motion vector texture content. From 87649c5972354df725ba260e0069e716edd1b24a Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Mon, 6 Jul 2020 19:49:08 +0200 Subject: [PATCH 168/200] Delete HDRenderPipeline.cs.orig --- .../RenderPipeline/HDRenderPipeline.cs.orig | 4633 ----------------- 1 file changed, 4633 deletions(-) delete mode 100644 com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig deleted file mode 100644 index 1507370c5f8..00000000000 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs.orig +++ /dev/null @@ -1,4633 +0,0 @@ -using System.Collections.Generic; -using UnityEngine.VFX; -using System; -using System.Diagnostics; -using System.Linq; -using UnityEngine.Experimental.GlobalIllumination; -using UnityEngine.Experimental.Rendering; -using UnityEngine.Experimental.Rendering.RenderGraphModule; -using Utilities; - -namespace UnityEngine.Rendering.HighDefinition -{ - /// - /// High Definition Render Pipeline class. - /// - public partial class HDRenderPipeline : RenderPipeline - { - #region Default Settings - internal static HDRenderPipelineAsset defaultAsset - => GraphicsSettings.renderPipelineAsset is HDRenderPipelineAsset hdrpAsset ? hdrpAsset : null; - - internal static HDRenderPipelineAsset currentAsset - => GraphicsSettings.currentRenderPipeline is HDRenderPipelineAsset hdrpAsset ? hdrpAsset : null; - - internal static HDRenderPipeline currentPipeline - => RenderPipelineManager.currentPipeline is HDRenderPipeline hdrp ? hdrp : null; - - internal static bool pipelineSupportsRayTracing => HDRenderPipeline.currentPipeline != null && HDRenderPipeline.currentPipeline.rayTracingSupported; - - - private static Volume s_DefaultVolume = null; - static VolumeProfile defaultVolumeProfile - => defaultAsset?.defaultVolumeProfile; - - static HDRenderPipeline() - { -#if UNITY_EDITOR - UnityEditor.AssemblyReloadEvents.beforeAssemblyReload += () => - { - if (s_DefaultVolume != null && !s_DefaultVolume.Equals(null)) - { - CoreUtils.Destroy(s_DefaultVolume.gameObject); - s_DefaultVolume = null; - } - }; -#endif - } - - internal static Volume GetOrCreateDefaultVolume() - { - if (s_DefaultVolume == null || s_DefaultVolume.Equals(null)) - { - var go = new GameObject("Default Volume") { hideFlags = HideFlags.HideAndDontSave }; - s_DefaultVolume = go.AddComponent(); - s_DefaultVolume.isGlobal = true; - s_DefaultVolume.priority = float.MinValue; - s_DefaultVolume.sharedProfile = defaultVolumeProfile; - } - - if ( - // In case the asset was deleted or the reference removed - s_DefaultVolume.sharedProfile == null || s_DefaultVolume.sharedProfile.Equals(null) -#if UNITY_EDITOR - - // In case the serialization recreated an empty volume sharedProfile - - || !UnityEditor.AssetDatabase.Contains(s_DefaultVolume.sharedProfile) -#endif - ) - { - s_DefaultVolume.sharedProfile = defaultVolumeProfile; - } - - if (s_DefaultVolume.sharedProfile != defaultVolumeProfile) - { - s_DefaultVolume.sharedProfile = defaultVolumeProfile; - } - - return s_DefaultVolume; - } - #endregion - - /// - /// Shader Tag for the High Definition Render Pipeline. - /// - public const string k_ShaderTagName = "HDRenderPipeline"; - - readonly HDRenderPipelineAsset m_Asset; - internal HDRenderPipelineAsset asset { get { return m_Asset; } } - readonly HDRenderPipelineAsset m_DefaultAsset; - internal RenderPipelineResources defaultResources { get { return m_DefaultAsset.renderPipelineResources; } } - - internal RenderPipelineSettings currentPlatformRenderPipelineSettings { get { return m_Asset.currentPlatformRenderPipelineSettings; } } - - readonly RenderPipelineMaterial m_DeferredMaterial; - readonly List m_MaterialList = new List(); - - readonly GBufferManager m_GbufferManager; - readonly DBufferManager m_DbufferManager; - readonly SharedRTManager m_SharedRTManager = new SharedRTManager(); - internal SharedRTManager sharedRTManager { get { return m_SharedRTManager; } } - - readonly PostProcessSystem m_PostProcessSystem; - readonly XRSystem m_XRSystem; - - // Keep track of previous Graphic and QualitySettings value to reset when switching to another pipeline - bool m_PreviousLightsUseLinearIntensity; - bool m_PreviousLightsUseColorTemperature; - bool m_PreviousSRPBatcher; - ShadowmaskMode m_PreviousShadowMaskMode; - - bool m_FrameSettingsHistoryEnabled = false; -#if UNITY_EDITOR - bool m_PreviousEnableCookiesInLightmapper = false; -#endif - - /// - /// This functions allows the user to have an approximation of the number of rays that were traced for a given frame. - /// - /// Specifes which ray count value should be returned. - /// The approximated ray count for a frame - public uint GetRaysPerFrame(RayCountValues rayValues) { return m_RayCountManager.GetRaysPerFrame(rayValues); } - - // Renderer Bake configuration can vary depends on if shadow mask is enabled or no - PerObjectData m_CurrentRendererConfigurationBakedLighting = HDUtils.k_RendererConfigurationBakedLighting; - MaterialPropertyBlock m_CopyDepthPropertyBlock = new MaterialPropertyBlock(); - Material m_CopyDepth; - Material m_DownsampleDepthMaterial; - Material m_UpsampleTransparency; - GPUCopy m_GPUCopy; - MipGenerator m_MipGenerator; - BlueNoise m_BlueNoise; - - IBLFilterBSDF[] m_IBLFilterArray = null; - - ComputeShader m_ScreenSpaceReflectionsCS { get { return defaultResources.shaders.screenSpaceReflectionsCS; } } - int m_SsrTracingKernel = -1; - int m_SsrReprojectionKernel = -1; - - Material m_ApplyDistortionMaterial; - - Material m_CameraMotionVectorsMaterial; - Material m_DecalNormalBufferMaterial; - - Material m_ClearStencilBufferMaterial; - - // Debug material - Material m_DebugViewMaterialGBuffer; - Material m_DebugViewMaterialGBufferShadowMask; - Material m_currentDebugViewMaterialGBuffer; - Material m_DebugDisplayLatlong; - Material m_DebugFullScreen; - MaterialPropertyBlock m_DebugFullScreenPropertyBlock = new MaterialPropertyBlock(); - Material m_DebugColorPicker; - Material m_ErrorMaterial; - - Material m_Blit; - Material m_BlitTexArray; - Material m_BlitTexArraySingleSlice; - MaterialPropertyBlock m_BlitPropertyBlock = new MaterialPropertyBlock(); - - - RenderTargetIdentifier[] m_MRTCache2 = new RenderTargetIdentifier[2]; - - // 'm_CameraColorBuffer' does not contain diffuse lighting of SSS materials until the SSS pass. It is stored within 'm_CameraSssDiffuseLightingBuffer'. - RTHandle m_CameraColorBuffer; - RTHandle m_OpaqueAtmosphericScatteringBuffer; // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity - RTHandle m_CameraSssDiffuseLightingBuffer; - - RTHandle m_ContactShadowBuffer; - RTHandle m_ScreenSpaceShadowsBuffer; - RTHandle m_DistortionBuffer; - - RTHandle m_LowResTransparentBuffer; - - // TODO: remove me, I am just a temporary debug texture. :-) - // RTHandle m_SsrDebugTexture; - RTHandle m_SsrHitPointTexture; - RTHandle m_SsrLightingTexture; - // MSAA Versions of regular textures - RTHandle m_CameraColorMSAABuffer; - RTHandle m_OpaqueAtmosphericScatteringMSAABuffer; // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity - RTHandle m_CameraSssDiffuseLightingMSAABuffer; - - Lazy m_CustomPassColorBuffer; - Lazy m_CustomPassDepthBuffer; - - // The current MSAA count - MSAASamples m_MSAASamples; - - // The pass "SRPDefaultUnlit" is a fall back to legacy unlit rendering and is required to support unity 2d + unity UI that render in the scene. - ShaderTagId[] m_ForwardAndForwardOnlyPassNames = { HDShaderPassNames.s_ForwardOnlyName, HDShaderPassNames.s_ForwardName, HDShaderPassNames.s_SRPDefaultUnlitName }; - ShaderTagId[] m_ForwardOnlyPassNames = { HDShaderPassNames.s_ForwardOnlyName, HDShaderPassNames.s_SRPDefaultUnlitName }; - - ShaderTagId[] m_AllTransparentPassNames = { HDShaderPassNames.s_TransparentBackfaceName, - HDShaderPassNames.s_ForwardOnlyName, - HDShaderPassNames.s_ForwardName, - HDShaderPassNames.s_SRPDefaultUnlitName }; - - ShaderTagId[] m_TransparentNoBackfaceNames = { HDShaderPassNames.s_ForwardOnlyName, - HDShaderPassNames.s_ForwardName, - HDShaderPassNames.s_SRPDefaultUnlitName }; - - - ShaderTagId[] m_AllForwardOpaquePassNames = { HDShaderPassNames.s_ForwardOnlyName, - HDShaderPassNames.s_ForwardName, - HDShaderPassNames.s_SRPDefaultUnlitName }; - - ShaderTagId[] m_DepthOnlyAndDepthForwardOnlyPassNames = { HDShaderPassNames.s_DepthForwardOnlyName, HDShaderPassNames.s_DepthOnlyName }; - ShaderTagId[] m_DepthForwardOnlyPassNames = { HDShaderPassNames.s_DepthForwardOnlyName }; - ShaderTagId[] m_DepthOnlyPassNames = { HDShaderPassNames.s_DepthOnlyName }; - ShaderTagId[] m_TransparentDepthPrepassNames = { HDShaderPassNames.s_TransparentDepthPrepassName }; - ShaderTagId[] m_TransparentDepthPostpassNames = { HDShaderPassNames.s_TransparentDepthPostpassName }; - ShaderTagId[] m_ForwardErrorPassNames = { HDShaderPassNames.s_AlwaysName, HDShaderPassNames.s_ForwardBaseName, HDShaderPassNames.s_DeferredName, HDShaderPassNames.s_PrepassBaseName, HDShaderPassNames.s_VertexName, HDShaderPassNames.s_VertexLMRGBMName, HDShaderPassNames.s_VertexLMName }; - ShaderTagId[] m_DecalsEmissivePassNames = { HDShaderPassNames.s_MeshDecalsForwardEmissiveName, HDShaderPassNames.s_ShaderGraphMeshDecalsForwardEmissiveName }; - ShaderTagId[] m_SinglePassName = new ShaderTagId[1]; - ShaderTagId[] m_Decals4RTPassNames = { HDShaderPassNames.s_MeshDecalsMName , HDShaderPassNames.s_MeshDecalsAOName , HDShaderPassNames.s_MeshDecalsMAOName, HDShaderPassNames.s_MeshDecalsSName , - HDShaderPassNames.s_MeshDecalsMSName, HDShaderPassNames.s_MeshDecalsAOSName, HDShaderPassNames.s_MeshDecalsMAOSName, HDShaderPassNames.s_ShaderGraphMeshDecalsName4RT}; - ShaderTagId[] m_Decals3RTPassNames = { HDShaderPassNames.s_MeshDecals3RTName , HDShaderPassNames.s_ShaderGraphMeshDecalsName3RT }; - - RenderStateBlock m_DepthStateOpaque; - - readonly List m_ActivePassVolumes = new List(6); - - // Detect when windows size is changing - int m_MaxCameraWidth; - int m_MaxCameraHeight; - - // Use to detect frame changes - int m_FrameCount; - float m_LastTime, m_Time; // Do NOT take the 'animateMaterials' setting into account. - - internal int GetFrameCount() { return m_FrameCount; } - internal float GetLastTime() { return m_LastTime; } - internal float GetTime() { return m_Time; } - - GraphicsFormat GetColorBufferFormat() - => (GraphicsFormat)m_Asset.currentPlatformRenderPipelineSettings.colorBufferFormat; - - GraphicsFormat GetCustomBufferFormat() - => (GraphicsFormat)m_Asset.currentPlatformRenderPipelineSettings.customBufferFormat; - - internal int GetDecalAtlasMipCount() - { - int highestDim = Math.Max(currentPlatformRenderPipelineSettings.decalSettings.atlasWidth, currentPlatformRenderPipelineSettings.decalSettings.atlasHeight); - return (int)Math.Log(highestDim, 2); - } - - internal int GetCookieAtlasMipCount() => (int)Mathf.Log((int)currentPlatformRenderPipelineSettings.lightLoopSettings.cookieAtlasSize, 2); - internal int GetCookieCubeArraySize() => currentPlatformRenderPipelineSettings.lightLoopSettings.cubeCookieTexArraySize; - - internal int GetPlanarReflectionProbeMipCount() - { - int size = (int)currentPlatformRenderPipelineSettings.lightLoopSettings.planarReflectionAtlasSize; - return (int)Mathf.Log(size, 2); - } - - internal int GetMaxScreenSpaceShadows() - { - return currentPlatformRenderPipelineSettings.hdShadowInitParams.supportScreenSpaceShadows ? currentPlatformRenderPipelineSettings.hdShadowInitParams.maxScreenSpaceShadowSlots : 0; - } - - readonly SkyManager m_SkyManager = new SkyManager(); - internal SkyManager skyManager { get { return m_SkyManager; } } - readonly AmbientOcclusionSystem m_AmbientOcclusionSystem; - - // Debugging - MaterialPropertyBlock m_SharedPropertyBlock = new MaterialPropertyBlock(); - DebugDisplaySettings m_DebugDisplaySettings = new DebugDisplaySettings(); - /// - /// Debug display settings. - /// - public DebugDisplaySettings debugDisplaySettings { get { return m_DebugDisplaySettings; } } - static DebugDisplaySettings s_NeutralDebugDisplaySettings = new DebugDisplaySettings(); - internal DebugDisplaySettings m_CurrentDebugDisplaySettings; - RTHandle m_DebugColorPickerBuffer; - RTHandle m_DebugFullScreenTempBuffer; - // This target is only used in Dev builds as an intermediate destination for post process and where debug rendering will be done. - RTHandle m_IntermediateAfterPostProcessBuffer; - // We need this flag because otherwise if no full screen debug is pushed (like for example if the corresponding pass is disabled), when we render the result in RenderDebug m_DebugFullScreenTempBuffer will contain potential garbage - bool m_FullScreenDebugPushed; - bool m_ValidAPI; // False by default mean we render normally, true mean we don't render anything - bool m_IsDepthBufferCopyValid; - RenderTexture m_TemporaryTargetForCubemaps; - - private CameraCache<(Transform viewer, HDProbe probe, int face)> m_ProbeCameraCache = new - CameraCache<(Transform viewer, HDProbe probe, int face)>(); - - RenderTargetIdentifier[] m_MRTTransparentMotionVec; - RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[3]; // Specular, diffuse, sss buffer; - RenderTargetIdentifier[] mMRTSingle = new RenderTargetIdentifier[1]; - string m_ForwardPassProfileName; - - internal Material GetBlitMaterial(bool useTexArray, bool singleSlice) { return useTexArray ? (singleSlice ? m_BlitTexArraySingleSlice : m_BlitTexArray) : m_Blit; } - - ComputeBuffer m_DepthPyramidMipLevelOffsetsBuffer = null; - - ScriptableCullingParameters frozenCullingParams; - bool frozenCullingParamAvailable = false; - - internal bool showCascade - { - get => m_CurrentDebugDisplaySettings.GetDebugLightingMode() == DebugLightingMode.VisualizeCascade; - set - { - if (value) - m_CurrentDebugDisplaySettings.SetDebugLightingMode(DebugLightingMode.VisualizeCascade); - else - m_CurrentDebugDisplaySettings.SetDebugLightingMode(DebugLightingMode.None); - } - } - - // RENDER GRAPH - RenderGraph m_RenderGraph; - - // MSAA resolve materials - Material m_ColorResolveMaterial = null; - Material m_MotionVectorResolve = null; - - // Flag that defines if ray tracing is supported by the current asset and platform - bool m_RayTracingSupported = false; - /// - /// Flag that defines if ray tracing is supported by the current HDRP asset and platform - /// - public bool rayTracingSupported { get { return m_RayTracingSupported; } } - - -#if UNITY_EDITOR - bool m_ResourcesInitialized = false; -#endif - - /// - /// HDRenderPipeline constructor. - /// - /// Source HDRenderPipelineAsset. - /// Defauklt HDRenderPipelineAsset. - public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defaultAsset) - { - m_Asset = asset; - m_DefaultAsset = defaultAsset; - HDProbeSystem.Parameters = asset.reflectionSystemParameters; - - DebugManager.instance.RefreshEditor(); - - m_ValidAPI = true; - - SetRenderingFeatures(); - - // The first thing we need to do is to set the defines that depend on the render pipeline settings - m_RayTracingSupported = GatherRayTracingSupport(m_Asset.currentPlatformRenderPipelineSettings); - -#if UNITY_EDITOR - m_Asset.EvaluateSettings(); - - UpgradeResourcesIfNeeded(); - - //In case we are loading element in the asset pipeline (occurs when library is not fully constructed) the creation of the HDRenderPipeline is done at a time we cannot access resources. - //So in this case, the reloader would fail and the resources cannot be validated. So skip validation here. - //The HDRenderPipeline will be reconstructed in a few frame which will fix this issue. - if (HDRenderPipeline.defaultAsset.renderPipelineResources == null - || HDRenderPipeline.defaultAsset.renderPipelineEditorResources == null - || (m_RayTracingSupported && HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources == null)) - return; - else - m_ResourcesInitialized = true; - - ValidateResources(); -#endif - - // We need to call this after the resource initialization as we attempt to use them in checking the supported API. - if (!CheckAPIValidity()) - { - m_ValidAPI = false; - - return; - } - - // Initial state of the RTHandle system. - // Tells the system that we will require MSAA or not so that we can avoid wasteful render texture allocation. - // TODO: Might want to initialize to at least the window resolution to avoid un-necessary re-alloc in the player - RTHandles.Initialize(1, 1, m_Asset.currentPlatformRenderPipelineSettings.supportMSAA, m_Asset.currentPlatformRenderPipelineSettings.msaaSampleCount); - - m_XRSystem = new XRSystem(asset.renderPipelineResources.shaders); - m_GPUCopy = new GPUCopy(defaultResources.shaders.copyChannelCS); - - m_MipGenerator = new MipGenerator(defaultResources); - m_BlueNoise = new BlueNoise(defaultResources); - - EncodeBC6H.DefaultInstance = EncodeBC6H.DefaultInstance ?? new EncodeBC6H(defaultResources.shaders.encodeBC6HCS); - - // Scan material list and assign it - m_MaterialList = HDUtils.GetRenderPipelineMaterialList(); - // Find first material that have non 0 Gbuffer count and assign it as deferredMaterial - m_DeferredMaterial = null; - foreach (var material in m_MaterialList) - { - if (material.IsDefferedMaterial()) - m_DeferredMaterial = material; - } - - // TODO: Handle the case of no Gbuffer material - // TODO: I comment the assert here because m_DeferredMaterial for whatever reasons contain the correct class but with a "null" in the name instead of the real name and then trigger the assert - // whereas it work. Don't know what is happening, DebugDisplay use the same code and name is correct there. - // Debug.Assert(m_DeferredMaterial != null); - - m_GbufferManager = new GBufferManager(asset, m_DeferredMaterial); - m_DbufferManager = new DBufferManager(); - m_DbufferManager.InitializeHDRPResouces(asset); - - m_SharedRTManager.Build(asset); - m_PostProcessSystem = new PostProcessSystem(asset, defaultResources); - m_AmbientOcclusionSystem = new AmbientOcclusionSystem(asset, defaultResources); - - // Initialize various compute shader resources - m_SsrTracingKernel = m_ScreenSpaceReflectionsCS.FindKernel("ScreenSpaceReflectionsTracing"); - m_SsrReprojectionKernel = m_ScreenSpaceReflectionsCS.FindKernel("ScreenSpaceReflectionsReprojection"); - - // General material - m_CameraMotionVectorsMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.cameraMotionVectorsPS); - m_DecalNormalBufferMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.decalNormalBufferPS); - - m_CopyDepth = CoreUtils.CreateEngineMaterial(defaultResources.shaders.copyDepthBufferPS); - m_DownsampleDepthMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.downsampleDepthPS); - m_UpsampleTransparency = CoreUtils.CreateEngineMaterial(defaultResources.shaders.upsampleTransparentPS); - - m_ApplyDistortionMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.applyDistortionPS); - - m_ClearStencilBufferMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.clearStencilBufferPS); - - InitializeDebugMaterials(); - - m_MaterialList.ForEach(material => material.Build(asset, defaultResources)); - - if (m_Asset.currentPlatformRenderPipelineSettings.lightLoopSettings.supportFabricConvolution) - { - m_IBLFilterArray = new IBLFilterBSDF[2]; - m_IBLFilterArray[0] = new IBLFilterGGX(defaultResources, m_MipGenerator); - m_IBLFilterArray[1] = new IBLFilterCharlie(defaultResources, m_MipGenerator); - } - else - { - m_IBLFilterArray = new IBLFilterBSDF[1]; - m_IBLFilterArray[0] = new IBLFilterGGX(defaultResources, m_MipGenerator); - } - - InitializeLightLoop(m_IBLFilterArray); - - m_SkyManager.Build(asset, defaultResources, m_IBLFilterArray); - - InitializeVolumetricLighting(); - InitializeSubsurfaceScattering(); - - m_DebugDisplaySettings.RegisterDebug(); -#if UNITY_EDITOR - // We don't need the debug of Scene View at runtime (each camera have its own debug settings) - // All scene view will share the same FrameSettings for now as sometimes Dispose is called after - // another instance of HDRenderPipeline constructor is called. - - Camera firstSceneViewCamera = UnityEditor.SceneView.sceneViews.Count > 0 ? (UnityEditor.SceneView.sceneViews[0] as UnityEditor.SceneView).camera : null; - if (firstSceneViewCamera != null) - { - var history = FrameSettingsHistory.RegisterDebug(null, true); - DebugManager.instance.RegisterData(history); - } -#endif - - m_DepthPyramidMipLevelOffsetsBuffer = new ComputeBuffer(15, sizeof(int) * 2); - - InitializeRenderTextures(); - - // For debugging - MousePositionDebug.instance.Build(); - - InitializeRenderStateBlocks(); - - // Keep track of the original msaa sample value - // TODO : Bind this directly to the debug menu instead of having an intermediate value - m_MSAASamples = m_Asset ? m_Asset.currentPlatformRenderPipelineSettings.msaaSampleCount : MSAASamples.None; - - // Propagate it to the debug menu - m_DebugDisplaySettings.data.msaaSamples = m_MSAASamples; - - m_MRTTransparentMotionVec = new RenderTargetIdentifier[2]; - - if (m_RayTracingSupported) - { - InitRayTracingManager(); - InitRayTracedReflections(); - InitRayTracedIndirectDiffuse(); - InitRaytracingDeferred(); - InitRecursiveRenderer(); - InitPathTracing(); - - m_AmbientOcclusionSystem.InitRaytracing(this); - } - - // Initialize screen space shadows - InitializeScreenSpaceShadows(); - - CameraCaptureBridge.enabled = true; - - // Render Graph - m_RenderGraph = new RenderGraph(m_Asset.currentPlatformRenderPipelineSettings.supportMSAA, m_MSAASamples); - m_RenderGraph.RegisterDebug(); - - InitializePrepass(m_Asset); - m_ColorResolveMaterial = CoreUtils.CreateEngineMaterial(asset.renderPipelineResources.shaders.colorResolvePS); -<<<<<<< HEAD -======= - m_MotionVectorResolve = CoreUtils.CreateEngineMaterial(asset.renderPipelineResources.shaders.resolveMotionVecPS); - - InitializeProbeVolumes(); ->>>>>>> 579f009136... Fix Motion Vectors written by transparent when rendering with MSAA (#315) - } - -#if UNITY_EDITOR - void UpgradeResourcesIfNeeded() - { - // The first thing we need to do is to set the defines that depend on the render pipeline settings - m_Asset.EvaluateSettings(); - - // Check that the serialized Resources are not broken - if (HDRenderPipeline.defaultAsset.renderPipelineResources == null) - HDRenderPipeline.defaultAsset.renderPipelineResources - = UnityEditor.AssetDatabase.LoadAssetAtPath(HDUtils.GetHDRenderPipelinePath() + "Runtime/RenderPipelineResources/HDRenderPipelineResources.asset"); - ResourceReloader.ReloadAllNullIn(HDRenderPipeline.defaultAsset.renderPipelineResources, HDUtils.GetHDRenderPipelinePath()); - - if (m_RayTracingSupported) - { - if (HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources == null) - HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources - = UnityEditor.AssetDatabase.LoadAssetAtPath(HDUtils.GetHDRenderPipelinePath() + "Runtime/RenderPipelineResources/HDRenderPipelineRayTracingResources.asset"); - ResourceReloader.ReloadAllNullIn(HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources, HDUtils.GetHDRenderPipelinePath()); - } - else - { - // If ray tracing is not enabled we do not want to have ray tracing resources referenced - HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources = null; - } - - if (HDRenderPipeline.defaultAsset.renderPipelineEditorResources == null) - HDRenderPipeline.defaultAsset.renderPipelineEditorResources - = UnityEditor.AssetDatabase.LoadAssetAtPath(HDUtils.GetHDRenderPipelinePath() + "Editor/RenderPipelineResources/HDRenderPipelineEditorResources.asset"); - ResourceReloader.ReloadAllNullIn(HDRenderPipeline.defaultAsset.renderPipelineEditorResources, HDUtils.GetHDRenderPipelinePath()); - - // Upgrade the resources (re-import every references in RenderPipelineResources) if the resource version mismatches - // It's done here because we know every HDRP assets have been imported before - HDRenderPipeline.defaultAsset.renderPipelineResources?.UpgradeIfNeeded(); - } - - void ValidateResources() - { - var resources = HDRenderPipeline.defaultAsset.renderPipelineResources; - - // We iterate over all compute shader to verify if they are all compiled, if it's not the case - // then we throw an exception to avoid allocating resources and crashing later on by using a null - // compute kernel. - foreach (var computeShader in resources.shaders.GetAllComputeShaders()) - { - foreach (var message in UnityEditor.ShaderUtil.GetComputeShaderMessages(computeShader)) - { - if (message.severity == UnityEditor.Rendering.ShaderCompilerMessageSeverity.Error) - { - // Will be catched by the try in HDRenderPipelineAsset.CreatePipeline() - throw new Exception(String.Format( - "Compute Shader compilation error on platform {0} in file {1}:{2}: {3}{4}\n" + - "HDRP will not run until the error is fixed.\n", - message.platform, message.file, message.line, message.message, message.messageDetails - )); - } - } - } - } - -#endif - - /// - /// Resets the reference size of the internal RTHandle System. - /// This allows users to reduce the memory footprint of render textures after doing a super sampled rendering pass for example. - /// - /// New width of the internal RTHandle System. - /// New height of the internal RTHandle System. - public void ResetRTHandleReferenceSize(int width, int height) - { - RTHandles.ResetReferenceSize(width, height); - HDCamera.ResetAllHistoryRTHandleSystems(width, height); - if (m_RenderGraph != null) - m_RenderGraph.ResetRTHandleReferenceSize(width, height); - } - - void InitializeRenderTextures() - { - RenderPipelineSettings settings = m_Asset.currentPlatformRenderPipelineSettings; - - if (settings.supportedLitShaderMode != RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) - m_GbufferManager.CreateBuffers(); - - if (settings.supportDecals) - m_DbufferManager.CreateBuffers(); - - InitSSSBuffers(); - m_SharedRTManager.InitSharedBuffers(m_GbufferManager, m_Asset.currentPlatformRenderPipelineSettings, defaultResources); - - m_CameraColorBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), enableRandomWrite: true, useMipMap: false, useDynamicScale: true, name: "CameraColor"); - m_OpaqueAtmosphericScatteringBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), enableRandomWrite: true, useMipMap: false, useDynamicScale: true, name: "OpaqueAtmosphericScattering"); - m_CameraSssDiffuseLightingBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.B10G11R11_UFloatPack32, enableRandomWrite: true, useDynamicScale: true, name: "CameraSSSDiffuseLighting"); - - m_CustomPassColorBuffer = new Lazy(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetCustomBufferFormat(), enableRandomWrite: true, useDynamicScale: true, name: "CustomPassColorBuffer")); - m_CustomPassDepthBuffer = new Lazy(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R32_UInt, enableRandomWrite: true, useDynamicScale: true, isShadowMap: true, name: "CustomPassDepthBuffer", depthBufferBits: DepthBits.Depth32)); - - m_DistortionBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: Builtin.GetDistortionBufferFormat(), useDynamicScale: true, name: "Distortion"); - - m_ContactShadowBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R32_UInt, enableRandomWrite: true, useDynamicScale: true, name: "ContactShadowsBuffer"); - - if (m_Asset.currentPlatformRenderPipelineSettings.lowresTransparentSettings.enabled) - { - // We need R16G16B16A16_SFloat as we need a proper alpha channel for compositing. - m_LowResTransparentBuffer = RTHandles.Alloc(Vector2.one * 0.5f, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite: true, useDynamicScale: true, name: "Low res transparent"); - } - - if (settings.supportSSR) - { - // m_SsrDebugTexture = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: RenderTextureFormat.ARGBFloat, sRGB: false, enableRandomWrite: true, useDynamicScale: true, name: "SSR_Debug_Texture"); - m_SsrHitPointTexture = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16_UNorm, enableRandomWrite: true, useDynamicScale: true, name: "SSR_Hit_Point_Texture"); - m_SsrLightingTexture = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite: true, useDynamicScale: true, name: "SSR_Lighting_Texture"); - } - - // Let's create the MSAA textures - if (m_Asset.currentPlatformRenderPipelineSettings.supportMSAA && m_Asset.currentPlatformRenderPipelineSettings.supportedLitShaderMode != RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly) - { - m_CameraColorMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "CameraColorMSAA"); - m_OpaqueAtmosphericScatteringMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "OpaqueAtmosphericScatteringMSAA"); - m_CameraSssDiffuseLightingMSAABuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), bindTextureMS: true, enableMSAA: true, useDynamicScale: true, name: "CameraSSSDiffuseLightingMSAA"); - } - } - - void GetOrCreateDebugTextures() - { - //Debug.isDebugBuild can be changed during DoBuildPlayer, these allocation has to be check on every frames - //TODO : Clean this with the RenderGraph system - if (Debug.isDebugBuild && m_DebugColorPickerBuffer == null && m_DebugFullScreenTempBuffer == null) - { - m_DebugColorPickerBuffer = RTHandles.Alloc(Vector2.one, filterMode: FilterMode.Point, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, useDynamicScale: true, name: "DebugColorPicker"); - m_DebugFullScreenTempBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, useDynamicScale: true, name: "DebugFullScreen"); - } - - if (m_IntermediateAfterPostProcessBuffer == null) - { - // We always need this target because there could be a custom pass in after post process mode. - // In that case, we need to do the flip y after this pass. - m_IntermediateAfterPostProcessBuffer = RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetColorBufferFormat(), useDynamicScale: true, name: "AfterPostProcess"); // Needs to be FP16 because output target might be HDR - } - } - - void DestroyRenderTextures() - { - m_GbufferManager.DestroyBuffers(); - m_DbufferManager.DestroyBuffers(); - m_MipGenerator.Release(); - - RTHandles.Release(m_CameraColorBuffer); - if (m_CustomPassColorBuffer.IsValueCreated) - RTHandles.Release(m_CustomPassColorBuffer.Value); - if (m_CustomPassDepthBuffer.IsValueCreated) - RTHandles.Release(m_CustomPassDepthBuffer.Value); - RTHandles.Release(m_OpaqueAtmosphericScatteringBuffer); - RTHandles.Release(m_CameraSssDiffuseLightingBuffer); - - RTHandles.Release(m_DistortionBuffer); - RTHandles.Release(m_ContactShadowBuffer); - - RTHandles.Release(m_LowResTransparentBuffer); - - // RTHandles.Release(m_SsrDebugTexture); - RTHandles.Release(m_SsrHitPointTexture); - RTHandles.Release(m_SsrLightingTexture); - - RTHandles.Release(m_DebugColorPickerBuffer); - RTHandles.Release(m_DebugFullScreenTempBuffer); - RTHandles.Release(m_IntermediateAfterPostProcessBuffer); - - RTHandles.Release(m_CameraColorMSAABuffer); - RTHandles.Release(m_OpaqueAtmosphericScatteringMSAABuffer); - RTHandles.Release(m_CameraSssDiffuseLightingMSAABuffer); - } - - void SetRenderingFeatures() - { - // Set sub-shader pipeline tag - Shader.globalRenderPipeline = "HDRenderPipeline"; - - // HD use specific GraphicsSettings - m_PreviousLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; - GraphicsSettings.lightsUseLinearIntensity = true; - m_PreviousLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; - GraphicsSettings.lightsUseColorTemperature = true; - m_PreviousSRPBatcher = GraphicsSettings.useScriptableRenderPipelineBatching; - GraphicsSettings.useScriptableRenderPipelineBatching = m_Asset.enableSRPBatcher; - - // In case shadowmask mode isn't setup correctly, force it to correct usage (as there is no UI to fix it) - m_PreviousShadowMaskMode = QualitySettings.shadowmaskMode; - QualitySettings.shadowmaskMode = ShadowmaskMode.DistanceShadowmask; - - SupportedRenderingFeatures.active = new SupportedRenderingFeatures() - { - reflectionProbeModes = SupportedRenderingFeatures.ReflectionProbeModes.Rotation, - defaultMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly, - mixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly | (m_Asset.currentPlatformRenderPipelineSettings.supportShadowMask ? SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask : 0), - lightmapBakeTypes = LightmapBakeType.Baked | LightmapBakeType.Mixed | LightmapBakeType.Realtime, - lightmapsModes = LightmapsMode.NonDirectional | LightmapsMode.CombinedDirectional, - lightProbeProxyVolumes = true, - motionVectors = true, - receiveShadows = false, - reflectionProbes = false, - rendererPriority = true, - overridesFog = true, - overridesOtherLightingSettings = true, - editableMaterialRenderQueue = false - // Enlighten is deprecated in 2019.3 and above - , enlighten = false - , overridesLODBias = true - , overridesMaximumLODLevel = true - , terrainDetailUnsupported = true - , overridesShadowmask = true // Don't display the shadow mask UI in Quality Settings - , overridesRealtimeReflectionProbes = true // Don't display the real time reflection probes checkbox UI in Quality Settings - }; - - Lightmapping.SetDelegate(GlobalIlluminationUtils.hdLightsDelegate); - -#if UNITY_EDITOR - // HDRP always enable baking of cookie by default - m_PreviousEnableCookiesInLightmapper = UnityEditor.EditorSettings.enableCookiesInLightmapper; - UnityEditor.EditorSettings.enableCookiesInLightmapper = true; - - SceneViewDrawMode.SetupDrawMode(); - - if (UnityEditor.PlayerSettings.colorSpace == ColorSpace.Gamma) - { - Debug.LogError("High Definition Render Pipeline doesn't support Gamma mode, change to Linear mode (HDRP isn't set up properly. Go to Windows > RenderPipeline > HDRP Wizard to fix your settings)."); - } -#endif - } - - bool CheckAPIValidity() - { - GraphicsDeviceType unsupportedDeviceType; - if (!IsSupportedPlatform(out unsupportedDeviceType)) - { - HDUtils.DisplayUnsupportedAPIMessage(unsupportedDeviceType.ToString()); - - // Display more information to the users when it should have use Metal instead of OpenGL - if (SystemInfo.graphicsDeviceType.ToString().StartsWith("OpenGL")) - { - if (SystemInfo.operatingSystem.StartsWith("Mac")) - HDUtils.DisplayUnsupportedMessage("Use Metal API instead."); - else if (SystemInfo.operatingSystem.StartsWith("Windows")) - HDUtils.DisplayUnsupportedMessage("Use Vulkan API instead."); - } - - return false; - } - - return true; - } - - // Note: If you add new platform in this function, think about adding support when building the player to in HDRPCustomBuildProcessor.cs - bool IsSupportedPlatform(out GraphicsDeviceType unsupportedGraphicDevice) - { - unsupportedGraphicDevice = SystemInfo.graphicsDeviceType; - - if (!SystemInfo.supportsComputeShaders) - return false; - - if (!(defaultResources?.shaders.defaultPS?.isSupported ?? true)) - return false; - -#if UNITY_EDITOR - UnityEditor.BuildTarget activeBuildTarget = UnityEditor.EditorUserBuildSettings.activeBuildTarget; - // If the build target matches the operating system of the editor - if (SystemInfo.operatingSystemFamily == HDUtils.BuildTargetToOperatingSystemFamily(activeBuildTarget)) - { - bool autoAPI = UnityEditor.PlayerSettings.GetUseDefaultGraphicsAPIs(activeBuildTarget); - - // then, there is two configuration possible: - if (autoAPI) - { - // if the graphic api is chosen automatically, then only the system's graphic device type matters - if (!HDUtils.IsSupportedGraphicDevice(SystemInfo.graphicsDeviceType)) - return false; - } - else - { - // otherwise, we need to iterate over every graphic api available in the list to track every non-supported APIs - return HDUtils.AreGraphicsAPIsSupported(activeBuildTarget, out unsupportedGraphicDevice); - } - } - else // if the build target does not match the editor OS, then we have to check using the graphic api list - { - return HDUtils.AreGraphicsAPIsSupported(activeBuildTarget, out unsupportedGraphicDevice); - } - - if (!HDUtils.IsSupportedBuildTarget(activeBuildTarget)) - return false; -#else - if (!HDUtils.IsSupportedGraphicDevice(SystemInfo.graphicsDeviceType)) - return false; -#endif - - if (!HDUtils.IsOperatingSystemSupported(SystemInfo.operatingSystem)) - return false; - - return true; - } - - void UnsetRenderingFeatures() - { - Shader.globalRenderPipeline = ""; - - GraphicsSettings.lightsUseLinearIntensity = m_PreviousLightsUseLinearIntensity; - GraphicsSettings.lightsUseColorTemperature = m_PreviousLightsUseColorTemperature; - GraphicsSettings.useScriptableRenderPipelineBatching = m_PreviousSRPBatcher; - QualitySettings.shadowmaskMode = m_PreviousShadowMaskMode; - - SupportedRenderingFeatures.active = new SupportedRenderingFeatures(); - - Lightmapping.ResetDelegate(); - -#if UNITY_EDITOR - UnityEditor.EditorSettings.enableCookiesInLightmapper = m_PreviousEnableCookiesInLightmapper; -#endif - } - - void InitializeDebugMaterials() - { - m_DebugViewMaterialGBuffer = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugViewMaterialGBufferPS); - m_DebugViewMaterialGBufferShadowMask = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugViewMaterialGBufferPS); - m_DebugViewMaterialGBufferShadowMask.EnableKeyword("SHADOWS_SHADOWMASK"); - m_DebugDisplayLatlong = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugDisplayLatlongPS); - m_DebugFullScreen = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugFullScreenPS); - m_DebugColorPicker = CoreUtils.CreateEngineMaterial(defaultResources.shaders.debugColorPickerPS); - m_Blit = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitPS); - m_ErrorMaterial = CoreUtils.CreateEngineMaterial("Hidden/InternalErrorShader"); - - // With texture array enabled, we still need the normal blit version for other systems like atlas - if (TextureXR.useTexArray) - { - m_Blit.EnableKeyword("DISABLE_TEXTURE2D_X_ARRAY"); - m_BlitTexArray = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitPS); - m_BlitTexArraySingleSlice = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitPS); - m_BlitTexArraySingleSlice.EnableKeyword("BLIT_SINGLE_SLICE"); - } - } - - void InitializeRenderStateBlocks() - { - m_DepthStateOpaque = new RenderStateBlock - { - depthState = new DepthState(true, CompareFunction.LessEqual), - mask = RenderStateMask.Depth - }; - } - - /// - /// Disposable pattern implementation. - /// - /// Is disposing. - protected override void Dispose(bool disposing) - { - DisposeProbeCameraPool(); - - UnsetRenderingFeatures(); - - if (!m_ValidAPI) - return; - -#if UNITY_EDITOR - if (!m_ResourcesInitialized) - return; -#endif - - base.Dispose(disposing); - - ReleaseScreenSpaceShadows(); - - if (m_RayTracingSupported) - { - ReleaseRecursiveRenderer(); - ReleaseRayTracingDeferred(); - ReleaseRayTracedIndirectDiffuse(); - ReleaseRayTracedReflections(); - ReleasePathTracing(); - ReleaseRayTracingManager(); - } - m_DebugDisplaySettings.UnregisterDebug(); - - CleanupLightLoop(); - - // For debugging - MousePositionDebug.instance.Cleanup(); - - DecalSystem.instance.Cleanup(); - - m_MaterialList.ForEach(material => material.Cleanup()); - - CoreUtils.Destroy(m_CameraMotionVectorsMaterial); - CoreUtils.Destroy(m_DecalNormalBufferMaterial); - - CoreUtils.Destroy(m_DebugViewMaterialGBuffer); - CoreUtils.Destroy(m_DebugViewMaterialGBufferShadowMask); - CoreUtils.Destroy(m_DebugDisplayLatlong); - CoreUtils.Destroy(m_DebugFullScreen); - CoreUtils.Destroy(m_DebugColorPicker); - CoreUtils.Destroy(m_Blit); - CoreUtils.Destroy(m_BlitTexArray); - CoreUtils.Destroy(m_BlitTexArraySingleSlice); - CoreUtils.Destroy(m_CopyDepth); - CoreUtils.Destroy(m_ErrorMaterial); - CoreUtils.Destroy(m_DownsampleDepthMaterial); - CoreUtils.Destroy(m_UpsampleTransparency); - CoreUtils.Destroy(m_ApplyDistortionMaterial); - CoreUtils.Destroy(m_ClearStencilBufferMaterial); - - CleanupSubsurfaceScattering(); - m_SharedRTManager.Cleanup(); - m_XRSystem.Cleanup(); - m_SkyManager.Cleanup(); - CleanupVolumetricLighting(); - - for(int bsdfIdx = 0; bsdfIdx < m_IBLFilterArray.Length; ++bsdfIdx) - { - m_IBLFilterArray[bsdfIdx].Cleanup(); - } - - m_PostProcessSystem.Cleanup(); - m_AmbientOcclusionSystem.Cleanup(); - m_BlueNoise.Cleanup(); - - HDCamera.ClearAll(); - - DestroyRenderTextures(); - CullingGroupManager.instance.Cleanup(); - - CoreUtils.SafeRelease(m_DepthPyramidMipLevelOffsetsBuffer); - - CustomPassVolume.Cleanup(); - - // RenderGraph - m_RenderGraph.Cleanup(); - m_RenderGraph.UnRegisterDebug(); - CleanupPrepass(); - CoreUtils.Destroy(m_ColorResolveMaterial); - CoreUtils.Destroy(m_MotionVectorResolve); - - -#if UNITY_EDITOR - SceneViewDrawMode.ResetDrawMode(); - - // Do not attempt to unregister SceneView FrameSettings. It is shared amongst every scene view and take only a little place. - // For removing it, you should be sure that Dispose could never be called after the constructor of another instance of this SRP. - // Also, at the moment, applying change to hdrpAsset cause the SRP to be Disposed and Constructed again. - // Not always in that order. -#endif - - // Dispose m_ProbeCameraPool properly - void DisposeProbeCameraPool() - { -#if UNITY_EDITOR - // Special case here: when the HDRP asset is modified in the Editor, - // it is disposed during an `OnValidate` call. - // But during `OnValidate` call, game object must not be destroyed. - // So, only when this method was called during an `OnValidate` call, the destruction of the - // pool is delayed, otherwise, it is destroyed as usual with `CoreUtils.Destroy` - var isInOnValidate = false; - isInOnValidate = new StackTrace().ToString().Contains("OnValidate"); - if (isInOnValidate) - { - var pool = m_ProbeCameraCache; - UnityEditor.EditorApplication.delayCall += () => pool.Dispose(); - m_ProbeCameraCache = null; - } - else - { -#endif - m_ProbeCameraCache.Dispose(); - m_ProbeCameraCache = null; -#if UNITY_EDITOR - } -#endif - } - - CameraCaptureBridge.enabled = false; - - // Dispose of Render Pipeline can be call either by OnValidate() or by OnDisable(). - // Inside an OnValidate() call we can't call a DestroyImmediate(). - // Here we are releasing our singleton to not leak while doing a domain reload. - // However this is doing a call to DestroyImmediate(). - // To workaround this, and was we only leak with Singleton while doing domain reload (and not in OnValidate) - // we are detecting if we are in an OnValidate call and releasing the Singleton only if it is not the case. - if (!m_Asset.isInOnValidateCall) - HDUtils.ReleaseComponentSingletons(); - } - - - void Resize(HDCamera hdCamera) - { - bool resolutionChanged = (hdCamera.actualWidth > m_MaxCameraWidth) || (hdCamera.actualHeight > m_MaxCameraHeight); - - if (resolutionChanged || LightLoopNeedResize(hdCamera, m_TileAndClusterData)) - { - // update recorded window resolution - m_MaxCameraWidth = Mathf.Max(m_MaxCameraWidth, hdCamera.actualWidth); - m_MaxCameraHeight = Mathf.Max(m_MaxCameraHeight, hdCamera.actualHeight); - - if (m_MaxCameraWidth > 0 && m_MaxCameraHeight > 0) - { - LightLoopReleaseResolutionDependentBuffers(); - m_DbufferManager.ReleaseResolutionDependentBuffers(); - m_SharedRTManager.DisposeCoarseStencilBuffer(); - } - - LightLoopAllocResolutionDependentBuffers(hdCamera, m_MaxCameraWidth, m_MaxCameraHeight); - m_DbufferManager.AllocResolutionDependentBuffers(hdCamera, m_MaxCameraWidth, m_MaxCameraHeight); - m_SharedRTManager.AllocateCoarseStencilBuffer(m_MaxCameraWidth, m_MaxCameraHeight, hdCamera.viewCount); - } - } - - void PushGlobalParams(HDCamera hdCamera, CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.PushGlobalParameters))) - { - // Set up UnityPerFrame CBuffer. - PushSubsurfaceScatteringGlobalParams(hdCamera, cmd); - - PushDecalsGlobalParams(hdCamera, cmd); - - Fog.PushFogShaderParameters(hdCamera, cmd); - - PushVolumetricLightingGlobalParams(hdCamera, cmd, m_FrameCount); - - SetMicroShadowingSettings(hdCamera, cmd); - - HDShadowSettings shadowSettings = hdCamera.volumeStack.GetComponent(); - cmd.SetGlobalFloat(HDShaderIDs._DirectionalTransmissionMultiplier, shadowSettings.directionalTransmissionMultiplier.value); - - m_AmbientOcclusionSystem.PushGlobalParameters(hdCamera, cmd); - - var ssRefraction = hdCamera.volumeStack.GetComponent() - ?? ScreenSpaceRefraction.defaultInstance; - ssRefraction.PushShaderParameters(cmd); - - // Set up UnityPerView CBuffer. - hdCamera.SetupGlobalParams(cmd, m_FrameCount); - - cmd.SetGlobalVector(HDShaderIDs._IndirectLightingMultiplier, new Vector4(hdCamera.volumeStack.GetComponent().indirectDiffuseIntensity.value, 0, 0, 0)); - - // It will be overridden for transparent pass. - cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, (int)UnityEngine.Rendering.ColorWriteMask.All); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors)) - { - var buf = m_SharedRTManager.GetMotionVectorsBuffer(); - - cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, buf); - cmd.SetGlobalVector( HDShaderIDs._CameraMotionVectorsSize, new Vector4(buf.referenceSize.x, - buf.referenceSize.y, - 1.0f / buf.referenceSize.x, - 1.0f / buf.referenceSize.y)); - cmd.SetGlobalVector(HDShaderIDs._CameraMotionVectorsScale, new Vector4(buf.referenceSize.x / (float)buf.rt.width, - buf.referenceSize.y / (float)buf.rt.height)); - } - else - { - cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, TextureXR.GetBlackTexture()); - } - - // Light loop stuff... - if (hdCamera.IsSSREnabled()) - cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, m_SsrLightingTexture); - else - cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, TextureXR.GetClearTexture()); - - // Off screen rendering is disabled for most of the frame by default. - cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 0); - cmd.SetGlobalFloat(HDShaderIDs._ReplaceDiffuseForIndirect, hdCamera.frameSettings.IsEnabled(FrameSettingsField.ReplaceDiffuseForIndirect) ? 1.0f : 0.0f); - cmd.SetGlobalInt(HDShaderIDs._EnableSkyReflection, hdCamera.frameSettings.IsEnabled(FrameSettingsField.SkyReflection) ? 1 : 0); - - m_SkyManager.SetGlobalSkyData(cmd, hdCamera); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) - { - bool validIndirectDiffuse = ValidIndirectDiffuseState(hdCamera); - cmd.SetGlobalInt(HDShaderIDs._RaytracedIndirectDiffuse, validIndirectDiffuse ? 1 : 0); - - // Bind the camera's ray tracing frame index - cmd.SetGlobalInt(HDShaderIDs._RaytracingFrameIndex, RayTracingFrameIndex(hdCamera)); - } - else - { - cmd.SetGlobalInt(HDShaderIDs._RaytracedIndirectDiffuse, 0); - } - cmd.SetGlobalFloat(HDShaderIDs._ContactShadowOpacity, m_ContactShadows.opacity.value); - } - } - - void CopyDepthBufferIfNeeded(HDCamera hdCamera, CommandBuffer cmd) - { - if (!m_IsDepthBufferCopyValid) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CopyDepthBuffer))) - { - // TODO: maybe we don't actually need the top MIP level? - // That way we could avoid making the copy, and build the MIP hierarchy directly. - // The downside is that our SSR tracing accuracy would decrease a little bit. - // But since we never render SSR at full resolution, this may be acceptable. - - // TODO: reading the depth buffer with a compute shader will cause it to decompress in place. - // On console, to preserve the depth test performance, we must NOT decompress the 'm_CameraDepthStencilBuffer' in place. - // We should call decompressDepthSurfaceToCopy() and decompress it to 'm_CameraDepthBufferMipChain'. - m_GPUCopy.SampleCopyChannel_xyzw2x(cmd, m_SharedRTManager.GetDepthStencilBuffer(), m_SharedRTManager.GetDepthTexture(), new RectInt(0, 0, hdCamera.actualWidth, hdCamera.actualHeight)); - // Depth texture is now ready, bind it. - cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthTexture()); - } - m_IsDepthBufferCopyValid = true; - } - } - - void BuildCoarseStencilAndResolveIfNeeded(HDCamera hdCamera, RTHandle depthStencilBuffer, RTHandle resolvedStencilBuffer, ComputeBuffer coarseStencilBuffer, CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CoarseStencilGeneration))) - { - bool MSAAEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - - // The following features require a copy of the stencil, if none are active, no need to do the resolve. - bool resolveIsNecessary = GetFeatureVariantsEnabled(hdCamera.frameSettings); - resolveIsNecessary = resolveIsNecessary || hdCamera.IsSSREnabled(); - - // We need the resolve only with msaa - resolveIsNecessary = resolveIsNecessary && MSAAEnabled; - - ComputeShader cs = defaultResources.shaders.resolveStencilCS; - int kernel = SampleCountToPassIndex(MSAAEnabled ? hdCamera.msaaSamples : MSAASamples.None); - kernel = resolveIsNecessary ? kernel + 3 : kernel; // We have a different variant if we need to resolve to non-MSAA stencil - int coarseStencilWidth = HDUtils.DivRoundUp(hdCamera.actualWidth, 8); - int coarseStencilHeight = HDUtils.DivRoundUp(hdCamera.actualHeight, 8); - cmd.SetGlobalVector(HDShaderIDs._CoarseStencilBufferSize, new Vector4(coarseStencilWidth, coarseStencilHeight, 1.0f / coarseStencilWidth, 1.0f / coarseStencilHeight)); - cmd.SetComputeBufferParam(cs, kernel, HDShaderIDs._CoarseStencilBuffer, coarseStencilBuffer); - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._StencilTexture, depthStencilBuffer, 0, RenderTextureSubElement.Stencil); - - if (resolveIsNecessary) - { - cmd.SetComputeTextureParam(cs, kernel, HDShaderIDs._OutputStencilBuffer, resolvedStencilBuffer); - } - - cmd.DispatchCompute(cs, kernel, coarseStencilWidth, coarseStencilHeight, hdCamera.viewCount); - } - } - - void SetMicroShadowingSettings(HDCamera hdCamera, CommandBuffer cmd) - { - MicroShadowing microShadowingSettings = hdCamera.volumeStack.GetComponent(); - cmd.SetGlobalFloat(HDShaderIDs._MicroShadowOpacity, microShadowingSettings.enable.value ? microShadowingSettings.opacity.value : 0.0f); - } - - void ConfigureKeywords(bool enableBakeShadowMask, HDCamera hdCamera, CommandBuffer cmd) - { - // Globally enable (for GBuffer shader and forward lit (opaque and transparent) the keyword SHADOWS_SHADOWMASK - CoreUtils.SetKeyword(cmd, "SHADOWS_SHADOWMASK", enableBakeShadowMask); - // Configure material to use depends on shadow mask option - m_CurrentRendererConfigurationBakedLighting = enableBakeShadowMask ? HDUtils.k_RendererConfigurationBakedLightingWithShadowMask : HDUtils.k_RendererConfigurationBakedLighting; - m_currentDebugViewMaterialGBuffer = enableBakeShadowMask ? m_DebugViewMaterialGBufferShadowMask : m_DebugViewMaterialGBuffer; - - CoreUtils.SetKeyword(cmd, "LIGHT_LAYERS", hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers)); - cmd.SetGlobalInt(HDShaderIDs._EnableLightLayers, hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers) ? 1 : 0); - - // configure keyword for both decal.shader and material - if (m_Asset.currentPlatformRenderPipelineSettings.supportDecals) - { - CoreUtils.SetKeyword(cmd, "DECALS_OFF", false); - CoreUtils.SetKeyword(cmd, "DECALS_3RT", !m_Asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask); - CoreUtils.SetKeyword(cmd, "DECALS_4RT", m_Asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask); - } - else - { - CoreUtils.SetKeyword(cmd, "DECALS_OFF", true); - CoreUtils.SetKeyword(cmd, "DECALS_3RT", false); - CoreUtils.SetKeyword(cmd, "DECALS_4RT", false); - } - - // Raise the normal buffer flag only if we are in forward rendering - CoreUtils.SetKeyword(cmd, "WRITE_NORMAL_BUFFER", hdCamera.frameSettings.litShaderMode == LitShaderMode.Forward); - - // Raise or remove the depth msaa flag based on the frame setting - CoreUtils.SetKeyword(cmd, "WRITE_MSAA_DEPTH", hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)); - } - - struct RenderRequest - { - public struct Target - { - public RenderTargetIdentifier id; - public CubemapFace face; - public RenderTexture copyToTarget; - } - public HDCamera hdCamera; - public bool clearCameraSettings; - public Target target; - public HDCullingResults cullingResults; - public int index; - // Indices of render request to render before this one - public List dependsOnRenderRequestIndices; - public CameraSettings cameraSettings; - public List<(HDProbe.RenderData, HDProbe)> viewDependentProbesData; - } - struct HDCullingResults - { - public CullingResults cullingResults; - public CullingResults? customPassCullingResults; - public HDProbeCullingResults hdProbeCullingResults; - public DecalSystem.CullResult decalCullResults; - // TODO: DecalCullResults - - internal void Reset() - { - hdProbeCullingResults.Reset(); - if (decalCullResults != null) - decalCullResults.Clear(); - else - decalCullResults = GenericPool.Get(); - } - } - - /// - /// RenderPipeline Render implementation. - /// - /// Current ScriptableRenderContext. - /// List of cameras to render. - protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras) - { -#if UNITY_EDITOR - if (!m_ResourcesInitialized) - return; -#endif - - if (!m_ValidAPI || cameras.Length == 0) - return; - - GetOrCreateDefaultVolume(); - GetOrCreateDebugTextures(); - - // This function should be called once every render (once for all camera) - LightLoopNewRender(); - - BeginFrameRendering(renderContext, cameras); - - // Check if we can speed up FrameSettings process by skiping history - // or go in detail if debug is activated. Done once for all renderer. - m_FrameSettingsHistoryEnabled = FrameSettingsHistory.enabled; - - int newCount = Time.frameCount; - bool newFrame = newCount != m_FrameCount; - m_FrameCount = newCount; - - if (newFrame) - { - m_LastTime = m_Time; // Only update time once per frame. - m_Time = Time.time; // Does NOT take the 'animateMaterials' setting into account. - m_LastTime = Mathf.Min(m_Time, m_LastTime); // Guard against broken Unity behavior. Should not be necessary. - - m_ProbeCameraCache.ClearCamerasUnusedFor(2, m_FrameCount); - HDCamera.CleanUnused(); - } - - var dynResHandler = DynamicResolutionHandler.instance; - dynResHandler.Update(m_Asset.currentPlatformRenderPipelineSettings.dynamicResolutionSettings, () => - { - var hdrp = (RenderPipelineManager.currentPipeline as HDRenderPipeline); - var stencilBuffer = hdrp.m_SharedRTManager.GetDepthStencilBuffer().rt; - var stencilBufferSize = new Vector2Int(stencilBuffer.width, stencilBuffer.height); - hdrp.m_SharedRTManager.ComputeDepthBufferMipChainSize(DynamicResolutionHandler.instance.GetScaledSize(stencilBufferSize)); - } - ); - - // This syntax is awful and hostile to debugging, please don't use it... - using (ListPool.Get(out List renderRequests)) - using (ListPool.Get(out List rootRenderRequestIndices)) - using (HashSetPool.Get(out HashSet skipClearCullingResults)) - using (DictionaryPool>.Get(out Dictionary> renderRequestIndicesWhereTheProbeIsVisible)) - using (ListPool.Get(out List cameraSettings)) - using (ListPool.Get(out List cameraPositionSettings)) - { - // With XR multi-pass enabled, each camera can be rendered multiple times with different parameters - var multipassCameras = m_XRSystem.SetupFrame(cameras, m_Asset.currentPlatformRenderPipelineSettings.xrSettings.singlePass, m_DebugDisplaySettings.data.xrSinglePassTestMode); - -#if UNITY_EDITOR - // See comment below about the preview camera workaround - bool hasGameViewCamera = false; - foreach (var c in cameras) - { - if (c.cameraType == CameraType.Game) - { - hasGameViewCamera = true; - break; - } - } -#endif - - // Culling loop - foreach ((Camera camera, XRPass xrPass) in multipassCameras) - { - if (camera == null) - continue; - -#if UNITY_EDITOR - // We selecting a camera in the editor, we have a preview that is drawn. - // For legacy reasons, Unity will render all preview cameras when rendering the GameView - // Actually, we don't need this here because we call explicitly Camera.Render when we - // need a preview - // - // This is an issue, because at some point, you end up with 2 cameras to render: - // - Main Camera (game view) - // - Preview Camera (preview) - // If the preview camera is rendered last, it will alter the "GameView RT" RenderTexture - // that was previously rendered by the Main Camera. - // This is an issue. - // - // Meanwhile, skipping all preview camera when rendering the game views is sane, - // and will workaround the aformentionned issue. - if (hasGameViewCamera && camera.cameraType == CameraType.Preview) - continue; -#endif - - bool cameraRequestedDynamicRes = false; - HDAdditionalCameraData hdCam; - if (camera.TryGetComponent(out hdCam)) - { - cameraRequestedDynamicRes = hdCam.allowDynamicResolution; - - // We are in a case where the platform does not support hw dynamic resolution, so we force the software fallback. - // TODO: Expose the graphics caps info on whether the platform supports hw dynamic resolution or not. - // Temporarily disable HW Dynamic resolution on metal until the problems we have with it are fixed - bool isMetal = (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal); - if (isMetal || (dynResHandler.RequestsHardwareDynamicResolution() && cameraRequestedDynamicRes && !camera.allowDynamicResolution)) - { - dynResHandler.ForceSoftwareFallback(); - } - } - - dynResHandler.SetCurrentCameraRequest(cameraRequestedDynamicRes); - RTHandles.SetHardwareDynamicResolutionState(dynResHandler.HardwareDynamicResIsEnabled()); - - VFXManager.PrepareCamera(camera); - - // Reset pooled variables - cameraSettings.Clear(); - cameraPositionSettings.Clear(); - skipClearCullingResults.Clear(); - - var cullingResults = UnsafeGenericPool.Get(); - cullingResults.Reset(); - - // Try to compute the parameters of the request or skip the request - var skipRequest = !TryCalculateFrameParameters( - camera, - xrPass, - out var additionalCameraData, - out var hdCamera, - out var cullingParameters); - - // Note: In case of a custom render, we have false here and 'TryCull' is not executed - if (!skipRequest) - { - var needCulling = true; - - // In XR multipass, culling results can be shared if the pass has the same culling id - if (xrPass.multipassId > 0) - { - foreach (var req in renderRequests) - { - if (camera == req.hdCamera.camera && req.hdCamera.xr.cullingPassId == xrPass.cullingPassId) - { - UnsafeGenericPool.Release(cullingResults); - cullingResults = req.cullingResults; - skipClearCullingResults.Add(req.index); - needCulling = false; - } - } - } - - if (needCulling) - skipRequest = !TryCull(camera, hdCamera, renderContext, m_SkyManager, cullingParameters, m_Asset, ref cullingResults); - } - - if (additionalCameraData != null && additionalCameraData.hasCustomRender) - { - skipRequest = true; - // Execute custom render - additionalCameraData.ExecuteCustomRender(renderContext, hdCamera); - } - - if (skipRequest) - { - // Submit render context and free pooled resources for this request - renderContext.Submit(); - UnsafeGenericPool.Release(cullingResults); - UnityEngine.Rendering.RenderPipeline.EndCameraRendering(renderContext, camera); - continue; - } - - // Select render target - RenderTargetIdentifier targetId = camera.targetTexture ?? new RenderTargetIdentifier(BuiltinRenderTextureType.CameraTarget); - if (camera.targetTexture != null) - { - camera.targetTexture.IncrementUpdateCount(); // Necessary if the texture is used as a cookie. - } - - // Render directly to XR render target if active - if (hdCamera.xr.enabled && hdCamera.xr.renderTargetValid) - targetId = hdCamera.xr.renderTarget; - - // Add render request - var request = new RenderRequest - { - hdCamera = hdCamera, - cullingResults = cullingResults, - target = new RenderRequest.Target - { - id = targetId, - face = CubemapFace.Unknown - }, - dependsOnRenderRequestIndices = ListPool.Get(), - index = renderRequests.Count, - cameraSettings = CameraSettings.From(hdCamera), - viewDependentProbesData = ListPool<(HDProbe.RenderData, HDProbe)>.Get() - // TODO: store DecalCullResult - }; - renderRequests.Add(request); - // This is a root render request - rootRenderRequestIndices.Add(request.index); - - // Add visible probes to list - for (var i = 0; i < cullingResults.cullingResults.visibleReflectionProbes.Length; ++i) - { - var visibleProbe = cullingResults.cullingResults.visibleReflectionProbes[i]; - - // TODO: The following fix is temporary. - // We should investigate why we got null cull result when we change scene - if (visibleProbe == null || visibleProbe.Equals(null) || visibleProbe.reflectionProbe == null || visibleProbe.reflectionProbe.Equals(null)) - continue; - - HDAdditionalReflectionData additionalReflectionData; - if (!visibleProbe.reflectionProbe.TryGetComponent(out additionalReflectionData)) - additionalReflectionData = visibleProbe.reflectionProbe.gameObject.AddComponent(); - - AddVisibleProbeVisibleIndexIfUpdateIsRequired(additionalReflectionData, request.index); - } - for (var i = 0; i < cullingResults.hdProbeCullingResults.visibleProbes.Count; ++i) - AddVisibleProbeVisibleIndexIfUpdateIsRequired(cullingResults.hdProbeCullingResults.visibleProbes[i], request.index); - - // local function to help insertion of visible probe - void AddVisibleProbeVisibleIndexIfUpdateIsRequired(HDProbe probe, int visibleInIndex) - { - // Don't add it if it has already been updated this frame or not a real time probe - // TODO: discard probes that are baked once per frame and already baked this frame - if (!probe.requiresRealtimeUpdate) - return; - - // Notify that we render the probe at this frame - probe.SetIsRendered(m_FrameCount); - - float visibility = ComputeVisibility(visibleInIndex, probe); - - if (!renderRequestIndicesWhereTheProbeIsVisible.TryGetValue(probe, out var visibleInIndices)) - { - visibleInIndices = ListPool<(int index, float weight)>.Get(); - renderRequestIndicesWhereTheProbeIsVisible.Add(probe, visibleInIndices); - } - if (!visibleInIndices.Contains((visibleInIndex, visibility))) - visibleInIndices.Add((visibleInIndex, visibility)); - } - - float ComputeVisibility(int visibleInIndex, HDProbe visibleProbe) - { - var visibleInRenderRequest = renderRequests[visibleInIndex]; - var viewerTransform = visibleInRenderRequest.hdCamera.camera.transform; - return HDUtils.ComputeWeightedLinearFadeDistance(visibleProbe.transform.position, viewerTransform.position, visibleProbe.weight, visibleProbe.fadeDistance); - } - } - - foreach (var probeToRenderAndDependencies in renderRequestIndicesWhereTheProbeIsVisible) - { - var visibleProbe = probeToRenderAndDependencies.Key; - var visibilities = probeToRenderAndDependencies.Value; - - // Two cases: - // - If the probe is view independent, we add only one render request per face that is - // a dependency for all its 'visibleIn' render requests - // - If the probe is view dependent, we add one render request per face per 'visibleIn' - // render requests - var isViewDependent = visibleProbe.type == ProbeSettings.ProbeType.PlanarProbe; - - Camera parentCamera; - - if (isViewDependent) - { - for (int i = 0; i < visibilities.Count; ++i) - { - var visibility = visibilities[i]; - if (visibility.weight <= 0f) - continue; - - var visibleInIndex = visibility.index; - var visibleInRenderRequest = renderRequests[visibleInIndex]; - var viewerTransform = visibleInRenderRequest.hdCamera.camera.transform; - - parentCamera = visibleInRenderRequest.hdCamera.camera; - - var renderDatas = ListPool.Get(); - - AddHDProbeRenderRequests( - visibleProbe, - viewerTransform, - new List<(int index, float weight)>{visibility}, - HDUtils.GetSceneCullingMaskFromCamera(visibleInRenderRequest.hdCamera.camera), - parentCamera, - visibleInRenderRequest.hdCamera.camera.fieldOfView, - visibleInRenderRequest.hdCamera.camera.aspect, - ref renderDatas - ); - - foreach (var renderData in renderDatas) - { - visibleInRenderRequest.viewDependentProbesData.Add((renderData, visibleProbe)); - } - - ListPool.Release(renderDatas); - } - } - else - { - // No single parent camera for view dependent probes. - parentCamera = null; - - bool visibleInOneViewer = false; - for (int i = 0; i < visibilities.Count && !visibleInOneViewer; ++i) - { - if (visibilities[i].weight > 0f) - visibleInOneViewer = true; - } - if (visibleInOneViewer) - { - var renderDatas = ListPool.Get(); - AddHDProbeRenderRequests(visibleProbe, null, visibilities, 0, parentCamera, referenceFieldOfView: 90, referenceAspect: 1, ref renderDatas); - ListPool.Release(renderDatas); - } - } - } - foreach (var pair in renderRequestIndicesWhereTheProbeIsVisible) - ListPool<(int index, float weight)>.Release(pair.Value); - renderRequestIndicesWhereTheProbeIsVisible.Clear(); - - // Local function to share common code between view dependent and view independent requests - void AddHDProbeRenderRequests( - HDProbe visibleProbe, - Transform viewerTransform, - List<(int index, float weight)> visibilities, - ulong overrideSceneCullingMask, - Camera parentCamera, - float referenceFieldOfView, - float referenceAspect, - ref List renderDatas - ) - { - var position = ProbeCapturePositionSettings.ComputeFrom( - visibleProbe, - viewerTransform - ); - cameraSettings.Clear(); - cameraPositionSettings.Clear(); - HDRenderUtilities.GenerateRenderingSettingsFor( - visibleProbe.settings, position, - cameraSettings, cameraPositionSettings, overrideSceneCullingMask, - referenceFieldOfView: referenceFieldOfView, - referenceAspect: referenceAspect - ); - - switch (visibleProbe.type) - { - case ProbeSettings.ProbeType.ReflectionProbe: - int desiredProbeSize = (int)((HDRenderPipeline)RenderPipelineManager.currentPipeline).currentPlatformRenderPipelineSettings.lightLoopSettings.reflectionCubemapSize; - if (visibleProbe.realtimeTexture == null || visibleProbe.realtimeTexture.width != desiredProbeSize) - { - visibleProbe.SetTexture(ProbeSettings.Mode.Realtime, HDRenderUtilities.CreateReflectionProbeRenderTarget(desiredProbeSize)); - } - break; - case ProbeSettings.ProbeType.PlanarProbe: - int desiredPlanarProbeSize = (int)visibleProbe.resolution; - if (visibleProbe.realtimeTexture == null || visibleProbe.realtimeTexture.width != desiredPlanarProbeSize) - { - visibleProbe.SetTexture(ProbeSettings.Mode.Realtime, HDRenderUtilities.CreatePlanarProbeRenderTarget(desiredPlanarProbeSize)); - } - // Set the viewer's camera as the default camera anchor - for (var i = 0; i < cameraSettings.Count; ++i) - { - var v = cameraSettings[i]; - if (v.volumes.anchorOverride == null) - { - v.volumes.anchorOverride = viewerTransform; - cameraSettings[i] = v; - } - } - break; - } - - for (int j = 0; j < cameraSettings.Count; ++j) - { - var camera = m_ProbeCameraCache.GetOrCreate((viewerTransform, visibleProbe, j), m_FrameCount, CameraType.Reflection); - var additionalCameraData = camera.GetComponent(); - - if (additionalCameraData == null) - additionalCameraData = camera.gameObject.AddComponent(); - additionalCameraData.hasPersistentHistory = true; - - // We need to set a targetTexture with the right otherwise when setting pixelRect, it will be rescaled internally to the size of the screen - camera.targetTexture = visibleProbe.realtimeTexture; - camera.gameObject.hideFlags = HideFlags.HideAndDontSave; - camera.gameObject.SetActive(false); - - // Warning: accessing Object.name generate 48B of garbage at each frame here - // camera.name = HDUtils.ComputeProbeCameraName(visibleProbe.name, j, viewerTransform?.name); - // Non Alloc version of ComputeProbeCameraName but without the viewerTransform name part - camera.name = visibleProbe.probeName[j]; - - camera.ApplySettings(cameraSettings[j]); - camera.ApplySettings(cameraPositionSettings[j]); - camera.cameraType = CameraType.Reflection; - camera.pixelRect = new Rect(0, 0, visibleProbe.realtimeTexture.width, visibleProbe.realtimeTexture.height); - - var _cullingResults = UnsafeGenericPool.Get(); - _cullingResults.Reset(); - - if (!(TryCalculateFrameParameters( - camera, - m_XRSystem.emptyPass, - out _, - out var hdCamera, - out var cullingParameters - ) - && TryCull( - camera, hdCamera, renderContext, m_SkyManager, cullingParameters, m_Asset, - ref _cullingResults - ))) - { - // Skip request and free resources - UnsafeGenericPool.Release(_cullingResults); - continue; - } - - // HACK! We render the probe until we know the ambient probe for the associated sky context is ready. - // For one-off rendering the dynamic ambient probe will be set to black until they are not processed, leading to faulty rendering. - // So we enqueue another rendering and then we will not set the probe texture until we have rendered with valid ambient probe. - if (!m_SkyManager.HasSetValidAmbientProbe(hdCamera)) - { - visibleProbe.ForceRenderingNextUpdate(); - } - - hdCamera.parentCamera = parentCamera; // Used to inherit the properties of the view - - HDAdditionalCameraData hdCam; - camera.TryGetComponent(out hdCam); - hdCam.flipYMode = visibleProbe.type == ProbeSettings.ProbeType.ReflectionProbe - ? HDAdditionalCameraData.FlipYMode.ForceFlipY - : HDAdditionalCameraData.FlipYMode.Automatic; - - if (!visibleProbe.realtimeTexture.IsCreated()) - visibleProbe.realtimeTexture.Create(); - - var renderData = new HDProbe.RenderData( - camera.worldToCameraMatrix, - camera.projectionMatrix, - camera.transform.position, - camera.transform.rotation, - cameraSettings[j].frustum.fieldOfView, - cameraSettings[j].frustum.aspect - ); - - renderDatas.Add(renderData); - - visibleProbe.SetRenderData( - ProbeSettings.Mode.Realtime, - renderData - ); - - // TODO: Assign the actual final target to render to. - // Currently, we use a target for each probe, and then copy it into the cache before using it - // during the lighting pass. - // But what we actually want here, is to render directly into the cache (either CubeArray, - // or Texture2DArray) - // To do so, we need to first allocate in the cache the location of the target and then assign - // it here. - var request = new RenderRequest - { - hdCamera = hdCamera, - cullingResults = _cullingResults, - clearCameraSettings = true, - dependsOnRenderRequestIndices = ListPool.Get(), - index = renderRequests.Count, - cameraSettings = cameraSettings[j], - viewDependentProbesData = ListPool<(HDProbe.RenderData, HDProbe)>.Get() - // TODO: store DecalCullResult - }; - - if (m_SkyManager.HasSetValidAmbientProbe(hdCamera)) - { - // As we render realtime texture on GPU side, we must tag the texture so our texture array cache detect that something have change - visibleProbe.realtimeTexture.IncrementUpdateCount(); - - if (cameraSettings.Count > 1) - { - var face = (CubemapFace)j; - request.target = new RenderRequest.Target - { - copyToTarget = visibleProbe.realtimeTexture, - face = face - }; - } - else - { - request.target = new RenderRequest.Target - { - id = visibleProbe.realtimeTexture, - face = CubemapFace.Unknown - }; - } - } - - renderRequests.Add(request); - - - foreach (var visibility in visibilities) - renderRequests[visibility.index].dependsOnRenderRequestIndices.Add(request.index); - } - } - - // TODO: Refactor into a method. If possible remove the intermediate target - // Find max size for Cubemap face targets and resize/allocate if required the intermediate render target - { - var size = Vector2Int.zero; - for (int i = 0; i < renderRequests.Count; ++i) - { - var renderRequest = renderRequests[i]; - var isCubemapFaceTarget = renderRequest.target.face != CubemapFace.Unknown; - if (!isCubemapFaceTarget) - continue; - - var width = renderRequest.hdCamera.actualWidth; - var height = renderRequest.hdCamera.actualHeight; - size.x = Mathf.Max(width, size.x); - size.y = Mathf.Max(height, size.y); - } - - if (size != Vector2.zero) - { - if (m_TemporaryTargetForCubemaps != null) - { - if (m_TemporaryTargetForCubemaps.width != size.x - || m_TemporaryTargetForCubemaps.height != size.y) - { - m_TemporaryTargetForCubemaps.Release(); - m_TemporaryTargetForCubemaps = null; - } - } - if (m_TemporaryTargetForCubemaps == null) - { - m_TemporaryTargetForCubemaps = new RenderTexture( - size.x, size.y, 1, GraphicsFormat.R16G16B16A16_SFloat - ) - { - autoGenerateMips = false, - useMipMap = false, - name = "Temporary Target For Cubemap Face", - volumeDepth = 1, - useDynamicScale = false - }; - } - } - } - - using (ListPool.Get(out List renderRequestIndicesToRender)) - { - // Flatten the render requests graph in an array that guarantee dependency constraints - { - using (GenericPool>.Get(out Stack stack)) - { - stack.Clear(); - for (int i = rootRenderRequestIndices.Count -1; i >= 0; --i) - { - stack.Push(rootRenderRequestIndices[i]); - while (stack.Count > 0) - { - var index = stack.Pop(); - if (!renderRequestIndicesToRender.Contains(index)) - renderRequestIndicesToRender.Add(index); - - var request = renderRequests[index]; - for (int j = 0; j < request.dependsOnRenderRequestIndices.Count; ++j) - stack.Push(request.dependsOnRenderRequestIndices[j]); - } - } - } - } - - using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.HDRenderPipelineAllRenderRequest))) - { - // Execute render request graph, in reverse order - for (int i = renderRequestIndicesToRender.Count - 1; i >= 0; --i) - { - var renderRequestIndex = renderRequestIndicesToRender[i]; - var renderRequest = renderRequests[renderRequestIndex]; - - var cmd = CommandBufferPool.Get(""); - - // TODO: Avoid the intermediate target and render directly into final target - // CommandBuffer.Blit does not work on Cubemap faces - // So we use an intermediate RT to perform a CommandBuffer.CopyTexture in the target Cubemap face - if (renderRequest.target.face != CubemapFace.Unknown) - { - if (!m_TemporaryTargetForCubemaps.IsCreated()) - m_TemporaryTargetForCubemaps.Create(); - - var hdCamera = renderRequest.hdCamera; - ref var target = ref renderRequest.target; - target.id = m_TemporaryTargetForCubemaps; - } - - // The HDProbe store only one RenderData per probe, however RenderData can be view dependent (e.g. planar probes). - // To avoid that the render data for the wrong view is used, we previously store a copy of the render data - // for each viewer and we are going to set it on the probe right before said viewer is rendered. - foreach (var probeDataPair in renderRequest.viewDependentProbesData) - { - var probe = probeDataPair.Item2; - var probeRenderData = probeDataPair.Item1; - probe.SetRenderData(ProbeSettings.Mode.Realtime, probeRenderData); - } - - // var aovRequestIndex = 0; - foreach (var aovRequest in renderRequest.hdCamera.aovRequests) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.HDRenderPipelineRenderAOV))) - { - cmd.SetInvertCulling(renderRequest.cameraSettings.invertFaceCulling); - ExecuteRenderRequest(renderRequest, renderContext, cmd, aovRequest); - cmd.SetInvertCulling(false); - } - renderContext.ExecuteCommandBuffer(cmd); - CommandBufferPool.Release(cmd); - renderContext.Submit(); - cmd = CommandBufferPool.Get(); - } - - using (new ProfilingScope(cmd, renderRequest.hdCamera.profilingSampler)) - { - cmd.SetInvertCulling(renderRequest.cameraSettings.invertFaceCulling); - ExecuteRenderRequest(renderRequest, renderContext, cmd, AOVRequestData.defaultAOVRequestDataNonAlloc); - cmd.SetInvertCulling(false); - UnityEngine.Rendering.RenderPipeline.EndCameraRendering(renderContext, renderRequest.hdCamera.camera); - } - - { - var target = renderRequest.target; - // Handle the copy if requested - if (target.copyToTarget != null) - { - cmd.CopyTexture( - target.id, 0, 0, 0, 0, renderRequest.hdCamera.actualWidth, renderRequest.hdCamera.actualHeight, - target.copyToTarget, (int)target.face, 0, 0, 0 - ); - } - if (renderRequest.clearCameraSettings) - // release reference because the RenderTexture might be destroyed before the camera - renderRequest.hdCamera.camera.targetTexture = null; - - ListPool.Release(renderRequest.dependsOnRenderRequestIndices); - ListPool<(HDProbe.RenderData, HDProbe)>.Release(renderRequest.viewDependentProbesData); - - // Culling results can be shared between render requests: clear only when required - if (!skipClearCullingResults.Contains(renderRequest.index)) - { - renderRequest.cullingResults.decalCullResults?.Clear(); - UnsafeGenericPool.Release(renderRequest.cullingResults); - } - } - - // Render XR mirror view once all render requests have been completed - if (i == 0 && renderRequest.hdCamera.camera.cameraType == CameraType.Game && renderRequest.hdCamera.camera.targetTexture == null) - { - HDAdditionalCameraData acd; - if (renderRequest.hdCamera.camera.TryGetComponent(out acd) && acd.xrRendering) - { - m_XRSystem.RenderMirrorView(cmd); - } - } - - // Now that all cameras have been rendered, let's propagate the data required for screen space shadows - PropagateScreenSpaceShadowData(); - - renderContext.ExecuteCommandBuffer(cmd); - CommandBufferPool.Release(cmd); - renderContext.Submit(); - } - } - } - } - - m_XRSystem.ReleaseFrame(); - UnityEngine.Rendering.RenderPipeline.EndFrameRendering(renderContext, cameras); - } - - - void PropagateScreenSpaceShadowData() - { - // For every unique light that has been registered, update the previous transform - foreach (HDAdditionalLightData lightData in m_ScreenSpaceShadowsUnion) - { - lightData.previousTransform = lightData.transform.localToWorldMatrix; - } - } - - void ExecuteRenderRequest( - RenderRequest renderRequest, - ScriptableRenderContext renderContext, - CommandBuffer cmd, - AOVRequestData aovRequest - ) - { - InitializeGlobalResources(renderContext); - - var hdCamera = renderRequest.hdCamera; - var camera = hdCamera.camera; - var cullingResults = renderRequest.cullingResults.cullingResults; - var customPassCullingResults = renderRequest.cullingResults.customPassCullingResults ?? cullingResults; - var hdProbeCullingResults = renderRequest.cullingResults.hdProbeCullingResults; - var decalCullingResults = renderRequest.cullingResults.decalCullResults; - var target = renderRequest.target; - - // Updates RTHandle - hdCamera.BeginRender(cmd); - - if (m_RayTracingSupported) - { - // This call need to happen once per camera - // TODO: This can be wasteful for "compatible" cameras. - // We need to determine the minimum set of feature used by all the camera and build the minimum number of acceleration structures. - BuildRayTracingAccelerationStructure(hdCamera); - } - - using (ListPool.Get(out var aovBuffers)) - { - aovRequest.AllocateTargetTexturesIfRequired(ref aovBuffers); - - // If we render a reflection view or a preview we should not display any debug information - // This need to be call before ApplyDebugDisplaySettings() - if (camera.cameraType == CameraType.Reflection || camera.cameraType == CameraType.Preview) - { - // Neutral allow to disable all debug settings - m_CurrentDebugDisplaySettings = s_NeutralDebugDisplaySettings; - } - else - { - // Make sure we are in sync with the debug menu for the msaa count - m_MSAASamples = m_DebugDisplaySettings.data.msaaSamples; - m_SharedRTManager.SetNumMSAASamples(m_MSAASamples); - - m_DebugDisplaySettings.UpdateCameraFreezeOptions(); - - m_CurrentDebugDisplaySettings = m_DebugDisplaySettings; - } - - aovRequest.SetupDebugData(ref m_CurrentDebugDisplaySettings); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) - { - // Must update after getting DebugDisplaySettings - m_RayCountManager.ClearRayCount(cmd, hdCamera, m_CurrentDebugDisplaySettings.data.countRays); - } - - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DBufferPrepareDrawData))) - { - // TODO: update singleton with DecalCullResults - DecalSystem.instance.CurrentCamera = hdCamera.camera; // Singletons are extremely dangerous... - DecalSystem.instance.LoadCullResults(decalCullingResults); - DecalSystem.instance.UpdateCachedMaterialData(); // textures, alpha or fade distances could've changed - DecalSystem.instance.CreateDrawData(); // prepare data is separate from draw - DecalSystem.instance.UpdateTextureAtlas(cmd); // as this is only used for transparent pass, would've been nice not to have to do this if no transparent renderers are visible, needs to happen after CreateDrawData - } - } - - using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.CustomPassVolumeUpdate))) - { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) - CustomPassVolume.Update(hdCamera); - } - - // Do anything we need to do upon a new frame. - // The NewFrame must be after the VolumeManager update and before Resize because it uses properties set in NewFrame - LightLoopNewFrame(hdCamera); - - // Apparently scissor states can leak from editor code. As it is not used currently in HDRP (apart from VR). We disable scissor at the beginning of the frame. - cmd.DisableScissorRect(); - - Resize(hdCamera); - m_PostProcessSystem.BeginFrame(cmd, hdCamera, this); - - ApplyDebugDisplaySettings(hdCamera, cmd); - - SetupCameraProperties(hdCamera, renderContext, cmd); - - // TODO: Find a correct place to bind these material textures - // We have to bind the material specific global parameters in this mode - foreach (var material in m_MaterialList) - material.Bind(cmd); - - // Frustum cull density volumes on the CPU. Can be performed as soon as the camera is set up. - DensityVolumeList densityVolumes = PrepareVisibleDensityVolumeList(hdCamera, cmd, hdCamera.time); - - // Note: Legacy Unity behave like this for ShadowMask - // When you select ShadowMask in Lighting panel it recompile shaders on the fly with the SHADOW_MASK keyword. - // However there is no C# function that we can query to know what mode have been select in Lighting Panel and it will be wrong anyway. Lighting Panel setup what will be the next bake mode. But until light is bake, it is wrong. - // Currently to know if you need shadow mask you need to go through all visible lights (of CullResult), check the LightBakingOutput struct and look at lightmapBakeType/mixedLightingMode. If one light have shadow mask bake mode, then you need shadow mask features (i.e extra Gbuffer). - // It mean that when we build a standalone player, if we detect a light with bake shadow mask, we generate all shader variant (with and without shadow mask) and at runtime, when a bake shadow mask light is visible, we dynamically allocate an extra GBuffer and switch the shader. - // So the first thing to do is to go through all the light: PrepareLightsForGPU - bool enableBakeShadowMask = PrepareLightsForGPU(cmd, hdCamera, cullingResults, hdProbeCullingResults, densityVolumes, m_CurrentDebugDisplaySettings, aovRequest); - - // Let's bind as soon as possible the light data - BindLightDataParameters(hdCamera, cmd); - - // Configure all the keywords - ConfigureKeywords(enableBakeShadowMask, hdCamera, cmd); - - // Caution: We require sun light here as some skies use the sun light to render, it means that UpdateSkyEnvironment must be called after PrepareLightsForGPU. - // TODO: Try to arrange code so we can trigger this call earlier and use async compute here to run sky convolution during other passes (once we move convolution shader to compute). - if (!m_CurrentDebugDisplaySettings.IsMatcapViewEnabled(hdCamera)) - UpdateSkyEnvironment(hdCamera, renderContext, m_FrameCount, cmd); - else - cmd.SetGlobalTexture(HDShaderIDs._SkyTexture, CoreUtils.magentaCubeTextureArray); - - // PushGlobalParams must be call after UpdateSkyEnvironment so AmbientProbe is correctly setup for volumetric - PushGlobalParams(hdCamera, cmd); - VFXManager.ProcessCameraCommand(camera, cmd); - - - if (GL.wireframe) - { - RenderWireFrame(cullingResults, hdCamera, target.id, renderContext, cmd); - return; - } - - if (m_RenderGraph.enabled) - { - ExecuteWithRenderGraph(renderRequest, aovRequest, aovBuffers, renderContext, cmd); - return; - } - - hdCamera.xr.StartSinglePass(cmd); - - ClearBuffers(hdCamera, cmd); - - // Render XR occlusion mesh to depth buffer early in the frame to improve performance - if (hdCamera.xr.enabled && m_Asset.currentPlatformRenderPipelineSettings.xrSettings.occlusionMesh) - { - hdCamera.xr.StopSinglePass(cmd); - hdCamera.xr.RenderOcclusionMeshes(cmd, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); - hdCamera.xr.StartSinglePass(cmd); - } - - // Bind the custom color/depth before the first custom pass - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) - { - if (m_CustomPassColorBuffer.IsValueCreated) - cmd.SetGlobalTexture(HDShaderIDs._CustomColorTexture, m_CustomPassColorBuffer.Value); - if (m_CustomPassDepthBuffer.IsValueCreated) - cmd.SetGlobalTexture(HDShaderIDs._CustomDepthTexture, m_CustomPassDepthBuffer.Value); - } - - RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforeRendering); - - // This is always false in forward and if it is true, is equivalent of saying we have a partial depth prepass. - bool shouldRenderMotionVectorAfterGBuffer = RenderDepthPrepass(cullingResults, hdCamera, renderContext, cmd); - if (!shouldRenderMotionVectorAfterGBuffer) - { - // If objects motion vectors if enabled, this will render the objects with motion vector into the target buffers (in addition to the depth) - // Note: An object with motion vector must not be render in the prepass otherwise we can have motion vector write that should have been rejected - RenderObjectsMotionVectors(cullingResults, hdCamera, renderContext, cmd); - } - // If we have MSAA, we need to complete the motion vector buffer before buffer resolves, hence we need to run camera mv first. - // This is always fine since shouldRenderMotionVectorAfterGBuffer is always false for forward. - bool needCameraMVBeforeResolve = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - if (needCameraMVBeforeResolve) - { - RenderCameraMotionVectors(cullingResults, hdCamera, renderContext, cmd); - } - - PreRenderSky(hdCamera, cmd); - - // Now that all depths have been rendered, resolve the depth buffer - m_SharedRTManager.ResolveSharedRT(cmd, hdCamera); - - RenderDBuffer(hdCamera, cmd, renderContext, cullingResults); - - RenderGBuffer(cullingResults, hdCamera, renderContext, cmd); - - DecalNormalPatch(hdCamera, cmd, renderContext); - - // We can now bind the normal buffer to be use by any effect - m_SharedRTManager.BindNormalBuffer(cmd); - - // After Depth and Normals/roughness including decals - bool depthBufferModified = RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.AfterOpaqueDepthAndNormal); - - // If the depth was already copied in RenderDBuffer, we force the copy again because the custom pass modified the depth. - if (depthBufferModified) - m_IsDepthBufferCopyValid = false; - - // In both forward and deferred, everything opaque should have been rendered at this point so we can safely copy the depth buffer for later processing. - GenerateDepthPyramid(hdCamera, cmd, FullScreenDebugMode.DepthPyramid); - - // Depth texture is now ready, bind it (Depth buffer could have been bind before if DBuffer is enable) - cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthTexture()); - - if (shouldRenderMotionVectorAfterGBuffer) - { - // See the call RenderObjectsMotionVectors() above and comment - RenderObjectsMotionVectors(cullingResults, hdCamera, renderContext, cmd); - } - - // In case we don't have MSAA, we always run camera motion vectors when is safe to assume Object MV are rendered - if(!needCameraMVBeforeResolve) - { - RenderCameraMotionVectors(cullingResults, hdCamera, renderContext, cmd); - } - -#if UNITY_EDITOR - var showGizmos = camera.cameraType == CameraType.SceneView || - (camera.targetTexture == null && camera.cameraType == CameraType.Game); -#endif - - RenderTransparencyOverdraw(cullingResults, hdCamera, renderContext, cmd); - - if (m_CurrentDebugDisplaySettings.IsDebugMaterialDisplayEnabled() || m_CurrentDebugDisplaySettings.IsMaterialValidationEnabled() || CoreUtils.IsSceneLightingDisabled(hdCamera.camera)) - { - RenderDebugViewMaterial(cullingResults, hdCamera, renderContext, cmd); - } - else if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && - hdCamera.volumeStack.GetComponent().enable.value && - hdCamera.camera.cameraType != CameraType.Preview) - { - // Update the light clusters that we need to update - BuildRayTracingLightCluster(cmd, hdCamera); - - // We only request the light cluster if we are gonna use it for debug mode - if (FullScreenDebugMode.LightCluster == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode && GetRayTracingClusterState()) - { - HDRaytracingLightCluster lightCluster = RequestLightCluster(); - lightCluster.EvaluateClusterDebugView(cmd, hdCamera); - } - - RenderPathTracing(hdCamera, cmd, m_CameraColorBuffer, renderContext, m_FrameCount); - } - else - { - - // When debug is enabled we need to clear otherwise we may see non-shadows areas with stale values. - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.ContactShadows) && m_CurrentDebugDisplaySettings.data.fullScreenDebugMode == FullScreenDebugMode.ContactShadows) - { - CoreUtils.SetRenderTarget(cmd, m_ContactShadowBuffer, ClearFlag.Color, Color.clear); - } - - bool msaaEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - BuildCoarseStencilAndResolveIfNeeded(hdCamera, m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled), - msaaEnabled ? m_SharedRTManager.GetStencilBuffer(msaaEnabled) : null, - m_SharedRTManager.GetCoarseStencilBuffer(), cmd); - - hdCamera.xr.StopSinglePass(cmd); - - var buildLightListTask = new HDGPUAsyncTask("Build light list", ComputeQueueType.Background); - // It is important that this task is in the same queue as the build light list due to dependency it has on it. If really need to move it, put an extra fence to make sure buildLightListTask has finished. - var volumeVoxelizationTask = new HDGPUAsyncTask("Volumetric voxelization", ComputeQueueType.Background); - var SSRTask = new HDGPUAsyncTask("Screen Space Reflection", ComputeQueueType.Background); - var SSAOTask = new HDGPUAsyncTask("SSAO", ComputeQueueType.Background); - - // Avoid garbage by explicitely passing parameters to the lambdas - var asyncParams = new HDGPUAsyncTaskParams - { - renderContext = renderContext, - hdCamera = hdCamera, - frameCount = m_FrameCount, - }; - - var haveAsyncTaskWithShadows = false; - if (hdCamera.frameSettings.BuildLightListRunsAsync()) - { - buildLightListTask.Start(cmd, asyncParams, Callback, !haveAsyncTaskWithShadows); - - haveAsyncTaskWithShadows = true; - - void Callback(CommandBuffer c, HDGPUAsyncTaskParams a) - => BuildGPULightListsCommon(a.hdCamera, c); - } - - if (hdCamera.frameSettings.VolumeVoxelizationRunsAsync()) - { - volumeVoxelizationTask.Start(cmd, asyncParams, Callback, !haveAsyncTaskWithShadows); - - haveAsyncTaskWithShadows = true; - - void Callback(CommandBuffer c, HDGPUAsyncTaskParams a) - => VolumeVoxelizationPass(a.hdCamera, c); - } - - if (hdCamera.frameSettings.SSRRunsAsync()) - { - SSRTask.Start(cmd, asyncParams, Callback, !haveAsyncTaskWithShadows); - - haveAsyncTaskWithShadows = true; - - void Callback(CommandBuffer c, HDGPUAsyncTaskParams a) - => RenderSSR(a.hdCamera, c, a.renderContext); - } - - if (hdCamera.frameSettings.SSAORunsAsync()) - { - SSAOTask.Start(cmd, asyncParams, AsyncSSAODispatch, !haveAsyncTaskWithShadows); - haveAsyncTaskWithShadows = true; - - void AsyncSSAODispatch(CommandBuffer c, HDGPUAsyncTaskParams a) - => m_AmbientOcclusionSystem.Dispatch(c, a.hdCamera, a.frameCount); - } - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderShadowMaps))) - { - // This call overwrites camera properties passed to the shader system. - RenderShadowMaps(renderContext, cmd, cullingResults, hdCamera); - - hdCamera.SetupGlobalParams(cmd, m_FrameCount); - } - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) - { - // Update the light clusters that we need to update - BuildRayTracingLightCluster(cmd, hdCamera); - - // We only request the light cluster if we are gonna use it for debug mode - if (FullScreenDebugMode.LightCluster == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode && GetRayTracingClusterState()) - { - HDRaytracingLightCluster lightCluster = RequestLightCluster(); - lightCluster.EvaluateClusterDebugView(cmd, hdCamera); - } - - bool validIndirectDiffuse = ValidIndirectDiffuseState(hdCamera); - if (validIndirectDiffuse) - { - RenderIndirectDiffuse(hdCamera, cmd, renderContext, m_FrameCount); - } - } - - if (!hdCamera.frameSettings.SSRRunsAsync()) - { - // Needs the depth pyramid and motion vectors, as well as the render of the previous frame. - RenderSSR(hdCamera, cmd, renderContext); - } - - // Contact shadows needs the light loop so we do them after the build light list - if (hdCamera.frameSettings.BuildLightListRunsAsync()) - { - buildLightListTask.EndWithPostWork(cmd, hdCamera, Callback); - - void Callback(CommandBuffer c, HDCamera cam) - { - var hdrp = (RenderPipelineManager.currentPipeline as HDRenderPipeline); - var globalParams = hdrp.PrepareLightLoopGlobalParameters(cam); - PushLightLoopGlobalParams(globalParams, c); - } - } - else - { - BuildGPULightLists(hdCamera, cmd); - } - - if (!hdCamera.frameSettings.SSAORunsAsync()) - m_AmbientOcclusionSystem.Render(cmd, hdCamera, renderContext, m_FrameCount); - - // Run the contact shadows here as they the light list - HDUtils.CheckRTCreated(m_ContactShadowBuffer); - RenderContactShadows(hdCamera, cmd); - PushFullScreenDebugTexture(hdCamera, cmd, m_ContactShadowBuffer, FullScreenDebugMode.ContactShadows); - - hdCamera.xr.StartSinglePass(cmd); - RenderScreenSpaceShadows(hdCamera, cmd); - hdCamera.xr.StopSinglePass(cmd); - - if (hdCamera.frameSettings.VolumeVoxelizationRunsAsync()) - { - volumeVoxelizationTask.End(cmd, hdCamera); - } - else - { - // Perform the voxelization step which fills the density 3D texture. - VolumeVoxelizationPass(hdCamera, cmd); - } - - // Render the volumetric lighting. - // The pass requires the volume properties, the light list and the shadows, and can run async. - VolumetricLightingPass(hdCamera, cmd, m_FrameCount); - - if (hdCamera.frameSettings.SSAORunsAsync()) - { - SSAOTask.EndWithPostWork(cmd, hdCamera, Callback); - void Callback(CommandBuffer c, HDCamera cam) - { - var hdrp = (RenderPipelineManager.currentPipeline as HDRenderPipeline); - hdrp.m_AmbientOcclusionSystem.PostDispatchWork(c, cam); - } - } - - SetContactShadowsTexture(hdCamera, m_ContactShadowBuffer, cmd); - - - if (hdCamera.frameSettings.SSRRunsAsync()) - { - SSRTask.End(cmd, hdCamera); - } - - hdCamera.xr.StartSinglePass(cmd); - - RenderDeferredLighting(hdCamera, cmd); - - RenderForwardOpaque(cullingResults, hdCamera, renderContext, cmd); - - m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_CameraSssDiffuseLightingMSAABuffer, m_CameraSssDiffuseLightingBuffer); - m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, GetSSSBufferMSAA(), GetSSSBuffer()); - - if(hdCamera.frameSettings.IsEnabled(FrameSettingsField.SubsurfaceScattering)) - { - // We need htile for SSS, but we don't need to resolve again - BuildCoarseStencilAndResolveIfNeeded(hdCamera, m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled), - msaaEnabled ? m_SharedRTManager.GetStencilBuffer(msaaEnabled) : null, - m_SharedRTManager.GetCoarseStencilBuffer(), cmd); - } - - // SSS pass here handle both SSS material from deferred and forward - RenderSubsurfaceScattering(hdCamera, cmd, hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA) ? m_CameraColorMSAABuffer : m_CameraColorBuffer, - m_CameraSssDiffuseLightingBuffer, m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), m_SharedRTManager.GetDepthTexture()); - - RenderForwardEmissive(cullingResults, hdCamera, renderContext, cmd); - - RenderSky(hdCamera, cmd); - - // Send all the geometry graphics buffer to client systems if required (must be done after the pyramid and before the transparent depth pre-pass) - SendGeometryGraphicsBuffers(cmd, hdCamera); - - m_PostProcessSystem.DoUserAfterOpaqueAndSky(cmd, hdCamera, m_CameraColorBuffer); - - // No need for old stencil values here since from transparent on different features are tagged - ClearStencilBuffer(hdCamera, cmd); - - RenderTransparentDepthPrepass(cullingResults, hdCamera, renderContext, cmd); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) - { - RaytracingRecursiveRender(hdCamera, cmd, renderContext, cullingResults); - } - - // To allow users to fetch the current color buffer, we temporarily bind the camera color buffer - cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, m_CameraColorBuffer); - RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforePreRefraction); - - // Render pre refraction objects - RenderForwardTransparent(cullingResults, hdCamera, true, renderContext, cmd); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction)) - { - // First resolution of the color buffer for the color pyramid - m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_CameraColorMSAABuffer, m_CameraColorBuffer); - - RenderColorPyramid(hdCamera, cmd, true); - - // Bind current color pyramid for shader graph SceneColorNode on transparent objects - cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain)); - } - else - { - cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, TextureXR.GetBlackTexture()); - } - - // We don't have access to the color pyramid with transparent if rough refraction is disabled - RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforeTransparent); - - // Render all type of transparent forward (unlit, lit, complex (hair...)) to keep the sorting between transparent objects. - RenderForwardTransparent(cullingResults, hdCamera, false, renderContext, cmd); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector)) - { - m_SharedRTManager.ResolveMotionVectorTexture(cmd, hdCamera); - } - - // We push the motion vector debug texture here as transparent object can overwrite the motion vector texture content. - if(m_Asset.currentPlatformRenderPipelineSettings.supportMotionVectors) - PushFullScreenDebugTexture(hdCamera, cmd, m_SharedRTManager.GetMotionVectorsBuffer(), FullScreenDebugMode.MotionVectors); - - // Second resolve the color buffer for finishing the frame - m_SharedRTManager.ResolveMSAAColor(cmd, hdCamera, m_CameraColorMSAABuffer, m_CameraColorBuffer); - - // Render All forward error - RenderForwardError(cullingResults, hdCamera, renderContext, cmd); - - DownsampleDepthForLowResTransparency(hdCamera, cmd); - - RenderLowResTransparent(cullingResults, hdCamera, renderContext, cmd); - - UpsampleTransparent(hdCamera, cmd); - - // Fill depth buffer to reduce artifact for transparent object during postprocess - RenderTransparentDepthPostpass(cullingResults, hdCamera, renderContext, cmd); - - RenderColorPyramid(hdCamera, cmd, false); - - AccumulateDistortion(cullingResults, hdCamera, renderContext, cmd); - RenderDistortion(hdCamera, cmd); - - PushFullScreenDebugTexture(hdCamera, cmd, m_CameraColorBuffer, FullScreenDebugMode.NanTracker); - PushFullScreenLightingDebugTexture(hdCamera, cmd, m_CameraColorBuffer); - -#if UNITY_EDITOR - // Render gizmos that should be affected by post processes - if (showGizmos) - { - if(m_CurrentDebugDisplaySettings.GetDebugLightingMode() == DebugLightingMode.MatcapView) - { - Gizmos.exposure = Texture2D.blackTexture; - } - else - { - Gizmos.exposure = m_PostProcessSystem.GetExposureTexture(hdCamera).rt; - } - - RenderGizmos(cmd, camera, renderContext, GizmoSubset.PreImageEffects); - } -#endif - } - - - // At this point, m_CameraColorBuffer has been filled by either debug views are regular rendering so we can push it here. - PushColorPickerDebugTexture(cmd, hdCamera, m_CameraColorBuffer); - - RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.BeforePostProcess); - - bool hasAfterPostProcessCustomPass = HDUtils.WillCustomPassBeExecuted(hdCamera, CustomPassInjectionPoint.AfterPostProcess); - - aovRequest.PushCameraTexture(cmd, AOVBuffers.Color, hdCamera, m_CameraColorBuffer, aovBuffers); - RenderPostProcess(cullingResults, hdCamera, target.id, renderContext, cmd, !hasAfterPostProcessCustomPass); - - RenderCustomPass(renderContext, cmd, hdCamera, customPassCullingResults, CustomPassInjectionPoint.AfterPostProcess); - - // Copy and rescale depth buffer for XR devices - if (hdCamera.xr.enabled && hdCamera.xr.copyDepth) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.XRDepthCopy))) - { - var depthBuffer = m_SharedRTManager.GetDepthStencilBuffer(); - var rtScale = depthBuffer.rtHandleProperties.rtHandleScale / DynamicResolutionHandler.instance.GetCurrentScale(); - - m_CopyDepthPropertyBlock.SetTexture(HDShaderIDs._InputDepth, depthBuffer); - m_CopyDepthPropertyBlock.SetVector(HDShaderIDs._BlitScaleBias, rtScale); - m_CopyDepthPropertyBlock.SetInt("_FlipY", 1); - - cmd.SetRenderTarget(target.id, 0, CubemapFace.Unknown, -1); - cmd.SetViewport(hdCamera.finalViewport); - CoreUtils.DrawFullScreen(cmd, m_CopyDepth, m_CopyDepthPropertyBlock); - } - } - - // In developer build, we always render post process in m_AfterPostProcessBuffer at (0,0) in which we will then render debug. - // Because of this, we need another blit here to the final render target at the right viewport. - if (!HDUtils.PostProcessIsFinalPass() || aovRequest.isValid || hasAfterPostProcessCustomPass) - { - hdCamera.ExecuteCaptureActions(m_IntermediateAfterPostProcessBuffer, cmd); - - RenderDebug(hdCamera, cmd, cullingResults); - - hdCamera.xr.StopSinglePass(cmd); - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.BlitToFinalRTDevBuildOnly))) - { - for (int viewIndex = 0; viewIndex < hdCamera.viewCount; ++viewIndex) - { - var finalBlitParams = PrepareFinalBlitParameters(hdCamera, viewIndex); - BlitFinalCameraTexture(finalBlitParams, m_BlitPropertyBlock, m_IntermediateAfterPostProcessBuffer, target.id, cmd); - } - } - - aovRequest.PushCameraTexture(cmd, AOVBuffers.Output, hdCamera, m_IntermediateAfterPostProcessBuffer, aovBuffers); - } - - // XR mirror view and blit do device - hdCamera.xr.EndCamera(cmd, hdCamera); - - // Send all the color graphics buffer to client systems if required. - SendColorGraphicsBuffer(cmd, hdCamera); - - // Due to our RT handle system we don't write into the backbuffer depth buffer (as our depth buffer can be bigger than the one provided) - // So we need to do a copy of the corresponding part of RT depth buffer in the target depth buffer in various situation: - // - RenderTexture (camera.targetTexture != null) has a depth buffer (camera.targetTexture.depth != 0) - // - We are rendering into the main game view (i.e not a RenderTexture camera.cameraType == CameraType.Game && hdCamera.camera.targetTexture == null) in the editor for allowing usage of Debug.DrawLine and Debug.Ray. - // - We draw Gizmo/Icons in the editor (hdCamera.camera.targetTexture != null && camera.targetTexture.depth != 0 - The Scene view has a targetTexture and a depth texture) - // TODO: If at some point we get proper render target aliasing, we will be able to use the provided depth texture directly with our RT handle system - // Note: Debug.DrawLine and Debug.Ray only work in editor, not in player - var copyDepth = hdCamera.camera.targetTexture != null && hdCamera.camera.targetTexture.depth != 0; -#if UNITY_EDITOR - copyDepth = copyDepth || hdCamera.isMainGameView; // Specific case of Debug.DrawLine and Debug.Ray -#endif - if (copyDepth && !hdCamera.xr.enabled) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CopyDepthInTargetTexture))) - { - cmd.SetRenderTarget(target.id); - cmd.SetViewport(hdCamera.finalViewport); - m_CopyDepthPropertyBlock.SetTexture(HDShaderIDs._InputDepth, m_SharedRTManager.GetDepthStencilBuffer()); - // When we are Main Game View we need to flip the depth buffer ourselves as we are after postprocess / blit that have already flipped the screen - m_CopyDepthPropertyBlock.SetInt("_FlipY", hdCamera.isMainGameView ? 1 : 0); - m_CopyDepthPropertyBlock.SetVector(HDShaderIDs._BlitScaleBias, new Vector4(1.0f, 1.0f, 0.0f, 0.0f)); - CoreUtils.DrawFullScreen(cmd, m_CopyDepth, m_CopyDepthPropertyBlock); - } - } - aovRequest.PushCameraTexture(cmd, AOVBuffers.DepthStencil, hdCamera, m_SharedRTManager.GetDepthStencilBuffer(), aovBuffers); - aovRequest.PushCameraTexture(cmd, AOVBuffers.Normals, hdCamera, m_SharedRTManager.GetNormalBuffer(), aovBuffers); - if (m_Asset.currentPlatformRenderPipelineSettings.supportMotionVectors) - aovRequest.PushCameraTexture(cmd, AOVBuffers.MotionVectors, hdCamera, m_SharedRTManager.GetMotionVectorsBuffer(), aovBuffers); - -#if UNITY_EDITOR - // We need to make sure the viewport is correctly set for the editor rendering. It might have been changed by debug overlay rendering just before. - cmd.SetViewport(hdCamera.finalViewport); - - // Render overlay Gizmos - if (showGizmos) - RenderGizmos(cmd, camera, renderContext, GizmoSubset.PostImageEffects); -#endif - - aovRequest.Execute(cmd, aovBuffers, RenderOutputProperties.From(hdCamera)); - } - - // This is required so that all commands up to here are executed before EndCameraRendering is called for the user. - // Otherwise command would not be rendered in order. - renderContext.ExecuteCommandBuffer(cmd); - cmd.Clear(); - } - - struct BlitFinalCameraTextureParameters - { - public bool flip; - public int srcTexArraySlice; - public int dstTexArraySlice; - public Rect viewport; - public Material blitMaterial; - } - - internal RTHandle GetExposureTexture(HDCamera hdCamera) => - m_PostProcessSystem.GetExposureTexture(hdCamera); - - BlitFinalCameraTextureParameters PrepareFinalBlitParameters(HDCamera hdCamera, int viewIndex) - { - var parameters = new BlitFinalCameraTextureParameters(); - - if (hdCamera.xr.enabled) - { - parameters.viewport = hdCamera.xr.GetViewport(viewIndex); - parameters.srcTexArraySlice = viewIndex; - parameters.dstTexArraySlice = hdCamera.xr.GetTextureArraySlice(viewIndex); - } - else - { - parameters.viewport = hdCamera.finalViewport; - parameters.srcTexArraySlice = -1; - parameters.dstTexArraySlice = -1; - } - - parameters.flip = hdCamera.flipYMode == HDAdditionalCameraData.FlipYMode.ForceFlipY || hdCamera.isMainGameView; - parameters.blitMaterial = HDUtils.GetBlitMaterial(TextureXR.useTexArray ? TextureDimension.Tex2DArray : TextureDimension.Tex2D, singleSlice: parameters.srcTexArraySlice >= 0); - - return parameters; - } - - static void BlitFinalCameraTexture(BlitFinalCameraTextureParameters parameters, MaterialPropertyBlock propertyBlock, RTHandle source, RenderTargetIdentifier destination, CommandBuffer cmd) - { - // Here we can't use the viewport scale provided in hdCamera. The reason is that this scale is for internal rendering before post process with dynamic resolution factored in. - // Here the input texture is already at the viewport size but may be smaller than the RT itself (because of the RTHandle system) so we compute the scale specifically here. - var scaleBias = new Vector4((float)parameters.viewport.width / source.rt.width, (float)parameters.viewport.height / source.rt.height, 0.0f, 0.0f); - - if (parameters.flip) - { - scaleBias.w = scaleBias.y; - scaleBias.y *= -1; - } - - propertyBlock.SetTexture(HDShaderIDs._BlitTexture, source); - propertyBlock.SetVector(HDShaderIDs._BlitScaleBias, scaleBias); - propertyBlock.SetFloat(HDShaderIDs._BlitMipLevel, 0); - propertyBlock.SetInt(HDShaderIDs._BlitTexArraySlice, parameters.srcTexArraySlice); - HDUtils.DrawFullScreen(cmd, parameters.viewport, parameters.blitMaterial, destination, propertyBlock, 0, parameters.dstTexArraySlice); - } - - void SetupCameraProperties(HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - // The next 2 functions are required to flush the command buffer before calling functions directly on the render context. - // This way, the commands will execute in the order specified by the C# code. - renderContext.ExecuteCommandBuffer(cmd); - cmd.Clear(); - - renderContext.SetupCameraProperties(hdCamera.camera, hdCamera.xr.enabled); - } - - void InitializeGlobalResources(ScriptableRenderContext renderContext) - { - // Global resources initialization - var cmd = CommandBufferPool.Get(""); - // Init material if needed - for (int bsdfIdx = 0; bsdfIdx < m_IBLFilterArray.Length; ++bsdfIdx) - { - if (!m_IBLFilterArray[bsdfIdx].IsInitialized()) - m_IBLFilterArray[bsdfIdx].Initialize(cmd); - } - - foreach (var material in m_MaterialList) - material.RenderInit(cmd); - - TextureXR.Initialize(cmd, defaultResources.shaders.clearUIntTextureCS); - - renderContext.ExecuteCommandBuffer(cmd); - CommandBufferPool.Release(cmd); - } - - bool TryCalculateFrameParameters( - Camera camera, - XRPass xrPass, - out HDAdditionalCameraData additionalCameraData, - out HDCamera hdCamera, - out ScriptableCullingParameters cullingParams - ) - { - // First, get aggregate of frame settings base on global settings, camera frame settings and debug settings - // Note: the SceneView camera will never have additionalCameraData - additionalCameraData = HDUtils.TryGetAdditionalCameraDataOrDefault(camera); - hdCamera = default; - cullingParams = default; - - FrameSettings currentFrameSettings = new FrameSettings(); - // Compute the FrameSettings actually used to draw the frame - // FrameSettingsHistory do the same while keeping all step of FrameSettings aggregation in memory for DebugMenu - if (m_FrameSettingsHistoryEnabled && camera.cameraType != CameraType.Preview && camera.cameraType != CameraType.Reflection) - FrameSettingsHistory.AggregateFrameSettings(ref currentFrameSettings, camera, additionalCameraData, m_Asset, m_DefaultAsset); - else - FrameSettings.AggregateFrameSettings(ref currentFrameSettings, camera, additionalCameraData, m_Asset, m_DefaultAsset); - - // Specific pass to simply display the content of the camera buffer if users have fill it themselves (like video player) - if (additionalCameraData.fullscreenPassthrough) - return false; - - // Retrieve debug display settings to init FrameSettings, unless we are a reflection and in this case we don't have debug settings apply. - DebugDisplaySettings debugDisplaySettings = (camera.cameraType == CameraType.Reflection || camera.cameraType == CameraType.Preview) ? s_NeutralDebugDisplaySettings : m_DebugDisplaySettings; - - // Disable post process if we enable debug mode or if the post process layer is disabled - if (debugDisplaySettings.IsDebugDisplayEnabled()) - { - if (debugDisplaySettings.IsDebugDisplayRemovePostprocess()) - { - currentFrameSettings.SetEnabled(FrameSettingsField.Postprocess, false); - currentFrameSettings.SetEnabled(FrameSettingsField.CustomPass, false); - } - - // Disable exposure if required - if (!debugDisplaySettings.DebugNeedsExposure()) - { - currentFrameSettings.SetEnabled(FrameSettingsField.ExposureControl, false); - } - - // Disable SSS if luxmeter is enabled - if (debugDisplaySettings.data.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter) - { - currentFrameSettings.SetEnabled(FrameSettingsField.SubsurfaceScattering, false); - } - } - - if(CoreUtils.IsSceneLightingDisabled(camera)) - { - currentFrameSettings.SetEnabled(FrameSettingsField.ExposureControl, false); - } - - // Disable object-motion vectors in everything but the game view - if (camera.cameraType != CameraType.Game) - { - currentFrameSettings.SetEnabled(FrameSettingsField.ObjectMotionVectors, false); - } - - hdCamera = HDCamera.GetOrCreate(camera, xrPass.multipassId); - - // From this point, we should only use frame settings from the camera - hdCamera.Update(currentFrameSettings, this, m_MSAASamples, xrPass); - - // Custom Render requires a proper HDCamera, so we return after the HDCamera was setup - if (additionalCameraData != null && additionalCameraData.hasCustomRender) - return false; - - if (hdCamera.xr.enabled) - { - cullingParams = hdCamera.xr.cullingParams; - } - else - { - if (!camera.TryGetCullingParameters(camera.stereoEnabled, out cullingParams)) - return false; - } - - if (m_DebugDisplaySettings.IsCameraFreezeEnabled()) - { - if (m_DebugDisplaySettings.IsCameraFrozen(camera)) - { - if (!frozenCullingParamAvailable) - { - frozenCullingParams = cullingParams; - frozenCullingParamAvailable = true; - } - cullingParams = frozenCullingParams; - } - } - else - { - frozenCullingParamAvailable = false; - } - - LightLoopUpdateCullingParameters(ref cullingParams, hdCamera); - - // If we don't use environment light (like when rendering reflection probes) - // we don't have to cull them. - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.ReflectionProbe)) - cullingParams.cullingOptions |= CullingOptions.NeedsReflectionProbes; - else - cullingParams.cullingOptions &= ~CullingOptions.NeedsReflectionProbes; - - return true; - } - - static bool TryCull( - Camera camera, - HDCamera hdCamera, - ScriptableRenderContext renderContext, - SkyManager skyManager, - ScriptableCullingParameters cullingParams, - HDRenderPipelineAsset hdrp, - ref HDCullingResults cullingResults - ) - { -#if UNITY_EDITOR - // emit scene view UI - if (camera.cameraType == CameraType.SceneView) - { - ScriptableRenderContext.EmitWorldGeometryForSceneView(camera); - } -#endif - - // Set the LOD bias and store current value to be able to restore it. - // Use a try/finalize pattern to be sure to restore properly the qualitySettings.lodBias - var initialLODBias = QualitySettings.lodBias; - var initialMaximumLODLevel = QualitySettings.maximumLODLevel; - try - { - QualitySettings.lodBias = hdCamera.frameSettings.GetResolvedLODBias(hdrp); - QualitySettings.maximumLODLevel = hdCamera.frameSettings.GetResolvedMaximumLODLevel(hdrp); - - // This needs to be called before culling, otherwise in the case where users generate intermediate renderers, it can provoke crashes. - BeginCameraRendering(renderContext, camera); - - DecalSystem.CullRequest decalCullRequest = null; - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) - { - // decal system needs to be updated with current camera, it needs it to set up culling and light list generation parameters - decalCullRequest = GenericPool.Get(); - DecalSystem.instance.CurrentCamera = camera; - DecalSystem.instance.BeginCull(decalCullRequest); - } - - // TODO: use a parameter to select probe types to cull depending on what is enabled in framesettings - var hdProbeCullState = new HDProbeCullState(); - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.PlanarProbe)) - hdProbeCullState = HDProbeSystem.PrepareCull(camera); - - // We need to set the ambient probe here because it's passed down to objects during the culling process. - skyManager.UpdateCurrentSkySettings(hdCamera); - skyManager.SetupAmbientProbe(hdCamera); - - using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.CullResultsCull))) - { - cullingResults.cullingResults = renderContext.Cull(ref cullingParams); - } - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) - { - using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.CustomPassCullResultsCull))) - { - cullingResults.customPassCullingResults = CustomPassVolume.Cull(renderContext, hdCamera); - } - } - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.PlanarProbe)) - HDProbeSystem.QueryCullResults(hdProbeCullState, ref cullingResults.hdProbeCullingResults); - else - cullingResults.hdProbeCullingResults = default; - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) - { - using (new ProfilingScope(null, ProfilingSampler.Get(HDProfileId.DBufferPrepareDrawData))) - { - DecalSystem.instance.EndCull(decalCullRequest, cullingResults.decalCullResults); - } - } - - if (decalCullRequest != null) - { - decalCullRequest.Clear(); - GenericPool.Release(decalCullRequest); - } - - return true; - } - finally - { - QualitySettings.lodBias = initialLODBias; - QualitySettings.maximumLODLevel = initialMaximumLODLevel; - } - } - - void RenderGizmos(CommandBuffer cmd, Camera camera, ScriptableRenderContext renderContext, GizmoSubset gizmoSubset) - { -#if UNITY_EDITOR - if (UnityEditor.Handles.ShouldRenderGizmos()) - { - bool renderPrePostprocessGizmos = (gizmoSubset == GizmoSubset.PreImageEffects); - - using (new ProfilingScope(cmd, renderPrePostprocessGizmos ? ProfilingSampler.Get(HDProfileId.GizmosPrePostprocess) : ProfilingSampler.Get(HDProfileId.Gizmos))) - { - renderContext.ExecuteCommandBuffer(cmd); - cmd.Clear(); - renderContext.DrawGizmos(camera, gizmoSubset); - } - } -#endif - } - - static RendererListDesc CreateOpaqueRendererListDesc( - CullingResults cull, - Camera camera, - ShaderTagId passName, - PerObjectData rendererConfiguration = 0, - RenderQueueRange? renderQueueRange = null, - RenderStateBlock? stateBlock = null, - Material overrideMaterial = null, - bool excludeObjectMotionVectors = false - ) - { - var result = new RendererListDesc(passName, cull, camera) - { - rendererConfiguration = rendererConfiguration, - renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllOpaque, - sortingCriteria = SortingCriteria.CommonOpaque, - stateBlock = stateBlock, - overrideMaterial = overrideMaterial, - excludeObjectMotionVectors = excludeObjectMotionVectors - }; - return result; - } - - static RendererListDesc CreateOpaqueRendererListDesc( - CullingResults cull, - Camera camera, - ShaderTagId[] passNames, - PerObjectData rendererConfiguration = 0, - RenderQueueRange? renderQueueRange = null, - RenderStateBlock? stateBlock = null, - Material overrideMaterial = null, - bool excludeObjectMotionVectors = false - ) - { - var result = new RendererListDesc(passNames, cull, camera) - { - rendererConfiguration = rendererConfiguration, - renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllOpaque, - sortingCriteria = SortingCriteria.CommonOpaque, - stateBlock = stateBlock, - overrideMaterial = overrideMaterial, - excludeObjectMotionVectors = excludeObjectMotionVectors - }; - return result; - } - - static RendererListDesc CreateTransparentRendererListDesc( - CullingResults cull, - Camera camera, - ShaderTagId passName, - PerObjectData rendererConfiguration = 0, - RenderQueueRange? renderQueueRange = null, - RenderStateBlock? stateBlock = null, - Material overrideMaterial = null, - bool excludeObjectMotionVectors = false - ) - { - var result = new RendererListDesc(passName, cull, camera) - { - rendererConfiguration = rendererConfiguration, - renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllTransparent, - sortingCriteria = SortingCriteria.CommonTransparent | SortingCriteria.RendererPriority, - stateBlock = stateBlock, - overrideMaterial = overrideMaterial, - excludeObjectMotionVectors = excludeObjectMotionVectors - }; - return result; - } - - static RendererListDesc CreateTransparentRendererListDesc( - CullingResults cull, - Camera camera, - ShaderTagId[] passNames, - PerObjectData rendererConfiguration = 0, - RenderQueueRange? renderQueueRange = null, - RenderStateBlock? stateBlock = null, - Material overrideMaterial = null, - bool excludeObjectMotionVectors = false - ) - { - var result = new RendererListDesc(passNames, cull, camera) - { - rendererConfiguration = rendererConfiguration, - renderQueueRange = renderQueueRange != null ? renderQueueRange.Value : HDRenderQueue.k_RenderQueue_AllTransparent, - sortingCriteria = SortingCriteria.CommonTransparent | SortingCriteria.RendererPriority, - stateBlock = stateBlock, - overrideMaterial = overrideMaterial, - excludeObjectMotionVectors = excludeObjectMotionVectors - }; - return result; - } - - static void DrawOpaqueRendererList(in ScriptableRenderContext renderContext, CommandBuffer cmd, in FrameSettings frameSettings, RendererList rendererList) - { - if (!frameSettings.IsEnabled(FrameSettingsField.OpaqueObjects)) - return; - - HDUtils.DrawRendererList(renderContext, cmd, rendererList); - } - - static void DrawTransparentRendererList(in ScriptableRenderContext renderContext, CommandBuffer cmd, in FrameSettings frameSettings, RendererList rendererList) - { - if (!frameSettings.IsEnabled(FrameSettingsField.TransparentObjects)) - return; - - HDUtils.DrawRendererList(renderContext, cmd, rendererList); - } - - void AccumulateDistortion(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Distortion)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.Distortion))) - { - CoreUtils.SetRenderTarget(cmd, m_DistortionBuffer, m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); - - // Only transparent object can render distortion vectors - var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_DistortionVectorsName)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - } - } - - void RenderDistortion(HDCamera hdCamera, CommandBuffer cmd) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Distortion)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ApplyDistortion))) - { - var currentColorPyramid = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); - - CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer); - // TODO: Set stencil stuff via parameters rather than hardcoding it in shader. - m_ApplyDistortionMaterial.SetTexture(HDShaderIDs._DistortionTexture, m_DistortionBuffer); - m_ApplyDistortionMaterial.SetTexture(HDShaderIDs._ColorPyramidTexture, currentColorPyramid); - - var size = new Vector4(hdCamera.actualWidth, hdCamera.actualHeight, 1f / hdCamera.actualWidth, 1f / hdCamera.actualHeight); - m_ApplyDistortionMaterial.SetVector(HDShaderIDs._Size, size); - m_ApplyDistortionMaterial.SetInt(HDShaderIDs._StencilMask, (int)StencilUsage.DistortionVectors); - m_ApplyDistortionMaterial.SetInt(HDShaderIDs._StencilRef, (int)StencilUsage.DistortionVectors); - - HDUtils.DrawFullScreen(cmd, m_ApplyDistortionMaterial, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(), null, 0); - } - } - - struct DepthPrepassParameters - { - public string passName; - public HDProfileId profilingId; - public RendererListDesc depthOnlyRendererListDesc; - public RendererListDesc mrtRendererListDesc; - public bool hasDepthOnlyPass; - public bool shouldRenderMotionVectorAfterGBuffer; - public RendererListDesc rayTracingOpaqueRLDesc; - public RendererListDesc rayTracingTransparentRLDesc; - public bool renderRayTracingPrepass; - } - - DepthPrepassParameters PrepareDepthPrepass(CullingResults cull, HDCamera hdCamera) - { - // Guidelines: - // Lit shader can be in deferred or forward mode. In this case we use "DepthOnly" pass with "GBuffer" or "Forward" pass name - // Other shader, including unlit are always forward and use "DepthForwardOnly" with "ForwardOnly" pass. - // Those pass are exclusive so use only "DepthOnly" or "DepthForwardOnly" but not both at the same time, same for "Forward" and "DepthForwardOnly" - // Any opaque material rendered in forward should have a depth prepass. If there is no depth prepass the lighting will be incorrect (deferred shadowing, contact shadow, SSAO), this may be acceptable depends on usage - - // Whatever the configuration we always render first opaque object then opaque alpha tested as they are more costly to render and could be reject by early-z - // (but no Hi-z as it is disable with clip instruction). This is handled automatically with the RenderQueue value (OpaqueAlphaTested have a different value and thus are sorted after Opaque) - - // Forward material always output normal buffer. - // Deferred material never output normal buffer. - // Caution: Unlit material let normal buffer untouch. Caution as if people try to filter normal buffer, it can result in weird result. - // TODO: Do we need a stencil bit to identify normal buffer not fill by unlit? So don't execute SSAO / SRR ? - - // Additional guidelines for motion vector: - // We render object motion vector at the same time than depth prepass with MRT to save drawcall. Depth buffer is then fill with combination of depth prepass + motion vector. - // For this we render first all objects that render depth only, then object that require object motion vector. - // We use the excludeMotion filter option of DrawRenderer to gather object without object motion vector (only C++ can know if an object have object motion vector). - // Caution: if there is no depth prepass we must render object motion vector after GBuffer pass otherwise some depth only objects can hide objects with motion vector and overwrite depth buffer but not update - // the motion vector buffer resulting in artifacts - - var result = new DepthPrepassParameters(); - - bool decalsEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals); - // To avoid rendering objects twice (once in the depth pre-pass and once in the motion vector pass when the motion vector pass is enabled) we exclude the objects that have motion vectors. - bool fullDeferredPrepass = hdCamera.frameSettings.IsEnabled(FrameSettingsField.DepthPrepassWithDeferredRendering) || decalsEnabled; - // To avoid rendering objects twice (once in the depth pre-pass and once in the motion vector pass when the motion vector pass is enabled) we exclude the objects that have motion vectors. - bool objectMotionEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.ObjectMotionVectors); - - result.shouldRenderMotionVectorAfterGBuffer = (hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred) && !fullDeferredPrepass; - result.hasDepthOnlyPass = false; - - switch (hdCamera.frameSettings.litShaderMode) - { - case LitShaderMode.Forward: - result.passName = "Depth Prepass (forward)"; - result.profilingId = HDProfileId.DepthPrepassForward; - result.mrtRendererListDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthOnlyAndDepthForwardOnlyPassNames, excludeObjectMotionVectors: objectMotionEnabled); - break; - case LitShaderMode.Deferred: - result.passName = fullDeferredPrepass ? (decalsEnabled ? "Depth Prepass (deferred) forced by Decals" : "Depth Prepass (deferred)") : "Depth Prepass (deferred incomplete)"; - result.profilingId = fullDeferredPrepass ? (decalsEnabled ? HDProfileId.DepthPrepassDeferredForDecals : HDProfileId.DepthPrepassDeferred) : HDProfileId.DepthPrepassDeferredIncomplete; - bool excludeMotion = fullDeferredPrepass ? objectMotionEnabled : false; - - // First deferred alpha tested materials. Alpha tested object have always a prepass even if enableDepthPrepassWithDeferredRendering is disabled - var partialPrepassRenderQueueRange = new RenderQueueRange { lowerBound = (int)RenderQueue.AlphaTest, upperBound = (int)RenderQueue.GeometryLast - 1 }; - - result.hasDepthOnlyPass = true; - - // First deferred material - result.depthOnlyRendererListDesc = CreateOpaqueRendererListDesc( - cull, hdCamera.camera, m_DepthOnlyPassNames, - renderQueueRange: fullDeferredPrepass ? HDRenderQueue.k_RenderQueue_AllOpaque : partialPrepassRenderQueueRange, - excludeObjectMotionVectors: excludeMotion); - - // Then forward only material that output normal buffer - result.mrtRendererListDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthForwardOnlyPassNames, excludeObjectMotionVectors: excludeMotion); - break; - default: - throw new ArgumentOutOfRangeException("Unknown ShaderLitMode"); - } - - result.renderRayTracingPrepass = false; - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) - { - RecursiveRendering recursiveRendering = hdCamera.volumeStack.GetComponent(); - if (recursiveRendering.enable.value) - { - result.renderRayTracingPrepass = true; - result.rayTracingOpaqueRLDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthOnlyAndDepthForwardOnlyPassNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AllOpaqueRaytracing); - result.rayTracingTransparentRLDesc = CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_DepthOnlyAndDepthForwardOnlyPassNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AllTransparentRaytracing); - } - } - - return result; - } - - static void RenderDepthPrepass( ScriptableRenderContext renderContext, - CommandBuffer cmd, - FrameSettings frameSettings, - RenderTargetIdentifier[] mrt, - RTHandle depthBuffer, - in RendererList depthOnlyRendererList, - in RendererList mrtRendererList, - bool hasDepthOnlyPass, - in RendererList rayTracingOpaqueRL, - in RendererList rayTracingTransparentRL, - bool renderRayTracingPrepass - ) - { - CoreUtils.SetRenderTarget(cmd, depthBuffer); - - if (hasDepthOnlyPass) - { - DrawOpaqueRendererList(renderContext, cmd, frameSettings, depthOnlyRendererList); - } - - CoreUtils.SetRenderTarget(cmd, mrt, depthBuffer); - DrawOpaqueRendererList(renderContext, cmd, frameSettings, mrtRendererList); - - // We want the opaque objects to be in the prepass so that we avoid rendering uselessly the pixels before ray tracing them - if (renderRayTracingPrepass) - { - HDUtils.DrawRendererList(renderContext, cmd, rayTracingOpaqueRL); - HDUtils.DrawRendererList(renderContext, cmd, rayTracingTransparentRL); - } - } - - // RenderDepthPrepass render both opaque and opaque alpha tested based on engine configuration. - // Lit Forward only: We always render all materials - // Lit Deferred: We always render depth prepass for alpha tested (optimization), other deferred material are render based on engine configuration. - // Forward opaque with deferred renderer (DepthForwardOnly pass): We always render all materials - // True is return if motion vector must be render after GBuffer pass - bool RenderDepthPrepass(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - var depthPrepassParameters = PrepareDepthPrepass(cull, hdCamera); - var depthOnlyRendererList = RendererList.Create(depthPrepassParameters.depthOnlyRendererListDesc); - var mrtDepthRendererList = RendererList.Create(depthPrepassParameters.mrtRendererListDesc); - - var rayTracingOpaqueRendererList = RendererList.Create(depthPrepassParameters.rayTracingOpaqueRLDesc); - var rayTracingTransparentRendererList = RendererList.Create(depthPrepassParameters.rayTracingTransparentRLDesc); - - using (new ProfilingScope(cmd, ProfilingSampler.Get(depthPrepassParameters.profilingId))) - { - RenderDepthPrepass(renderContext, cmd, hdCamera.frameSettings, - m_SharedRTManager.GetPrepassBuffersRTI(hdCamera.frameSettings), - m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), - depthOnlyRendererList, - mrtDepthRendererList, - depthPrepassParameters.hasDepthOnlyPass, - rayTracingOpaqueRendererList, - rayTracingTransparentRendererList, - depthPrepassParameters.renderRayTracingPrepass - ); - } - - return depthPrepassParameters.shouldRenderMotionVectorAfterGBuffer; - } - - // RenderGBuffer do the gbuffer pass. This is solely call with deferred. If we use a depth prepass, then the depth prepass will perform the alpha testing for opaque alpha tested and we don't need to do it anymore - // during Gbuffer pass. This is handled in the shader and the depth test (equal and no depth write) is done here. - void RenderGBuffer(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (hdCamera.frameSettings.litShaderMode != LitShaderMode.Deferred) - return; - - using (new ProfilingScope(cmd, m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() ? ProfilingSampler.Get(HDProfileId.GBufferDebug) : ProfilingSampler.Get(HDProfileId.GBuffer))) - { - // setup GBuffer for rendering - CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffersRTI(hdCamera.frameSettings), m_SharedRTManager.GetDepthStencilBuffer()); - - var rendererList = RendererList.Create(CreateOpaqueRendererListDesc(cull, hdCamera.camera, HDShaderPassNames.s_GBufferName, m_CurrentRendererConfigurationBakedLighting)); - DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - - m_GbufferManager.BindBufferAsTextures(cmd); - } - } - - void RenderDBuffer(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext, CullingResults cullingResults) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) - { - // We still bind black textures to make sure that something is bound (can be a problem on some platforms) - m_DbufferManager.BindBlackTextures(cmd); - - // Bind buffer to make sure that something is bound . - cmd.SetGlobalBuffer(HDShaderIDs._DecalPropertyMaskBufferSRV, m_DbufferManager.propertyMaskBuffer); - - return; - } - - // We need to copy depth buffer texture if we want to bind it at this stage - CopyDepthBufferIfNeeded(hdCamera, cmd); - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DBufferRender))) - { - bool use4RTs = m_Asset.currentPlatformRenderPipelineSettings.decalSettings.perChannelMask; - RenderDBuffer( use4RTs, - m_DbufferManager.GetBuffersRTI(), - m_DbufferManager.GetRTHandles(), - m_SharedRTManager.GetDepthStencilBuffer(), - m_DbufferManager.propertyMaskBuffer, - m_DbufferManager.clearPropertyMaskBufferShader, - m_DbufferManager.clearPropertyMaskBufferKernel, - m_DbufferManager.propertyMaskBufferSize, - RendererList.Create(PrepareMeshDecalsRendererList(cullingResults, hdCamera, use4RTs)), - renderContext, cmd); - - cmd.SetGlobalBuffer(HDShaderIDs._DecalPropertyMaskBufferSRV, m_DbufferManager.propertyMaskBuffer); - - m_DbufferManager.BindBufferAsTextures(cmd); - } - } - - void DecalNormalPatch(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext) - { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals) && - !hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) // MSAA not supported - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DBufferNormal))) - { - var parameters = PrepareDBufferNormalPatchParameters(hdCamera); - parameters.decalNormalBufferMaterial.SetInt(HDShaderIDs._DecalNormalBufferStencilReadMask, parameters.stencilMask); - parameters.decalNormalBufferMaterial.SetInt(HDShaderIDs._DecalNormalBufferStencilRef, parameters.stencilRef); - - CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthStencilBuffer()); - cmd.SetRandomWriteTarget(1, m_SharedRTManager.GetNormalBuffer()); - cmd.DrawProcedural(Matrix4x4.identity, parameters.decalNormalBufferMaterial, 0, MeshTopology.Triangles, 3, 1); - cmd.ClearRandomWriteTargets(); - } - } - } - - RendererListDesc PrepareMeshDecalsRendererList(CullingResults cullingResults, HDCamera hdCamera, bool use4RTs) - { - var desc = new RendererListDesc(use4RTs ? m_Decals4RTPassNames : m_Decals3RTPassNames, cullingResults, hdCamera.camera) - { - sortingCriteria = SortingCriteria.CommonOpaque, - rendererConfiguration = PerObjectData.None, - renderQueueRange = HDRenderQueue.k_RenderQueue_AllOpaque - }; - - return desc; - } - - static void PushDecalsGlobalParams(HDCamera hdCamera, CommandBuffer cmd) - { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) - { - cmd.SetGlobalInt(HDShaderIDs._EnableDecals, 1); - cmd.SetGlobalVector(HDShaderIDs._DecalAtlasResolution, new Vector2(HDUtils.hdrpSettings.decalSettings.atlasWidth, HDUtils.hdrpSettings.decalSettings.atlasHeight)); - } - else - { - cmd.SetGlobalInt(HDShaderIDs._EnableDecals, 0); - } - } - - static RenderTargetIdentifier[] m_Dbuffer3RtIds = new RenderTargetIdentifier[3]; - - static void RenderDBuffer( bool use4RTs, - RenderTargetIdentifier[] mrt, - RTHandle[] rtHandles, - RTHandle depthStencilBuffer, - ComputeBuffer propertyMaskBuffer, - ComputeShader propertyMaskClearShader, - int propertyMaskClearShaderKernel, - int propertyMaskBufferSize, - RendererList meshDecalsRendererList, - ScriptableRenderContext renderContext, - CommandBuffer cmd) - { - // for alpha compositing, color is cleared to 0, alpha to 1 - // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html - - // this clears the targets - // TODO: Once we move to render graph, move this to render targets initialization parameters and remove rtHandles parameters - Color clearColor = new Color(0.0f, 0.0f, 0.0f, 1.0f); - Color clearColorNormal = new Color(0.5f, 0.5f, 0.5f, 1.0f); // for normals 0.5 is neutral - Color clearColorAOSBlend = new Color(1.0f, 1.0f, 1.0f, 1.0f); - CoreUtils.SetRenderTarget(cmd, rtHandles[0], ClearFlag.Color, clearColor); - CoreUtils.SetRenderTarget(cmd, rtHandles[1], ClearFlag.Color, clearColorNormal); - CoreUtils.SetRenderTarget(cmd, rtHandles[2], ClearFlag.Color, clearColor); - - if (use4RTs) - { - CoreUtils.SetRenderTarget(cmd, rtHandles[3], ClearFlag.Color, clearColorAOSBlend); - // this actually sets the MRTs and HTile RWTexture, this is done separately because we do not have an api to clear MRTs to different colors - CoreUtils.SetRenderTarget(cmd, mrt, depthStencilBuffer); // do not clear anymore - } - else - { - for (int rtindex = 0; rtindex < 3; rtindex++) - { - m_Dbuffer3RtIds[rtindex] = mrt[rtindex]; - } - // this actually sets the MRTs and HTile RWTexture, this is done separately because we do not have an api to clear MRTs to different colors - CoreUtils.SetRenderTarget(cmd, m_Dbuffer3RtIds, depthStencilBuffer); // do not clear anymore - } - - // clear decal property mask buffer - cmd.SetComputeBufferParam(propertyMaskClearShader, propertyMaskClearShaderKernel, HDShaderIDs._DecalPropertyMaskBuffer, propertyMaskBuffer); - cmd.DispatchCompute(propertyMaskClearShader, propertyMaskClearShaderKernel, propertyMaskBufferSize / 64, 1, 1); - cmd.SetRandomWriteTarget(use4RTs ? 4 : 3, propertyMaskBuffer); - - HDUtils.DrawRendererList(renderContext, cmd, meshDecalsRendererList); - DecalSystem.instance.RenderIntoDBuffer(cmd); - - cmd.ClearRandomWriteTargets(); - } - - struct DBufferNormalPatchParameters - { - public Material decalNormalBufferMaterial; - public int stencilRef; - public int stencilMask; - } - - DBufferNormalPatchParameters PrepareDBufferNormalPatchParameters(HDCamera hdCamera) - { - var parameters = new DBufferNormalPatchParameters(); - parameters.decalNormalBufferMaterial = m_DecalNormalBufferMaterial; - switch (hdCamera.frameSettings.litShaderMode) - { - case LitShaderMode.Forward: // in forward rendering all pixels that decals wrote into have to be composited - parameters.stencilMask = (int)StencilUsage.Decals; - parameters.stencilRef = (int)StencilUsage.Decals; - break; - case LitShaderMode.Deferred: // in deferred rendering only pixels affected by both forward materials and decals need to be composited - parameters.stencilMask = (int)StencilUsage.Decals | (int)StencilUsage.RequiresDeferredLighting; - parameters.stencilRef = (int)StencilUsage.Decals; - break; - default: - throw new ArgumentOutOfRangeException("Unknown ShaderLitMode"); - } - - return parameters; - } - - RendererListDesc PrepareForwardEmissiveRendererList(CullingResults cullResults, HDCamera hdCamera) - { - var result = new RendererListDesc(m_DecalsEmissivePassNames, cullResults, hdCamera.camera) - { - renderQueueRange = HDRenderQueue.k_RenderQueue_AllOpaque, - sortingCriteria = SortingCriteria.CommonOpaque, - rendererConfiguration = PerObjectData.None - }; - - return result; - } - - void RenderForwardEmissive(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ForwardEmissive))) - { - bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(msaa)); - HDUtils.DrawRendererList(renderContext, cmd, RendererList.Create(PrepareForwardEmissiveRendererList(cullResults, hdCamera))); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) - DecalSystem.instance.RenderForwardEmissive(cmd); - } - } - - void RenderWireFrame(CullingResults cull, HDCamera hdCamera, RenderTargetIdentifier backbuffer, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderWireFrame))) - { - CoreUtils.SetRenderTarget(cmd, backbuffer, ClearFlag.Color, GetColorBufferClearColor(hdCamera)); - - var rendererListOpaque = RendererList.Create(CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_AllForwardOpaquePassNames)); - DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListOpaque); - - // Render forward transparent - var rendererListTransparent = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_AllTransparentPassNames)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListTransparent); - } - } - - void RenderDebugViewMaterial(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DisplayDebugViewMaterial))) - { - if (m_CurrentDebugDisplaySettings.data.materialDebugSettings.IsDebugGBufferEnabled() && hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DebugViewMaterialGBuffer))) - { - HDUtils.DrawFullScreen(cmd, m_currentDebugViewMaterialGBuffer, m_CameraColorBuffer); - } - } - else - { - // When rendering debug material we shouldn't rely on a depth prepass for optimizing the alpha clip test. As it is control on the material inspector side - // we must override the state here. - - CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.All, Color.clear); - // Render Opaque forward - var rendererListOpaque = RendererList.Create(CreateOpaqueRendererListDesc(cull, hdCamera.camera, m_AllForwardOpaquePassNames, m_CurrentRendererConfigurationBakedLighting, stateBlock: m_DepthStateOpaque)); - DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListOpaque); - - // Render forward transparent - var rendererListTransparent = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_AllTransparentPassNames, m_CurrentRendererConfigurationBakedLighting)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListTransparent); - } - } - } - - void RenderTransparencyOverdraw(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() && m_CurrentDebugDisplaySettings.data.fullScreenDebugMode == FullScreenDebugMode.TransparencyOverdraw) - { - - CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(), clearFlag: ClearFlag.Color, clearColor: Color.black); - var stateBlock = new RenderStateBlock - { - mask = RenderStateMask.Blend, - blendState = new BlendState - { - blendState0 = new RenderTargetBlendState - { - - destinationColorBlendMode = BlendMode.One, - sourceColorBlendMode = BlendMode.One, - destinationAlphaBlendMode = BlendMode.One, - sourceAlphaBlendMode = BlendMode.One, - colorBlendOperation = BlendOp.Add, - alphaBlendOperation = BlendOp.Add, - writeMask = ColorWriteMask.All - } - } - }; - - // High res transparent objects, drawing in m_DebugFullScreenTempBuffer - cmd.SetGlobalFloat(HDShaderIDs._DebugTransparencyOverdrawWeight, 1.0f); - - var passNames = m_Asset.currentPlatformRenderPipelineSettings.supportTransparentBackface ? m_AllTransparentPassNames : m_TransparentNoBackfaceNames; - m_DebugFullScreenPropertyBlock.SetFloat(HDShaderIDs._TransparencyOverdrawMaxPixelCost, (float)m_DebugDisplaySettings.data.transparencyDebugSettings.maxPixelCost); - var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, passNames, stateBlock: stateBlock)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, passNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessTransparent, stateBlock: stateBlock)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - - // Low res transparent objects, copying result m_DebugTranparencyLowRes - cmd.SetGlobalFloat(HDShaderIDs._DebugTransparencyOverdrawWeight, 0.25f); - rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, passNames, renderQueueRange: HDRenderQueue.k_RenderQueue_LowTransparent, stateBlock: stateBlock)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - PushFullScreenDebugTexture(hdCamera, cmd, m_CameraColorBuffer, FullScreenDebugMode.TransparencyOverdraw); - - // weighted sum of m_DebugFullScreenTempBuffer and m_DebugTranparencyLowRes done in DebugFullScreen.shader - - } - } - - void UpdateSkyEnvironment(HDCamera hdCamera, ScriptableRenderContext renderContext, int frameIndex, CommandBuffer cmd) - { - m_SkyManager.UpdateEnvironment(hdCamera, renderContext, GetCurrentSunLight(), frameIndex, cmd); - } - - /// - /// Request an update of the environment lighting. - /// - public void RequestSkyEnvironmentUpdate() - { - m_SkyManager.RequestEnvironmentUpdate(); - } - - internal void RequestStaticSkyUpdate() - { - m_SkyManager.RequestStaticEnvironmentUpdate(); - } - - void PreRenderSky(HDCamera hdCamera, CommandBuffer cmd) - { - if (m_CurrentDebugDisplaySettings.DebugHideSky(hdCamera)) - { - return; - } - - bool msaaEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - var colorBuffer = msaaEnabled ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - var depthBuffer = m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled); - var normalBuffer = m_SharedRTManager.GetNormalBuffer(msaaEnabled); - - var visualEnv = hdCamera.volumeStack.GetComponent(); - m_SkyManager.PreRenderSky(hdCamera, GetCurrentSunLight(), colorBuffer, normalBuffer, depthBuffer, m_CurrentDebugDisplaySettings, m_FrameCount, cmd); - } - - void RenderSky(HDCamera hdCamera, CommandBuffer cmd) - { - if (m_CurrentDebugDisplaySettings.DebugHideSky(hdCamera)) - { - return; - } - - // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity. - // We load from the color buffer, perform blending manually, and store to the atmospheric scattering buffer. - // Then we perform a copy from the atmospheric scattering buffer back to the color buffer. - bool msaaEnabled = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - var colorBuffer = msaaEnabled ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - var intermediateBuffer = msaaEnabled ? m_OpaqueAtmosphericScatteringMSAABuffer : m_OpaqueAtmosphericScatteringBuffer; - var depthBuffer = m_SharedRTManager.GetDepthStencilBuffer(msaaEnabled); - - var visualEnv = hdCamera.volumeStack.GetComponent(); - m_SkyManager.RenderSky(hdCamera, GetCurrentSunLight(), colorBuffer, depthBuffer, m_CurrentDebugDisplaySettings, m_FrameCount, cmd); - - if (Fog.IsFogEnabled(hdCamera) || Fog.IsPBRFogEnabled(hdCamera)) - { - var pixelCoordToViewDirWS = hdCamera.mainViewConstants.pixelCoordToViewDirWS; - m_SkyManager.RenderOpaqueAtmosphericScattering(cmd, hdCamera, colorBuffer, m_LightingBufferHandle, intermediateBuffer, depthBuffer, pixelCoordToViewDirWS, hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)); - } - } - - /// - /// Export the provided camera's sky to a flattened cubemap. - /// - /// Requested camera. - /// Result texture. - public Texture2D ExportSkyToTexture(Camera camera) - { - return m_SkyManager.ExportSkyToTexture(camera); - } - - RendererListDesc PrepareForwardOpaqueRendererList(CullingResults cullResults, HDCamera hdCamera) - { - var passNames = hdCamera.frameSettings.litShaderMode == LitShaderMode.Forward - ? m_ForwardAndForwardOnlyPassNames - : m_ForwardOnlyPassNames; - return CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, passNames, m_CurrentRendererConfigurationBakedLighting); - } - - // Guidelines: In deferred by default there is no opaque in forward. However it is possible to force an opaque material to render in forward - // by using the pass "ForwardOnly". In this case the .shader should not have "Forward" but only a "ForwardOnly" pass. - // It must also have a "DepthForwardOnly" and no "DepthOnly" pass as forward material (either deferred or forward only rendering) have always a depth pass. - // The RenderForward pass will render the appropriate pass depends on the engine settings. In case of forward only rendering, both "Forward" pass and "ForwardOnly" pass - // material will be render for both transparent and opaque. In case of deferred, both path are used for transparent but only "ForwardOnly" is use for opaque. - // (Thus why "Forward" and "ForwardOnly" are exclusive, else they will render two times" - void RenderForwardOpaque(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - bool debugDisplay = m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled(); - using (new ProfilingScope(cmd, debugDisplay ? ProfilingSampler.Get(HDProfileId.ForwardOpaqueDebug) : ProfilingSampler.Get(HDProfileId.ForwardOpaque))) - { - bool useFptl = hdCamera.frameSettings.IsEnabled(FrameSettingsField.FPTLForForwardOpaque); - bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - - RenderTargetIdentifier[] renderTarget = null; - - // In case of forward SSS we will bind all the required target. It is up to the shader to write into it or not. - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.SubsurfaceScattering)) - { - renderTarget = m_MRTWithSSS; - renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; // Store the specular color - renderTarget[1] = msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer; - renderTarget[2] = msaa ? GetSSSBufferMSAA() : GetSSSBuffer(); - } - else - { - renderTarget = mMRTSingle; - renderTarget[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - } - - RenderForwardRendererList(hdCamera.frameSettings, - RendererList.Create(PrepareForwardOpaqueRendererList(cullResults, hdCamera)), - renderTarget, - m_SharedRTManager.GetDepthStencilBuffer(msaa), - useFptl ? m_TileAndClusterData.lightList : m_TileAndClusterData.perVoxelLightLists, - true, renderContext, cmd); - } - } - - static bool NeedMotionVectorForTransparent(FrameSettings frameSettings) - { - return frameSettings.IsEnabled(FrameSettingsField.MotionVectors) && frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector); - } - - RendererListDesc PrepareForwardTransparentRendererList(CullingResults cullResults, HDCamera hdCamera, bool preRefraction) - { - RenderQueueRange transparentRange; - if (preRefraction) - { - transparentRange = HDRenderQueue.k_RenderQueue_PreRefraction; - } - else if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) - { - transparentRange = HDRenderQueue.k_RenderQueue_Transparent; - } - else // Low res transparent disabled - { - transparentRange = HDRenderQueue.k_RenderQueue_TransparentWithLowRes; - } - - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction)) - { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) - transparentRange = HDRenderQueue.k_RenderQueue_AllTransparent; - else - transparentRange = HDRenderQueue.k_RenderQueue_AllTransparentWithLowRes; - } - - if (NeedMotionVectorForTransparent(hdCamera.frameSettings)) - { - m_CurrentRendererConfigurationBakedLighting |= PerObjectData.MotionVectors; // This will enable the flag for low res transparent as well - } - - var passNames = m_Asset.currentPlatformRenderPipelineSettings.supportTransparentBackface ? m_AllTransparentPassNames : m_TransparentNoBackfaceNames; - return CreateTransparentRendererListDesc(cullResults, hdCamera.camera, passNames, m_CurrentRendererConfigurationBakedLighting, transparentRange); - } - - - void RenderForwardTransparent(CullingResults cullResults, HDCamera hdCamera, bool preRefraction, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - // If rough refraction are turned off, we render all transparents in the Transparent pass and we skip the PreRefraction one. - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction) && preRefraction) - { - return; - } - - HDProfileId passName; - bool debugDisplay = m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled(); - if (debugDisplay) - passName = preRefraction ? HDProfileId.ForwardPreRefractionDebug : HDProfileId.ForwardTransparentDebug; - else - passName = preRefraction ? HDProfileId.ForwardPreRefraction : HDProfileId.ForwardTransparent; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(passName))) - { - bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - bool renderMotionVecForTransparent = NeedMotionVectorForTransparent(hdCamera.frameSettings); - cmd.SetGlobalInt(HDShaderIDs._ColorMaskTransparentVel, renderMotionVecForTransparent ? (int)ColorWriteMask.All : 0); - - m_MRTTransparentMotionVec[0] = msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer; - m_MRTTransparentMotionVec[1] = renderMotionVecForTransparent ? m_SharedRTManager.GetMotionVectorsBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) - // It doesn't really matter what gets bound here since the color mask state set will prevent this from ever being written to. However, we still need to bind something - // to avoid warnings about unbound render targets. The following rendertarget could really be anything if renderVelocitiesForTransparent, here the normal buffer - // as it is guaranteed to exist and to have the same size. - // to avoid warnings about unbound render targets. - : m_SharedRTManager.GetNormalBuffer(msaa); - - if ((hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals)) && (DecalSystem.m_DecalDatasCount > 0)) // enable d-buffer flag value is being interpreted more like enable decals in general now that we have clustered - // decal datas count is 0 if no decals affect transparency - { - DecalSystem.instance.SetAtlas(cmd); // for clustered decals - } - - RenderForwardRendererList(hdCamera.frameSettings, - RendererList.Create(PrepareForwardTransparentRendererList(cullResults, hdCamera, preRefraction)), - m_MRTTransparentMotionVec, - m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), - m_TileAndClusterData.perVoxelLightLists, - false, renderContext, cmd); - } - } - - static void RenderForwardRendererList( FrameSettings frameSettings, - RendererList rendererList, - RenderTargetIdentifier[] renderTarget, - RTHandle depthBuffer, - ComputeBuffer lightListBuffer, - bool opaque, - ScriptableRenderContext renderContext, - CommandBuffer cmd) - { - // Note: SHADOWS_SHADOWMASK keyword is enabled in HDRenderPipeline.cs ConfigureForShadowMask - bool useFptl = opaque && frameSettings.IsEnabled(FrameSettingsField.FPTLForForwardOpaque); - - // say that we want to use tile/cluster light loop - CoreUtils.SetKeyword(cmd, "USE_FPTL_LIGHTLIST", useFptl); - CoreUtils.SetKeyword(cmd, "USE_CLUSTERED_LIGHTLIST", !useFptl); - cmd.SetGlobalBuffer(HDShaderIDs.g_vLightListGlobal, lightListBuffer); - - CoreUtils.SetRenderTarget(cmd, renderTarget, depthBuffer); - if (opaque) - DrawOpaqueRendererList(renderContext, cmd, frameSettings, rendererList); - else - DrawTransparentRendererList(renderContext, cmd, frameSettings, rendererList); - } - - // This is use to Display legacy shader with an error shader - [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] - void RenderForwardError(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderForwardError))) - { - CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer()); - var rendererList = RendererList.Create(CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, m_ForwardErrorPassNames, renderQueueRange: RenderQueueRange.all, overrideMaterial: m_ErrorMaterial)); - HDUtils.DrawRendererList(renderContext, cmd, rendererList); - } - } - - bool RenderCustomPass(ScriptableRenderContext context, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResults, CustomPassInjectionPoint injectionPoint) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.CustomPass)) - return false; - - bool executed = false; - CustomPassVolume.GetActivePassVolumes(injectionPoint, m_ActivePassVolumes); - foreach (var customPass in m_ActivePassVolumes) - { - if (customPass == null) - return false; - - var customPassTargets = new CustomPass.RenderTargets - { - cameraColorMSAABuffer = m_CameraColorMSAABuffer, - cameraColorBuffer = (injectionPoint == CustomPassInjectionPoint.AfterPostProcess) ? m_IntermediateAfterPostProcessBuffer : m_CameraColorBuffer, - customColorBuffer = m_CustomPassColorBuffer, - customDepthBuffer = m_CustomPassDepthBuffer, - }; - executed |= customPass.Execute(context, cmd, hdCamera, cullingResults, m_SharedRTManager, customPassTargets); - } - - return executed; - } - - void RenderTransparentDepthPrepass(CullingResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentPrepass)) - { - // Render transparent depth prepass after opaque one - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.TransparentDepthPrepass))) - { - CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthStencilBuffer()); - var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cull, hdCamera.camera, m_TransparentDepthPrepassNames)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - } - } - } - - void RenderTransparentDepthPostpass(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentPostpass)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.TransparentDepthPostpass))) - { - CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthStencilBuffer()); - var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, m_TransparentDepthPostpassNames)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing)) - { - // If there is a ray-tracing environment and the feature is enabled we want to push these objects to the transparent postpass (they are not rendered in the first call because they are not in the generic transparent render queue) - var rrSettings = hdCamera.volumeStack.GetComponent(); - if (rrSettings.enable.value) - { - var rendererListRT = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, m_TransparentDepthPostpassNames, renderQueueRange: HDRenderQueue.k_RenderQueue_AllTransparentRaytracing)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererListRT); - } - } - } - } - - void RenderLowResTransparent(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.LowResTransparent))) - { - cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 1); - cmd.SetGlobalInt(HDShaderIDs._OffScreenDownsampleFactor, 2); - CoreUtils.SetRenderTarget(cmd, m_LowResTransparentBuffer, m_SharedRTManager.GetLowResDepthBuffer(), clearFlag: ClearFlag.Color, Color.black); - RenderQueueRange transparentRange = HDRenderQueue.k_RenderQueue_LowTransparent; - var passNames = m_Asset.currentPlatformRenderPipelineSettings.supportTransparentBackface ? m_AllTransparentPassNames : m_TransparentNoBackfaceNames; - var rendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, passNames, m_CurrentRendererConfigurationBakedLighting, HDRenderQueue.k_RenderQueue_LowTransparent)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 0); - cmd.SetGlobalInt(HDShaderIDs._OffScreenDownsampleFactor, 1); - } - } - - void RenderObjectsMotionVectors(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.ObjectMotionVectors)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ObjectsMotionVector))) - { - // These flags are still required in SRP or the engine won't compute previous model matrices... - // If the flag hasn't been set yet on this camera, motion vectors will skip a frame. - hdCamera.camera.depthTextureMode |= DepthTextureMode.MotionVectors | DepthTextureMode.Depth; - - CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetMotionVectorsPassBuffersRTI(hdCamera.frameSettings), m_SharedRTManager.GetDepthStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA))); - var rendererList = RendererList.Create(CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_MotionVectorsName, PerObjectData.MotionVectors)); - DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, rendererList); - } - } - - void RenderCameraMotionVectors(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.MotionVectors)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.CameraMotionVectors))) - { - bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - - // These flags are still required in SRP or the engine won't compute previous model matrices... - // If the flag hasn't been set yet on this camera, motion vectors will skip a frame. - hdCamera.camera.depthTextureMode |= DepthTextureMode.MotionVectors | DepthTextureMode.Depth; - m_CameraMotionVectorsMaterial.SetInt(HDShaderIDs._StencilMask, (int)StencilUsage.ObjectMotionVector); - m_CameraMotionVectorsMaterial.SetInt(HDShaderIDs._StencilRef, (int)StencilUsage.ObjectMotionVector); - - HDUtils.DrawFullScreen(cmd, m_CameraMotionVectorsMaterial, m_SharedRTManager.GetMotionVectorsBuffer(msaa), m_SharedRTManager.GetDepthStencilBuffer(msaa), null, 0); - -#if UNITY_EDITOR - // In scene view there is no motion vector, so we clear the RT to black - if (hdCamera.camera.cameraType == CameraType.SceneView && !hdCamera.animateMaterials) - { - CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetMotionVectorsBuffer(msaa), m_SharedRTManager.GetDepthStencilBuffer(msaa), ClearFlag.Color, Color.clear); - } -#endif - } - } - - struct RenderSSRParameters - { - public ComputeShader ssrCS; - public int tracingKernel; - public int reprojectionKernel; - - public int width, height, viewCount; - public int maxIteration; - public bool reflectSky; - public float thicknessScale; - public float thicknessBias; - public float roughnessFadeEnd; - public float roughnessFadeEndTimesRcpLength; - public float roughnessFadeRcpLength; - public float edgeFadeRcpLength; - - public int depthPyramidMipCount; - public ComputeBuffer offsetBufferData; - public ComputeBuffer coarseStencilBuffer; - - public Vector4 colorPyramidUVScaleAndLimit; - public int colorPyramidMipCount; - } - - RenderSSRParameters PrepareSSRParameters(HDCamera hdCamera) - { - var volumeSettings = hdCamera.volumeStack.GetComponent(); - var parameters = new RenderSSRParameters(); - - parameters.ssrCS = m_ScreenSpaceReflectionsCS; - parameters.tracingKernel = m_SsrTracingKernel; - parameters.reprojectionKernel = m_SsrReprojectionKernel; - - parameters.width = hdCamera.actualWidth; - parameters.height = hdCamera.actualHeight; - parameters.viewCount = hdCamera.viewCount; - - float n = hdCamera.camera.nearClipPlane; - float f = hdCamera.camera.farClipPlane; - - parameters.maxIteration = volumeSettings.rayMaxIterations; - parameters.reflectSky = volumeSettings.reflectSky.value; - - float thickness = volumeSettings.depthBufferThickness.value; - parameters.thicknessScale = 1.0f / (1.0f + thickness); - parameters.thicknessBias = -n / (f - n) * (thickness * parameters.thicknessScale); - - var info = m_SharedRTManager.GetDepthBufferMipChainInfo(); - parameters.depthPyramidMipCount = info.mipLevelCount; - parameters.offsetBufferData = info.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); - parameters.coarseStencilBuffer = m_SharedRTManager.GetCoarseStencilBuffer(); - - float roughnessFadeStart = 1 - volumeSettings.smoothnessFadeStart.value; - parameters.roughnessFadeEnd = 1 - volumeSettings.minSmoothness.value; - float roughnessFadeLength = parameters.roughnessFadeEnd - roughnessFadeStart; - parameters.roughnessFadeEndTimesRcpLength = (roughnessFadeLength != 0) ? (parameters.roughnessFadeEnd * (1.0f / roughnessFadeLength)) : 1; - parameters.roughnessFadeRcpLength = (roughnessFadeLength != 0) ? (1.0f / roughnessFadeLength) : 0; - parameters.edgeFadeRcpLength = Mathf.Min(1.0f / volumeSettings.screenFadeDistance.value, float.MaxValue); - - parameters.colorPyramidUVScaleAndLimit = HDUtils.ComputeUvScaleAndLimit(hdCamera.historyRTHandleProperties.previousViewportSize, hdCamera.historyRTHandleProperties.previousRenderTargetSize); - parameters.colorPyramidMipCount = hdCamera.colorPyramidHistoryMipCount; - - return parameters; - } - - static void RenderSSR( in RenderSSRParameters parameters, - RTHandle depthPyramid, - RTHandle SsrHitPointTexture, - RTHandle stencilBuffer, - RTHandle clearCoatMask, - RTHandle previousColorPyramid, - RTHandle ssrLightingTexture, - CommandBuffer cmd, - ScriptableRenderContext renderContext) - { - var cs = parameters.ssrCS; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.SsrTracing))) - { - cmd.SetComputeIntParam(cs, HDShaderIDs._SsrIterLimit, parameters.maxIteration); - cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrThicknessScale, parameters.thicknessScale); - cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrThicknessBias, parameters.thicknessBias); - cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrRoughnessFadeEnd, parameters.roughnessFadeEnd); - cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrRoughnessFadeRcpLength, parameters.roughnessFadeRcpLength); - cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrRoughnessFadeEndTimesRcpLength, parameters.roughnessFadeEndTimesRcpLength); - cmd.SetComputeIntParam(cs, HDShaderIDs._SsrDepthPyramidMaxMip, parameters.depthPyramidMipCount - 1); - cmd.SetComputeFloatParam(cs, HDShaderIDs._SsrEdgeFadeRcpLength, parameters.edgeFadeRcpLength); - cmd.SetComputeIntParam(cs, HDShaderIDs._SsrReflectsSky, parameters.reflectSky ? 1 : 0); - cmd.SetComputeIntParam(cs, HDShaderIDs._SsrStencilBit, (int)StencilUsage.TraceReflectionRay); - - // cmd.SetComputeTextureParam(cs, kernel, "_SsrDebugTexture", m_SsrDebugTexture); - cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._CameraDepthTexture, depthPyramid); - cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._SsrClearCoatMaskTexture, clearCoatMask); - cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._SsrHitPointTexture, SsrHitPointTexture); - - if (stencilBuffer.rt.stencilFormat == GraphicsFormat.None) // We are accessing MSAA resolved version and not the depth stencil buffer directly. - { - cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._StencilTexture, stencilBuffer); - } - else - { - cmd.SetComputeTextureParam(cs, parameters.tracingKernel, HDShaderIDs._StencilTexture, stencilBuffer, 0, RenderTextureSubElement.Stencil); - } - - cmd.SetComputeBufferParam(cs, parameters.tracingKernel, HDShaderIDs._CoarseStencilBuffer, parameters.coarseStencilBuffer); - - cmd.SetComputeBufferParam(cs, parameters.tracingKernel, HDShaderIDs._DepthPyramidMipLevelOffsets, parameters.offsetBufferData); - - cmd.DispatchCompute(cs, parameters.tracingKernel, HDUtils.DivRoundUp(parameters.width, 8), HDUtils.DivRoundUp(parameters.height, 8), parameters.viewCount); - } - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.SsrReprojection))) - { - // cmd.SetComputeTextureParam(cs, kernel, "_SsrDebugTexture", m_SsrDebugTexture); - cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._SsrHitPointTexture, SsrHitPointTexture); - cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._SsrLightingTextureRW, ssrLightingTexture); - cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._ColorPyramidTexture, previousColorPyramid); - cmd.SetComputeTextureParam(cs, parameters.reprojectionKernel, HDShaderIDs._SsrClearCoatMaskTexture, clearCoatMask); - - cmd.SetComputeVectorParam(cs, HDShaderIDs._ColorPyramidUvScaleAndLimitPrevFrame, parameters.colorPyramidUVScaleAndLimit); - cmd.SetComputeIntParam(cs, HDShaderIDs._SsrColorPyramidMaxMip, parameters.colorPyramidMipCount - 1); - - cmd.DispatchCompute(cs, parameters.reprojectionKernel, HDUtils.DivRoundUp(parameters.width, 8), HDUtils.DivRoundUp(parameters.height, 8), parameters.viewCount); - } - } - - void RenderSSR(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext renderContext) - { - if (!hdCamera.IsSSREnabled()) - return; - - var settings = hdCamera.volumeStack.GetComponent(); - bool usesRaytracedReflections = hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && settings.rayTracing.value; - if (usesRaytracedReflections) - { - hdCamera.xr.StartSinglePass(cmd); - RenderRayTracedReflections(hdCamera, cmd, m_SsrLightingTexture, renderContext, m_FrameCount); - hdCamera.xr.StopSinglePass(cmd); - } - else - { - var previousColorPyramid = hdCamera.GetPreviousFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); - - // Evaluate the clear coat mask texture based on the lit shader mode - RTHandle clearCoatMask = hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred ? m_GbufferManager.GetBuffer(2) : TextureXR.GetBlackTexture(); - - var parameters = PrepareSSRParameters(hdCamera); - RenderSSR(parameters, m_SharedRTManager.GetDepthTexture(), m_SsrHitPointTexture, - m_SharedRTManager.GetStencilBuffer(hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)), clearCoatMask, previousColorPyramid, - m_SsrLightingTexture, cmd, renderContext); - - if (!hdCamera.colorPyramidHistoryIsValid) - { - cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, TextureXR.GetClearTexture()); - hdCamera.colorPyramidHistoryIsValid = true; // For the next frame... - } - } - cmd.SetGlobalInt(HDShaderIDs._UseRayTracedReflections, usesRaytracedReflections ? 1 : 0); - - PushFullScreenDebugTexture(hdCamera, cmd, m_SsrLightingTexture, FullScreenDebugMode.ScreenSpaceReflections); - } - - void RenderColorPyramid(HDCamera hdCamera, CommandBuffer cmd, bool isPreRefraction) - { - if (isPreRefraction) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Refraction)) - return; - } - else - { - // This final Gaussian pyramid can be reused by SSR, so disable it only if there is no distortion - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Distortion) && !hdCamera.IsSSREnabled()) - return; - } - - var currentColorPyramid = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); - - int lodCount; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ColorPyramid))) - { - Vector2Int pyramidSizeV2I = new Vector2Int(hdCamera.actualWidth, hdCamera.actualHeight); - lodCount = m_MipGenerator.RenderColorGaussianPyramid(cmd, pyramidSizeV2I, m_CameraColorBuffer, currentColorPyramid); - hdCamera.colorPyramidHistoryMipCount = lodCount; - } - - float scaleX = hdCamera.actualWidth / (float)currentColorPyramid.rt.width; - float scaleY = hdCamera.actualHeight / (float)currentColorPyramid.rt.height; - Vector4 pyramidScaleLod = new Vector4(scaleX, scaleY, lodCount, 0.0f); - Vector4 pyramidScale = new Vector4(scaleX, scaleY, 0f, 0f); - // Warning! Danger! - // The color pyramid scale is only correct for the most detailed MIP level. - // For the other MIP levels, due to truncation after division by 2, a row or - // column of texels may be lost. Since this can happen to BOTH the texture - // size AND the viewport, (uv * _ColorPyramidScale.xy) can be off by a texel - // unless the scale is 1 (and it will not be 1 if the texture was resized - // and is of greater size compared to the viewport). - cmd.SetGlobalTexture(HDShaderIDs._ColorPyramidTexture, currentColorPyramid); - cmd.SetGlobalVector(HDShaderIDs._ColorPyramidScale, pyramidScaleLod); - PushFullScreenDebugTextureMip(hdCamera, cmd, currentColorPyramid, lodCount, pyramidScale, isPreRefraction ? FullScreenDebugMode.PreRefractionColorPyramid : FullScreenDebugMode.FinalColorPyramid); - } - - void GenerateDepthPyramid(HDCamera hdCamera, CommandBuffer cmd, FullScreenDebugMode debugMode) - { - CopyDepthBufferIfNeeded(hdCamera, cmd); - - int mipCount = m_SharedRTManager.GetDepthBufferMipChainInfo().mipLevelCount; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DepthPyramid))) - { - m_MipGenerator.RenderMinDepthPyramid(cmd, m_SharedRTManager.GetDepthTexture(), m_SharedRTManager.GetDepthBufferMipChainInfo()); - } - - float scaleX = hdCamera.actualWidth / (float)m_SharedRTManager.GetDepthTexture().rt.width; - float scaleY = hdCamera.actualHeight / (float)m_SharedRTManager.GetDepthTexture().rt.height; - Vector4 pyramidScaleLod = new Vector4(scaleX, scaleY, mipCount, 0.0f); - Vector4 pyramidScale = new Vector4(scaleX, scaleY, 0f, 0f); - cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthTexture()); - cmd.SetGlobalVector(HDShaderIDs._DepthPyramidScale, pyramidScaleLod); - PushFullScreenDebugTextureMip(hdCamera, cmd, m_SharedRTManager.GetDepthTexture(), mipCount, pyramidScale, debugMode); - } - - void DownsampleDepthForLowResTransparency(HDCamera hdCamera, CommandBuffer cmd) - { - var settings = m_Asset.currentPlatformRenderPipelineSettings.lowresTransparentSettings; - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DownsampleDepth))) - { - CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetLowResDepthBuffer()); - cmd.SetViewport(new Rect(0, 0, hdCamera.actualWidth * 0.5f, hdCamera.actualHeight * 0.5f)); - // TODO: Add option to switch modes at runtime - if(settings.checkerboardDepthBuffer) - { - m_DownsampleDepthMaterial.EnableKeyword("CHECKERBOARD_DOWNSAMPLE"); - } - cmd.DrawProcedural(Matrix4x4.identity, m_DownsampleDepthMaterial, 0, MeshTopology.Triangles, 3, 1, null); - } - } - - void UpsampleTransparent(HDCamera hdCamera, CommandBuffer cmd) - { - var settings = m_Asset.currentPlatformRenderPipelineSettings.lowresTransparentSettings; - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.LowResTransparent)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.UpsampleLowResTransparent))) - { - CoreUtils.SetRenderTarget(cmd, m_CameraColorBuffer); - if(settings.upsampleType == LowResTransparentUpsample.Bilinear) - { - m_UpsampleTransparency.EnableKeyword("BILINEAR"); - } - else if (settings.upsampleType == LowResTransparentUpsample.NearestDepth) - { - m_UpsampleTransparency.EnableKeyword("NEAREST_DEPTH"); - } - m_UpsampleTransparency.SetTexture(HDShaderIDs._LowResTransparent, m_LowResTransparentBuffer); - m_UpsampleTransparency.SetTexture(HDShaderIDs._LowResDepthTexture, m_SharedRTManager.GetLowResDepthBuffer()); - cmd.DrawProcedural(Matrix4x4.identity, m_UpsampleTransparency, 0, MeshTopology.Triangles, 3, 1, null); - } - } - - void ApplyDebugDisplaySettings(HDCamera hdCamera, CommandBuffer cmd) - { - // See ShaderPassForward.hlsl: for forward shaders, if DEBUG_DISPLAY is enabled and no DebugLightingMode or DebugMipMapMod - // modes have been set, lighting is automatically skipped (To avoid some crashed due to lighting RT not set on console). - // However debug mode like colorPickerModes and false color don't need DEBUG_DISPLAY and must work with the lighting. - // So we will enabled DEBUG_DISPLAY independently - - bool debugDisplayEnabledOrSceneLightingDisabled = m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() || CoreUtils.IsSceneLightingDisabled(hdCamera.camera); - // Enable globally the keyword DEBUG_DISPLAY on shader that support it with multi-compile - CoreUtils.SetKeyword(cmd, "DEBUG_DISPLAY", debugDisplayEnabledOrSceneLightingDisabled); - - // Setting this all the time due to a strange bug that either reports a (globally) bound texture as not bound or where SetGlobalTexture doesn't behave as expected. - // As a workaround we bind it regardless of debug display. Eventually with - cmd.SetGlobalTexture(HDShaderIDs._DebugMatCapTexture, defaultResources.textures.matcapTex); - - if (debugDisplayEnabledOrSceneLightingDisabled || - m_CurrentDebugDisplaySettings.data.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None) - { - // This is for texture streaming - m_CurrentDebugDisplaySettings.UpdateMaterials(); - - var lightingDebugSettings = m_CurrentDebugDisplaySettings.data.lightingDebugSettings; - var materialDebugSettings = m_CurrentDebugDisplaySettings.data.materialDebugSettings; - var debugAlbedo = new Vector4(lightingDebugSettings.overrideAlbedo ? 1.0f : 0.0f, lightingDebugSettings.overrideAlbedoValue.r, lightingDebugSettings.overrideAlbedoValue.g, lightingDebugSettings.overrideAlbedoValue.b); - var debugSmoothness = new Vector4(lightingDebugSettings.overrideSmoothness ? 1.0f : 0.0f, lightingDebugSettings.overrideSmoothnessValue, 0.0f, 0.0f); - var debugNormal = new Vector4(lightingDebugSettings.overrideNormal ? 1.0f : 0.0f, 0.0f, 0.0f, 0.0f); - var debugAmbientOcclusion = new Vector4(lightingDebugSettings.overrideAmbientOcclusion ? 1.0f : 0.0f, lightingDebugSettings.overrideAmbientOcclusionValue, 0.0f, 0.0f); - var debugSpecularColor = new Vector4(lightingDebugSettings.overrideSpecularColor ? 1.0f : 0.0f, lightingDebugSettings.overrideSpecularColorValue.r, lightingDebugSettings.overrideSpecularColorValue.g, lightingDebugSettings.overrideSpecularColorValue.b); - var debugEmissiveColor = new Vector4(lightingDebugSettings.overrideEmissiveColor ? 1.0f : 0.0f, lightingDebugSettings.overrideEmissiveColorValue.r, lightingDebugSettings.overrideEmissiveColorValue.g, lightingDebugSettings.overrideEmissiveColorValue.b); - var debugTrueMetalColor = new Vector4(materialDebugSettings.materialValidateTrueMetal ? 1.0f : 0.0f, materialDebugSettings.materialValidateTrueMetalColor.r, materialDebugSettings.materialValidateTrueMetalColor.g, materialDebugSettings.materialValidateTrueMetalColor.b); - - DebugLightingMode debugLightingMode = m_CurrentDebugDisplaySettings.GetDebugLightingMode(); - if (CoreUtils.IsSceneLightingDisabled(hdCamera.camera)) - { - debugLightingMode = DebugLightingMode.MatcapView; - } - - cmd.SetGlobalFloatArray(HDShaderIDs._DebugViewMaterial, m_CurrentDebugDisplaySettings.GetDebugMaterialIndexes()); - cmd.SetGlobalInt(HDShaderIDs._DebugLightingMode, (int)debugLightingMode); - cmd.SetGlobalInt(HDShaderIDs._DebugShadowMapMode, (int)m_CurrentDebugDisplaySettings.GetDebugShadowMapMode()); - cmd.SetGlobalInt(HDShaderIDs._DebugMipMapMode, (int)m_CurrentDebugDisplaySettings.GetDebugMipMapMode()); - cmd.SetGlobalInt(HDShaderIDs._DebugMipMapModeTerrainTexture, (int)m_CurrentDebugDisplaySettings.GetDebugMipMapModeTerrainTexture()); - cmd.SetGlobalInt(HDShaderIDs._ColorPickerMode, (int)m_CurrentDebugDisplaySettings.GetDebugColorPickerMode()); - cmd.SetGlobalInt(HDShaderIDs._DebugFullScreenMode, (int)m_CurrentDebugDisplaySettings.data.fullScreenDebugMode); - -#if UNITY_EDITOR - cmd.SetGlobalInt(HDShaderIDs._MatcapMixAlbedo, HDRenderPipelinePreferences.matcapViewMixAlbedo ? 1 : 0); - cmd.SetGlobalFloat(HDShaderIDs._MatcapViewScale, HDRenderPipelinePreferences.matcapViewScale); -#else - cmd.SetGlobalInt(HDShaderIDs._MatcapMixAlbedo, 0); - cmd.SetGlobalFloat(HDShaderIDs._MatcapViewScale, 1.0f); -#endif - cmd.SetGlobalVector(HDShaderIDs._DebugLightingAlbedo, debugAlbedo); - cmd.SetGlobalVector(HDShaderIDs._DebugLightingSmoothness, debugSmoothness); - cmd.SetGlobalVector(HDShaderIDs._DebugLightingNormal, debugNormal); - cmd.SetGlobalVector(HDShaderIDs._DebugLightingAmbientOcclusion, debugAmbientOcclusion); - cmd.SetGlobalVector(HDShaderIDs._DebugLightingSpecularColor, debugSpecularColor); - cmd.SetGlobalVector(HDShaderIDs._DebugLightingEmissiveColor, debugEmissiveColor); - cmd.SetGlobalColor(HDShaderIDs._DebugLightingMaterialValidateHighColor, materialDebugSettings.materialValidateHighColor); - cmd.SetGlobalColor(HDShaderIDs._DebugLightingMaterialValidateLowColor, materialDebugSettings.materialValidateLowColor); - cmd.SetGlobalColor(HDShaderIDs._DebugLightingMaterialValidatePureMetalColor, debugTrueMetalColor); - - cmd.SetGlobalVector(HDShaderIDs._MousePixelCoord, HDUtils.GetMouseCoordinates(hdCamera)); - cmd.SetGlobalVector(HDShaderIDs._MouseClickPixelCoord, HDUtils.GetMouseClickCoordinates(hdCamera)); - cmd.SetGlobalTexture(HDShaderIDs._DebugFont, defaultResources.textures.debugFontTex); - - - } - } - - static bool NeedColorPickerDebug(DebugDisplaySettings debugSettings) - { - return debugSettings.data.colorPickerDebugSettings.colorPickerMode != ColorPickerDebugMode.None - || debugSettings.data.falseColorDebugSettings.falseColor - || debugSettings.data.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuminanceMeter; - } - - void PushColorPickerDebugTexture(CommandBuffer cmd, HDCamera hdCamera, RTHandle textureID) - { - if (NeedColorPickerDebug(m_CurrentDebugDisplaySettings)) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.PushToColorPicker))) - { - HDUtils.BlitCameraTexture(cmd, textureID, m_DebugColorPickerBuffer); - } - } - } - - bool NeedsFullScreenDebugMode() - { - bool fullScreenDebugEnabled = m_CurrentDebugDisplaySettings.data.fullScreenDebugMode != FullScreenDebugMode.None; - bool lightingDebugEnabled = m_CurrentDebugDisplaySettings.data.lightingDebugSettings.shadowDebugMode == ShadowMapDebugMode.SingleShadow; - - return fullScreenDebugEnabled || lightingDebugEnabled; - } - - void PushFullScreenLightingDebugTexture(HDCamera hdCamera, CommandBuffer cmd, RTHandle textureID) - { - // In practice, this is only useful for the SingleShadow debug view. - // TODO: See how we can make this nicer than a specific functions just for one case. - if (NeedsFullScreenDebugMode() && m_FullScreenDebugPushed == false) - { - m_FullScreenDebugPushed = true; - HDUtils.BlitCameraTexture(cmd, textureID, m_DebugFullScreenTempBuffer); - } - } - - internal void PushFullScreenDebugTexture(HDCamera hdCamera, CommandBuffer cmd, RTHandle textureID, FullScreenDebugMode debugMode) - { - if (debugMode == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode) - { - m_FullScreenDebugPushed = true; // We need this flag because otherwise if no full screen debug is pushed (like for example if the corresponding pass is disabled), when we render the result in RenderDebug m_DebugFullScreenTempBuffer will contain potential garbage - HDUtils.BlitCameraTexture(cmd, textureID, m_DebugFullScreenTempBuffer); - } - } - - void PushFullScreenDebugTextureMip(HDCamera hdCamera, CommandBuffer cmd, RTHandle texture, int lodCount, Vector4 scaleBias, FullScreenDebugMode debugMode) - { - if (debugMode == m_CurrentDebugDisplaySettings.data.fullScreenDebugMode) - { - var mipIndex = Mathf.FloorToInt(m_CurrentDebugDisplaySettings.data.fullscreenDebugMip * (lodCount)); - - m_FullScreenDebugPushed = true; // We need this flag because otherwise if no full screen debug is pushed (like for example if the corresponding pass is disabled), when we render the result in RenderDebug m_DebugFullScreenTempBuffer will contain potential garbage - HDUtils.BlitCameraTexture(cmd, texture, m_DebugFullScreenTempBuffer, scaleBias, mipIndex); - } - } - - struct DebugParameters - { - public DebugDisplaySettings debugDisplaySettings; - public HDCamera hdCamera; - - // Full screen debug - public bool resolveFullScreenDebug; - public Material debugFullScreenMaterial; - public int depthPyramidMip; - public ComputeBuffer depthPyramidOffsets; - - // Sky - public Texture skyReflectionTexture; - public Material debugLatlongMaterial; - - public bool rayTracingSupported; - public RayCountManager rayCountManager; - - // Lighting - public LightLoopDebugOverlayParameters lightingOverlayParameters; - - // Color picker - public bool colorPickerEnabled; - public Material colorPickerMaterial; - } - - DebugParameters PrepareDebugParameters(HDCamera hdCamera, HDUtils.PackedMipChainInfo depthMipInfo) - { - var parameters = new DebugParameters(); - - parameters.debugDisplaySettings = m_CurrentDebugDisplaySettings; - parameters.hdCamera = hdCamera; - - parameters.resolveFullScreenDebug = NeedsFullScreenDebugMode() && m_FullScreenDebugPushed; - parameters.debugFullScreenMaterial = m_DebugFullScreen; - parameters.depthPyramidMip = (int)(parameters.debugDisplaySettings.data.fullscreenDebugMip * depthMipInfo.mipLevelCount); - parameters.depthPyramidOffsets = depthMipInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); - - parameters.skyReflectionTexture = m_SkyManager.GetSkyReflection(hdCamera); - parameters.debugLatlongMaterial = m_DebugDisplayLatlong; - parameters.lightingOverlayParameters = PrepareLightLoopDebugOverlayParameters(); - - parameters.rayTracingSupported = hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing); - parameters.rayCountManager = m_RayCountManager; - - parameters.colorPickerEnabled = NeedColorPickerDebug(parameters.debugDisplaySettings); - parameters.colorPickerMaterial = m_DebugColorPicker; - - return parameters; - } - - static void ResolveFullScreenDebug( in DebugParameters parameters, - MaterialPropertyBlock mpb, - RTHandle inputFullScreenDebug, - RTHandle inputDepthPyramid, - RTHandle output, - CommandBuffer cmd) - { - mpb.SetTexture(HDShaderIDs._DebugFullScreenTexture, inputFullScreenDebug); - mpb.SetTexture(HDShaderIDs._CameraDepthTexture, inputDepthPyramid); - mpb.SetFloat(HDShaderIDs._FullScreenDebugMode, (float)parameters.debugDisplaySettings.data.fullScreenDebugMode); - mpb.SetInt(HDShaderIDs._DebugDepthPyramidMip, parameters.depthPyramidMip); - mpb.SetBuffer(HDShaderIDs._DebugDepthPyramidOffsets, parameters.depthPyramidOffsets); - mpb.SetInt(HDShaderIDs._DebugContactShadowLightIndex, parameters.debugDisplaySettings.data.fullScreenContactShadowLightIndex); - - HDUtils.DrawFullScreen(cmd, parameters.debugFullScreenMaterial, output, mpb, 0); - } - - static void ResolveColorPickerDebug(in DebugParameters parameters, - RTHandle debugColorPickerBuffer, - RTHandle output, - CommandBuffer cmd) - { - ColorPickerDebugSettings colorPickerDebugSettings = parameters.debugDisplaySettings.data.colorPickerDebugSettings; - FalseColorDebugSettings falseColorDebugSettings = parameters.debugDisplaySettings.data.falseColorDebugSettings; - var falseColorThresholds = new Vector4(falseColorDebugSettings.colorThreshold0, falseColorDebugSettings.colorThreshold1, falseColorDebugSettings.colorThreshold2, falseColorDebugSettings.colorThreshold3); - - // Here we have three cases: - // - Material debug is enabled, this is the buffer we display - // - Otherwise we display the HDR buffer before postprocess and distortion - // - If fullscreen debug is enabled we always use it - parameters.colorPickerMaterial.SetTexture(HDShaderIDs._DebugColorPickerTexture, debugColorPickerBuffer); - parameters.colorPickerMaterial.SetColor(HDShaderIDs._ColorPickerFontColor, colorPickerDebugSettings.fontColor); - parameters.colorPickerMaterial.SetInt(HDShaderIDs._FalseColorEnabled, falseColorDebugSettings.falseColor ? 1 : 0); - parameters.colorPickerMaterial.SetVector(HDShaderIDs._FalseColorThresholds, falseColorThresholds); - // The material display debug perform sRGBToLinear conversion as the final blit currently hardcodes a linearToSrgb conversion. As when we read with color picker this is not done, - // we perform it inside the color picker shader. But we shouldn't do it for HDR buffer. - parameters.colorPickerMaterial.SetFloat(HDShaderIDs._ApplyLinearToSRGB, parameters.debugDisplaySettings.IsDebugMaterialDisplayEnabled() ? 1.0f : 0.0f); - - HDUtils.DrawFullScreen(cmd, parameters.colorPickerMaterial, output); - } - - static void RenderSkyReflectionOverlay(in DebugParameters debugParameters, CommandBuffer cmd, MaterialPropertyBlock mpb, ref float x, ref float y, float overlaySize) - { - var lightingDebug = debugParameters.debugDisplaySettings.data.lightingDebugSettings; - if (lightingDebug.displaySkyReflection) - { - mpb.SetTexture(HDShaderIDs._InputCubemap, debugParameters.skyReflectionTexture); - mpb.SetFloat(HDShaderIDs._Mipmap, lightingDebug.skyReflectionMipmap); - mpb.SetFloat(HDShaderIDs._ApplyExposure, 1.0f); - mpb.SetFloat(HDShaderIDs._SliceIndex, lightingDebug.cookieCubeArraySliceIndex); - cmd.SetViewport(new Rect(x, y, overlaySize, overlaySize)); - cmd.DrawProcedural(Matrix4x4.identity, debugParameters.debugLatlongMaterial, 0, MeshTopology.Triangles, 3, 1, mpb); - HDUtils.NextOverlayCoord(ref x, ref y, overlaySize, overlaySize, debugParameters.hdCamera); - } - } - - static void RenderRayCountOverlay(in DebugParameters debugParameters, CommandBuffer cmd, ref float x, ref float y, float overlaySize) - { - if (debugParameters.rayTracingSupported) - debugParameters.rayCountManager.EvaluateRayCount(cmd, debugParameters.hdCamera); - } - - void RenderDebug(HDCamera hdCamera, CommandBuffer cmd, CullingResults cullResults) - { - // We don't want any overlay for these kind of rendering - if (hdCamera.camera.cameraType == CameraType.Reflection || hdCamera.camera.cameraType == CameraType.Preview) - return; - - // Render Debug are only available in dev builds and we always render them in the same RT - CoreUtils.SetRenderTarget(cmd, m_IntermediateAfterPostProcessBuffer, m_SharedRTManager.GetDepthStencilBuffer()); - - var debugParams = PrepareDebugParameters(hdCamera, m_SharedRTManager.GetDepthBufferMipChainInfo()); - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.RenderDebug))) - { - // First render full screen debug texture - if (debugParams.resolveFullScreenDebug) - { - m_FullScreenDebugPushed = false; - ResolveFullScreenDebug(debugParams, m_DebugFullScreenPropertyBlock, m_DebugFullScreenTempBuffer, m_SharedRTManager.GetDepthTexture(), m_IntermediateAfterPostProcessBuffer, cmd); - PushColorPickerDebugTexture(cmd, hdCamera, m_IntermediateAfterPostProcessBuffer); - } - - // First resolve color picker - if (debugParams.colorPickerEnabled) - ResolveColorPickerDebug(debugParams, m_DebugColorPickerBuffer, m_IntermediateAfterPostProcessBuffer, cmd); - - // Light volumes - var lightingDebug = debugParams.debugDisplaySettings.data.lightingDebugSettings; - if (lightingDebug.displayLightVolumes) - { - s_lightVolumes.RenderLightVolumes(cmd, hdCamera, cullResults, lightingDebug, m_IntermediateAfterPostProcessBuffer); - } - - // Then overlays - HDUtils.ResetOverlay(); - float debugPanelWidth = HDUtils.GetRuntimeDebugPanelWidth(debugParams.hdCamera); - float x = 0.0f; - float overlayRatio = debugParams.debugDisplaySettings.data.debugOverlayRatio; - float overlaySize = Math.Min(debugParams.hdCamera.actualHeight, debugParams.hdCamera.actualWidth - debugPanelWidth) * overlayRatio; - float y = debugParams.hdCamera.actualHeight - overlaySize; - - // Add the width of the debug display if enabled on the camera - x += debugPanelWidth; - - RenderSkyReflectionOverlay(debugParams, cmd, m_SharedPropertyBlock, ref x, ref y, overlaySize); - RenderRayCountOverlay(debugParams, cmd, ref x, ref y, overlaySize); - RenderLightLoopDebugOverlay(debugParams, cmd, ref x, ref y, overlaySize, m_SharedRTManager.GetDepthTexture()); - - HDShadowManager.ShadowDebugAtlasTextures atlases = debugParams.lightingOverlayParameters.shadowManager.GetDebugAtlasTextures(); - RenderShadowsDebugOverlay(debugParams, atlases, cmd, ref x, ref y, overlaySize, m_SharedPropertyBlock); - - DecalSystem.instance.RenderDebugOverlay(debugParams.hdCamera, cmd, debugParams.debugDisplaySettings, ref x, ref y, overlaySize, debugParams.hdCamera.actualWidth); - } - } - - void ClearStencilBuffer(HDCamera hdCamera, CommandBuffer cmd) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearStencil))) - { - m_ClearStencilBufferMaterial.SetInt(HDShaderIDs._StencilMask, (int)StencilUsage.HDRPReservedBits); - HDUtils.DrawFullScreen(cmd, m_ClearStencilBufferMaterial, m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer()); - } - } - - void ClearBuffers(HDCamera hdCamera, CommandBuffer cmd) - { - bool msaa = hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA); - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearBuffers))) - { - // We clear only the depth buffer, no need to clear the various color buffer as we overwrite them. - // Clear depth/stencil and init buffers - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearDepthStencil))) - { - if (hdCamera.clearDepth) - { - CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(msaa), ClearFlag.Depth); - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) - { - CoreUtils.SetRenderTarget(cmd, m_SharedRTManager.GetDepthTexture(true), m_SharedRTManager.GetDepthStencilBuffer(true), ClearFlag.Color, Color.black); - } - } - m_IsDepthBufferCopyValid = false; - } - - // Clear the HDR target - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearHDRTarget))) - { - if (hdCamera.clearColorMode == HDAdditionalCameraData.ClearColorMode.Color || - // If the luxmeter is enabled, the sky isn't rendered so we clear the background color - m_CurrentDebugDisplaySettings.data.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter || - // If the matcap view is enabled, the sky isn't updated so we clear the background color - m_CurrentDebugDisplaySettings.DebugHideSky(hdCamera) || - // If we want the sky but the sky don't exist, still clear with background color - (hdCamera.clearColorMode == HDAdditionalCameraData.ClearColorMode.Sky && !m_SkyManager.IsVisualSkyValid(hdCamera)) || - // Special handling for Preview we force to clear with background color (i.e black) - // Note that the sky use in this case is the last one setup. If there is no scene or game, there is no sky use as reflection in the preview - HDUtils.IsRegularPreviewCamera(hdCamera.camera) - ) - { - CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraColorMSAABuffer : m_CameraColorBuffer, m_SharedRTManager.GetDepthStencilBuffer(msaa), ClearFlag.Color, GetColorBufferClearColor(hdCamera)); - } - } - - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.SubsurfaceScattering)) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearSssLightingBuffer))) - { - CoreUtils.SetRenderTarget(cmd, msaa ? m_CameraSssDiffuseLightingMSAABuffer : m_CameraSssDiffuseLightingBuffer, ClearFlag.Color, Color.clear); - } - } - - if (hdCamera.IsSSREnabled()) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearSsrBuffers))) - { - // In practice, these textures are sparse (mostly black). Therefore, clearing them is fast (due to CMASK), - // and much faster than fully overwriting them from within SSR shaders. - // CoreUtils.SetRenderTarget(cmd, hdCamera, m_SsrDebugTexture, ClearFlag.Color, Color.clear); - CoreUtils.SetRenderTarget(cmd, m_SsrHitPointTexture, ClearFlag.Color, Color.clear); - CoreUtils.SetRenderTarget(cmd, m_SsrLightingTexture, ClearFlag.Color, Color.clear); - } - } - - // We don't need to clear the GBuffers as scene is rewrite and we are suppose to only access valid data (invalid data are tagged with StencilUsage.Clear in the stencil), - // This is to save some performance - if (hdCamera.frameSettings.litShaderMode == LitShaderMode.Deferred) - { - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ClearGBuffer))) - { - // We still clear in case of debug mode or on demand - if (m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() || hdCamera.frameSettings.IsEnabled(FrameSettingsField.ClearGBuffers)) - { - // On PS4 we don't have working MRT clear, so need to clear buffers one by one - // https://fogbugz.unity3d.com/f/cases/1182018/ - if (Application.platform == RuntimePlatform.PS4) - { - var GBuffers = m_GbufferManager.GetBuffersRTI(); - foreach (var gbuffer in GBuffers) - { - CoreUtils.SetRenderTarget(cmd, gbuffer, m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); - } - } - else - { - CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffersRTI(), m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); - } - } - - // If we are in deferred mode and the ssr is enabled, we need to make sure that the second gbuffer is cleared given that we are using that information for - // clear coat selection - if (hdCamera.IsSSREnabled()) - { - CoreUtils.SetRenderTarget(cmd, m_GbufferManager.GetBuffer(2), m_SharedRTManager.GetDepthStencilBuffer(), ClearFlag.Color, Color.clear); - } - } - } - } - } - - void RenderPostProcess(CullingResults cullResults, HDCamera hdCamera, RenderTargetIdentifier finalRT, ScriptableRenderContext renderContext, CommandBuffer cmd, bool isFinalPass) - { - // Y-Flip needs to happen during the post process pass only if it's the final pass and is the regular game view - // SceneView flip is handled by the editor internal code and GameView rendering into render textures should not be flipped in order to respect Unity texture coordinates convention - bool flipInPostProcesses = HDUtils.PostProcessIsFinalPass() && isFinalPass && (hdCamera.flipYMode == HDAdditionalCameraData.FlipYMode.ForceFlipY || hdCamera.isMainGameView); - RenderTargetIdentifier destination = HDUtils.PostProcessIsFinalPass() && isFinalPass ? finalRT : m_IntermediateAfterPostProcessBuffer; - - - // We render AfterPostProcess objects first into a separate buffer that will be composited in the final post process pass - RenderAfterPostProcess(cullResults, hdCamera, renderContext, cmd); - - // Set the depth buffer to the main one to avoid missing out on transparent depth for post process. - cmd.SetGlobalTexture(HDShaderIDs._CameraDepthTexture, m_SharedRTManager.GetDepthStencilBuffer()); - - // Post-processes output straight to the backbuffer - m_PostProcessSystem.Render( - cmd: cmd, - camera: hdCamera, - blueNoise: m_BlueNoise, - colorBuffer: m_CameraColorBuffer, - afterPostProcessTexture: GetAfterPostProcessOffScreenBuffer(), - lightingBuffer: null, - finalRT: destination, - depthBuffer: m_SharedRTManager.GetDepthStencilBuffer(), - flipY: flipInPostProcesses - ); - } - - - RTHandle GetAfterPostProcessOffScreenBuffer() - { - if (currentPlatformRenderPipelineSettings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) - return GetSSSBuffer(); - else - return m_GbufferManager.GetBuffer(0); - } - - - void RenderAfterPostProcess(CullingResults cullResults, HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) - { - if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.AfterPostprocess)) - return; - - using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.AfterPostProcessing))) - { - // Note about AfterPostProcess and TAA: - // When TAA is enabled rendering is jittered and then resolved during the post processing pass. - // It means that any rendering done after post processing need to disable jittering. This is what we do with hdCamera.UpdateViewConstants(false); - // The issue is that the only available depth buffer is jittered so pixels would wobble around depth tested edges. - // In order to avoid that we decide that objects rendered after Post processes while TAA is active will not benefit from the depth buffer so we disable it. - bool taaEnabled = hdCamera.IsTAAEnabled(); - hdCamera.UpdateAllViewConstants(false); - hdCamera.SetupGlobalParams(cmd, m_FrameCount); - - // Here we share GBuffer albedo buffer since it's not needed anymore - // Note: We bind the depth only if the ZTest for After Post Process is enabled. It is disabled by - // default so we're consistent in the behavior: no ZTest for After Post Process materials). - if (taaEnabled || !hdCamera.frameSettings.IsEnabled(FrameSettingsField.ZTestAfterPostProcessTAA)) - CoreUtils.SetRenderTarget(cmd, GetAfterPostProcessOffScreenBuffer(), clearFlag: ClearFlag.Color, clearColor: Color.black); - else - CoreUtils.SetRenderTarget(cmd, GetAfterPostProcessOffScreenBuffer(), m_SharedRTManager.GetDepthStencilBuffer(), clearFlag: ClearFlag.Color, clearColor: Color.black); - - cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 1); - var opaqueRendererList = RendererList.Create(CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_ForwardOnlyName, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessOpaque)); - DrawOpaqueRendererList(renderContext, cmd, hdCamera.frameSettings, opaqueRendererList); - // Setup off-screen transparency here - var transparentRendererList = RendererList.Create(CreateTransparentRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_ForwardOnlyName, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessTransparent)); - DrawTransparentRendererList(renderContext, cmd, hdCamera.frameSettings, transparentRendererList); - cmd.SetGlobalInt(HDShaderIDs._OffScreenRendering, 0); - } - } - - void SendGeometryGraphicsBuffers(CommandBuffer cmd, HDCamera hdCamera) - { - bool needNormalBuffer = false; - Texture normalBuffer = null; - bool needDepthBuffer = false; - Texture depthBuffer = null; - - HDAdditionalCameraData acd = null; - hdCamera.camera.TryGetComponent(out acd); - - HDAdditionalCameraData.BufferAccessType externalAccess = new HDAdditionalCameraData.BufferAccessType(); - if (acd != null) - externalAccess = acd.GetBufferAccess(); - - // Figure out which client systems need which buffers - // Only VFX systems for now - VFXCameraBufferTypes neededVFXBuffers = VFXManager.IsCameraBufferNeeded(hdCamera.camera); - needNormalBuffer |= ((neededVFXBuffers & VFXCameraBufferTypes.Normal) != 0 || (externalAccess & HDAdditionalCameraData.BufferAccessType.Normal) != 0); - needDepthBuffer |= ((neededVFXBuffers & VFXCameraBufferTypes.Depth) != 0 || (externalAccess & HDAdditionalCameraData.BufferAccessType.Depth) != 0); - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && GetRayTracingState()) - { - needNormalBuffer = true; - needDepthBuffer = true; - } - - // Here if needed for this particular camera, we allocate history buffers. - // Only one is needed here because the main buffer used for rendering is separate. - // Ideally, we should double buffer the main rendering buffer but since we don't know in advance if history is going to be needed, it would be a big waste of memory. - if (needNormalBuffer) - { - RTHandle mainNormalBuffer = m_SharedRTManager.GetNormalBuffer(); - RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) - { - return rtHandleSystem.Alloc(Vector2.one, TextureXR.slices, colorFormat: mainNormalBuffer.rt.graphicsFormat, dimension: TextureXR.dimension, enableRandomWrite: mainNormalBuffer.rt.enableRandomWrite, name: $"Normal History Buffer" - ); - } - - normalBuffer = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.Normal) ?? hdCamera.AllocHistoryFrameRT((int)HDCameraFrameHistoryType.Normal, Allocator, 1); - - for (int i = 0; i < hdCamera.viewCount; i++) - cmd.CopyTexture(mainNormalBuffer, i, 0, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight, normalBuffer, i, 0, 0, 0); - } - - if (needDepthBuffer) - { - RTHandle mainDepthBuffer = m_SharedRTManager.GetDepthTexture(); - RTHandle Allocator(string id, int frameIndex, RTHandleSystem rtHandleSystem) - { - return rtHandleSystem.Alloc(Vector2.one, TextureXR.slices, colorFormat: mainDepthBuffer.rt.graphicsFormat, dimension: TextureXR.dimension, enableRandomWrite: mainDepthBuffer.rt.enableRandomWrite, name: $"Depth History Buffer" - ); - } - - depthBuffer = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.Depth) ?? hdCamera.AllocHistoryFrameRT((int)HDCameraFrameHistoryType.Depth, Allocator, 1); - - for (int i = 0; i < hdCamera.viewCount; i++) - cmd.CopyTexture(mainDepthBuffer, i, 0, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight, depthBuffer, i, 0, 0, 0); - } - - // Send buffers to client. - // For now, only VFX systems - if ((neededVFXBuffers & VFXCameraBufferTypes.Depth) != 0) - { - VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Depth, depthBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); - } - - if ((neededVFXBuffers & VFXCameraBufferTypes.Normal) != 0) - { - VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Normal, normalBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); - } - } - - void SendColorGraphicsBuffer(CommandBuffer cmd, HDCamera hdCamera) - { - // Figure out which client systems need which buffers - VFXCameraBufferTypes neededVFXBuffers = VFXManager.IsCameraBufferNeeded(hdCamera.camera); - - if ((neededVFXBuffers & VFXCameraBufferTypes.Color) != 0) - { - var colorBuffer = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); - VFXManager.SetCameraBuffer(hdCamera.camera, VFXCameraBufferTypes.Color, colorBuffer, 0, 0, hdCamera.actualWidth, hdCamera.actualHeight); - } - } - } -} From 6c0a5576b5704ecb54ad5b008c81de4c71d6ded3 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Mon, 6 Jul 2020 22:21:03 +0200 Subject: [PATCH 169/200] Update HDRenderPipeline.RenderGraph.cs --- .../HDRenderPipeline.RenderGraph.cs | 47 ------------------- 1 file changed, 47 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index 4c28c45e2a7..0ec08f3bb35 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -137,11 +137,6 @@ void ExecuteWithRenderGraph( RenderRequest renderRequest, colorBuffer = RenderTransparency(m_RenderGraph, hdCamera, colorBuffer, prepassOutput.depthBuffer, prepassOutput.motionVectorsBuffer, currentColorPyramid, prepassOutput.depthPyramidTexture, shadowResult, cullingResults); - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector)) - { - prepassOutput.motionVectorsBuffer = ResolveMotionVector(m_RenderGraph, hdCamera, prepassOutput.motionVectorsBuffer); - } - // TODO RENDERGRAPH : Move this to the end after we do move semantic and graph pruning to avoid doing the rest of the frame for nothing // Transparent objects may write to the depth and motion vectors buffers. aovRequest.PushCameraTexture(m_RenderGraph, AOVBuffers.DepthStencil, hdCamera, prepassOutput.resolvedDepthBuffer, aovBuffers); @@ -993,48 +988,6 @@ RenderGraphMutableResource ResolveMSAAColor(RenderGraph renderGraph, HDCamera hd } } - class ResolveMotionVectorData - { - public TextureHandle input; - public TextureHandle output; - public Material resolveMaterial; - public int passIndex; - } - - TextureHandle ResolveMotionVector(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle input) - { - if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.MSAA)) - { - using (var builder = renderGraph.AddRenderPass("ResolveMotionVector", out var passData)) - { - var outputDesc = renderGraph.GetTextureDesc(input); - outputDesc.enableMSAA = false; - outputDesc.enableRandomWrite = true; - outputDesc.bindTextureMS = false; - outputDesc.name = string.Format("{0}Resolved", outputDesc.name); - - passData.input = builder.ReadTexture(input); - passData.output = builder.UseColorBuffer(renderGraph.CreateTexture(outputDesc), 0); - passData.resolveMaterial = m_MotionVectorResolve; - passData.passIndex = SampleCountToPassIndex(m_MSAASamples); - - builder.SetRenderFunc( - (ResolveColorData data, RenderGraphContext context) => - { - var res = context.resources; - var mpb = context.renderGraphPool.GetTempMaterialPropertyBlock(); - mpb.SetTexture(HDShaderIDs._MotionVectorTextureMS, res.GetTexture(data.input)); - context.cmd.DrawProcedural(Matrix4x4.identity, data.resolveMaterial, data.passIndex, MeshTopology.Triangles, 3, 1, mpb); - }); - - return passData.output; - } - } - else - { - return input; - } - } #if UNITY_EDITOR class RenderGizmosPassData { From da91b065771ef30c7112e118251fbfa320bd16c0 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 12 May 2020 18:23:10 +0200 Subject: [PATCH 170/200] Fix issue with Uber Post process shader when alpha is enabled #422 --- .../Scenes/9x_Other/9713_VirtualTexturing.meta | 8 ++++++++ .../ReferenceImages/Linear/OSXEditor/Metal/None.meta | 8 ++++++++ .../Linear/WindowsEditor/Direct3D11/None.meta | 8 ++++++++ .../ReferenceImages/Linear/WindowsEditor/Vulkan/None.meta | 8 ++++++++ .../Linear/WindowsPlayer/Direct3D11/None.meta | 8 ++++++++ .../ReferenceImages/Linear/WindowsPlayer/Vulkan/None.meta | 8 ++++++++ com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/PostProcessing/Shaders/UberPost.compute | 3 ++- 8 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.meta new file mode 100644 index 00000000000..735cd34ee74 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9713_VirtualTexturing.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2559987e9b9bc30428f6e337ec811b1c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta new file mode 100644 index 00000000000..eb010f78023 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b838e15c9e0d6a74b82a23ee7930cafb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta new file mode 100644 index 00000000000..2fb084f30a9 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0b4eb0e5b5fd9d841b1c9ec2a273d583 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None.meta new file mode 100644 index 00000000000..a2b4627624f --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f65095793041e14499935e4dd8e36f0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta new file mode 100644 index 00000000000..eebb1122e9e --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 841b7041a26803844a51ce2d4e2dfc75 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None.meta new file mode 100644 index 00000000000..34691e459cc --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c3ce77a122d9144e94026de76ca1ef6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9b1789595c8..73d1c440db7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix error when removing DecalProjector from component contextual menu (case 1243960) - Fixed issue when switching back to custom sensor type in physical camera settings (case 1244350). - Fixed the prefab integration of custom passes (Prefab Override Highlight not working as expected). +- Fixed issue with post process when running in RGBA16 and an object with additive blending is in the scene. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute index 714861745ea..0a2165ec060 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute @@ -231,7 +231,8 @@ void MAIN(uint3 dispatchThreadId : SV_DispatchThreadID) // Alpha mask #ifdef ENABLE_ALPHA // Post processing is not applied on pixels with zero alpha - color.xyz = lerp(inputColor.xyz, color.xyz, inputColor.a); + // Saturate is necessary to avoid issues when additive blending pushes the alpha over 1. + color.xyz = lerp(inputColor.xyz, color.xyz, saturate(inputColor.a)); #endif // Done From ba31f5017dc2c155f775da0a6c264fb998720b05 Mon Sep 17 00:00:00 2001 From: skhiat <55133890+skhiat@users.noreply.github.com> Date: Wed, 13 May 2020 09:17:51 +0200 Subject: [PATCH 171/200] Fix the bug (#430) --- .../Runtime/Material/Decal/DecalSystem.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs index c19d3d507b3..edcdac53c7b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs @@ -796,7 +796,14 @@ public int DrawOrder { get { - return this.m_Material.GetInt("_DrawOrder"); + if (m_IsHDRenderPipelineDecal) + { + return this.m_Material.GetInt("_DrawOrder"); + } + else + { + return 0; + } } } From 6219a8779540a32637825b401783e77874982681 Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Wed, 13 May 2020 16:18:36 +0200 Subject: [PATCH 172/200] Save scene-view camera settings in Editor prefs #440 --- .../CHANGELOG.md | 1 + .../HDAdditionalSceneViewSettings.cs | 90 +++++++++++++++++-- 2 files changed, 82 insertions(+), 9 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 73d1c440db7..d58a0e95480 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -122,6 +122,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed scalarization code for contact shadows - Fix MaterialBalls having same guid issue - Fix spelling and grammatical errors in material samples +- Fixed issue with sceneview camera settings not being saved after Editor restart. ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs index f70ffb78d71..6f629822036 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/HDAdditionalSceneViewSettings.cs @@ -11,23 +11,95 @@ static class Styles { public static readonly GUIContent AAMode = EditorGUIUtility.TrTextContent("Camera Anti-aliasing", "The anti-alising mode that will be used in the scene view camera."); public static readonly GUIContent StopNaNs = EditorGUIUtility.TrTextContent("Camera Stop NaNs", "When enabled, any NaNs in the color buffer of the scene view camera will be suppressed."); +#if UNITY_2020_2_OR_NEWER + public static readonly string HelpBox = "Temporal Anti - aliasing in the Scene View is only supported when Always Refresh is enabled."; +#else public static readonly string HelpBox = "Temporal Anti - aliasing in the Scene View is only supported when Animated Materials are enabled."; +#endif + } + + // Helper class to manage editor preferences with local caching. + // Only supports bools, floats and ints/enums, so we keep it local for now. + class CachedEditorPref + { + T m_Storage; + string m_Key; + + public T value + { + // We update the Editor prefs only when writing. Reading goes through the cached local var to ensure that reads have no overhead. + get => m_Storage; + set + { + m_Storage = value; + SetPref(value); + } + } + + // Creates a cached editor preference using the specified key and default value + public CachedEditorPref(string key, T dafaultValue) + { + m_Key = key; + m_Storage = GetOrCreatePref(dafaultValue); + } + + T GetOrCreatePref(T defaultValue) + { + if (EditorPrefs.HasKey(m_Key)) + { + if (typeof(T) == typeof(bool)) + { + return (T)(object)EditorPrefs.GetBool(m_Key); + } + else if (typeof(T) == typeof(float)) + { + return (T)(object)EditorPrefs.GetFloat(m_Key); + } + return (T)(object)EditorPrefs.GetInt(m_Key); + } + else + { + if (typeof(T) == typeof(bool)) + { + EditorPrefs.SetBool(m_Key, (bool)(object)defaultValue); + } + else if (typeof(T) == typeof(float)) + { + EditorPrefs.SetFloat(m_Key, (float)(object)defaultValue); + } + else + { + EditorPrefs.SetInt(m_Key, (int)(object)defaultValue); + } + return defaultValue; + } + } + + void SetPref(T value) + { + if (typeof(T) == typeof(bool)) + EditorPrefs.SetBool(m_Key, (bool)(object)value); + else if (typeof(T) == typeof(float)) + EditorPrefs.SetFloat(m_Key, (float)(object)value); + else + EditorPrefs.SetInt(m_Key, (int)(object)value); + } } - static AntialiasingMode s_SceneViewAntialiasing = AntialiasingMode.None; + static CachedEditorPref s_SceneViewAntialiasing = new CachedEditorPref("HDRP:SceneViewCamera:Antialiasing", AntialiasingMode.None); public static AntialiasingMode sceneViewAntialiasing { - get => s_SceneViewAntialiasing; - set => s_SceneViewAntialiasing = value; + get => s_SceneViewAntialiasing.value; + set => s_SceneViewAntialiasing.value = value; } - static bool s_SceneViewStopNaNs = false; + static CachedEditorPref s_SceneViewStopNaNs = new CachedEditorPref("HDRP:SceneViewCamera:StopNaNs", false); public static bool sceneViewStopNaNs { - get => s_SceneViewStopNaNs; - set => s_SceneViewStopNaNs = value; + get => s_SceneViewStopNaNs.value; + set => s_SceneViewStopNaNs.value = value; } static HDAdditionalSceneViewSettings() @@ -40,11 +112,11 @@ static void DoAdditionalSettings(SceneView sceneView) EditorGUILayout.Space(); EditorGUILayout.LabelField("HD Render Pipeline", EditorStyles.boldLabel); - s_SceneViewAntialiasing = (AntialiasingMode)EditorGUILayout.EnumPopup(Styles.AAMode, s_SceneViewAntialiasing); - if (s_SceneViewAntialiasing == AntialiasingMode.TemporalAntialiasing) + sceneViewAntialiasing = (AntialiasingMode)EditorGUILayout.EnumPopup(Styles.AAMode, sceneViewAntialiasing); + if (sceneViewAntialiasing == AntialiasingMode.TemporalAntialiasing) EditorGUILayout.HelpBox(Styles.HelpBox, MessageType.Info); - s_SceneViewStopNaNs = EditorGUILayout.Toggle(Styles.StopNaNs, s_SceneViewStopNaNs); + sceneViewStopNaNs = EditorGUILayout.Toggle(Styles.StopNaNs, sceneViewStopNaNs); } } #endif From 187be6df8345fe97db83dbf403c894d262d014f7 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Thu, 14 May 2020 15:07:01 +0200 Subject: [PATCH 173/200] Fix issue causing not all baked reflection probes to be deleted #441 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/Lighting/Reflection/HDBakedReflectionSystem.cs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index d58a0e95480..a0d887d4808 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -123,6 +123,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix MaterialBalls having same guid issue - Fix spelling and grammatical errors in material samples - Fixed issue with sceneview camera settings not being saved after Editor restart. +- Fixed issue that caused not all baked reflection to be deleted upon clicking "Clear Baked Data" in the lighting menu (case 1136080) ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs index 416a320cdbc..a72d37ea47e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs @@ -471,8 +471,13 @@ void DeleteCubemapAssets(bool deleteUnusedOnly) // Or we delete all assets || !deleteUnusedOnly) { + // If the buffer is full we empty it and then push again the element we were trying to + // push but failed. if (!buffer.TryPush(files[fileI])) + { DeleteAllAssetsIn(ref buffer); + buffer.TryPush(files[fileI]); + } } } } @@ -489,6 +494,9 @@ static void DeleteAllAssetsIn(ref CoreUnsafeUtils.FixedBufferStringQueue queue) while (queue.TryPop(out string path)) AssetDatabase.DeleteAsset(path); AssetDatabase.StopAssetEditing(); + + // Clear the queue so that can be filled again. + queue.Clear(); } internal static void Checkout(string targetFile) From ec1d31463782817707d783f4a1b901c269c75a53 Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Mon, 18 May 2020 10:18:56 +0200 Subject: [PATCH 174/200] Fix Light overlap #444 --- .../Runtime/Utilities/CoreUtils.cs | 26 +++ .../CHANGELOG.md | 1 + .../Runtime/Debug/DebugLightVolumes.compute | 9 +- .../Runtime/Debug/DebugLightVolumes.cs | 211 ++++++++++-------- .../Lighting/Light/HDAdditionalLightData.cs | 21 ++ .../RenderPipeline/HDRenderPipeline.cs | 3 +- 6 files changed, 178 insertions(+), 93 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs b/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs index 0f16e604818..2b59a468cfc 100644 --- a/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs +++ b/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs @@ -1106,6 +1106,32 @@ public static bool IsSceneLightingDisabled(Camera camera) return disabled; } + /// + /// Returns true if the "Light Overlap" scene view draw mode is enabled. + /// + /// Input camera. + /// True if "Light Overlap" is enabled in the scene view associated with the input camera. + public static bool IsLightOverlapDebugEnabled(Camera camera) + { + bool enabled = false; +#if UNITY_EDITOR + if (camera.cameraType == CameraType.SceneView) + { + // Determine whether the "LightOverlap" mode is enabled for the current view. + for (int i = 0; i < UnityEditor.SceneView.sceneViews.Count; i++) + { + var sv = UnityEditor.SceneView.sceneViews[i] as UnityEditor.SceneView; + if (sv.camera == camera && sv.cameraMode.drawMode == UnityEditor.DrawCameraMode.LightOverlap) + { + enabled = true; + break; + } + } + } +#endif + return enabled; + } + #if UNITY_EDITOR static Func> materialEditors; diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a0d887d4808..dcc89742fbc 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -124,6 +124,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix spelling and grammatical errors in material samples - Fixed issue with sceneview camera settings not being saved after Editor restart. - Fixed issue that caused not all baked reflection to be deleted upon clicking "Clear Baked Data" in the lighting menu (case 1136080) +- Fixed the light overlap scene view draw mode (wasn't working at all). ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute index 2d0faa53454..b5d937b117d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.compute @@ -7,9 +7,6 @@ // Tile size of this compute #define DEBUG_LIGHT_VOLUME_TILE_SIZE 8 -// The pixel radius to switch on the edge color -#define RADIUS_PIXEL_BORDER 1 - // Input Runtime textures TEXTURE2D_X_FLOAT(_DebugLightCountBuffer); TEXTURE2D_X(_DebugColorAccumulationBuffer); @@ -17,6 +14,8 @@ TEXTURE2D_X(_DebugColorAccumulationBuffer); // Data used for the computation Texture2D _ColorGradientTexture; int _MaxDebugLightCount; +// The pixel radius to switch on the edge color +float _BorderRadius; // output texture RW_TEXTURE2D_X(float4, _DebugLightVolumesTexture); @@ -58,9 +57,9 @@ void LightVolumeColors(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 group // Look around this pixel to check if this should be displayed as a border float maxLightCount = lightCount; bool isBorder = false; - for (int radiusX = -RADIUS_PIXEL_BORDER; radiusX <= RADIUS_PIXEL_BORDER; ++radiusX) + for (float radiusX = -_BorderRadius; radiusX <= _BorderRadius; ++radiusX) { - for (int radiusY = -RADIUS_PIXEL_BORDER; radiusY <= RADIUS_PIXEL_BORDER; ++radiusY) + for (float radiusY = -_BorderRadius; radiusY <= _BorderRadius; ++radiusY) { // Compute the target pixel int2 targetpixel = int2((uint)currentPixelCoordinate.x + radiusX, (uint)currentPixelCoordinate.y + radiusY); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.cs index 47495addf93..6f09825a3dc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugLightVolumes.cs @@ -34,6 +34,7 @@ class DebugLightVolumes public static readonly int _DebugLightVolumesTextureShaderID = Shader.PropertyToID("_DebugLightVolumesTexture"); public static readonly int _ColorGradientTextureShaderID = Shader.PropertyToID("_ColorGradientTexture"); public static readonly int _MaxDebugLightCountShaderID = Shader.PropertyToID("_MaxDebugLightCount"); + public static readonly int _BorderRadiusShaderID = Shader.PropertyToID("_BorderRadius"); // Render target array for the prepass RenderTargetIdentifier[] m_RTIDs = new RenderTargetIdentifier[2]; @@ -83,20 +84,26 @@ public struct RenderLightVolumesParameters public ComputeShader debugLightVolumeCS; public int debugLightVolumeKernel; public int maxDebugLightCount; + public float borderRadius; public Texture2D colorGradientTexture; + public bool lightOverlapEnabled; } public RenderLightVolumesParameters PrepareLightVolumeParameters(HDCamera hdCamera, LightingDebugSettings lightDebugSettings, CullingResults cullResults) { var parameters = new RenderLightVolumesParameters(); + bool lightOverlapEnabled = CoreUtils.IsLightOverlapDebugEnabled(hdCamera.camera); + bool useColorAndEdge = lightDebugSettings.lightVolumeDebugByCategory == LightVolumeDebug.ColorAndEdge || lightOverlapEnabled; parameters.hdCamera = hdCamera; parameters.cullResults = cullResults; parameters.debugLightVolumeMaterial = m_DebugLightVolumeMaterial; parameters.debugLightVolumeCS = m_DebugLightVolumeCompute; - parameters.debugLightVolumeKernel = lightDebugSettings.lightVolumeDebugByCategory == LightVolumeDebug.ColorAndEdge ? m_DebugLightVolumeColorsKernel : m_DebugLightVolumeGradientKernel; + parameters.debugLightVolumeKernel = useColorAndEdge ? m_DebugLightVolumeColorsKernel : m_DebugLightVolumeGradientKernel; parameters.maxDebugLightCount = (int)lightDebugSettings.maxDebugLightCount; + parameters.borderRadius = lightOverlapEnabled ? 0.5f : 1f; parameters.colorGradientTexture = m_ColorGradientTexture; + parameters.lightOverlapEnabled = lightOverlapEnabled; return parameters; } @@ -111,104 +118,69 @@ public static void RenderLightVolumes(CommandBuffer cmd, RTHandle destination, MaterialPropertyBlock mpb) { - // Set the render target array - CoreUtils.SetRenderTarget(cmd, accumulationMRT, depthBuffer); - // First of all let's do the regions for the light sources (we only support Punctual and Area) - int numLights = parameters.cullResults.visibleLights.Length; - for (int lightIdx = 0; lightIdx < numLights; ++lightIdx) + if (parameters.lightOverlapEnabled) { - // Let's build the light's bounding sphere matrix - Light currentLegacyLight = parameters.cullResults.visibleLights[lightIdx].light; - if (currentLegacyLight == null) continue; - HDAdditionalLightData currentHDRLight = currentLegacyLight.GetComponent(); - if (currentHDRLight == null) continue; + // We only need the accumulation buffer, not the color (we only disply the outline of the light shape in this mode). + CoreUtils.SetRenderTarget(cmd, accumulationMRT[0], depthBuffer); - Matrix4x4 positionMat = Matrix4x4.Translate(currentLegacyLight.transform.position); - - switch(currentHDRLight.ComputeLightType(currentLegacyLight)) + // The cullresult doesn't contains overlapping lights so we use a custom list + foreach (var overlappingHDLight in HDAdditionalLightData.s_overlappingHDLights) { - case HDLightType.Point: - mpb.SetColor(_ColorShaderID, new Color(0.0f, 0.5f, 0.0f, 1.0f)); - mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); - mpb.SetVector(_RangeShaderID, new Vector3(currentLegacyLight.range, currentLegacyLight.range, currentLegacyLight.range)); - cmd.DrawMesh(DebugShapes.instance.RequestSphereMesh(), positionMat, parameters.debugLightVolumeMaterial, 0, 0, mpb); - break; - case HDLightType.Spot: - switch (currentHDRLight.spotLightShape) - { - case SpotLightShape.Cone: - float bottomRadius = Mathf.Tan(currentLegacyLight.spotAngle * Mathf.PI / 360.0f) * currentLegacyLight.range; - mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.5f, 0.0f, 1.0f)); - mpb.SetVector(_RangeShaderID, new Vector3(bottomRadius, bottomRadius, currentLegacyLight.range)); - mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); - cmd.DrawMesh(DebugShapes.instance.RequestConeMesh(), currentLegacyLight.gameObject.transform.localToWorldMatrix, parameters.debugLightVolumeMaterial, 0, 0, mpb); - break; - case SpotLightShape.Box: - mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.5f, 0.0f, 1.0f)); - mpb.SetVector(_RangeShaderID, new Vector3(currentHDRLight.shapeWidth, currentHDRLight.shapeHeight, currentLegacyLight.range)); - mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, currentLegacyLight.range / 2.0f)); - cmd.DrawMesh(DebugShapes.instance.RequestBoxMesh(), currentLegacyLight.gameObject.transform.localToWorldMatrix, parameters.debugLightVolumeMaterial, 0, 0, mpb); - break; - case SpotLightShape.Pyramid: - float bottomWidth = Mathf.Tan(currentLegacyLight.spotAngle * Mathf.PI / 360.0f) * currentLegacyLight.range; - mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.5f, 0.0f, 1.0f)); - mpb.SetVector(_RangeShaderID, new Vector3(currentHDRLight.aspectRatio * bottomWidth * 2, bottomWidth * 2, currentLegacyLight.range)); - mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); - cmd.DrawMesh(DebugShapes.instance.RequestPyramidMesh(), currentLegacyLight.gameObject.transform.localToWorldMatrix, parameters.debugLightVolumeMaterial, 0, 0, mpb); - break; - } - break; - case HDLightType.Area: - switch (currentHDRLight.areaLightShape) - { - case AreaLightShape.Rectangle: - mpb.SetColor(_ColorShaderID, new Color(0.0f, 1.0f, 1.0f, 1.0f)); - mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); - mpb.SetVector(_RangeShaderID, new Vector3(currentLegacyLight.range, currentLegacyLight.range, currentLegacyLight.range)); - cmd.DrawMesh(DebugShapes.instance.RequestSphereMesh(), positionMat, parameters.debugLightVolumeMaterial, 0, 0, mpb); - break; - case AreaLightShape.Tube: - mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.0f, 0.5f, 1.0f)); - mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); - mpb.SetVector(_RangeShaderID, new Vector3(currentLegacyLight.range, currentLegacyLight.range, currentLegacyLight.range)); - cmd.DrawMesh(DebugShapes.instance.RequestSphereMesh(), positionMat, parameters.debugLightVolumeMaterial, 0, 0, mpb); - break; - default: - break; - } - break; + RenderLightVolume(cmd, parameters, overlappingHDLight, overlappingHDLight.legacyLight, mpb); } } - - // Now let's do the same but for reflection probes - int numProbes = parameters.cullResults.visibleReflectionProbes.Length; - for (int probeIdx = 0; probeIdx < numProbes; ++probeIdx) + else { - // Let's build the light's bounding sphere matrix - ReflectionProbe currentLegacyProbe = parameters.cullResults.visibleReflectionProbes[probeIdx].reflectionProbe; - HDAdditionalReflectionData currentHDProbe = currentLegacyProbe.GetComponent(); + // Set the render target array + CoreUtils.SetRenderTarget(cmd, accumulationMRT, depthBuffer); - if (!currentHDProbe) - continue; - - MaterialPropertyBlock m_MaterialProperty = new MaterialPropertyBlock(); - Mesh targetMesh = null; - if (currentHDProbe.influenceVolume.shape == InfluenceShape.Sphere) + // First of all let's do the regions for the light sources (we only support Punctual and Area) + int numLights = parameters.cullResults.visibleLights.Length; + for (int lightIdx = 0; lightIdx < numLights; ++lightIdx) { - m_MaterialProperty.SetVector(_RangeShaderID, new Vector3(currentHDProbe.influenceVolume.sphereRadius, currentHDProbe.influenceVolume.sphereRadius, currentHDProbe.influenceVolume.sphereRadius)); - targetMesh = DebugShapes.instance.RequestSphereMesh(); + // Let's build the light's bounding sphere matrix + Light currentLegacyLight = parameters.cullResults.visibleLights[lightIdx].light; + if (currentLegacyLight == null) continue; + HDAdditionalLightData currentHDRLight = currentLegacyLight.GetComponent(); + if (currentHDRLight == null) continue; + + RenderLightVolume(cmd, parameters, currentHDRLight, currentLegacyLight, mpb); } - else + + // When we enable the light overlap mode we hide probes as they can't be baked in shadow masks + if (!parameters.lightOverlapEnabled) { - m_MaterialProperty.SetVector(_RangeShaderID, new Vector3(currentHDProbe.influenceVolume.boxSize.x, currentHDProbe.influenceVolume.boxSize.y, currentHDProbe.influenceVolume.boxSize.z)); - targetMesh = DebugShapes.instance.RequestBoxMesh(); - } + // Now let's do the same but for reflection probes + int numProbes = parameters.cullResults.visibleReflectionProbes.Length; + for (int probeIdx = 0; probeIdx < numProbes; ++probeIdx) + { + // Let's build the light's bounding sphere matrix + ReflectionProbe currentLegacyProbe = parameters.cullResults.visibleReflectionProbes[probeIdx].reflectionProbe; + HDAdditionalReflectionData currentHDProbe = currentLegacyProbe.GetComponent(); + + if (!currentHDProbe) + continue; + + MaterialPropertyBlock m_MaterialProperty = new MaterialPropertyBlock(); + Mesh targetMesh = null; + if (currentHDProbe.influenceVolume.shape == InfluenceShape.Sphere) + { + m_MaterialProperty.SetVector(_RangeShaderID, new Vector3(currentHDProbe.influenceVolume.sphereRadius, currentHDProbe.influenceVolume.sphereRadius, currentHDProbe.influenceVolume.sphereRadius)); + targetMesh = DebugShapes.instance.RequestSphereMesh(); + } + else + { + m_MaterialProperty.SetVector(_RangeShaderID, new Vector3(currentHDProbe.influenceVolume.boxSize.x, currentHDProbe.influenceVolume.boxSize.y, currentHDProbe.influenceVolume.boxSize.z)); + targetMesh = DebugShapes.instance.RequestBoxMesh(); + } - m_MaterialProperty.SetColor(_ColorShaderID, new Color(1.0f, 1.0f, 0.0f, 1.0f)); - m_MaterialProperty.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); - Matrix4x4 positionMat = Matrix4x4.Translate(currentLegacyProbe.transform.position); - cmd.DrawMesh(targetMesh, positionMat, parameters.debugLightVolumeMaterial, 0, 0, m_MaterialProperty); + m_MaterialProperty.SetColor(_ColorShaderID, new Color(1.0f, 1.0f, 0.0f, 1.0f)); + m_MaterialProperty.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); + Matrix4x4 positionMat = Matrix4x4.Translate(currentLegacyProbe.transform.position); + cmd.DrawMesh(targetMesh, positionMat, parameters.debugLightVolumeMaterial, 0, 0, m_MaterialProperty); + } + } } // Set the input params for the compute @@ -217,6 +189,7 @@ public static void RenderLightVolumes(CommandBuffer cmd, cmd.SetComputeTextureParam(parameters.debugLightVolumeCS, parameters.debugLightVolumeKernel, _DebugLightVolumesTextureShaderID, debugLightVolumesTexture); cmd.SetComputeTextureParam(parameters.debugLightVolumeCS, parameters.debugLightVolumeKernel, _ColorGradientTextureShaderID, parameters.colorGradientTexture); cmd.SetComputeIntParam(parameters.debugLightVolumeCS, _MaxDebugLightCountShaderID, parameters.maxDebugLightCount); + cmd.SetComputeFloatParam(parameters.debugLightVolumeCS, _BorderRadiusShaderID, parameters.borderRadius); // Texture dimensions int texWidth = parameters.hdCamera.actualWidth; // m_ColorAccumulationBuffer.rt.width; @@ -235,6 +208,70 @@ public static void RenderLightVolumes(CommandBuffer cmd, cmd.DrawProcedural(Matrix4x4.identity, parameters.debugLightVolumeMaterial, 1, MeshTopology.Triangles, 3, 1, mpb); } + static void RenderLightVolume( + CommandBuffer cmd, + in RenderLightVolumesParameters parameters, + HDAdditionalLightData currentHDRLight, + Light currentLegacyLight, + MaterialPropertyBlock mpb) + { + Matrix4x4 positionMat = Matrix4x4.Translate(currentLegacyLight.transform.position); + + switch(currentHDRLight.ComputeLightType(currentLegacyLight)) + { + case HDLightType.Point: + mpb.SetColor(_ColorShaderID, new Color(0.0f, 0.5f, 0.0f, 1.0f)); + mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); + mpb.SetVector(_RangeShaderID, new Vector3(currentLegacyLight.range, currentLegacyLight.range, currentLegacyLight.range)); + cmd.DrawMesh(DebugShapes.instance.RequestSphereMesh(), positionMat, parameters.debugLightVolumeMaterial, 0, 0, mpb); + break; + case HDLightType.Spot: + switch (currentHDRLight.spotLightShape) + { + case SpotLightShape.Cone: + float bottomRadius = Mathf.Tan(currentLegacyLight.spotAngle * Mathf.PI / 360.0f) * currentLegacyLight.range; + mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.5f, 0.0f, 1.0f)); + mpb.SetVector(_RangeShaderID, new Vector3(bottomRadius, bottomRadius, currentLegacyLight.range)); + mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); + cmd.DrawMesh(DebugShapes.instance.RequestConeMesh(), currentLegacyLight.gameObject.transform.localToWorldMatrix, parameters.debugLightVolumeMaterial, 0, 0, mpb); + break; + case SpotLightShape.Box: + mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.5f, 0.0f, 1.0f)); + mpb.SetVector(_RangeShaderID, new Vector3(currentHDRLight.shapeWidth, currentHDRLight.shapeHeight, currentLegacyLight.range)); + mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, currentLegacyLight.range / 2.0f)); + cmd.DrawMesh(DebugShapes.instance.RequestBoxMesh(), currentLegacyLight.gameObject.transform.localToWorldMatrix, parameters.debugLightVolumeMaterial, 0, 0, mpb); + break; + case SpotLightShape.Pyramid: + float bottomWidth = Mathf.Tan(currentLegacyLight.spotAngle * Mathf.PI / 360.0f) * currentLegacyLight.range; + mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.5f, 0.0f, 1.0f)); + mpb.SetVector(_RangeShaderID, new Vector3(currentHDRLight.aspectRatio * bottomWidth * 2, bottomWidth * 2, currentLegacyLight.range)); + mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); + cmd.DrawMesh(DebugShapes.instance.RequestPyramidMesh(), currentLegacyLight.gameObject.transform.localToWorldMatrix, parameters.debugLightVolumeMaterial, 0, 0, mpb); + break; + } + break; + case HDLightType.Area: + switch (currentHDRLight.areaLightShape) + { + case AreaLightShape.Rectangle: + mpb.SetColor(_ColorShaderID, new Color(0.0f, 1.0f, 1.0f, 1.0f)); + mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); + mpb.SetVector(_RangeShaderID, new Vector3(currentLegacyLight.range, currentLegacyLight.range, currentLegacyLight.range)); + cmd.DrawMesh(DebugShapes.instance.RequestSphereMesh(), positionMat, parameters.debugLightVolumeMaterial, 0, 0, mpb); + break; + case AreaLightShape.Tube: + mpb.SetColor(_ColorShaderID, new Color(1.0f, 0.0f, 0.5f, 1.0f)); + mpb.SetVector(_OffsetShaderID, new Vector3(0, 0, 0)); + mpb.SetVector(_RangeShaderID, new Vector3(currentLegacyLight.range, currentLegacyLight.range, currentLegacyLight.range)); + cmd.DrawMesh(DebugShapes.instance.RequestSphereMesh(), positionMat, parameters.debugLightVolumeMaterial, 0, 0, mpb); + break; + default: + break; + } + break; + } + } + public void RenderLightVolumes(CommandBuffer cmd, HDCamera hdCamera, CullingResults cullResults, LightingDebugSettings lightDebugSettings, RTHandle finalRT) { using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.DisplayLightVolume))) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index 2a13aecb773..091c61be589 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -113,6 +113,9 @@ public static BoolScalableSetting UseContactShadow(HDRenderPipelineAsset hdrp) = internal const float k_MinAreaLightShadowCone = 10.0f; internal const float k_MaxAreaLightShadowCone = 179.0f; + /// List of the lights that overlaps when the OverlapLight scene view mode is enabled + internal static HashSet s_overlappingHDLights = new HashSet(); + #region HDLight Properties API [SerializeField, FormerlySerializedAs("displayLightIntensity")] @@ -1616,6 +1619,7 @@ void OnDisable() { DisableCachedShadowSlot(); SetEmissiveMeshRendererEnabled(false); + s_overlappingHDLights.Remove(this); } void SetEmissiveMeshRendererEnabled(bool enabled) @@ -2151,6 +2155,14 @@ void LateUpdate() return; #endif +#if UNITY_EDITOR + // Update the list of overlapping lights for the LightOverlap scene view mode + if (IsOverlapping()) + s_overlappingHDLights.Add(this); + else + s_overlappingHDLights.Remove(this); +#endif + #if UNITY_EDITOR //if not parented anymore, refresh it if (m_ChildEmissiveMeshViewer != null && !m_ChildEmissiveMeshViewer.Equals(null)) @@ -3032,5 +3044,14 @@ void ISerializationCallbackReceiver.OnBeforeSerialize() void Reset() => UpdateBounds(); + + /// Tell if the light is overlapping for the light overlap debug mode + internal bool IsOverlapping() + { + var baking = GetComponent().bakingOutput; + bool isOcclusionSeparatelyBaked = baking.occlusionMaskChannel != -1; + bool isDirectUsingBakedOcclusion = baking.mixedLightingMode == MixedLightingMode.Shadowmask || baking.mixedLightingMode == MixedLightingMode.Subtractive; + return isDirectUsingBakedOcclusion && !isOcclusionSeparatelyBaked; + } } } 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 192adb75007..b625cae91e5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -4339,7 +4339,8 @@ void RenderDebug(HDCamera hdCamera, CommandBuffer cmd, CullingResults cullResult // Light volumes var lightingDebug = debugParams.debugDisplaySettings.data.lightingDebugSettings; - if (lightingDebug.displayLightVolumes) + bool isLightOverlapDebugEnabled = CoreUtils.IsLightOverlapDebugEnabled(hdCamera.camera); + if (lightingDebug.displayLightVolumes || isLightOverlapDebugEnabled) { s_lightVolumes.RenderLightVolumes(cmd, hdCamera, cullResults, lightingDebug, m_IntermediateAfterPostProcessBuffer); } From 62c2cd26b8ccc87b8107f9a7cd7d08ab96b95705 Mon Sep 17 00:00:00 2001 From: Pavlos Mavridis Date: Fri, 15 May 2020 02:57:29 +0200 Subject: [PATCH 175/200] Fixed null reference exception in LookDev when setting the SRP to None #447 --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + .../Editor/LookDev/DisplayWindow.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 91499c367d8..d0f134ec53a 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -19,6 +19,7 @@ The version number for this package has increased due to a version update of a r - Fixed copy/pasting of Volume Components when loading a new scene - Fix LookDev's camera button layout. - Fix LookDev's layout vanishing on domain reload. +- Fixed null reference exception in LookDev when setting the SRP to one not implementing LookDev (case 1245086) ## [8.0.1] - 2020-02-25 diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs index a616701a681..cbdcc972640 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs @@ -3,6 +3,8 @@ using UnityEngine; using UnityEngine.UIElements; +using RenderPipelineManager = UnityEngine.Rendering.RenderPipelineManager; + namespace UnityEditor.Rendering.LookDev { /// Interface that must implement the viewer to communicate with the compositor and data management @@ -680,6 +682,17 @@ void OnGUI() rootVisualElement.styleSheets.Add(styleSheetLight); } + // [case 1245086] Guard in case the SRP asset is set to null (or to a not supported SRP) when the lookdev window is already open + // Note: After an editor reload, we might get a null OnUpdateRequestedInternal and null SRP for a couple of frames, hence the check. + if (!LookDev.supported && OnUpdateRequestedInternal !=null) + { + // Print an error and close the Lookdev window (to avoid spamming the console) + Debug.LogError($"LookDev is not supported by this Scriptable Render Pipeline: " + + (RenderPipelineManager.currentPipeline == null ? "No SRP in use" : RenderPipelineManager.currentPipeline.ToString())); + LookDev.Close(); + return; + } + OnUpdateRequestedInternal?.Invoke(); } } From 77c5bd559dbdefbb4ace5ce9b9e162d4e6dc2ce4 Mon Sep 17 00:00:00 2001 From: fredericv-unity3d <55485372+fredericv-unity3d@users.noreply.github.com> Date: Fri, 15 May 2020 12:20:35 +0200 Subject: [PATCH 176/200] Check reflection probe null pointer before use. (case 1244047) #456 --- .../CHANGELOG.md | 1 + .../Reflection/HDAdditionalReflectionData.Legacy.cs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index dcc89742fbc..290d57f5187 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -125,6 +125,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue with sceneview camera settings not being saved after Editor restart. - Fixed issue that caused not all baked reflection to be deleted upon clicking "Clear Baked Data" in the lighting menu (case 1136080) - Fixed the light overlap scene view draw mode (wasn't working at all). +- Fixed error when undo a Reflection Probe removal in a prefab instance. (case 1244047) ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDAdditionalReflectionData.Legacy.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDAdditionalReflectionData.Legacy.cs index 1b979ba2b23..1f446401766 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDAdditionalReflectionData.Legacy.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDAdditionalReflectionData.Legacy.cs @@ -30,6 +30,16 @@ public override void PrepareCulling() var tr = transform; var position = tr.position; var cubeProbe = reflectionProbe; + + if (cubeProbe == null || cubeProbe.Equals(null)) + { + // case 1244047 + // This can happen when removing the component from the editor and then undo the remove. + // The order of call maybe incorrect and the code flows here before the reflection probe + // is restored. + return; + } + switch (influence.shape) { case InfluenceShape.Box: From 572eaf79eb4ae4097f769028badbb6ccedd8a1a3 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 7 Jul 2020 06:58:57 +0200 Subject: [PATCH 177/200] Update 2002_Light_DynamicMix.unity --- .../2x_Lighting/2002_Light_DynamicMix.unity | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity index 0669ff028df..a309d419ec1 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2002_Light_DynamicMix.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.30957052, g: 0.3253681, b: 0.35991505, a: 1} + m_IndirectSpecularColor: {r: 0.31014416, g: 0.3259645, b: 0.36057484, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -576,7 +576,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 10 + m_Version: 11 m_ObsoleteShadowResolutionTier: 1 m_ObsoleteUseShadowQualitySettings: 0 m_ObsoleteCustomShadowResolution: 512 @@ -624,7 +624,6 @@ MonoBehaviour: m_LightShadowRadius: 0.5 m_SemiTransparentShadow: 0 m_ColorShadow: 1 - m_DistanceBasedFiltering: 0 m_EvsmExponent: 15 m_EvsmLightLeakBias: 0 m_EvsmVarianceBias: 0.00001 @@ -675,6 +674,7 @@ MonoBehaviour: showAdditionalSettings: 1 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 --- !u!108 &487878716 Light: m_ObjectHideFlags: 0 @@ -925,7 +925,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 10 + m_Version: 11 m_ObsoleteShadowResolutionTier: 1 m_ObsoleteUseShadowQualitySettings: 0 m_ObsoleteCustomShadowResolution: 512 @@ -973,7 +973,6 @@ MonoBehaviour: m_LightShadowRadius: 0.5 m_SemiTransparentShadow: 0 m_ColorShadow: 1 - m_DistanceBasedFiltering: 0 m_EvsmExponent: 15 m_EvsmLightLeakBias: 0 m_EvsmVarianceBias: 0.00001 @@ -1024,6 +1023,7 @@ MonoBehaviour: showAdditionalSettings: 5 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 --- !u!108 &576870515 Light: m_ObjectHideFlags: 0 @@ -1810,7 +1810,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 10 + m_Version: 11 m_ObsoleteShadowResolutionTier: 1 m_ObsoleteUseShadowQualitySettings: 0 m_ObsoleteCustomShadowResolution: 512 @@ -1858,7 +1858,6 @@ MonoBehaviour: m_LightShadowRadius: 0.5 m_SemiTransparentShadow: 0 m_ColorShadow: 1 - m_DistanceBasedFiltering: 0 m_EvsmExponent: 15 m_EvsmLightLeakBias: 0 m_EvsmVarianceBias: 0.00001 @@ -1909,6 +1908,7 @@ MonoBehaviour: showAdditionalSettings: 5 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 --- !u!108 &1083378962 Light: m_ObjectHideFlags: 0 @@ -2065,7 +2065,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 10 + m_Version: 11 m_ObsoleteShadowResolutionTier: 1 m_ObsoleteUseShadowQualitySettings: 0 m_ObsoleteCustomShadowResolution: 512 @@ -2113,7 +2113,6 @@ MonoBehaviour: m_LightShadowRadius: 0.5 m_SemiTransparentShadow: 0 m_ColorShadow: 1 - m_DistanceBasedFiltering: 0 m_EvsmExponent: 15 m_EvsmLightLeakBias: 0 m_EvsmVarianceBias: 0.00001 @@ -2164,6 +2163,7 @@ MonoBehaviour: showAdditionalSettings: 1 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 --- !u!108 &1302673722 Light: m_ObjectHideFlags: 0 @@ -2612,7 +2612,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 10 + m_Version: 11 m_ObsoleteShadowResolutionTier: 1 m_ObsoleteUseShadowQualitySettings: 0 m_ObsoleteCustomShadowResolution: 512 @@ -2660,7 +2660,6 @@ MonoBehaviour: m_LightShadowRadius: 0.5 m_SemiTransparentShadow: 0 m_ColorShadow: 1 - m_DistanceBasedFiltering: 0 m_EvsmExponent: 15 m_EvsmLightLeakBias: 0 m_EvsmVarianceBias: 0.00001 @@ -2711,6 +2710,7 @@ MonoBehaviour: showAdditionalSettings: 1 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 --- !u!108 &1637281123 Light: m_ObjectHideFlags: 0 From a8d7a7d9fd54f11ca2c39a70dfa3d21c1ca2ec74 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Fri, 15 May 2020 10:38:21 +0200 Subject: [PATCH 178/200] Fix few multi-editing issues with Emission UI #473 --- .../CHANGELOG.md | 9 +- .../Material/UIBlocks/EmissionUIBlock.cs | 95 +++++++++++++++++-- 2 files changed, 90 insertions(+), 14 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 290d57f5187..422e9a4dd3b 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -49,6 +49,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue when switching back to custom sensor type in physical camera settings (case 1244350). - Fixed the prefab integration of custom passes (Prefab Override Highlight not working as expected). - Fixed issue with post process when running in RGBA16 and an object with additive blending is in the scene. +- Fixed issue with sceneview camera settings not being saved after Editor restart. +- Fixed issue that caused not all baked reflection to be deleted upon clicking "Clear Baked Data" in the lighting menu (case 1136080) +- Fixed the light overlap scene view draw mode (wasn't working at all). +- Fixed error when undo a Reflection Probe removal in a prefab instance. (case 1244047) +- Fixed various multi-editing issues when changing Emission parameters. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings @@ -122,10 +127,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed scalarization code for contact shadows - Fix MaterialBalls having same guid issue - Fix spelling and grammatical errors in material samples -- Fixed issue with sceneview camera settings not being saved after Editor restart. -- Fixed issue that caused not all baked reflection to be deleted upon clicking "Clear Baked Data" in the lighting menu (case 1136080) -- Fixed the light overlap scene view draw mode (wasn't working at all). -- Fixed error when undo a Reflection Probe removal in a prefab instance. (case 1244047) ### Changed - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs index 08eeee01db4..34a9c22eff4 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs @@ -103,6 +103,31 @@ public override void OnGUI() } } + void UpdateEmissiveColorAndIntensity() + { + materialEditor.serializedObject.ApplyModifiedProperties(); + foreach (Material target in materials) + { + if (target.HasProperty(kEmissiveColorLDR) && target.HasProperty(kEmissiveIntensity) && target.HasProperty(kEmissiveColor)) + { + target.SetColor(kEmissiveColor, target.GetColor(kEmissiveColorLDR) * target.GetFloat(kEmissiveIntensity)); + } + } + materialEditor.serializedObject.Update(); + } + + void UpdateEmissionUnit(float newUnitFloat) + { + foreach (Material target in materials) + { + if (target.HasProperty(kEmissiveIntensityUnit) && target.HasProperty(kEmissiveIntensity)) + { + target.SetFloat(kEmissiveIntensityUnit, newUnitFloat); + } + } + materialEditor.serializedObject.Update(); + } + void DrawEmissionGUI() { EditorGUI.BeginChangeCheck(); @@ -120,35 +145,85 @@ void DrawEmissionGUI() else { EditorGUI.BeginChangeCheck(); + DoEmissiveTextureProperty(emissiveColorLDR); + // Normalize all emissive colors for each target separately + foreach (Material material in materials) { - DoEmissiveTextureProperty(emissiveColorLDR); - emissiveColorLDR.colorValue = NormalizeEmissionColor(ref updateEmissiveColor, emissiveColorLDR.colorValue); + if (material.HasProperty(kEmissiveColorLDR)) + material.SetColor(kEmissiveColorLDR, NormalizeEmissionColor(ref updateEmissiveColor, material.GetColor(kEmissiveColorLDR))); + } + if (EditorGUI.EndChangeCheck() || updateEmissiveColor) + UpdateEmissiveColorAndIntensity(); + float newUnitFloat; + float newIntensity = emissiveIntensity.floatValue; + bool unitIsMixed = emissiveIntensityUnit.hasMixedValue; + bool intensityIsMixed = unitIsMixed || emissiveIntensity.hasMixedValue; + bool intensityChanged = false; + bool unitChanged = false; + EditorGUI.BeginChangeCheck(); + { using (new EditorGUILayout.HorizontalScope()) { EmissiveIntensityUnit unit = (EmissiveIntensityUnit)emissiveIntensityUnit.floatValue; + EditorGUI.showMixedValue = intensityIsMixed; if (unit == EmissiveIntensityUnit.Nits) { using (var change = new EditorGUI.ChangeCheckScope()) { materialEditor.ShaderProperty(emissiveIntensity, Styles.emissiveIntensityText); - if (change.changed) - emissiveIntensity.floatValue = Mathf.Clamp(emissiveIntensity.floatValue, 0, float.MaxValue); + intensityChanged = change.changed; + if (intensityChanged) + newIntensity = Mathf.Clamp(emissiveIntensity.floatValue, 0, float.MaxValue); } } else { - float evValue = LightUtils.ConvertLuminanceToEv(emissiveIntensity.floatValue); - evValue = EditorGUILayout.FloatField(Styles.emissiveIntensityText, evValue); - evValue = Mathf.Clamp(evValue, 0, float.MaxValue); - emissiveIntensity.floatValue = LightUtils.ConvertEvToLuminance(evValue); + float value = emissiveIntensity.floatValue; + if (!intensityIsMixed) + { + float evValue = LightUtils.ConvertLuminanceToEv(emissiveIntensity.floatValue); + evValue = EditorGUILayout.FloatField(Styles.emissiveIntensityText, evValue); + newIntensity = Mathf.Clamp(evValue, 0, float.MaxValue); + emissiveIntensity.floatValue = LightUtils.ConvertEvToLuminance(evValue); + } + else + { + using (var change = new EditorGUI.ChangeCheckScope()) + { + newIntensity = EditorGUILayout.FloatField(Styles.emissiveIntensityText, value); + intensityChanged = change.changed; + } + } + } + EditorGUI.showMixedValue = false; + + EditorGUI.showMixedValue = emissiveIntensityUnit.hasMixedValue; + using (var change = new EditorGUI.ChangeCheckScope()) + { + newUnitFloat = (float)(EmissiveIntensityUnit)EditorGUILayout.EnumPopup(unit); + unitChanged = change.changed; } - emissiveIntensityUnit.floatValue = (float)(EmissiveIntensityUnit)EditorGUILayout.EnumPopup(unit); + EditorGUI.showMixedValue = false; } } if (EditorGUI.EndChangeCheck() || updateEmissiveColor) - emissiveColor.colorValue = emissiveColorLDR.colorValue * emissiveIntensity.floatValue; + { + if(unitChanged) + { + if (unitIsMixed) + UpdateEmissionUnit(newUnitFloat); + else + emissiveIntensityUnit.floatValue = newUnitFloat; + } + + // We don't allow changes on intensity if units are mixed + if (intensityChanged && !unitIsMixed) + emissiveIntensity.floatValue = newIntensity; + + UpdateEmissiveColorAndIntensity(); + } } materialEditor.ShaderProperty(emissiveExposureWeight, Styles.emissiveExposureWeightText); From 4b3611d98550841360aeb42525f5ea4c6f19faf2 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 14 May 2020 15:00:59 +0100 Subject: [PATCH 179/200] Updated Decal Projector doc (#477) Updated Limitations section and added a disclaimer about decal shader stripping. --- .../Documentation~/Decal-Projector.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 371832bad66..37ad65a2972 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md @@ -42,6 +42,7 @@ Using the Inspector allows you to change all of the Decal Projector properties, | **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. | | **Affects Transparent** | Enable the checkbox to allow HDRP to draw the projector’s decal on top of transparent surfaces. HDRP packs all Textures from decals with **Affects Transparency** enabled into an atlas, which can affect memory and performance. You can edit the dimensions of this atlas in the **Decals** section of your Unity Project’s [HDRP Asset](HDRP-Asset.html#Decals). | -## Know limitation +## Limitations -- Decal texture tiling is ignored when projected on transparent surface +- If you project a decal onto a transparent surface, HDRP ignores the decal's Texture tiling. +- In **Project Settings > Graphics**, if **Instancing Variants** is set to **Strip All**, Unity strips the Decal Shader this component references when you build your Project. This happens even if you include the Shader in the **Always Included Shaders** list. If Unity strips the Shader during the build process, the decal does not appear in your built Application. From 3c5804f19483615ab3fcdc3d60013894272ff783 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Thu, 14 May 2020 15:09:17 +0100 Subject: [PATCH 180/200] Look Dev docs refactor 2 #484 --- .../Documentation~/Images/LookDev1.png | 0 .../Documentation~/Images/LookDev2.png | 0 .../Documentation~/Images/LookDev3.png | 0 .../Documentation~/Images/LookDev4.png | 0 .../Documentation~/Images/LookDev5.png | 0 .../Documentation~/Images/LookDev6.png | 0 .../Documentation~/Images/LookDev7.png | 0 .../Documentation~/Images/LookDev8.png | 0 .../Documentation~/Images/LookDev9.png | 0 .../Images/LookDevEnvironmentLibrary1.png | 0 .../Images/LookDevEnvironmentLibrary2.png | 0 .../Images/LookDevEnvironmentLibrary3.png | 0 .../Images/LookDevEnvironmentLibrary4.png | 0 .../Images/LookDevEnvironmentLibrary5.png | 0 .../Look-Dev-Environment-Library.md | 3 +- .../Documentation~/Look-Dev.md | 142 ++++++++++++++++++ .../Documentation~/TableOfContents.md | 4 +- .../Documentation~/Look-Dev.md | 142 +----------------- .../Documentation~/TableOfContents.md | 4 +- 19 files changed, 150 insertions(+), 145 deletions(-) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev1.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev2.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev3.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev4.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev5.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev6.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev7.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev8.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDev9.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDevEnvironmentLibrary1.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDevEnvironmentLibrary2.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDevEnvironmentLibrary3.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDevEnvironmentLibrary4.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Images/LookDevEnvironmentLibrary5.png (100%) rename {com.unity.render-pipelines.high-definition => com.unity.render-pipelines.core}/Documentation~/Look-Dev-Environment-Library.md (98%) create mode 100644 com.unity.render-pipelines.core/Documentation~/Look-Dev.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev1.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev1.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev1.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev1.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev2.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev2.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev2.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev2.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev3.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev3.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev3.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev3.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev4.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev4.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev4.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev4.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev5.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev5.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev5.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev5.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev6.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev6.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev6.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev6.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev7.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev7.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev7.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev7.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev8.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev8.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev8.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev8.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev9.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDev9.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDev9.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDev9.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary1.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary1.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary1.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary1.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary2.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary2.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary2.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary2.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary3.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary3.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary3.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary3.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary4.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary4.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary4.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary4.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary5.png b/com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary5.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LookDevEnvironmentLibrary5.png rename to com.unity.render-pipelines.core/Documentation~/Images/LookDevEnvironmentLibrary5.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev-Environment-Library.md b/com.unity.render-pipelines.core/Documentation~/Look-Dev-Environment-Library.md similarity index 98% rename from com.unity.render-pipelines.high-definition/Documentation~/Look-Dev-Environment-Library.md rename to com.unity.render-pipelines.core/Documentation~/Look-Dev-Environment-Library.md index c1be65fb941..cfaa0c1da1a 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev-Environment-Library.md +++ b/com.unity.render-pipelines.core/Documentation~/Look-Dev-Environment-Library.md @@ -49,5 +49,4 @@ To add, remove, or duplicate environments, use the toolbar at the bottom of the To import an HDRI Texture into the Unity Editor, load an **.hdr** or **.exr** file into your Unity Project like you would any other image. In the Texture Importer Inspector window, set **Texture Type** to **Default**, set **Texture Shape** to **Cube**, and set **Convolution Type** to **None**. -When you want to test an HDRI Texture Asset or a skybox cube map Material, drag and drop it into the Look Dev view. - +When you want to test an HDRI Texture Asset or a skybox cube map Material, drag and drop it into the Look Dev view. \ No newline at end of file diff --git a/com.unity.render-pipelines.core/Documentation~/Look-Dev.md b/com.unity.render-pipelines.core/Documentation~/Look-Dev.md new file mode 100644 index 00000000000..2797d2b7a5c --- /dev/null +++ b/com.unity.render-pipelines.core/Documentation~/Look-Dev.md @@ -0,0 +1,142 @@ +# Look Dev + +Look Dev is an image-based lighting tool that contains a viewer for you to check and compare Assets to ensure they work well in various lighting conditions. Look Dev uses the Scriptable Render Pipeline, so it can display the Asset in the same way as it looks in your Scene. You can load Assets into Look Dev either as Prefabs or from the Hierarchy window. + +Look Dev is only available in Edit mode. The Look Dev window closes when you enter Play mode. + +### Asset validation + +Asset validation confirms whether Assets are authored correctly and behave as expected in different lighting environments. + +You must use an HDRI (high dynamic range image) to validate your Assets in Look Dev. An HDRI contains real-world lighting with incredibly high detail. As such, it offers perfect lighting that is difficult to create by hand. By using such an accurate lighting environment to test an Asset, you can determine whether the Asset itself or your Project's lighting is reducing the visual quality of your Scene. + +You can load two different Assets into Look Dev at the same time and compare them in two viewports. For example, an Art Director can check that a new Asset matches the art direction guidelines of a reference Asset. + +## Using Look Dev + +To open Look Dev in the Unity Editor, select **Window > Render Pipeline > Look Dev**. The first time you use Look Dev, you must either create a new [Environment Library](Look-Dev-Environment-Library.html) or load one. For information on how to create an Environment Library, see the [Environment Library documentation](Look-Dev-Environment-Library.html). + +### Viewports + +By default, there is only one viewport in Look Dev, but you can choose from a selection of split-screen views (see the [Multi-view section](#MultiView)). + +### Controls + +Navigation with the Look Dev Camera works in a similar way to the [Scene view Camera](https://docs.unity3d.com/Manual/SceneViewNavigation.html): + +- **Rotate around pivot:** Left click and drag (this is similar to the Scene view except that you need to press the Alt key for the Scene view Camera). +- **Pan camera:** Middle click and drag. +- **Zoom:** Alt + right click and drag. +- **Forward/backward:** Mouse wheel. +- **First Person mode:** Right click + W, A,S, and D. + +### Loading Assets into Look Dev + +Look Dev lets you view: + +**Prefabs** - To load a Prefab into Look Dev, drag it from the Project window into the Look Dev viewport. + +**GameObjects** - To load a copy of a Hierarchy GameObject, drag the GameObject from the Hierarchy into the Look Dev viewport. + + + +## Viewport modes + +Use the toolbar in the top-left of the window to change which viewing mode Look Dev uses. + +### Single viewport + +![](Images/LookDev1.png) + +By default, Look Dev displays a single viewport which contains the Prefab or GameObject you are working with. If you are in another viewing mode, you can click either the number **1** or number **2** button to go back to single view. Each button corresponds to a viewport in Look Dev. Select button **1** to use viewport 1, and button 2 to use viewport **2**. + + + +### Multi-viewport + +![](Images/LookDev2.png) + +Use multiple viewports to compare different environments and settings for the same Asset. You can arrange viewports: + +- Vertically side-by-side. Use this mode to compare two different lighting conditions on the same Asset to check that the Asset behaves correctly. +- Horizontally side-by-side. Use this mode to compare two different lighting conditions for horizontal objects, like an environment Asset, to check that the Asset behaves correctly. +- Split-screen. Use this mode investigate texture problems using a debug Shader mode (for example, use one screen to view Normal or Albedo shading, and the other for environment-lit mode). +- Side-by-side and split-screen: Use this mode to compare two different versions of the same Asset using the same lighting conditions to see which changes improve the Asset’s quality. + +All three of these modes are useful to compare two different versions of the same Asset using the same lighting conditions to see which changes improve the Asset’s quality. + +To load a different Prefab or Hierarchy GameObject into each split-screen view, drag and drop the Asset into the viewport that you want to view it in. + +When using multiple viewports, it only makes sense to compare different Prefabs or GameObjects when you want to look at two versions of the same Asset. Comparing completely different Assets doesn’t give you a good idea of the difference in lighting or visual effect. + +##### Vertical or horizontal side-by-side + +Vertical and horizontal side-by-side viewports show an identical view of your Asset. + +![](Images/LookDev3.png) + +##### Split-screen + +In a split-screen view, there is a red/blue manipulation Gizmo that separates the two viewports. For information on how to use this Gizmo, see [Using the manipulation Gizmo](#ManipulationGizmo). + +![](Images/LookDev4.png) + +#### Multi-viewport Camera + +By default, Look Dev synchronizes the camera movement for both views. To decouple the Cameras from one another, and manipulate them independently, click the **Synchronized Cameras** button in-between the two numbered Camera buttons. + +![](Images/LookDev5.png) + +To align the cameras with each other, or reset them, click on the drop-down arrow next to the viewport **2** icon: + +![](Images/LookDev6.png) + + + +### Using the manipulation Gizmo + +The manipulation Gizmo represents the separation plane between the two viewports. It has different behavior in split-screen mode, but you use it in the same way for both side-by-side or split-screen modes. + +#### Moving the separator + +To move the separator, click and drag the straight line of the Gizmo to the location you want. + +![](Images/LookDev7.png) + +#### Changing the orientation and length + +To change the orientation and length of the manipulator Gizmo, click and drag the circle at either end of the manipulator. Changing the length of the Gizmo lets you set the orientation and [blending](#Blending) values more precisely. + +![](Images/LookDev8.png)) + +#### Changing the split in increments + +To change the split in increments, click and hold the circle on the end of the manipulation Gizmo, then hold Shift as you move the mouse. This snaps the manipulation Gizmo to set angles in increments of 22.5°, which is useful for a perfectly horizontal, vertical or diagonal angle. + + + +#### Blending + +The central white circle on the separator allows you to blend between the two views. Left click on it and drag along the red line to blend the left-hand view with the right-hand view. Drag along the blue line to blend the right-hand view with the left-hand view (as shown in the image below). + +The white circle automatically snaps back into the center when you drag it back. This helps you get back to the default blending value quickly. + +![](Images/LookDev9.png) + +### HDRI environments in Look Dev + +Lighting in Look Dev uses an HDRI. The Look Dev view allows you to manipulate and easily switch between HDRIs to simulate different environments for the Asset you are working on. + +Look Dev uses the [Environment Library](Look-Dev-Environment-Library.html) Asset to store a list of environments, which are HDRIs with extra properties that you can use to further refine the environment. For information on how to create, edit, and assign Environment Libraries, see the [Environment Library documentation](Look-Dev-Environment-Library.html#Creation). + +## Implementing Look Dev for your custom Scriptable Render Pipeline + +In order to use Look Dev in your custom Scriptable Render Pipeline, you must implement the **UnityEngine.Rendering.LookDev.IDataProvider** interface. + +| **Function** | **Description** | +| ------------------------------------------------------------ | ------------------------------------------------------------ | +| **void FirstInitScene(StageRuntimeInterface stage)** | Look Dev calls this function after it initializes the Scene with a Light and Camera. It uses this function to add and configure extra components according to the needs of your Scriptable Render Pipeline. | +| **void UpdateSky(Camera camera, Sky sky, StageRuntimeInterface stage)** | Look Dev uses this function to update the environment when you change something in Look Dev. You can handle the sky in various ways, so add code that corresponds to your Scriptable Render Pipeline. | +| **IEnumerable****** **supportedDebugModes { get; }** | Use this function to specify the list of supported debug modes. You do not need to add **None** because Look Dev handles that automatically. | +| **void UpdateDebugMode(int debugIndex)** | Use this function to update the debug mode based on what the user selects. The **debugIndex** matches the list in **supportedDebugModes**. If the user selects **None**, then the **debugIndex** is **-1**; | +| **void GetShadowMask(ref RenderTexture output, StageRuntimeInterface stage)** | This function computes a shadow map. The given **StageRuntimeInterface** contains access to the Camera and a Light simulating the sun. | \ No newline at end of file diff --git a/com.unity.render-pipelines.core/Documentation~/TableOfContents.md b/com.unity.render-pipelines.core/Documentation~/TableOfContents.md index 43587d6cc61..3896f5b625e 100644 --- a/com.unity.render-pipelines.core/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.core/Documentation~/TableOfContents.md @@ -1,4 +1,6 @@ * [SRP Core](index) * Camera components * [Free Camera](Free-Camera) - * [Camera Switcher](Camera-Switcher) \ No newline at end of file + * [Camera Switcher](Camera-Switcher) +* [Look Dev](Look-Dev) + * [Environment Library](Look-Dev-Environment-Library) \ No newline at end of file diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev.md b/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev.md index 2797d2b7a5c..db12c7feac2 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Look-Dev.md @@ -1,142 +1,6 @@ # Look Dev +Look Dev is an image-based lighting tool that you can use to test how your Assets look in various lighting conditions. -Look Dev is an image-based lighting tool that contains a viewer for you to check and compare Assets to ensure they work well in various lighting conditions. Look Dev uses the Scriptable Render Pipeline, so it can display the Asset in the same way as it looks in your Scene. You can load Assets into Look Dev either as Prefabs or from the Hierarchy window. +For more information, see [the SRP Core documentation.](https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest/index.html?subfolder=/manual/Look-Dev.html) -Look Dev is only available in Edit mode. The Look Dev window closes when you enter Play mode. - -### Asset validation - -Asset validation confirms whether Assets are authored correctly and behave as expected in different lighting environments. - -You must use an HDRI (high dynamic range image) to validate your Assets in Look Dev. An HDRI contains real-world lighting with incredibly high detail. As such, it offers perfect lighting that is difficult to create by hand. By using such an accurate lighting environment to test an Asset, you can determine whether the Asset itself or your Project's lighting is reducing the visual quality of your Scene. - -You can load two different Assets into Look Dev at the same time and compare them in two viewports. For example, an Art Director can check that a new Asset matches the art direction guidelines of a reference Asset. - -## Using Look Dev - -To open Look Dev in the Unity Editor, select **Window > Render Pipeline > Look Dev**. The first time you use Look Dev, you must either create a new [Environment Library](Look-Dev-Environment-Library.html) or load one. For information on how to create an Environment Library, see the [Environment Library documentation](Look-Dev-Environment-Library.html). - -### Viewports - -By default, there is only one viewport in Look Dev, but you can choose from a selection of split-screen views (see the [Multi-view section](#MultiView)). - -### Controls - -Navigation with the Look Dev Camera works in a similar way to the [Scene view Camera](https://docs.unity3d.com/Manual/SceneViewNavigation.html): - -- **Rotate around pivot:** Left click and drag (this is similar to the Scene view except that you need to press the Alt key for the Scene view Camera). -- **Pan camera:** Middle click and drag. -- **Zoom:** Alt + right click and drag. -- **Forward/backward:** Mouse wheel. -- **First Person mode:** Right click + W, A,S, and D. - -### Loading Assets into Look Dev - -Look Dev lets you view: - -**Prefabs** - To load a Prefab into Look Dev, drag it from the Project window into the Look Dev viewport. - -**GameObjects** - To load a copy of a Hierarchy GameObject, drag the GameObject from the Hierarchy into the Look Dev viewport. - - - -## Viewport modes - -Use the toolbar in the top-left of the window to change which viewing mode Look Dev uses. - -### Single viewport - -![](Images/LookDev1.png) - -By default, Look Dev displays a single viewport which contains the Prefab or GameObject you are working with. If you are in another viewing mode, you can click either the number **1** or number **2** button to go back to single view. Each button corresponds to a viewport in Look Dev. Select button **1** to use viewport 1, and button 2 to use viewport **2**. - - - -### Multi-viewport - -![](Images/LookDev2.png) - -Use multiple viewports to compare different environments and settings for the same Asset. You can arrange viewports: - -- Vertically side-by-side. Use this mode to compare two different lighting conditions on the same Asset to check that the Asset behaves correctly. -- Horizontally side-by-side. Use this mode to compare two different lighting conditions for horizontal objects, like an environment Asset, to check that the Asset behaves correctly. -- Split-screen. Use this mode investigate texture problems using a debug Shader mode (for example, use one screen to view Normal or Albedo shading, and the other for environment-lit mode). -- Side-by-side and split-screen: Use this mode to compare two different versions of the same Asset using the same lighting conditions to see which changes improve the Asset’s quality. - -All three of these modes are useful to compare two different versions of the same Asset using the same lighting conditions to see which changes improve the Asset’s quality. - -To load a different Prefab or Hierarchy GameObject into each split-screen view, drag and drop the Asset into the viewport that you want to view it in. - -When using multiple viewports, it only makes sense to compare different Prefabs or GameObjects when you want to look at two versions of the same Asset. Comparing completely different Assets doesn’t give you a good idea of the difference in lighting or visual effect. - -##### Vertical or horizontal side-by-side - -Vertical and horizontal side-by-side viewports show an identical view of your Asset. - -![](Images/LookDev3.png) - -##### Split-screen - -In a split-screen view, there is a red/blue manipulation Gizmo that separates the two viewports. For information on how to use this Gizmo, see [Using the manipulation Gizmo](#ManipulationGizmo). - -![](Images/LookDev4.png) - -#### Multi-viewport Camera - -By default, Look Dev synchronizes the camera movement for both views. To decouple the Cameras from one another, and manipulate them independently, click the **Synchronized Cameras** button in-between the two numbered Camera buttons. - -![](Images/LookDev5.png) - -To align the cameras with each other, or reset them, click on the drop-down arrow next to the viewport **2** icon: - -![](Images/LookDev6.png) - - - -### Using the manipulation Gizmo - -The manipulation Gizmo represents the separation plane between the two viewports. It has different behavior in split-screen mode, but you use it in the same way for both side-by-side or split-screen modes. - -#### Moving the separator - -To move the separator, click and drag the straight line of the Gizmo to the location you want. - -![](Images/LookDev7.png) - -#### Changing the orientation and length - -To change the orientation and length of the manipulator Gizmo, click and drag the circle at either end of the manipulator. Changing the length of the Gizmo lets you set the orientation and [blending](#Blending) values more precisely. - -![](Images/LookDev8.png)) - -#### Changing the split in increments - -To change the split in increments, click and hold the circle on the end of the manipulation Gizmo, then hold Shift as you move the mouse. This snaps the manipulation Gizmo to set angles in increments of 22.5°, which is useful for a perfectly horizontal, vertical or diagonal angle. - - - -#### Blending - -The central white circle on the separator allows you to blend between the two views. Left click on it and drag along the red line to blend the left-hand view with the right-hand view. Drag along the blue line to blend the right-hand view with the left-hand view (as shown in the image below). - -The white circle automatically snaps back into the center when you drag it back. This helps you get back to the default blending value quickly. - -![](Images/LookDev9.png) - -### HDRI environments in Look Dev - -Lighting in Look Dev uses an HDRI. The Look Dev view allows you to manipulate and easily switch between HDRIs to simulate different environments for the Asset you are working on. - -Look Dev uses the [Environment Library](Look-Dev-Environment-Library.html) Asset to store a list of environments, which are HDRIs with extra properties that you can use to further refine the environment. For information on how to create, edit, and assign Environment Libraries, see the [Environment Library documentation](Look-Dev-Environment-Library.html#Creation). - -## Implementing Look Dev for your custom Scriptable Render Pipeline - -In order to use Look Dev in your custom Scriptable Render Pipeline, you must implement the **UnityEngine.Rendering.LookDev.IDataProvider** interface. - -| **Function** | **Description** | -| ------------------------------------------------------------ | ------------------------------------------------------------ | -| **void FirstInitScene(StageRuntimeInterface stage)** | Look Dev calls this function after it initializes the Scene with a Light and Camera. It uses this function to add and configure extra components according to the needs of your Scriptable Render Pipeline. | -| **void UpdateSky(Camera camera, Sky sky, StageRuntimeInterface stage)** | Look Dev uses this function to update the environment when you change something in Look Dev. You can handle the sky in various ways, so add code that corresponds to your Scriptable Render Pipeline. | -| **IEnumerable****** **supportedDebugModes { get; }** | Use this function to specify the list of supported debug modes. You do not need to add **None** because Look Dev handles that automatically. | -| **void UpdateDebugMode(int debugIndex)** | Use this function to update the debug mode based on what the user selects. The **debugIndex** matches the list in **supportedDebugModes**. If the user selects **None**, then the **debugIndex** is **-1**; | -| **void GetShadowMask(ref RenderTexture output, StageRuntimeInterface stage)** | This function computes a shadow map. The given **StageRuntimeInterface** contains access to the Camera and a Light simulating the sun. | \ No newline at end of file +![](Images/HDRPFeatures-LookDev.png) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index 96ac363bab4..8a8f3b90a3b 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -140,9 +140,7 @@ * Components * [Decal Projector](Decal-Projector) * Tools - * Look Dev - * [Look Dev Window](Look-Dev) - * [Environment Library](Look-Dev-Environment-Library) + * [Look Dev](Look-Dev) * Debugging * [MatCap](MatCap) * [Render Pipeline Debug Window](Render-Pipeline-Debug-Window) From c36894889741d98f6167d3f2dca3f3dfbeabeb3a Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Fri, 15 May 2020 11:59:27 +0200 Subject: [PATCH 181/200] Re-enable cubemap thumbnail gen only for d3d11 #487 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/Lighting/Reflection/HDCubemapInspector.cs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 422e9a4dd3b..7330f22e00a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the light overlap scene view draw mode (wasn't working at all). - Fixed error when undo a Reflection Probe removal in a prefab instance. (case 1244047) - Fixed various multi-editing issues when changing Emission parameters. +- Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11 and Metal). ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs index b82a3d45ab0..e65b65b5eb0 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDCubemapInspector.cs @@ -232,7 +232,12 @@ public override Texture2D RenderStaticPreview(string assetPath, Object[] subAsse m_PreviewUtility.ambientColor = Color.black; m_PreviewUtility.BeginStaticPreview(new Rect(0, 0, width, height)); m_PreviewUtility.DrawMesh(sphereMesh, Matrix4x4.identity, previewMaterial, 0); - m_PreviewUtility.camera.Render(); + // TODO: For now the following line is D3D11 + Metal only as it cause out of memory on both DX12 and Vulkan API. + // We will need to invest time to understand what is happening + // For now priority is to enable Yamato platform automation + // This mean that cubemap icon will render incorrectly on anything but D3D11 + if(SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D11 || SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal) + m_PreviewUtility.camera.Render(); var outTexture = m_PreviewUtility.EndStaticPreview(); From 7a86fe32d0a67189f04aa8bc34e7e52218f6acf8 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Fri, 15 May 2020 14:24:56 +0200 Subject: [PATCH 182/200] Hd/fix undo environmentlibrary lookdev #490 --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + .../Editor/LookDev/Context.cs | 12 ++++++++++++ .../DisplayWindow.EnvironmentLibrarySidePanel.cs | 8 ++++++++ .../Editor/LookDev/DisplayWindow.cs | 8 +++++++- .../Editor/LookDev/EnvironmentLibrary.cs | 11 +++++++++++ 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index d0f134ec53a..769ce63ed2f 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -20,6 +20,7 @@ The version number for this package has increased due to a version update of a r - Fix LookDev's camera button layout. - Fix LookDev's layout vanishing on domain reload. - Fixed null reference exception in LookDev when setting the SRP to one not implementing LookDev (case 1245086) +- Fix LookDev's undo/redo on EnvironmentLibrary (case 1234725) ## [8.0.1] - 2020-02-25 diff --git a/com.unity.render-pipelines.core/Editor/LookDev/Context.cs b/com.unity.render-pipelines.core/Editor/LookDev/Context.cs index 04f0300517e..7db4c4e799f 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/Context.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/Context.cs @@ -264,6 +264,18 @@ internal bool HasLibraryAssetChanged(EnvironmentLibrary environmentLibrary) return m_EnvironmentLibraryGUID != AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(environmentLibrary)); } + + internal void FullReimportEnvironmentLibrary() + { + if (environmentLibrary == null) + return; + + // refresh AssetDatabase in case of undo/redo creating/destructing environment subasset + string libraryPath = AssetDatabase.GetAssetPath(environmentLibrary); + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(environmentLibrary), ImportAssetOptions.DontDownloadFromCacheServer | ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate | ImportAssetOptions.ImportRecursive); + UpdateEnvironmentLibrary(AssetDatabase.LoadAssetAtPath(libraryPath)); + EditorUtility.SetDirty(environmentLibrary); + } } /// diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs index 30d1e966387..5db3aba5723 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs @@ -463,5 +463,13 @@ void OnFocus() ((IEnvironmentDisplayer)this).Repaint(); } } + + void FullRefreshEnvironmentList() + { + if (LookDev.currentContext.environmentLibrary != null) + LookDev.currentContext.FullReimportEnvironmentLibrary(); + + ((IEnvironmentDisplayer)this).Repaint(); + } } } diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs index cbdcc972640..12b7368fccc 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs @@ -259,9 +259,15 @@ void OnEnable() ApplyLayout(viewLayout); ApplySidePanelChange(layout.showedSidePanel); + + Undo.undoRedoPerformed += FullRefreshEnvironmentList; } - void OnDisable() => OnClosedInternal?.Invoke(); + void OnDisable() + { + Undo.undoRedoPerformed -= FullRefreshEnvironmentList; + OnClosedInternal?.Invoke(); + } void CreateToolbar() { diff --git a/com.unity.render-pipelines.core/Editor/LookDev/EnvironmentLibrary.cs b/com.unity.render-pipelines.core/Editor/LookDev/EnvironmentLibrary.cs index 310239b1ac5..18872041db4 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/EnvironmentLibrary.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/EnvironmentLibrary.cs @@ -32,15 +32,21 @@ public class EnvironmentLibrary : ScriptableObject /// The created Environment public Environment Add() { + Undo.SetCurrentGroupName("Add Environment"); + int group = Undo.GetCurrentGroup(); + Environment environment = ScriptableObject.CreateInstance(); environment.name = "New Environment"; Undo.RegisterCreatedObjectUndo(environment, "Add Environment"); + Undo.RecordObject(this, "Add Environment"); environments.Add(environment); // Store this new environment as a subasset so we can reference it safely afterwards. AssetDatabase.AddObjectToAsset(environment, this); + Undo.CollapseUndoOperations(group); + // Force save / refresh. Important to do this last because SaveAssets can cause effect to become null! EditorUtility.SetDirty(this); AssetDatabase.SaveAssets(); @@ -54,11 +60,16 @@ public Environment Add() /// Index where to remove Environment public void Remove(int index) { + Undo.SetCurrentGroupName("Remove Environment"); + int group = Undo.GetCurrentGroup(); + Environment environment = environments[index]; Undo.RecordObject(this, "Remove Environment"); environments.RemoveAt(index); Undo.DestroyObjectImmediate(environment); + Undo.CollapseUndoOperations(group); + // Force save / refresh EditorUtility.SetDirty(this); AssetDatabase.SaveAssets(); From 09dd4b6c856c6f3292009968f41c08b443acac94 Mon Sep 17 00:00:00 2001 From: fredericv-unity3d <55485372+fredericv-unity3d@users.noreply.github.com> Date: Tue, 19 May 2020 14:40:41 +0200 Subject: [PATCH 183/200] =?UTF-8?q?Clone=20in=20the=20Asset=20folder=20whe?= =?UTF-8?q?n=20the=20original=20volume=20profile=20is=20in=20a=20re?= =?UTF-8?q?=E2=80=A6=20#508?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/Volume/VolumeEditor.cs | 18 +++++++++++++++++- .../CHANGELOG.md | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs index a9e96ed1b9d..274016aa54a 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs @@ -1,4 +1,7 @@ +using System.IO; +using UnityEditor.PackageManager; using UnityEngine; +using UnityEngine.Assertions; using UnityEngine.Rendering; namespace UnityEditor.Rendering @@ -153,7 +156,13 @@ public override void OnInspectorGUI() // Duplicate the currently assigned profile and save it as a new profile var origin = profileRef; var path = AssetDatabase.GetAssetPath(m_Profile.objectReferenceValue); - path = AssetDatabase.GenerateUniqueAssetPath(path); + + path = IsAssetInReadOnlyPackage(path) + // We may be in a read only package, in that case we need to clone the volume profile in an + // editable area, such as the root of the project. + ? AssetDatabase.GenerateUniqueAssetPath(Path.Combine("Assets", Path.GetFileName(path))) + // Otherwise, duplicate next to original asset. + : AssetDatabase.GenerateUniqueAssetPath(path); var asset = Instantiate(origin); asset.components.Clear(); @@ -202,5 +211,12 @@ public override void OnInspectorGUI() serializedObject.ApplyModifiedProperties(); } + + static bool IsAssetInReadOnlyPackage(string path) + { + Assert.IsNotNull(path); + var info = PackageManager.PackageInfo.FindForAssetPath(path); + return info != null && (info.source != PackageSource.Local && info.source != PackageSource.Embedded); + } } } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7330f22e00a..87d904a8dc9 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -62,6 +62,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Changed default exposure compensation to 0. - Improved performance of reflection probe management when using a lot of probes. - MSAA Within Forward Frame Setting is now enabled by default on Cameras when new Render Pipeline Asset is created +- Cloned volume profile from read only assets are created in the root of the project. (case 1154961) ## [8.1.0] - 2020-04-21 From 2d2981b868b09473e544c64771e490de728ef19e Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Fri, 15 May 2020 15:16:55 +0100 Subject: [PATCH 184/200] Added system requirements and frame settings api docs (#510) * Added system requirements and frame settings api doc * Update System-Requirements.md Co-authored-by: sebastienlagarde --- .../Documentation~/Frame-Settings-API.md | 112 ++++++++++++++++++ .../Images/FrameSettingsAPI-watch.png | 3 + .../Documentation~/System-Requirements.md | 37 ++++++ .../Documentation~/TableOfContents.md | 2 + .../Documentation~/index.md | 11 +- 5 files changed, 155 insertions(+), 10 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/FrameSettingsAPI-watch.png create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md b/com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md new file mode 100644 index 00000000000..6a95b715d56 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md @@ -0,0 +1,112 @@ +# Frame Settings Scripting API + +In the High Definition Render Pipelines (HDRP), [Frame Settings](Frame-Settings.md) control how a rendering component, such as a [Camera](HDRP-Camera.md), [Reflection Probe](Reflection-Probe.md), or [Planar Reflection Probe](Planar-Reflection-Probe.md), renders a Scene. You can specify default Frame Settings for your entire Project and then override them for a particular rendering component. This means that each Frame Setting has a default value, set in the [HDRP Asset](HDRP-Asset.md), then each individual rendering component in your Scene can have an override for it. This is useful if you have lower priority rendering components that do not need to use certain effects. To specify which default Frame Settings a rendering component overrides, each rendering component contains an [override mask](../api/UnityEngine.Rendering.HighDefinition.FrameSettingsOverrideMask.html). A mask is an array of bits, where each bit represents one of two states (0 for disabled and 1 for enabled). Each bit in the override mask represents the override state of a particular Frame Setting. + +To get the final value of a Frame Setting for a particular rendering component, HDRP performs the following steps: + +1. Checks the Project-wide default value for the Frame Setting. In this step, HDRP checks the current value stored for the Frame Setting in the HDRP Asset. +2. Checks the rendering component's override mask to see if the bit that corresponds to the Frame Setting is set. The state of the Frame Setting's bit in the override mask corresponds to the state of the override checkbox to the left of the Frame Setting in the rendering component's Inspector. +3. Gets the Frame Setting's override value from the rendering component's custom Frame Settings. +4. Sanitizes the result. To lighten your Project, you can specify which features to use in the HDRP Asset. If the Frame Setting you try to modify affects an unavailable feature, Unity discards it in this final sanitization pass. To make sure it is not possible for HDRP to process features that are not available, you cannot access the sanitization process via scripting API. + +## Modifying default Frame Settings + +The Default Frame Settings are in the HDRP Asset, so it is not good practice to modify them at runtime. Instead, you can modify them in Edit mode in [Default Settings tab](Default-Settings-Window.md). + +Note that you can set individual default Frame Settings for three types of rendering component: + +- Cameras +- Realtime Reflection Probes and Realtime Planar Reflection Probes +- Baked/custom Reflection Probes and Baked/custom Planar Reflection Probe + +There is currently no scripting API to modify default Frame Settings. + +## Modifying Frame Settings for a particular rendering component + +HDRP stores the Frame Settings for rendering components in additional data components attached to the rendering component. The additional data components are: + +| **Rendering component** | **Additional data component** | +| ----------------------- | ----------------------------- | +| **Camera** | HDAdditionalCameraData | +| **Reflection Probe** | HDAdditionalReflectionData | + +To modify the value of a Frame Setting, the first step is to get a reference to the additional data component. To do this, either create a public variable and assign it in the Inspector, or use [GetComponent()](https://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html) where T is the additional data component type. + +Next, access the Frame Settings override mask. This controls which Frame Settings to use overridden values for and is of type `FrameSettingsOverrideMask`. Accessing the Frame Settings override mask is different depending on whether you want to modify the Frame Settings of a Camera or a Reflection Probe: + +- **Camera**: `HDAdditionalCameraData.renderingPathCustomFrameSettingsOverrideMask` +- **Reflection Probe**: `HDAdditionalReflectionData.frameSettingsOverrideMask` + +For information on the API available for `FrameSettingsOverrideMask`, including how to set/unset a bit in the mask, see [FrameSettingsOverrideMask Scripting API](#framesettingsoverridemask-scripting-api). + +Finally, access the Frame Settings structure itself. This controls the actual value for each Frame Setting and is of type `FrameSettings`. Accessing the Frame Settings is also different depending on whether you want to modify the Frame Settings of a Camera or a Reflection Probe: + +- **Camera**: `HDAdditionalCameraData.renderingPathCustomFrameSettings` +- **Reflection Probe**: `HDAdditionalReflectionData.frameSettings` + +For information on the API available for `FrameSettings`, including how to edit the value of a Frame Setting, see [FrameSettings Scripting API](framesettings-scripting-api). + +## Frame Setting enumerations + +To make it easier to set the value of some Frame Settings, HDRP provides the following enum types. + +### LitShaderMode + +An enum which helps to switch a rendering component between deferred and forward rendering. + +For information on what each enum value does, see [LitShaderMode](../api/UnityEngine.Rendering.HighDefinition.LitShaderMode.html). + +### LODBiasMode + +An enum which defines how HDRP calculates a LOD bias. + +For information on what each enum value does, see [LODBiasMode](../api/UnityEngine.Rendering.HighDefinition.LODBiasMode.html). + +### MaximumLODLevelMode + +An enum which defines how HDRP calculates the maximum LOD level. + +For information on what each enum value does, see [MaximumLODLevelMode](../api/UnityEngine.Rendering.HighDefinition.MaximumLODLevelMode.html). + +### FrameSettingsField + +An enum where each entry represents a particular Frame Setting. For a list of entries in this enum, see [FrameSettingsField](../api/UnityEngine.Rendering.HighDefinition.FrameSettingsField.html). + +As well as an entry for each Frame Settings, this enum also includes the value `FrameSettingsField.None` that is set to **-1** for convenience and internal usage. + +## FrameSettingsOverrideMask Scripting API + +This is a structure that has a single field which stores the override mask. For more information about this structure and the API it contains, see [FrameSettingsOverrideMask](../api/UnityEngine.Rendering.HighDefinition.FrameSettingsOverrideMask.html). + +In the override mask, to allow you to easily access the bit for a given Frame Setting, HDRP provides the [FrameSettingsField](#framesettingsfield) enum. You can use this, for example, to find the bit responsible for overriding the **Opaque Objects** Frame Setting. To do this, you would do `this[(int)FrameSettingsField.OpaqueObjects]`. + +The following example shows how to compare the `humanizedData` from a rendering component's override mask with the rendering component's custom Frame Settings. There are some custom Frame Settings set, but the mask is all zeros which means that this rendering component uses the default Frame Settings. + +![](Images/FrameSettingsAPI-watch.png) + +## FrameSettings Scripting API + +This is a structure that contains information on how a rendering component should render the Scene. For more information about this structure and the API it contains, see [FrameSettings](../api/UnityEngine.Rendering.HighDefinition.FrameSettings.html). + +### Example + +The following example demonstrates a component that changes a Camera's Frame Settings so the Camera does not render opaque GameObjects. It has the public field `cameraToChange`, which represents the Camera to change the Frame Settings for, and the public function `RemoveOpaqueObjectsFromRendering`, which contains the logic to change the Camera's Frame Settings. + +``` +using UnityEngine; +using UnityEngine.Rendering.HighDefinition; + +public class ChangeFrameSettings : MonoBehaviour +{ + public Camera cameraToChange; + + public void RemoveOpaqueObjectsFromRendering() + { + HDAdditionalCameraData hdCameraData = cameraToChange.GetComponent(); + + hdCameraData.renderingPathCustomFrameSettingsOverrideMask.mask[(int)FrameSettingsField.OpaqueObjects] = true; + + hdCameraData.renderingPathCustomFrameSettings.SetEnabled(FrameSettingsField.OpaqueObjects, false); + } +} +``` \ No newline at end of file diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/FrameSettingsAPI-watch.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/FrameSettingsAPI-watch.png new file mode 100644 index 00000000000..7b6000f35dd --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/FrameSettingsAPI-watch.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e025291d565a2ce695ac45c8dc00c59c74ba0750da440e86245d4878c9b40a8b +size 9502 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md b/com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md new file mode 100644 index 00000000000..d8f06030ca6 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md @@ -0,0 +1,37 @@ +# Requirements and compatibility + +This page contains information on system requirements and compatibility of the High Definition Render Pipeline (HDRP) package. + +## Unity Editor compatibility + +The following table shows the compatibility of the High Definition Render Pipeline (HDRP) versions with different Unity Editor versions. + +| **Package version** | **Minimum Unity version** | **Maximum Unity version** | +| ------------------- | ------------------------- | ------------------------- | +| 10.x | 2020.2 | 2020.2 | +| 8.x / 9.x-preview | 2020.1 | 2020.1 | +| 7.x | 2019.3 | 2019.4 | +| 6.x | 2019.2 | 2019.2 | + +## Render pipeline compatibility + +Projects made using HDRP are not compatible with the Universal Render Pipeline (URP) or the Built-in Render Pipeline. Before you start development, you must decide which render pipeline to use in your Project. For information on choosing a render pipeline, see the [Render Pipelines](https://docs.unity3d.com/2019.3/Documentation/Manual/render-pipelines.html) section of the Unity Manual. + +## Unity Player system requirements + +This section describes the HDRP package’s target platform requirements. For platforms or use cases not covered in this section, general system requirements for the Unity Player apply. + +For more information, see [System requirements for Unity](https://docs.unity3d.com/Manual/system-requirements.html). + +HRDP is only compatible with the following platforms: + +- Windows and Windows Store, with DirectX 11 or DirectX 12 and Shader Model 5.0 +- Modern consoles (Sony PS4 and Microsoft Xbox One) +- MacOS (minimum version 10.13) using Metal graphics +- Linux and Windows platforms with Vulkan + +**Note: HDRP only works on these platforms if the device used supports Compute Shaders. HDRP does not support OpenGL or OpenGL ES devices.** + +### Ray tracing + +To use ray tracing in HDRP, there are hardware requirements you must meet. For information on these requirements, see [Getting started with ray tracing](Ray-Tracing-Getting-Started.md#HardwareRequirements). diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index 8a8f3b90a3b..da05f7f77b8 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -3,6 +3,7 @@ * [Features List](HDRP-Features) * [Comparison with the Built-in Render Pipeline](Feature-Comparison) * Getting started + * [System Requirements](System-Requirements.md) * [Getting Started with HDRP](Getting-started-with-HDRP) * [Upgrading to HDRP](Upgrading-To-HDRP) * [Render Pipeline Wizard](Render-Pipeline-Wizard) @@ -153,5 +154,6 @@ * [Creating a Custom Sky](Creating-a-Custom-Sky) * [Creating a Custom Post-Process Effect](Custom-Post-Process) * [Creating a Custom Render Pass](Custom-Pass) + * [Editing Frame Settings at Runtime](Frame-Settings-API.md) * [HDRP Glossary](Glossary) * [Known Issues and How To Fix Them](Known-Issues) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/index.md b/com.unity.render-pipelines.high-definition/Documentation~/index.md index b041030e01d..b066920f5ad 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/index.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/index.md @@ -10,13 +10,4 @@ NOTE: Projects that you make with HDRP are not compatible with the Universal Ren This documentation contains the information you need to create applications using HDRP; including information on Lighting, Materials and Shaders, Cameras, and debugging. -HRDP is only supported on the following platforms: - -* Windows and Windows Store, with DirectX 11 or DirectX 12 and Shader Model 5.0 -* Modern consoles (Sony PS4 and Microsoft Xbox One) -* MacOS using Metal graphics -* Linux and Windows platforms with Vulkan - -**HDRP does not support OpenGL or OpenGL ES devices.** - -**Note: HDRP only works on these platforms if the device used supports Compute Shaders.** \ No newline at end of file +For information on platform support and system requirements, see [System Requirements](System-Requirements.md). From 4fbd0aa9ceb4faaf33242c6b40687d1c0945992f Mon Sep 17 00:00:00 2001 From: Antoine Lelievre Date: Fri, 15 May 2020 13:30:07 +0200 Subject: [PATCH 185/200] Remove max atlas probe alloc size in HDRP asset (#458) * Fixed max alloc planar size not taking in account the max cache size * Removed the max cache clamp on texture atlases --- .../RenderPipeline/HDRenderPipelineUI.cs | 26 +++---------------- .../Runtime/Lighting/LightCookieManager.cs | 3 --- 2 files changed, 4 insertions(+), 25 deletions(-) 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 bd41dd2e4e1..8ecc4016043 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -221,17 +221,8 @@ static void Drawer_SectionCookies(SerializedHDRenderPipelineAsset serialized, Ed { GraphicsFormat cookieFormat = (GraphicsFormat)serialized.renderPipelineSettings.lightLoopSettings.cookieFormat.intValue; long currentCache = PowerOfTwoTextureAtlas.GetApproxCacheSizeInByte(1, serialized.renderPipelineSettings.lightLoopSettings.cookieAtlasSize.intValue, true, cookieFormat); - if (currentCache > HDRenderPipeline.k_MaxCacheSize) - { - int reserved = PowerOfTwoTextureAtlas.GetMaxCacheSizeForWeightInByte(HDRenderPipeline.k_MaxCacheSize, true, cookieFormat); - string message = string.Format(Styles.cacheErrorFormat, HDEditorUtils.HumanizeWeight(currentCache), reserved); - EditorGUILayout.HelpBox(message, MessageType.Error); - } - else - { - string message = string.Format(Styles.cacheInfoFormat, HDEditorUtils.HumanizeWeight(currentCache)); - EditorGUILayout.HelpBox(message, MessageType.Info); - } + string message = string.Format(Styles.cacheInfoFormat, HDEditorUtils.HumanizeWeight(currentCache)); + EditorGUILayout.HelpBox(message, MessageType.Info); } EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightLoopSettings.cookieAtlasLastValidMip, Styles.cookieAtlasLastValidMipContent); @@ -301,17 +292,8 @@ static void Drawer_SectionReflection(SerializedHDRenderPipelineAsset serialized, else { long currentCache = PlanarReflectionProbeCache.GetApproxCacheSizeInByte(1, serialized.renderPipelineSettings.lightLoopSettings.planarReflectionAtlasSize.intValue, GraphicsFormat.R16G16B16A16_UNorm); - if (currentCache > HDRenderPipeline.k_MaxCacheSize) - { - int reserved = PlanarReflectionProbeCache.GetMaxCacheSizeForWeightInByte(HDRenderPipeline.k_MaxCacheSize, GraphicsFormat.R16G16B16A16_UNorm); - string message = string.Format(Styles.cacheErrorFormat, HDEditorUtils.HumanizeWeight(currentCache), reserved); - EditorGUILayout.HelpBox(message, MessageType.Error); - } - else - { - string message = string.Format(Styles.cacheInfoFormat, HDEditorUtils.HumanizeWeight(currentCache)); - EditorGUILayout.HelpBox(message, MessageType.Info); - } + string message = string.Format(Styles.cacheInfoFormat, HDEditorUtils.HumanizeWeight(currentCache)); + EditorGUILayout.HelpBox(message, MessageType.Info); } EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen, Styles.maxPlanarReflectionOnScreen); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs index 8de7e0f0406..d551020e17c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs @@ -63,9 +63,6 @@ public LightCookieManager(HDRenderPipelineAsset hdAsset, int maxCacheSize) cookieFormat = (GraphicsFormat)gLightLoopSettings.cookieFormat; cookieAtlasLastValidMip = gLightLoopSettings.cookieAtlasLastValidMip; - if (PowerOfTwoTextureAtlas.GetApproxCacheSizeInByte(1, cookieAtlasSize, true, cookieFormat) > HDRenderPipeline.k_MaxCacheSize) - cookieAtlasSize = PowerOfTwoTextureAtlas.GetMaxCacheSizeForWeightInByte(HDRenderPipeline.k_MaxCacheSize, true, cookieFormat); - m_CookieAtlas = new PowerOfTwoTextureAtlas(cookieAtlasSize, gLightLoopSettings.cookieAtlasLastValidMip, cookieFormat, name: "Cookie Atlas (Punctual Lights)", useMipMap: true); m_CubeToPanoMaterial = CoreUtils.CreateEngineMaterial(hdResources.shaders.cubeToPanoPS); From e0f625b3a71e735534374f3353f1d1f1d5e5f71d Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Mon, 8 Jun 2020 16:12:37 +0200 Subject: [PATCH 186/200] Improve transition between LOD for lit and layeredLit tessellation #517 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Documentation~/Upgrading-from-2019.3-to-2020.1.md | 4 ++++ .../Runtime/Material/LayeredLit/LayeredLitData.hlsl | 3 ++- .../Material/LayeredLit/LayeredLitDataDisplacement.hlsl | 9 +++++++++ .../Runtime/Material/Lit/LitData.hlsl | 3 ++- .../Runtime/Material/Lit/LitDataDisplacement.hlsl | 6 ++++++ 6 files changed, 24 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 87d904a8dc9..5269d98f459 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Improved performance of reflection probe management when using a lot of probes. - MSAA Within Forward Frame Setting is now enabled by default on Cameras when new Render Pipeline Asset is created - Cloned volume profile from read only assets are created in the root of the project. (case 1154961) +- Lit and LayeredLit tessellation cross lod fade don't used dithering anymore between LOD but fade the tessellation height instead. Allow a smoother transition ## [8.1.0] - 2020-04-21 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md index aaf04d2c617..e954c92616a 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2019.3-to-2020.1.md @@ -2,6 +2,10 @@ In the High Definition Render Pipeline (HDRP), some features work differently between major versions of Unity. This document helps you upgrade HDRP from Unity 2019.3 to 2020.1. +## Mesh LOD Transition + +From Unity 2020.1, HDRP no longer uses dithering for the LOD crossfade transition between a LOD that uses a material with tessellation and a LOD that uses a material with no tessellation. Instead, HDRP smoothly decreases the tessellation displacement strength. This improves the transition between the first high-quality LOD with tessellation and a second mid-quality LOD without tessellation. The remaining transitions between non-tessellation materials still use dithering. + ## Scene View Camera Settings From Unity 2020.1, the HDRP-specific settings of the scene view camera (anti-aliasing mode and stop NaNs) can be found in the same pop-up window as the standard scene camera settings, which are accessible by clicking the scene camera button on the toolbar of the scene window. These settings were previously in the HDRP preferences window (Edit > Preferences). diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl index 821ee5814e8..1e00ee85b8b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitData.hlsl @@ -658,7 +658,8 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p input.texCoord1 = ((_UVMappingMask0.y + _UVMappingMask1.y + _UVMappingMask2.y + _UVMappingMask3.y + _UVDetailsMappingMask0.y + _UVDetailsMappingMask1.y + _UVDetailsMappingMask2.y + _UVDetailsMappingMask3.y) > 0) ? input.texCoord1 : 0; #endif -#ifndef SHADER_STAGE_RAY_TRACING +// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD) +#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT) #ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x); #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitDataDisplacement.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitDataDisplacement.hlsl index b408f25a983..2be0e26e622 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitDataDisplacement.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitDataDisplacement.hlsl @@ -307,6 +307,15 @@ float3 ComputePerVertexDisplacement(LayerTexCoord layerTexCoord, float4 vertexCo float height1 = (SAMPLE_UVMAPPING_TEXTURE2D_LOD(_HeightMap1, SAMPLER_HEIGHTMAP_IDX, layerTexCoord.base1, lod).r - _HeightCenter1) * _HeightAmplitude1; float height2 = (SAMPLE_UVMAPPING_TEXTURE2D_LOD(_HeightMap2, SAMPLER_HEIGHTMAP_IDX, layerTexCoord.base2, lod).r - _HeightCenter2) * _HeightAmplitude2; float height3 = (SAMPLE_UVMAPPING_TEXTURE2D_LOD(_HeightMap3, SAMPLER_HEIGHTMAP_IDX, layerTexCoord.base3, lod).r - _HeightCenter3) * _HeightAmplitude3; + + // Scale by lod factor to ensure tessellated displacement influence is fully removed by the time we transition LODs +#if defined(LOD_FADE_CROSSFADE) && defined(_TESSELLATION_DISPLACEMENT) + height0 *= unity_LODFade.x; + height1 *= unity_LODFade.x; + height2 *= unity_LODFade.x; + height3 *= unity_LODFade.x; +#endif + // Height is affected by tiling property and by object scale (depends on option). // Apply scaling from tiling properties (TexWorldScale and tiling from BaseColor) ApplyDisplacementTileScale(height0, height1, height2, height3); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl index c7ea5698d82..4c5d0df93c7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitData.hlsl @@ -186,7 +186,8 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p input.texCoord1 = (_UVMappingMask.y + _UVDetailsMappingMask.y) > 0 ? input.texCoord1 : 0; #endif -#if !defined(SHADER_STAGE_RAY_TRACING) +// Don't dither if displaced tessellation (we're fading out the displacement instead to match the next LOD) +#if !defined(SHADER_STAGE_RAY_TRACING) && !defined(_TESSELLATION_DISPLACEMENT) #ifdef LOD_FADE_CROSSFADE // enable dithering LOD transition if user select CrossFade transition in LOD group LODDitheringTransition(ComputeFadeMaskSeed(V, posInput.positionSS), unity_LODFade.x); #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataDisplacement.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataDisplacement.hlsl index d5203b67196..b2ccd968abf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataDisplacement.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitDataDisplacement.hlsl @@ -202,6 +202,12 @@ float3 ComputePerVertexDisplacement(LayerTexCoord layerTexCoord, float4 vertexCo { #ifdef _HEIGHTMAP float height = (SAMPLE_UVMAPPING_TEXTURE2D_LOD(_HeightMap, sampler_HeightMap, layerTexCoord.base, lod).r - _HeightCenter) * _HeightAmplitude; + + // Scale by lod factor to ensure tessellated displacement influence is fully removed by the time we transition LODs +#if defined(LOD_FADE_CROSSFADE) && defined(_TESSELLATION_DISPLACEMENT) + height *= unity_LODFade.x; +#endif + #else float height = 0.0; #endif From 03f53e18a47a9645a14c8995ac3eb729305d1335 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Mon, 18 May 2020 17:08:42 +0200 Subject: [PATCH 187/200] [9.x.x] Fix Microshadow not working properly with LightLayers enabled in deferred #522 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Material/Lit/Lit.hlsl | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 5269d98f459..bafdd048b3e 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error when undo a Reflection Probe removal in a prefab instance. (case 1244047) - Fixed various multi-editing issues when changing Emission parameters. - Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11 and Metal). +- Fixed Microshadow not working correctly in deferred with LightLayers ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings 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 1e856c8d89f..959efa32a01 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 @@ -195,11 +195,8 @@ float GetAmbientOcclusionForMicroShadowing(BSDFData bsdfData) { float sourceAO; #if (SHADERPASS == SHADERPASS_DEFERRED_LIGHTING) - // Note: In deferred pass we don't have space in GBuffer to store ambientOcclusion unless LIGHT_LAYERS is enabled - // so we use specularOcclusion instead - // The define LIGHT_LAYERS only exist for the GBuffer and the Forward pass. To avoid to add another - // variant to deferred.compute, we use dynamic branching instead with _EnableLightLayers. - sourceAO = _EnableLightLayers ? bsdfData.ambientOcclusion : bsdfData.specularOcclusion; + // Note: In deferred pass we don't have space in GBuffer to store ambientOcclusion so we use specularOcclusion instead + sourceAO = bsdfData.specularOcclusion; #else sourceAO = bsdfData.ambientOcclusion; #endif From 3c0f6293f1ad0c99a298a5243dd68c78981f3e15 Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Mon, 18 May 2020 09:46:37 +0200 Subject: [PATCH 188/200] Use path relative to package for depth of field #523 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute | 2 +- .../Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index bafdd048b3e..59143bb92bd 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed various multi-editing issues when changing Emission parameters. - Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11 and Metal). - Fixed Microshadow not working correctly in deferred with LightLayers +- Tentative fix for missing include in depth of field shaders. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute index 131772320c7..3a4f9e030fc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldGather.compute @@ -1,6 +1,6 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#include "DepthOfFieldCommon.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCommon.hlsl" #pragma only_renderers d3d11 playstation xboxone vulkan metal switch diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute index 2b0e724fbfd..108af07061b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute @@ -1,6 +1,6 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" -#include "DepthOfFieldCommon.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldCommon.hlsl" #pragma only_renderers d3d11 playstation xboxone vulkan metal switch From 736858c5f85990fb21db3ae6775bd816eea27ac3 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Mon, 18 May 2020 19:00:03 +0200 Subject: [PATCH 189/200] Add support for batchmode (#542) --- .../Editor/AssetProcessors/MaterialPostProcessor.cs | 2 +- .../Editor/BuildProcessors/HDRPPreprocessShaders.cs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs index dda018cf4e0..b3937f0bb78 100644 --- a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs @@ -67,7 +67,7 @@ static void RegisterUpgraderReimport() { string commandLineOptions = System.Environment.CommandLine; bool inTestSuite = commandLineOptions.Contains("-testResults"); - if (!inTestSuite && fileExist) + if (!inTestSuite && fileExist && !Application.isBatchMode) { EditorUtility.DisplayDialog("HDRP Material upgrade", "The Materials in your Project were created using an older version of the High Definition Render Pipeline (HDRP)." + " Unity must upgrade them to be compatible with your current version of HDRP. \n" + diff --git a/com.unity.render-pipelines.high-definition/Editor/BuildProcessors/HDRPPreprocessShaders.cs b/com.unity.render-pipelines.high-definition/Editor/BuildProcessors/HDRPPreprocessShaders.cs index e909aa04413..fddb336616d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/BuildProcessors/HDRPPreprocessShaders.cs +++ b/com.unity.render-pipelines.high-definition/Editor/BuildProcessors/HDRPPreprocessShaders.cs @@ -394,9 +394,15 @@ static void GetAllValidHDRPAssets() } // Prompt a warning if we find 0 HDRP Assets. - if (_hdrpAssets.Count == 0) + if (_hdrpAssets.Count == 0 && !Application.isBatchMode) + { if (EditorUtility.DisplayDialog("HDRP Asset missing", "No HDRP Asset has been set in the Graphic Settings, and no potential used in the build HDRP Asset has been found. If you want to continue compiling, this might lead to VERY long compilation time.", "Ok", "Cancel")) - throw new UnityEditor.Build.BuildFailedException("Build canceled"); + throw new UnityEditor.Build.BuildFailedException("Build canceled"); + } + else + { + Debug.LogWarning("There is no HDRP Asset provided in GraphicsSettings. Build time can be extremely long without it."); + } /* Debug.Log(string.Format("{0} HDRP assets in build:{1}", From 0e9793d25222ad8c6d047eeb4382c3c80aa016b8 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Tue, 19 May 2020 12:20:14 +0100 Subject: [PATCH 190/200] Update Reflection-Probes-Intro.md (#548) --- .../Documentation~/Reflection-Probes-Intro.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md index 1db5ae91b6b..1d779b8b855 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md @@ -11,4 +11,6 @@ The High Definition Render Pipeline (HDRP) allows you to use two different Refle To create a **Reflection Probe** in the Unity Editor, select **GameObject > Light > Reflection Probe** or **Planar Reflection Probe**. -You can customize the behavior of a Reflection Probe in the Inspector. Both types of HDRP Reflection Probe are separate components, but share many of the same properties. For information on each Reflection Probe’s properties, see the [Reflection Probe](Reflection-Probe.html) and [Planar Reflection Probe](Planar-Reflection-Probe.html) documentation. \ No newline at end of file +You can customize the behavior of a Reflection Probe in the Inspector. Both types of HDRP Reflection Probe are separate components, but share many of the same properties. For information on each Reflection Probe’s properties, see the [Reflection Probe](Reflection-Probe.html) and [Planar Reflection Probe](Planar-Reflection-Probe.html) documentation. + +To make sure HDRP does not apply post-processing effects twice, once in a Reflection Probe's capture and once in a Camera's capture of the reflection, HDRP does not apply post-processing to the Reflection Probe capture. \ No newline at end of file From 8b84ee23274cc1b769d0bf88d5f812a15002120c Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Fri, 22 May 2020 14:38:55 +0200 Subject: [PATCH 191/200] Hd/fix wizard defaultvolumeprofile creation #565 --- .../CHANGELOG.md | 1 + .../DefaultScene/HDWizard.Configuration.cs | 18 ++++++++++++++++-- .../Editor/DefaultScene/HDWizard.Window.cs | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 59143bb92bd..8297bbe8c0d 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11 and Metal). - Fixed Microshadow not working correctly in deferred with LightLayers - Tentative fix for missing include in depth of field shaders. +- Fixed Wizard check on default volume profile to also check it is not the default one in package. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Configuration.cs b/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Configuration.cs index 9c3d3962740..81526d8115c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Configuration.cs +++ b/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Configuration.cs @@ -460,7 +460,9 @@ bool IsDefaultVolumeProfileAssigned() return false; var hdAsset = HDRenderPipeline.currentAsset; - return hdAsset.defaultVolumeProfile != null && !hdAsset.defaultVolumeProfile.Equals(null); + return hdAsset.defaultVolumeProfile != null + && !hdAsset.defaultVolumeProfile.Equals(null) + && hdAsset.defaultVolumeProfile != hdAsset.renderPipelineEditorResources.defaultSettingsVolumeProfile; } void FixDefaultVolumeProfileAssigned(bool fromAsyncUnused) { @@ -471,7 +473,19 @@ void FixDefaultVolumeProfileAssigned(bool fromAsyncUnused) if (hdrpAsset == null) return; - EditorDefaultSettings.GetOrAssignDefaultVolumeProfile(hdrpAsset); + VolumeProfile defaultSettingsVolumeProfileInPackage = hdrpAsset.renderPipelineEditorResources.defaultSettingsVolumeProfile; + string defaultSettingsVolumeProfilePath = "Assets/" + HDProjectSettings.projectSettingsFolderPath + '/' + defaultSettingsVolumeProfileInPackage.name + ".asset"; + + //try load one if one already exist + VolumeProfile defaultSettingsVolumeProfile = AssetDatabase.LoadAssetAtPath(defaultSettingsVolumeProfilePath); + if (defaultSettingsVolumeProfile == null || defaultSettingsVolumeProfile.Equals(null)) + { + //else create it + AssetDatabase.CopyAsset(AssetDatabase.GetAssetPath(defaultSettingsVolumeProfileInPackage), defaultSettingsVolumeProfilePath); + defaultSettingsVolumeProfile = AssetDatabase.LoadAssetAtPath(defaultSettingsVolumeProfilePath); + } + hdrpAsset.defaultVolumeProfile = defaultSettingsVolumeProfile; + EditorUtility.SetDirty(hdrpAsset); } diff --git a/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs b/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs index 614da9582a7..e1f451f0171 100644 --- a/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs +++ b/com.unity.render-pipelines.high-definition/Editor/DefaultScene/HDWizard.Window.cs @@ -108,7 +108,7 @@ public ConfigStyle(string label, string error, string button = resolve, MessageT error: "Default scene prefab must be set to create HD templated scene!"); public static readonly ConfigStyle hdrpVolumeProfile = new ConfigStyle( label: "Default volume profile", - error: "Default volume profile must be assigned in the HDRP asset!"); + error: "Default volume profile must be assigned in the HDRP asset! Also, for it to be editable, it should be outside of package."); public static readonly ConfigStyle vrLegacyVRSystem = new ConfigStyle( label: "Legacy VR System", From ff5acb9a90c735ad404c200c6eaa1c1bbe8b784d Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Fri, 22 May 2020 16:48:56 +0100 Subject: [PATCH 192/200] Added note on decal emission on transparent surfaces (#567) * Update Decal-Projector.md * Update Decal-Projector.md * Update Decal-Projector.md --- .../Documentation~/Decal-Projector.md | 1 + 1 file changed, 1 insertion(+) 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 37ad65a2972..088a8523a98 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md @@ -45,4 +45,5 @@ Using the Inspector allows you to change all of the Decal Projector properties, ## Limitations - If you project a decal onto a transparent surface, HDRP ignores the decal's Texture tiling. +- When you project a decal onto a surface, the emissive component of the decal affects the surface regardless of whether you enable **Receive Decal** on the surface's Material or not. - In **Project Settings > Graphics**, if **Instancing Variants** is set to **Strip All**, Unity strips the Decal Shader this component references when you build your Project. This happens even if you include the Shader in the **Always Included Shaders** list. If Unity strips the Shader during the build process, the decal does not appear in your built Application. From ad2885bae880399c80f0b8bfffbff9a4bfee0e29 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Fri, 22 May 2020 15:43:52 +0100 Subject: [PATCH 193/200] Added terrain lit doc (#573) * Add terrain lit doc * Update HDRP-Features.md * Update HDRP-Features.md --- .../Documentation~/HDRP-Features.md | 3 +- .../Images/TerrainLitShader1.png | 3 ++ .../Documentation~/TableOfContents.md | 1 + .../Documentation~/Terrain-Lit-Shader.md | 46 +++++++++++++++++++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/TerrainLitShader1.png create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Terrain-Lit-Shader.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md index 73f8f3bbe18..e3c1be83a66 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md @@ -40,7 +40,6 @@ Use Volumes to localize environmental Scene settings and post-processing effects HDRP Shaders allow you to use the following features: - [Opaque/transparent surfaces](Surface-Type.md). - - Different blend modes for transparent surfaces. - Transparent surfaces that work with fog. - Refraction and distortion for transparent surfaces. @@ -116,7 +115,7 @@ The Decal Shader allows you to place decals on surfaces in your Scene. To apply ![](Images/HDRPFeatures-TerrainShader.png) -The Terrain Lit Shader is compatible with the built-in terrain system and supports up to eight layers in a single draw call. This Shader uses the same lighting model as the Lit Shader. +The Terrain Lit Shader is compatible with the built-in terrain system and supports up to eight layers in a single draw call. This Shader uses the same lighting model as the Lit Shader. For more information, including the full list of Shader properties, see the [Terrain Lit Shader documentation](Terrain-Lit-Shader.md). diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/TerrainLitShader1.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/TerrainLitShader1.png new file mode 100644 index 00000000000..930b14bca24 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/TerrainLitShader1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33e6168455c6873019999e3206267be8e3f7a93d6ef9e9d9c94c0c13949f2fbf +size 45539 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index da05f7f77b8..df166b11435 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -64,6 +64,7 @@ * [Layered Lit Shader](Layered-Lit-Shader) * [Lit Tessellation Shader](Lit-Tessellation-Shader) * [Lit Shader](Lit-Shader) + * [Terrain Lit Shader](Terrain-Lit-Shader.md) * [Unlit Shader](Unlit-Shader) * Shader Graph Master Nodes * [Customizing Materials Using Master Nodes](Customizing-HDRP-materials-with-Shader-Graph) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Terrain-Lit-Shader.md b/com.unity.render-pipelines.high-definition/Documentation~/Terrain-Lit-Shader.md new file mode 100644 index 00000000000..a2e5d3ac8db --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Terrain-Lit-Shader.md @@ -0,0 +1,46 @@ +# **Terrain Lit Shader** + +The High Definition Render Pipeline (HDRP) uses the Terrain Lit Shader for Unity Terrain. This Shader is a simpler version of the [Lit Shader](Lit-Shader.md). A Terrain can use a Terrain Lit Material with up to eight [Terrain Layers](https://docs.unity3d.com/Manual/class-TerrainLayer.html). + +![](Images/HDRPFeatures-TerrainShader.png) + +## Creating a Terrain Lit Material + +To create a new Terrain Lit Shader Material: + +1. Go to your Project window and right-click in the **Assets** folder +2. Select **Create > Material**. This adds a new Material to your Unity Project’s Asset folder. +3. Click on the Material to view it in the Inspector. +4. Click on the **Shader** drop-down and select **HDRP > TerrainLit**. + +## Using a Terrain Lit Material + +To use a Terrain Lit Material, you must assign it to a Terrain: + +1. View the Terrain in the Inspector and click on the cog button to go to the **Terrain Settings** section. +2. Either drag and drop or use the radio button to assign your Terrain Lit Material to the **Material** property. + +![](Images/TerrainLitShader1.png) + +## Material properties + +### Surface Options + +| **Property** | **Description** | +| ------------------ | ------------------------------------------------------------ | +| **Receive Decals** | Enable this checkbox to allow HDRP to draw decals on this Material’s surface. | + +### Terrain + +| **Property** | **Description** | +| ----------------------------- | ------------------------------------------------------------ | +| **Enable Height-based Blend** | Specifies whether HDRP should only render the Terrain Layer with the greatest height value for a particular pixel. When enabled, HDRP takes the height values from the blue channel of the **Mask Map** Texture. When disabled, HDRP blends the Terrain Layers based on the weights painted in the control map Textures. | +| **- Height Transition** | Controls how much HDRP blends the terrain if multiple Terrain Layers are approximately the same height. | +| **Enable Per-pixel Normal** | Specifies whether HDRP should sample the normal map Texture on a per-pixel level. When enabled, Unity preserves more geometry details for distant terrain parts. Unity generates a geometry normal map at runtime from the heightmap, rather than the Mesh geometry. This means you can have high-resolution Mesh normals, even if your Mesh is low resolution. It only works if you enable **Draw Instanced** on the terrain. | +| **Specular Occlusion Mode** | Sets the mode that HDRP uses to calculate specular occlusion.
• **Off**: Disables specular occlusion.
• **From Ambient Occlusion**: Calculates specular occlusion from the ambient occlusion map and the Camera's view direction. | + +### Advanced Options + +| **Property** | **Description** | +| ------------------------- | ------------------------------------------------------------ | +| **Enable GPU Instancing** | Enable this checkbox to tell HDRP to render meshes with the same geometry and Material/Shader in one batch when possible. This makes rendering faster. HDRP can not render Meshes in one batch if they have different Materials, or if the hardware does not support GPU instancing. | \ No newline at end of file From e25bebf9c195203427ce34212ce2b948320d49a5 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Sat, 23 May 2020 14:04:32 +0200 Subject: [PATCH 194/200] Fixed light layers not correctly disabled when the lightlayers is set to Nothing #584 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/Lighting/LightLoop/LightLoop.cs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 8297bbe8c0d..b5725b06523 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed Microshadow not working correctly in deferred with LightLayers - Tentative fix for missing include in depth of field shaders. - Fixed Wizard check on default volume profile to also check it is not the default one in package. +- Fixed light layers not correctly disabled when the lightlayers is set to Nothing and Lightlayers isn't enabled in HDRP Asset ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 1581bc42d14..1ca6843ed51 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -1163,7 +1163,7 @@ internal void GetDirectionalLightData(CommandBuffer cmd, HDCamera hdCamera, Visi var lightData = new DirectionalLightData(); - lightData.lightLayers = additionalLightData.GetLightLayers(); + lightData.lightLayers = hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers) ? additionalLightData.GetLightLayers() : uint.MaxValue; // Light direction for directional is opposite to the forward direction lightData.forward = light.GetForward(); @@ -1318,8 +1318,7 @@ internal void GetLightData(CommandBuffer cmd, HDCamera hdCamera, HDShadowSetting var lightData = new LightData(); var visibleLightAxisAndPosition = light.GetAxisAndPosition(); - - lightData.lightLayers = additionalLightData.GetLightLayers(); + lightData.lightLayers = hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers) ? additionalLightData.GetLightLayers() : uint.MaxValue; lightData.lightType = gpuLightType; @@ -1814,7 +1813,7 @@ internal bool GetEnvLightData(CommandBuffer cmd, HDCamera hdCamera, in Processed return false; InfluenceVolume influence = probe.influenceVolume; - envLightData.lightLayers = probe.lightLayersAsUInt; + envLightData.lightLayers = hdCamera.frameSettings.IsEnabled(FrameSettingsField.LightLayers) ? probe.lightLayersAsUInt : uint.MaxValue; envLightData.influenceShapeType = influence.envShape; envLightData.weight = processedProbe.weight; envLightData.multiplier = probe.multiplier * m_indirectLightingController.indirectSpecularIntensity.value; From facd3bdab521079cf323152949ed09b78a00eb67 Mon Sep 17 00:00:00 2001 From: JulienIgnace-Unity Date: Mon, 25 May 2020 13:35:40 +0200 Subject: [PATCH 195/200] Hdrp/fix camera switcher #591 --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + .../Runtime/Camera/CameraSwitcher.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 769ce63ed2f..fd2d3bec35e 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -21,6 +21,7 @@ The version number for this package has increased due to a version update of a r - Fix LookDev's layout vanishing on domain reload. - Fixed null reference exception in LookDev when setting the SRP to one not implementing LookDev (case 1245086) - Fix LookDev's undo/redo on EnvironmentLibrary (case 1234725) +- Fixed a wrong condition in CameraSwitcher, potentially causing out of bound exceptions. ## [8.0.1] - 2020-02-25 diff --git a/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs b/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs index 91754c7bdaf..8f8772bec44 100644 --- a/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs +++ b/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs @@ -89,7 +89,7 @@ Camera GetNextCamera() void SetCameraIndex(int index) { - if (index > 0 || index < GetCameraCount()) + if (index > 0 && index < GetCameraCount()) { m_CurrentCameraIndex = index; From 6d1b9668b3582c16fa1868c45eb1dd16d16e010a Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Tue, 26 May 2020 17:16:04 +0100 Subject: [PATCH 196/200] Added Lit master node doc (#613) --- .../Documentation~/Master-Node-Lit.md | 111 ++++++++++++++++++ .../Documentation~/TableOfContents.md | 1 + 2 files changed, 112 insertions(+) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Lit.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Lit.md b/com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Lit.md new file mode 100644 index 00000000000..86e814c1e11 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Lit.md @@ -0,0 +1,111 @@ +# Lit master node + +You can use the Lit master node to render custom physically based materials in the High Definition Render Pipeline (HDRP). It supports various effects, such as subsurface scattering, anisotropy, iridescence, specular color and translucency. + +The Lit master node is the destination node for the Lit Shader Graph. It contains ports that you can attach to other Shader Graph nodes so you can edit properties that control the appearance of the Material. To customize the Material, you must override the inputs attached to these slots with your own values. + +![](Images/HDRPFeatures-LitShader.png) + +## Creating and editing a Lit Material + +To create and edit a Material that uses this master node, see [Creating and Editing HDRP Shader Graphs](Customizing-HDRP-materials-with-Shader-Graph.md). When you create a Material from the Shader Graph, the properties that you exposed in the Blackboard appear in the **Exposed Properties** section. + +## Properties + +There are properties on the master node as well as properties on the Materials that use it. [Material properties](#material-inspector) are in the Inspector for Materials that use this Shader, and the master node properties are inside the Shader Graph itself in two sections: + +- [**Master node input ports**](#Master-node-input-ports): Shader Graph input ports on the master node itself. You can connect these ports to the output of other nodes or, in some cases, input your own values. +- [**Master node settings menu**](#Master-node-settings-menu): Settings you can use to customize your master node and expose more input ports. + +### Master node input ports + +The following table describes the input ports on a Lit master node, including the property type and Shader stage used for each port. For more information on Shader stages, see [Shader stage](https://docs.unity3d.com/Packages/com.unity.shadergraph@6.9/manual/Shader-Stage.html). + +| **Property** | **Type** | **Stage** | **Description** | +| --------------------------------------- | ----------------- | --------- | ------------------------------------------------------------ | +| **Vertex Position** | Vector 3 | Vertex | The object space position of the Material per vertex. | +| **Vertex Normal** | Vector 3 | Vertex | The object space normals of the Material per vertex. | +| **Vertex Tangent** | Vector 3 | Vertex | The object space tangent of the Material per vertex. | +| **Base Color** | Vector 3 | Fragment | The color of the Material. To assign an image, connect a sampled Texture2D to this Master Node. | +| **Normal** | Vector 3 | Fragment | The normal of the pixel.To modify the coordinate space, use the **Fragment Normal Space** setting. | +| **Bent Normal** | Vector 3 | Fragment | The [bent normal](Glossary.md#BentNormalMap) of the fragment. | +| **Subsurface Mask** | Vector 1 | Fragment | The strength of the screen-space blur effect across the Material.
This port only appears when you set **Material Type** to **Subsurface Scattering**. | +| **Tangent** | Vector 3 | | Assign a Texture that defines the direction of the anisotropy effect of a pixel, in tangent space. This stretches the specular highlights in the given direction.
This port only appears when you set **Material Type** to **Anisotropy**. | +| **Anisotropy** | Vector 1 | Fragment | This stretches the specular highlights in a given direction. Negative values make the effect vertical, and positive values make the effect horizontal.
This port only appears when you set **Material Type** to **Anisotropy**. | +| **Thickness** | Vector 1 | Fragment | The strength of the transmission effect. Higher values mean thicker areas, and thicker areas transmit less light. Expected range 0 - 1.
This port only appears when you set **Material Type** to **Subsurface Scattering** or **Translucent**. | +| **Diffusion Profile** | Diffusion Profile | Fragment | Specifies which [Diffusion Profile](Diffusion-Profile.md) the Material uses for subsurface scattering and/or transmission.
This port only appears when you set **Material Type** to **Subsurface Scattering** or **Translucent**. | +| **Iridescence Mask** | Vector 1 | Fragment | The strength of the iridescent effect.
This port only appears when you set **Material Type** to **Iridescence**. | +| **Iridescence Layer Thickness** | Vector 1 | Fragment | The thickness of the iridescence. This modifies the color of the effect.
This port only appears when you set **Material Type** to **Iridescence**. | +| **Specular Color** | Vector 3 | Fragment | The color of the specular highlight.
This port only appears when you set **Material Type** to **Specular Color**. | +| **Coat Mask** | Vector 1 | Fragment | This simulates a clear coat effect on the Material to mimic Materials like car paint or plastics. | +| **Metallic** | Vector 1 | Fragment | The metallic value of the material, 1 for metals and 0 for non metals. | +| **Smoothness** | Vector 1 | Fragment | Every light ray that hits a smooth surface bounces off at predictable and consistent angles. For a perfectly smooth surface that reflects light like a mirror, set this to a value of 1. Less smooth surfaces reflect light over a wider range of angles (because the light hits the bumps in the microsurface), so the reflections have less detail and spread across the surface in a more diffused pattern. | +| **Ambient Occlusion** | Vector 1 | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to **0** to remove all global illumination. | +| **Specular Occlusion** | Vector 1 | Fragment | A multiplier for the intensity of specular global illumination.
This port only appears when you set **Specular Occlusion Mode** to **Custom**. | +| **Emission** | Vector 3 | Fragment | The emission color and it’s intensity. | +| **Alpha** | Vector 1 | Fragment | Defines the Material's alpha value. Used for transparency and/or alpha clip. Expected range 0 - 1. | +| **Alpha Clip Threshold** | Vector 1 | Fragment | Set the alpha value limit that HDRP uses to determine whether it should render each pixel. If the alpha value of the pixel is equal to or higher than the limit then HDRP renders the pixel.
This port only appears when you enable the **Alpha Clipping** setting. | +| **Alpha Clip Threshold Depth Prepass** | Vector 1 | Fragment | Set the alpha value limit that HDRP uses for the Transparent depth prepass.
This port only appears when you set surface type to **Transparent** and enable the **Transparent Depth Prepass** setting. | +| **Alpha Clip Threshold Depth Postpass** | Vector 1 | Fragment | Set the alpha value limit that HDRP uses for the Transparent depth postpass.
This port only appears when you enable the **Transparent Depth Postpass** setting. | +| **Alpha Clip Threshold Shadow** | Vector 1 | Fragment | Set a separate threshold value for alpha clipping shadows.
This port only appears when you set surface type to **Transparent** and enable the **Alpha Clipping** and **Use Shadow Threshold** setting. | +| **Specular AA Screen Space Variance** | Vector 1 | Fragment | The strength of the [geometric specular anti-aliasing](Geometric-Specular-Anti-Aliasing.md) effect between 0 and 1. Higher values produce a blurrier result with less aliasing.
This port only appears when you enable the **Geometric Specular AA** setting. | +| **Specular AA Threshold** | Vector 1 | Fragment | The maximum value that HDRP subtracts from the smoothness value to reduce artifacts.
This port only appears when you enable the **Geometric Specular AA** setting. | +| **RefractionIndex** | | | The index of refraction defines the ratio between the speed of light in a vacuum and the speed of light in the medium of the Material. Higher values produce more intense refraction.
This port only appears when you set **Refraction Model** to a value other than **None**. | +| **Transmittance Color** | | | Refractive Materials can colorize light which passes through them. Use this input to define that color.
This port only appears when you set **Refraction Model** to a value other than **None**. | +| **Transmittance Absorption Distance** | | | Set the thickness of the object at which the Transmittance Color affects incident light at full strength.
This port only appears when you set **Refraction Model** to a value other than **None**. | +| **Distortion Vector** | Vector 2 | Fragment | Set the distortion vector for the light passing through the Material. This port only appears when you set **Surface Type** to **Transparent** and enable the **Distortion** setting. | +| **Distortion Blur** | Vector 1 | Fragment | Set the blur intensity for the distortion.
This port only appears when you set **Surface Type** to **Transparent** and enable the **Distortion** setting. | +| **Baked GI** | Vector 3 | Fragment | Replaces the built-in diffuse global illumination (GI) solution with a value that you can set. This is for the front [face](Glossary.md#Face) of the Mesh only.
This port only appears when you enable the **Override Baked GI** setting. | +| **Baked Back GI** | Vector 3 | Fragment | Replaces the built-in diffuse global illumination (GI) solution with a value that you can set. This is for the back [face](Glossary.md#Face) of the Mesh only.
This port only appears when you enable the **Override Baked GI** setting. | +| **Depth Offset** | Vector 1 | Fragment | The value that the Shader uses to increase the depth of the fragment by.
This port only appears when you enable the **Depth Offset** setting. | + +### Master node settings menu + +To view these properties, click the cog icon in the top right of the master node. + +| **Property** | **Description** | +| ------------------------------------ | ------------------------------------------------------------ | +| **Precision** | Select the precision of the calculations that the Shader processes. Lower precision calculations are faster but can cause issues, such as incorrect intensity for specular highlights.
• **Inherit**: Uses global precision settings. This is the highest precision setting, so using it does not result in any precision issues, but Shader calculations are slower than other values.
• **Float**: Uses single-precision floating-point instructions. This makes each calculation less resource-intensive, which speeds up calculations.
• **Half**: Uses half-precision floating-point instructions. This is the fastest precision level, which means that calculations that use it are the least resource-intensive to process. This precision setting is the most likely one to result in issues, such as quantization (banding) artifacts and intensity clipping. | +| **Surface Type** | Use the drop-down to define whether your Material supports transparency or not. Materials with the **Transparent Surface Type** are more resource intensive to render than Materials with the **Opaque** **Surface Type**. HDRP exposes more properties, depending on the **Surface Type** you select. For more information about the feature and for the list of properties each **Surface Type** exposes, see the [Surface Type documentation](Surface-Type.md). | +| **Rendering Pass** | Use the drop-down to set the rendering pass that HDRP processes this Material in.
• **Before Refraction**: Draws the GameObject before the refraction pass. This means that HDRP includes this Material when it processes refraction. To expose this option, select **Transparent** from the **Surface Type** drop-down.
• **Default**: Draws the GameObject in the default opaque or transparent rendering pass pass, depending on the **Surface Type**.
• **Low Resolution**: Draws the GameObject in half resolution after the **Default** pass.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Blending mode** | Use the drop-down to determine how HDRP calculates the color of each pixel of the transparent Material by blending the Material with the background pixels.
• **Alpha**: Uses the Material’s alpha value to change how transparent an object is. 0 is fully transparent. 1 appears fully opaque, but the Material is still rendered during the Transparent render pass. This is useful for visuals that you want to be fully visible but to also fade over time, like clouds.
• **Additive**: Adds the Material’s RGB values to the background color. The alpha channel of the Material modulates the intensity. A value of 0 adds nothing and a value of 1 adds 100% of the Material color to the background color.
• **Premultiply**: Assumes that you have already multiplied the RGB values of the Material by the alpha channel. This gives better results than **Alpha** blending when filtering images or composing different layers.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **- Preserve Specular Lighting** | Enable the checkbox to make alpha blending not reduce the intensity of specular highlights. This preserves the specular elements on the transparent surface, such as sunbeams shining off glass or water.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Sorting Priority** | Allows you to change the rendering order of overlaid transparent surfaces. For more information and an example of usage, see the [Material sorting documentation](Renderer-And-Material-Priority.md#SortingByMaterial).
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Receive Fog** | Enable the checkbox to allow fog to affect the transparent surface. When disabled, HDRP does not take this Material into account when it calculates the fog in the Scene.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Back Then Front Rendering** | Enable the checkbox to make HDRP render this Material in two separate draw calls. HDRP renders the back face in the first draw call and the front face in the second.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Transparent Depth Prepass** | Enable the checkbox to add polygons from the transparent surface to the depth buffer to improve their sorting. HDRP performs this operation before the lighting pass and this process improves GPU performance.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Transparent Depth Postpass** | Enable the checkbox to add polygons to the depth buffer that post-processing uses. HDRP performs this operation before the lighting pass. Enabling this feature is useful if you want to use post-processing effects that use depth information, like [motion blur](Post-Processing-Motion-Blur.md) or [depth of field](Post-Processing-Depth-of-Field.md).
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Transparent Writes Motion Vector** | Enable the checkbox to make HDRP write motion vectors for transparent GameObjects that use this Material. This allows HDRP to process effects like motion blur for transparent objects. For more information on motion vectors, see the [motion vectors documentation](Motion-Vectors.md).
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Refraction Model** | Use the drop-down to select the model that HDRP uses to process refraction.
• **None**: No refraction occurs. Select this option to disable refraction.
• **Box**: A box-shaped model where incident light enters through a flat surface and leaves through a flat surface. Select this option for hollow surfaces.
• **Sphere**: A sphere-shaped model that produces a magnifying glass-like effect to refraction. Select this option for solid surfaces.
• **Thin**: A thin box surface type, equivalent to Box with a fixed thickness of 5cm. Select this for thin window-like surfaces.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Distortion** | Enable the checkbox to distort the light passing through this transparent Material.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **- Distortion Blend Mode** | Set the mode HDRP uses to blend overlaid distortion surfaces.
This setting only appears when you set **Surface Type** to **Transparent** and enable the **Distortion** setting. | +| **- Distortion Depth Test** | Check this box to make GameObjects that are closer to the Camera hide the distortion effect, otherwise you can always see the effect. If you do not enable this feature then the distortion effect appears on top of the rendering.
This setting only appears when you set **Surface Type** to **Transparent** and enable the **Distortion** setting. | +| **Depth Write** | Enable the checkbox to make HDRP write depth values for transparent GameObjects that use this Material.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Cull Mode** | Use the drop-down to select which face to cull for transparent GameObjects that use this Material. To expose this option, select **Transparent** from the **Surface Type** drop-down.
• **Front:** Culls the front face of the geometry.
• **Back:** Culls the back face of the geometry.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Depth Test** | Unity uses DepthTest when rendering an object, to check if it is behind another object. Unity does this by testing the z-value of a given Objects pixel and comparing against a value stored in the depth buffer. By default, DepthTest is set to Less Equal, allowing the original object to appear in front of the object it is tested against. Use the drop-down to select the comparison function to use for the depth test. Each comparison function changes how the Shader renders. To expose this option, select Transparent from the Surface Type drop-down.
• **Disabled**: Do not perform a depth test.
• **Never**: The depth test never passes.
• **Less**: The depth test passes if the pixel's z-value is less than the stored value.
• **Equal**: The depth test passes if the pixel's z-value is equal to the stored value.
• **Less Equal**: The depth test passes if the pixel's z-value is less than or equal than the Z-buffers value. This renders the tested pixel in front of the other.
• **Greater**: The depth test passes if the pixel's z-value is greater than the stored value.
• **Not Equal**: The depth test passes if the pixel's z-value is not equal to the stored value.
• **Greater Equal**: The depth test passes if the pixel's z-value is greater than or equal to the stored value.
• **Always**: The depth test always passes, there is no comparison to the stored value.
This setting only appears when you set **Surface Type** to **Transparent.** | +| **Double Sided** | Enable this setting to make HDRP render both faces of the polygons in your geometry. For more information about the feature and for the list of properties this feature exposes, see the [Double-Sided documentation](Double-Sided.md). | +| **Fragment Normal Space** | Use this drop-down to select the type of Normal Map space that this Material uses.
• **TangentSpace:** Defines the normals in [tangent space](Glossary.html#TangentSpaceNormalMap). Use this to tile a Texture on a Mesh. The normal map Texture must be BC7, BC5, or DXT5nm format.
• **ObjectSpace:** Defines the normals in [object space](Glossary.md#ObjectSpaceNormalMap). Use this for planar-mapping GameObjects like the terrain. The normal map must be an RGB Texture .
• **WorldSpace:** Defines the normal maps in world space. | +| **Alpha Clipping** | Enable this setting to make this Material act like a Cutout Shader. HDRP then discards pixels with an alpha value below the **Threshold** value. | +| **Use Shadow Threshold** | Enable this setting to set another threshold value for alpha clipping shadows. | +| **Material Type** | The **Material Type** property allows you to give your Material a type, which allows you to customize it with different settings depending on the **Material Type** you select. For information on the available Material Types, see [Material Type](Material-Type.md). | +| **Transmission** | Enable the checkbox to make HDRP simulate the translucency of an object using a thickness map. Configure subsurface scattering and transmission settings using a [Diffusion Profile](Diffusion-Profile.md). For more information, see documentation on [Subsurface Scattering](Subsurface-Scattering.md).
This setting only appears when you set **Material Type** to **Subsurface Scattering** | +| **Energy Conserving Specular** | Enable the checkbox to make HDRP reduce the diffuse color of the Material if the specular effect is more intense. This makes the lighting of the Material more consistent, which makes the Material look more physically accurate.
This port only appears when you set **Material Type** to **Specular Color** | +| **Receive Decals** | Enable this setting to allow HDRP to draw decals on this Material’s surface. | +| **Receive SSR** | Enable this setting to make HDRP include this Material when it processes the screen space reflection pass. | +| **Add Precomputed Velocity** | Enable this setting to use precomputed velocity information stored in an Alembic file. | +| **Geometric Specular AA** | Enable this setting to make HDRP perform geometric anti-aliasing on this Material. This modifies the smoothness values on surfaces of curved geometry to remove specular artifacts. For more information about the feature and for the list of properties this feature exposes, see the [Geometric Specular Anti-aliasing documentation](Geometric-Specular-Anti-Aliasing.md). | +| **Specular Occlusion Mode** | Set the mode that HDRP uses to calculate specular occlusion.
• **Off**: Disables specular occlusion.
• **From AO**: Calculates specular occlusion from the ambient occlusion map and the Camera's view vector.
• **From AO and Bent Normal**: Calculates specular occlusion from the ambient occlusion map, the bent normal map, and the Camera's view vector.
• **Custom**: Allows you to specify your own specular occlusion values. | +| **Override Baked GI** | Enable this setting to expose two baked GI [input ports](#Master-node-input-ports). This makes this Materials ignore global illumination in your Scene and, instead, allows you to provide your own global illumination values and customize the way this Material looks. | +| **Depth Offset** | Enable this setting to expose the **DepthOffset** [InputPort](#Master-node-input-ports) which you can use to increase the depth value of the fragment and push it away from the Camera. | +| **DOTS instancing** | Enable GPU Instancing for use with the Hybrid Renderer. | +| **Support LOD CrossFade** | Indicates whether HDRP processes dithering when moving from one LOD level to another when sampling Textures. | + +### Material Inspector + +These properties are in the **Exposed Properties** section of the Inspector and sit alongside the properties that you exposed in the Shader Graph's Blackboard. If you set **Override ShaderGUI** to `true`, the Material Properties section does not appear, and instead, the ShaderGUI you specified appears. + +| **Property** | **Description** | +| -------------------------------------- | ------------------------------------------------------------ | +| **Enable GPU Instancing** | Enable this setting to tell HDRP to render Meshes with the same geometry and Material in one batch when possible. This makes rendering faster. HDRP cannot render Meshes in one batch if they have different Materials, or if the hardware does not support GPU instancing. For example, you can not [static-batch](https://docs.unity3d.com/Manual/DrawCallBatching.html) GameObjects that have an animation based on the object pivot, but the GPU can instance them. | +| **Emission** | Defines the Material's emission color value. Expects positive values. | +| **Motion Vector For Vertex Animation** | Indicates whether HDRP should evaluate motion vectors for animation. | \ No newline at end of file diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index df166b11435..2b69e9a4776 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -71,6 +71,7 @@ * [Decal](Master-Node-Decal) * [Fabric](Master-Node-Fabric) * [Hair](Master-Node-Hair) + * [Lit](Master-Node-Lit) * [Unlit](Master-Node-Unlit) * Shader Graph Nodes * [Emission](SGNode-Emission) From 21ccf27778a6baf68b98faea98eb3f8ffde52419 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Sat, 6 Jun 2020 01:32:45 +0100 Subject: [PATCH 197/200] Hdrp/docs/volumetric lighting format fix (#628) * Updated volumetric lighting and subsurface scattering docs * Update Override-Diffusion-Profile.md --- .../Documentation~/Diffusion-Profile.md | 15 ++++++++++----- .../Images/VolumetricLighting1.png | 3 --- .../Images/VolumetricLighting2.png | 3 --- .../Documentation~/Override-Diffusion-Profile.md | 2 +- .../Documentation~/Subsurface-Scattering.md | 16 ++++++++-------- .../Documentation~/Volumetric-Lighting.md | 12 +++++------- 6 files changed, 24 insertions(+), 27 deletions(-) delete mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting1.png delete mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting2.png 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 09d6da2ae7d..8c85dcee955 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Diffusion-Profile.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Diffusion-Profile.md @@ -1,8 +1,13 @@ # Diffusion Profile -The High Definition Render Pipeline (HDRP) stores most [subsurface scattering](Subsurface-Scattering.html) 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__. To use it, open your HDRP Asset and add it to the __Diffusion Profile List__ property. +To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffusion Profile__. + +* To use it by default, open your HDRP Asset and, in the **Material** section, add it to the __Diffusion Profile List__. +* To use it in a particular [Volume](Volumes.md), select a Volume with a [Diffusion Profile Override](Override-Diffusion-Profile.md) and add it to the **Diffusion Profile List** . + +## Properties | Property| Description | |:---|:---| @@ -14,7 +19,7 @@ To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffu -## Subsurface Scattering only +### Subsurface Scattering only | Property| Description | |:---|:---| @@ -22,7 +27,7 @@ To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffu -## Transmission only +### Transmission only | Property| Description | |:---|:---| @@ -33,7 +38,7 @@ To create a Diffusion Profile, navigate to __Assets > Create > Rendering > Diffu -## Profile Previews +### Profile Previews | Property| Description | |:---|:---| diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting1.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting1.png deleted file mode 100644 index 2e653c96395..00000000000 --- a/com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e93f3e969405031a0b0ab665441d433350ee4560108b83e35fa8ecc9ab3b1750 -size 5823 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting2.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting2.png deleted file mode 100644 index e410c9c1561..00000000000 --- a/com.unity.render-pipelines.high-definition/Documentation~/Images/VolumetricLighting2.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c9e453bbd6f2834915a61cb6e6be8abcee01dc6ec3814184a4b73761ad8c8597 -size 20335 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md b/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md index c315b00fc1f..23aff332e11 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md @@ -1,6 +1,6 @@ # Diffusion Profile Override -The High Definition Render Pipeline (HDRP) allows you to use up to 15 [Diffusion Profiles](Diffusion-Profile.html) in view at the same time. To use more than 15 Diffusion Profiles in a Scene, you can use the **Diffusion Profile Override** inside a [Volume](Volumes.html). This allows you to specify which Diffusion Profile to use in a certain area (or in the Scene if the Volume is global). +The High Definition Render Pipeline (HDRP) allows you to use up to 15 custom [Diffusion Profiles](Diffusion-Profile.md) in view at the same time. To use more than 15 custom Diffusion Profiles in a Scene, you can use the **Diffusion Profile Override** inside a [Volume](Volumes.md). This allows you to specify which Diffusion Profiles to use in a certain area (or in the Scene if the Volume is global). ## Using a Diffusion Profile Override diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Subsurface-Scattering.md b/com.unity.render-pipelines.high-definition/Documentation~/Subsurface-Scattering.md index 1ec53d0a336..ca59614540c 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Subsurface-Scattering.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Subsurface-Scattering.md @@ -4,20 +4,20 @@ __Subsurface Scattering__ handles light that penetrates and moves within the are Subsurface scattering also handles the light that penetrates GameObjects from behind and makes those GameObjects look transparent. For certain types of objects, the screen-space blur effect may not make a large visual difference. Therefore, HDRP implements two material types: -* __Subsurface Scattering__ implements both the screen-space blur effect and transmission (you can disable the latter) +* __Subsurface Scattering__ implements both the screen-space blur effect and transmission (you can disable the latter). * __Translucent__ only models transmission. ## Enabling Subsurface Scattering -To enable subsurface scattering in your [HDRP Asset](HDRP-Asset.html): +To enable subsurface scattering in your [HDRP Asset](HDRP-Asset.md): -- In the HDRP Asset’s Inspector window, navigate to the __Material__ section and enable the __Subsurface Scattering__ checkbox. -- When you enable the __Subsurface Scattering__ checkbox, HDRP displays the __High Quality__ option. You can Enable the checkbox to increase the sample count and reduce the amount of visual noise the blur pass can cause by undersampling. Note that this is around two and a half times more resource intensive than the default quality. -- Within the __HDRP Asset__, locate the __Default Frame Settings__. Under the __Lighting__ section, enable __Subsurface Scattering__ and __Transmission__. +1. In the HDRP Asset’s Inspector window, go to the __Material__ section and enable the __Subsurface Scattering__ checkbox. +2. When you enable the __Subsurface Scattering__ checkbox, HDRP displays the __High Quality__ option. You can Enable this option to increase the sample count and reduce the amount of visual noise the blur pass can cause by under sampling. Note that this is around two and a half times more resource intensive than the default quality. +3. Go to **Edit > Project Settings > HDRP Default Settings** and, in the **Default Frame Settings** section, under the __Lighting__ subsection, enable __Subsurface Scattering__ and __Transmission__. -HDRP stores most subsurface scattering settings in a [Diffusion Profile Settings](Diffusion-Profile.html) Asset. The __Diffusion Profile List Asset__ contains a set of 15 Diffusion Profiles you can edit and later assign to your Materials. +HDRP stores most subsurface scattering settings in a [Diffusion Profile](Diffusion-Profile.md). HDRP supports up to 15 custom Diffusion Profiles in view at the same time, but you can override which Diffusion Profiles HDRP uses and thus use as many Diffusion Profiles as you want throughout your project. To do this, use the [Diffusion Profile Override](Override-Diffusion-Profile.md) in the [Volume](Volumes.md) system. This [override](Volume-Components.md) lets you specify 15 custom Diffusion Profiles which HDRP can use for a Camera within the override's Volume. -To create a Diffusion Profile Asset, navigate to __Assets > Create > Rendering > Diffusion Profile Settings__. To use it, open your HDRP Asset and assign the new Diffusion Profile Asset to the __Diffusion Profile List__ property. +For information on how to create and use a Diffusion Profile, see the [Diffusion Profile documentation](Diffusion-Profile.md) ## Adding Subsurface Scattering to your Material @@ -27,6 +27,6 @@ For the __Subsurface Scattering__ material type, uncheck the __Transmission__ ch ### Customizing Subsurface Scattering behavior -When you select __Subsurface Scattering__ or __Translucent__ from the __Material Type__ drop-down, Unity exposes several new properties in the Material UI. For information on how to use these properties to customize the behavior of the subsurface scattering effect, see the [Material Type documentation](Material-Type.html). +When you select __Subsurface Scattering__ or __Translucent__ from the __Material Type__ drop-down, Unity exposes several new properties in the Material UI. For information on how to use these properties to customize the behavior of the subsurface scattering effect, see the [Material Type documentation](Material-Type.md). You can learn more about HDRP’s implementation in our [Efficient Screen-Space Subsurface Scattering](http://advances.realtimerendering.com/s2018/Efficient%20screen%20space%20subsurface%20scattering%20Siggraph%202018.pdf) presentation. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md b/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md index bdf941ed394..f327f6ebe43 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Volumetric-Lighting.md @@ -4,14 +4,12 @@ The High Definition Render Pipeline (HDRP) includes a volumetric lighting system ## Enabling Volumetric Lighting -To toggle and customize Volumetric Lighting in an [HDRP Asset](HDRP-Asset.html): +To enable and customize Volumetric Lighting in an [HDRP Asset](HDRP-Asset.md): -1. Open an HDRP Asset in your Unity Project and view it in the Inspector. Enable the **Volumetrics** checkbox in the **Lighting** section to enable Volumetric Lighting. - ![](Images/VolumetricLighting1.png) -2. If you want to increase the resolution of the volumetrics, enable the **High Quality** checkbox. Volumetric lighting is an expensive effect, and this option can potentially increase the cost of volumetric lighting by up to eight times. -3. In the **Default Frame Settings** section, under the **Lighting** subsection, make sure you enable **Fog** and **Volumetric** if they are not already. - ![](Images/VolumetricLighting2.png) -4. If you want to enable reprojection support, check **Reprojection**. This option improves the lighting quality in the Scene by taking previous frames into account when calculating the lighting for the current frame. Currently, this option is not compatible with dynamic lights, so you may encounter ghosting artifacts behind moving Lights. Additionally, using high values for **Global Anisotropy** in the [Fog](Override-Fog.html) Volume override may cause flickering Shadows. +1. Select an HDRP Asset in your Unity Project and view it in the Inspector. In the **Lighting** section, enable the **Volumetrics** checkbox. +2. If you want to increase the resolution of the volumetrics, enable the **High Quality** checkbox. Volumetric lighting is a resource intensive effect and this option can potentially increase the resource intensity by up to eight times. +3. Go to **Edit > Project Settings > HDRP Default Settings** and, in the **Default Frame Settings** section, under the **Lighting** subsection, make sure you enable **Fog** and **Volumetrics** if they are not already. +4. Still in **Default Frame Settings**, if you want to enable reprojection support, enable **Reprojection**. This option improves the lighting quality in the Scene by taking previous frames into account when calculating the lighting for the current frame. Currently, this option is not compatible with dynamic lights, so you may encounter ghosting artifacts behind moving Lights. Additionally, using high values for **Anisotropy** in the [Fog](Override-Fog.md) Volume override may cause flickering Shadows. ## Notes Volumetric fog does not work for Cameras that use oblique projection matrices. If you want a Camera to render volumetric fog, do not assign an off-axis projection to it. \ No newline at end of file From 320da20905967e726d6c7b22fe314b663660f8f4 Mon Sep 17 00:00:00 2001 From: JordanL8 Date: Sat, 6 Jun 2020 01:33:09 +0100 Subject: [PATCH 198/200] Adds mention of fidelityfx-cas as requested by AMD (#629) --- .../Documentation~/HDRP-Asset.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md index 73ff57b6263..fae814bece9 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md @@ -75,7 +75,7 @@ These settings control the draw distance and resolution of the decals atlas that | ------------------------------- | ------------------------------------------------------------ | | **Enable** | Enable the checkbox to make HDRP support dynamic resolution in your Unity Project. | | **- Dynamic Resolution Type** | Use the drop-down to select the type of dynamic resolution HDRP uses:
• **Software**: This option allocates render targets to accommodate the maximum resolution possible, then rescales the viewport accordingly. This allows the viewport to render at varying resolutions. | -| **- Upscale Filter** | Use the drop-down to select the filter that HDRP uses for upscaling.
• **Bilinear**: A low quality upsample. The least resource intensive option.
• **Catmull-Rom**: A bicubic upsample with 4 taps.
• **Lanczos**: A sharp upsample. This method can potentially introduce artifacts so you should not use it for extreme upsampling cases for example, when the screen percentage is less than 50%.
• **Contrast Adaptive Sharpen**: An ultra sharp upsample. Not meant for screen percenatage less than 50% and will still sharpen when screen percentage is set to 100% | +| **- Upscale Filter** | Use the drop-down to select the filter that HDRP uses for upscaling.
• **Bilinear**: A low quality upsample. The least resource intensive option.
• **Catmull-Rom**: A bicubic upsample with 4 taps.
• **Lanczos**: A sharp upsample. This method can potentially introduce artifacts so you should not use it for extreme upsampling cases for example, when the screen percentage is less than 50%.
• **Contrast Adaptive Sharpen**: An ultra sharp upsample. This option is not meant for screen percentages less than 50% and still sharpens when the screen percentage is set to 100%. This uses **FidelityFX (CAS) AMD™**. For information about FidelityFX and Contrast Adaptive Sharpening, see [AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx). | | **- Minimum Screen Percentage** | The minimum screen percentage that dynamic resolution can reach. | | **- Maximum Screen Percentage** | The maximum screen percentage that dynamic resolution can reach. This value must be higher than the **Min Screen Percentage**. | | **- Force Screen Percentage** | Enable the checkbox to force HDRP to use a specific screen percentage for dynamic resolution. This feature is useful for debugging dynamic resolution. | From 97221a8ff107f85cea60ce5368998af846aa4552 Mon Sep 17 00:00:00 2001 From: thomas-zeng <49886741+thomas-zeng@users.noreply.github.com> Date: Fri, 5 Jun 2020 17:34:38 -0700 Subject: [PATCH 199/200] * Updated XR mirrorview logic to use `TryGetAdditionalCameraDataOrDefault`. (#641) --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 b625cae91e5..e0b5fe2d06b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1887,9 +1887,8 @@ ref _cullingResults // Render XR mirror view once all render requests have been completed if (i == 0 && renderRequest.hdCamera.camera.cameraType == CameraType.Game && renderRequest.hdCamera.camera.targetTexture == null) - { - HDAdditionalCameraData acd; - if (renderRequest.hdCamera.camera.TryGetComponent(out acd) && acd.xrRendering) + { + if (HDUtils.TryGetAdditionalCameraDataOrDefault(renderRequest.hdCamera.camera).xrRendering) { m_XRSystem.RenderMirrorView(cmd); } From 1fbe59dec423eb5365602884ed3e05830c234add Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 7 Jul 2020 07:39:49 +0200 Subject: [PATCH 200/200] Revert: Fixed an error about procedural sky being logged by mistake. #273 --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 - .../Runtime/Sky/VisualEnvironment.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b5725b06523..cae2ea33570 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -23,7 +23,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a performance issue with stochastic ray traced area shadows. - Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. - Fixed a null ref exception in static sky when the default volume profile is invalid. -- Fixed an error about procedural sky being logged by mistake. - Fixed flickering of the game/scene view when lookdev is running. - Fixed some GCAlloc in the debug window. - Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs index 94618852e64..531e03b333f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/VisualEnvironment.cs @@ -11,7 +11,7 @@ namespace UnityEngine.Rendering.HighDefinition public sealed class VisualEnvironment : VolumeComponent { /// Type of sky that should be used for rendering. - public NoInterpIntParameter skyType = new NoInterpIntParameter(0); + public IntParameter skyType = new IntParameter(0); /// Defines the way the ambient probe should be computed. public SkyAmbientModeParameter skyAmbientMode = new SkyAmbientModeParameter(SkyAmbientMode.Static);