From 09ebac45ebf958f7a751445ccf64a7aaad4a0811 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Sat, 14 Feb 2026 01:12:55 +0000 Subject: [PATCH 01/16] [Port] [6000.4] [URP][UUM-124869] Fix Decal Hierarchy Scene and Game View visibilty --- .../Runtime/Decal/DecalProjector.cs | 33 ++++++++++++------- .../Decal/Entities/DecalEntityManager.cs | 6 ++++ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs index 710a8fe18a0..97ba722c212 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs @@ -247,6 +247,23 @@ public float fadeFactor } } +#if UNITY_EDITOR + [SerializeField] + private bool m_VisibleInScene = true; + public bool visibleInScene + { + get + { + return m_VisibleInScene; + } + set + { + m_VisibleInScene = value; + OnValidate(); + } + } +#endif + private Material m_OldMaterial = null; private float m_OldDrawDistance = 1000.0f; private float m_OldFadeScale = 0.9f; @@ -295,18 +312,12 @@ void OnEnable() #if UNITY_EDITOR void UpdateDecalVisibility() { - // Fade out the decal when it is hidden by the scene visibility - if (UnityEditor.SceneVisibilityManager.instance.IsHidden(gameObject)) - { - onDecalRemove?.Invoke(this); - } - else - { - onDecalAdd?.Invoke(this); - onDecalPropertyChange?.Invoke(this); // Scene culling mask may have changed. - } - } + // Change serialized property when decal is hidden in scene + visibleInScene = !UnityEditor.SceneVisibilityManager.instance.IsHidden(gameObject); + // Force proeprty update that will look at visibleInScene to adjust scene culling mask + onDecalPropertyChange?.Invoke(this); + } #endif void OnDisable() diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/Entities/DecalEntityManager.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/Entities/DecalEntityManager.cs index 8d29ccd21cb..bb4a057f9bc 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/Entities/DecalEntityManager.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/Entities/DecalEntityManager.cs @@ -343,7 +343,13 @@ public void UpdateDecalEntityData(DecalEntity decalEntity, DecalProjector decalP float endAngleFade = decalProjector.endAngleFade; Vector4 uvScaleBias = decalProjector.uvScaleBias; int layerMask = decalProjector.gameObject.layer; +#if UNITY_EDITOR + // instead of removing decal altogether, set scene culling mask to game view only if !visibleInScene + ulong sceneLayerMask = decalProjector.visibleInScene ? decalProjector.gameObject.sceneCullingMask : + UnityEditor.SceneManagement.SceneCullingMasks.GameViewObjects; +#else ulong sceneLayerMask = decalProjector.gameObject.sceneCullingMask; +#endif float fadeFactor = decalProjector.fadeFactor; cachedChunk.drawDistances[arrayIndex] = new Vector2(drawDistance, fadeScale); From a6c3a245f90f059074121ee2df29196775476c45 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Mon, 16 Feb 2026 22:16:08 +0000 Subject: [PATCH 02/16] [Port] [6000.4] docg-8422: Remove deprecated link --- .../Documentation~/getting-started-in-hdrp.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/getting-started-in-hdrp.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/getting-started-in-hdrp.md index 036be6fb1f3..c026620fec1 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/getting-started-in-hdrp.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/getting-started-in-hdrp.md @@ -10,4 +10,3 @@ Set up a project to use the High Definition Render Pipeline (HDRP), and use Volu ## Additional resources - [HDRP overview](HDRP-Features.md) -- [Achieving High Fidelity Graphics for Games with HDRP](https://resources.unity.com/unitenow/onlinesessions/achieving-high-fidelity-graphics-for-games-with-hdrp) From 91f4a061dc209c02accff634441f3628dc9a8f4a Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Mon, 16 Feb 2026 22:16:08 +0000 Subject: [PATCH 03/16] [Port] [6000.4] [HDRP] Fix flickering regression in volumetric clouds with alpha clipped geometry --- .../VolumetricClouds/VolumetricClouds.compute | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricClouds/VolumetricClouds.compute b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricClouds/VolumetricClouds.compute index 80b8c9e3e49..9e44c083f7c 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricClouds/VolumetricClouds.compute +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricClouds/VolumetricClouds.compute @@ -96,22 +96,41 @@ void REPROJECT_CLOUDS(uint3 dispatchThreadId : SV_DispatchThreadID, float validityFactor = 1.0; #ifdef WITH_REJECTION + + bool currentIsSky = currentSceneDepth == UNITY_RAW_FAR_CLIP_VALUE; + float4 lightingMin = float4(FLT_MAX, FLT_MAX, FLT_MAX, 1.0); float4 lightingMax = float4(0, 0, 0, 0.0); - for (int y = -1; y <= 1; ++y) + + int skySampleCount = 0; + if(currentIsSky) { - for (int x = -1; x <= 1; ++x) + for (int y = -1; y <= 1; ++y) { - CloudReprojectionData data = GetCloudReprojectionDataSample(threadCoord, int2(x, y)); - if ((data.pixelDepth == UNITY_RAW_FAR_CLIP_VALUE) == (currentSceneDepth == UNITY_RAW_FAR_CLIP_VALUE)) + for (int x = -1; x <= 1; ++x) { - lightingMin = min(lightingMin, data.cloudLighting); - lightingMax = max(lightingMax, data.cloudLighting); + CloudReprojectionData data = GetCloudReprojectionDataSample(threadCoord, int2(x, y)); + bool sampleIsSky = data.pixelDepth == UNITY_RAW_FAR_CLIP_VALUE; + + if (sampleIsSky) + { + lightingMin = min(lightingMin, data.cloudLighting); + lightingMax = max(lightingMax, data.cloudLighting); + skySampleCount++; + } } } + + // Only apply clamping if we have enough sky samples (at least 5 out of 9) + if (skySampleCount >= 5) + { + // Modulate validity factor based on sky sample ratio, the more samples are sky, the more ghosting reduction + float skyRatio = skySampleCount / 9.0; + previousColor = ClipCloudsToRegion(previousColor, lightingMin, lightingMax, skyRatio); + validityFactor *= skyRatio; + } } - previousColor = ClipCloudsToRegion(previousColor, lightingMin, lightingMax, validityFactor); #endif if (validTracing) From 85ee739b00fc149ad1e81e6e5f55a6ee02fc0bf8 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Mon, 16 Feb 2026 22:16:08 +0000 Subject: [PATCH 04/16] [Port] [6000.4] [PS5, PS4] Fix built-in RP warnings when using shadergraph shaders on PS4 or PS5 --- .../BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl index 27b5d3eba3a..9afdfcea44b 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/HLSLSupportShim.hlsl @@ -16,12 +16,19 @@ #define SHADOWS_NATIVE +#undef fixed #define fixed real +#undef fixed2 #define fixed2 real2 +#undef fixed3 #define fixed3 real3 +#undef fixed4 #define fixed4 real4 +#undef fixed4x4 #define fixed4x4 real4x4 +#undef fixed3x3 #define fixed3x3 real3x3 +#undef fixed2x2 #define fixed2x2 real2x2 #define UNITY_INITIALIZE_OUTPUT(type,name) ZERO_INITIALIZE(type, name) From 8785a512abfe9740b815167046679a6b42054deb Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Tue, 17 Feb 2026 23:10:47 +0000 Subject: [PATCH 05/16] [Port] [6000.4] [Bugfix] Reflection probe rotation setting included in build --- .../Runtime/Settings/URPReflectionProbeSettings.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Settings/URPReflectionProbeSettings.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Settings/URPReflectionProbeSettings.cs index 4f16a3aa5ad..47677c29327 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Settings/URPReflectionProbeSettings.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Settings/URPReflectionProbeSettings.cs @@ -18,6 +18,7 @@ public class URPReflectionProbeSettings : IRenderPipelineGraphicsSettings [SerializeField, HideInInspector] private int version = 1; int IRenderPipelineGraphicsSettings.version => version; + bool IRenderPipelineGraphicsSettings.isAvailableInPlayerBuild => true; [SerializeField, Tooltip("Use ReflectionProbe rotation. Enabling this will improve the appearance of reflections when the ReflectionProbe isn't axis aligned, but may worsen performance on lower end platforms.")] private bool useReflectionProbeRotation = true; From 824da5004da97f404c95e954e321378b6df042a7 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Wed, 18 Feb 2026 20:36:14 +0000 Subject: [PATCH 06/16] [Port] [6000.4] [ShaderGraph] Fix Enum Labels and a few other issues --- .../Editor/Data/Nodes/Channel/SwizzleNode.cs | 2 +- .../Editor/Data/Nodes/Utility/KeywordNode.cs | 5 +- .../ShaderInputPropertyDrawer.cs | 6 +- .../Editor/Generation/Processors/Generator.cs | 120 ++++++++++-------- 4 files changed, 73 insertions(+), 60 deletions(-) diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Channel/SwizzleNode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Channel/SwizzleNode.cs index 210b7c7604a..ba02cc7ff4a 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Channel/SwizzleNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Channel/SwizzleNode.cs @@ -36,7 +36,7 @@ public string maskInput get { return _maskInput; } set { - if (_maskInput.Equals(value)) + if (value == null || _maskInput.Equals(value)) return; _maskInput = value; UpdateNodeAfterDeserialization(); diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Utility/KeywordNode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Utility/KeywordNode.cs index b1d7a4e873e..f3810ccf737 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Utility/KeywordNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Utility/KeywordNode.cs @@ -154,8 +154,9 @@ public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMo sb.AppendLine(string.Format($"{outputSlot.concreteValueType.ToShaderString()} {GetVariableNameForSlot(OutputSlotId)};")); for(int i = 0; i < keyword.entries.Count; ++i) { - string keywordName = $"{keyword.referenceName}_{keyword.entries[i].referenceName}"; - var value = GetSlotValue(i + 1, generationMode); + var keywordEntry = keyword.entries[i]; + string keywordName = $"{keyword.referenceName}_{keywordEntry.referenceName}"; + var value = GetSlotValue(keywordEntry.id, generationMode); sb.AppendLine(string.Format($"{(i != 0 ? "else" : "")} if({keywordName}) {GetVariableNameForSlot(OutputSlotId)} = {value};")); } break; diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs index c95ef75217a..ebcbd57a960 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs @@ -1604,7 +1604,8 @@ void BuildKeywordFields(PropertySheet propertySheet, ShaderInput shaderInput) return; keyword.keywordDefinition = (KeywordDefinition)newValue; UpdateEnableState(); - this._postChangeValueCallback(true, ModificationScope.Nothing); + this._postChangeValueCallback(true); + this._keywordChangedCallback(); }, keyword.keywordDefinition, "Definition", @@ -1964,6 +1965,7 @@ void KeywordAddCallbacks() keyword.entries[index] = new KeywordEntry(entry.id, displayName, referenceName); this._postChangeValueCallback(true); + this._keywordChangedCallback(); } }; @@ -2070,6 +2072,8 @@ void KeywordReorderEntries(ReorderableList list) { this._preChangeValueCallback("Reorder Keyword Entry"); this._postChangeValueCallback(true); + this._keywordChangedCallback(); + } public string GetDuplicateSafeEnumDisplayName(int id, string name) diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs b/Packages/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs index d2d4dc4bfc9..3d0b2919f94 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs +++ b/Packages/com.unity.shadergraph/Editor/Generation/Processors/Generator.cs @@ -33,6 +33,32 @@ struct GeneratedShader class Generator { + #region ProfileMarkers + //UUM-117133; + //static readonly ProfilerMarker s_profileGenerateShaderPass = new ProfilerMarker("GenerateShaderPass"); + //static readonly ProfilerMarker s_profileCollectShaderKeywords = new ProfilerMarker("CollectShaderKeywords"); + //static readonly ProfilerMarker s_profileGetCurrentTargetActiveBlocks = new ProfilerMarker("GetCurrentTargetActiveBlocks"); + //static readonly ProfilerMarker s_profileProcessStackForPass = new ProfilerMarker("ProcessStackForPass"); + //static readonly ProfilerMarker s_profileGetActiveFieldsFromUpstreamNodes = new ProfilerMarker("GetActiveFieldsFromUpstreamNodes"); + //static readonly ProfilerMarker s_profileGetActiveFieldsFromPass = new ProfilerMarker("GetActiveFieldsFromPass"); + //static readonly ProfilerMarker s_profilePropagateActiveFieldReqs = new ProfilerMarker("PropagateActiveFieldReqs"); + //static readonly ProfilerMarker s_profileRenderState = new ProfilerMarker("RenderState"); + //static readonly ProfilerMarker s_profilePragmas = new ProfilerMarker("Pragmas"); + //static readonly ProfilerMarker s_profileKeywords = new ProfilerMarker("Keywords"); + //static readonly ProfilerMarker s_profileStructsAndPacking = new ProfilerMarker("StructsAndPacking"); + //static readonly ProfilerMarker s_profileStructTypes = new ProfilerMarker("StructTypes"); + //static readonly ProfilerMarker s_profileGraphVertex = new ProfilerMarker("GraphVertex"); + //static readonly ProfilerMarker s_profileGenerateVertexDescriptionStruct = new ProfilerMarker("GenerateVertexDescriptionStruct"); + //static readonly ProfilerMarker s_profileGenerateVertexDescriptionFunction = new ProfilerMarker("GenerateVertexDescriptionFunction"); + //static readonly ProfilerMarker s_profileGraphPixel = new ProfilerMarker("GraphPixel"); + //static readonly ProfilerMarker s_profileGraphFunctions = new ProfilerMarker("GraphFunctions"); + //static readonly ProfilerMarker s_profileGraphKeywords = new ProfilerMarker("GraphKeywords"); + //static readonly ProfilerMarker s_profileGraphProperties = new ProfilerMarker("GraphProperties"); + //static readonly ProfilerMarker s_profileGraphDefines = new ProfilerMarker("GraphDefines"); + //static readonly ProfilerMarker s_profileProcessTemplate = new ProfilerMarker("ProcessTemplate"); + #endregion + + const string kDebugSymbol = "SHADERGRAPH_DEBUG"; // readonly data setup in constructor @@ -544,7 +570,8 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ if (m_Mode == GenerationMode.Preview && !pass.useInPreview) return; - Profiler.BeginSample("GenerateShaderPass"); + // using (s_profileGenerateShaderPass.Auto()) + { // -------------------------------------------------- // Debug @@ -571,11 +598,10 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ CustomInterpSubGen customInterpSubGen = new CustomInterpSubGen(m_OutputNode != null); // Initiailize Collectors - Profiler.BeginSample("CollectShaderKeywords"); var propertyCollector = new PropertyCollector(); var keywordCollector = new KeywordCollector(); - m_GraphData.CollectShaderKeywords(keywordCollector, m_Mode); - Profiler.EndSample(); + // using (s_profileCollectShaderKeywords.Auto()) + m_GraphData.CollectShaderKeywords(keywordCollector, m_Mode); // Get upstream nodes from ShaderPass port mask List vertexNodes; @@ -588,21 +614,17 @@ void GenerateShaderPass(int targetIndex, PassDescriptor pass, ActiveFields activ if (m_OutputNode == null) { // Update supported block list for current target implementation - Profiler.BeginSample("GetCurrentTargetActiveBlocks"); var activeBlockContext = new TargetActiveBlockContext(currentBlockDescriptors, pass); - m_Targets[targetIndex].GetActiveBlocks(ref activeBlockContext); - Profiler.EndSample(); + // using (s_profileGetCurrentTargetActiveBlocks.Auto()) + m_Targets[targetIndex].GetActiveBlocks(ref activeBlockContext); void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlockMask, List nodeList, List slotList) { if (passBlockMask == null) - { - Profiler.EndSample(); return; - } - Profiler.BeginSample("ProcessStackForPass"); + // using (s_profileProcessStackForPass.Auto()) foreach (var blockFieldDescriptor in passBlockMask) { // Mask blocks on active state @@ -632,7 +654,6 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo slotList.Add(block.FindSlot(0)); activeFields.baseInstance.Add(block.descriptor); } - Profiler.EndSample(); } // Mask blocks per pass @@ -674,11 +695,9 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo List[] pixelNodePermutations = new List[pixelNodes.Count]; // Get active fields from upstream Node requirements - Profiler.BeginSample("GetActiveFieldsFromUpstreamNodes"); ShaderGraphRequirementsPerKeyword graphRequirements; - GenerationUtils.GetActiveFieldsAndPermutationsForNodes(pass, keywordCollector, vertexNodes, pixelNodes, new bool[ShaderGeneratorNames.UVCount], - vertexNodePermutations, pixelNodePermutations, activeFields, out graphRequirements); - Profiler.EndSample(); + // using(s_profileGetActiveFieldsFromUpstreamNodes.Auto()) + GenerationUtils.GetActiveFieldsAndPermutationsForNodes(pass, keywordCollector, vertexNodes, pixelNodes, new bool[ShaderGeneratorNames.UVCount], vertexNodePermutations, pixelNodePermutations, activeFields, out graphRequirements); // Moved this up so that we can reuse the information to figure out which struct Descriptors // should be populated by custom interpolators. @@ -691,9 +710,8 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo passStructs = customInterpSubGen.CopyModifyExistingPassStructs(passStructs, activeFields.baseInstance); // Get active fields from ShaderPass - Profiler.BeginSample("GetActiveFieldsFromPass"); - GenerationUtils.AddRequiredFields(pass.requiredFields, activeFields.baseInstance); - Profiler.EndSample(); + // using (s_profileGetActiveFieldsFromPass.Auto()) + GenerationUtils.AddRequiredFields(pass.requiredFields, activeFields.baseInstance); // Function Registry var functionBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable); @@ -715,12 +733,11 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo // Propagate active field requirements using dependencies // Must be executed before types are built - Profiler.BeginSample("PropagateActiveFieldReqs"); + // using(s_profilePropagateActiveFieldReqs.Auto()) foreach (var instance in activeFields.all.instances) { GenerationUtils.ApplyFieldDependencies(instance, pass.fieldDependencies); } - Profiler.EndSample(); // -------------------------------------------------- // Pass Setup @@ -749,7 +766,7 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo // Pass Code // Render State - Profiler.BeginSample("RenderState"); + // using (s_profileRenderState.Auto()) using (var renderStateBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable)) { // Render states need to be separated by RenderState.Type @@ -777,9 +794,8 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo string command = GenerationUtils.GetSpliceCommand(renderStateBuilder.ToCodeBlock(), "RenderState"); spliceCommands.Add("RenderState", command); } - Profiler.EndSample(); // Pragmas - Profiler.BeginSample("Pragmas"); + // using (s_profilePragmas.Auto()) using (var passPragmaBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable)) { if (pass.pragmas != null) @@ -801,9 +817,8 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo string command = GenerationUtils.GetSpliceCommand(passPragmaBuilder.ToCodeBlock(), "PassPragmas"); spliceCommands.Add("PassPragmas", command); } - Profiler.EndSample(); // Keywords - Profiler.BeginSample("Keywords"); + // using (s_profileKeywords.Auto()) using (var passKeywordBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable)) { if (pass.keywords != null) @@ -821,7 +836,6 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo string command = GenerationUtils.GetSpliceCommand(passKeywordBuilder.ToCodeBlock(), "PassKeywords"); spliceCommands.Add("PassKeywords", command); } - Profiler.EndSample(); List originalPassStructs = new List(passStructs); @@ -830,9 +844,9 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo // ----------------------------- // Generated structs and Packing code - Profiler.BeginSample("StructsAndPacking"); var interpolatorBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable); - + // using (s_profileStructsAndPacking.Auto()) + { if (passStructs != null) { var packedStructs = new List(); @@ -893,11 +907,12 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo else interpolatorBuilder.AppendLine("//Interpolator Packs: "); spliceCommands.Add("InterpolatorPack", interpolatorBuilder.ToCodeBlock()); - Profiler.EndSample(); + } // Generated String Builders for all struct types - Profiler.BeginSample("StructTypes"); var passStructBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable); + // using (s_profileStructTypes.Auto()) + { if (passStructs != null) { var structBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable); @@ -911,17 +926,18 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo if (passStructBuilder.length == 0) passStructBuilder.AppendLine("//Pass Structs: "); spliceCommands.Add("PassStructs", passStructBuilder.ToCodeBlock()); - Profiler.EndSample(); + } // Note: End of code copy/pasted into GeneratePassStructsAndInterpolators() in GeneratorDerivativeUtils.cs. // -------------------------------------------------- // Graph Vertex - Profiler.BeginSample("GraphVertex"); var vertexBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable); // If vertex modification enabled + // using (s_profileGraphVertex.Auto()) + { if (activeFields.baseInstance.Contains(Fields.GraphVertex) && vertexSlots != null) { // Setup @@ -933,12 +949,11 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo // Build vertex graph outputs // Add struct fields to active fields - Profiler.BeginSample("GenerateVertexDescriptionStruct"); + // using(s_profileGenerateVertexDescriptionStruct.Auto()) GenerationUtils.GenerateVertexDescriptionStruct(vertexGraphOutputBuilder, vertexSlots, vertexGraphOutputName, activeFields.baseInstance); - Profiler.EndSample(); // Build vertex graph functions from ShaderPass vertex port mask - Profiler.BeginSample("GenerateVertexDescriptionFunction"); + // using(s_profileGenerateVertexDescriptionFunction.Auto()) GenerationUtils.GenerateVertexDescriptionFunction( m_GraphData, vertexGraphFunctionBuilder, @@ -953,7 +968,6 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo vertexGraphInputName, vertexGraphFunctionName, vertexGraphOutputName); - Profiler.EndSample(); // Generate final shader strings if (m_HumanReadable) @@ -974,18 +988,18 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo if (vertexBuilder.length == 0) vertexBuilder.AppendLine("// GraphVertex: "); spliceCommands.Add("GraphVertex", vertexBuilder.ToCodeBlock()); - Profiler.EndSample(); + } // -------------------------------------------------- // Graph Pixel - Profiler.BeginSample("GraphPixel"); // Setup string pixelGraphInputName = "SurfaceDescriptionInputs"; string pixelGraphOutputName = "SurfaceDescription"; string pixelGraphFunctionName = "SurfaceDescriptionFunction"; var pixelGraphOutputBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable); var pixelGraphFunctionBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable); - + // using (s_profileGraphPixel.Auto()) + { // Build pixel graph outputs // Add struct fields to active fields GenerationUtils.GenerateSurfaceDescriptionStruct(pixelGraphOutputBuilder, pixelSlots, pixelGraphOutputName, activeFields.baseInstance, m_OutputNode is SubGraphOutputNode, pass.virtualTextureFeedback); @@ -1020,18 +1034,19 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo pixelBuilder.AppendLine("// GraphPixel: "); spliceCommands.Add("GraphPixel", pixelBuilder.ToCodeBlock()); } - Profiler.EndSample(); + } // -------------------------------------------------- // Graph Functions - Profiler.BeginSample("GraphFunctions"); + // using (s_profileGraphFunctions.Auto()) + { if (functionBuilder.length == 0) functionBuilder.AppendLine("// GraphFunctions: "); spliceCommands.Add("GraphFunctions", functionBuilder.ToCodeBlock()); - Profiler.EndSample(); + } // -------------------------------------------------- // Graph Keywords - Profiler.BeginSample("GraphKeywords"); + // using (s_profileGraphKeywords.Auto()) using (var keywordBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable)) { keywordCollector.GetKeywordsDeclaration(keywordBuilder, m_Mode); @@ -1039,11 +1054,10 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo keywordBuilder.AppendLine("// GraphKeywords: "); spliceCommands.Add("GraphKeywords", keywordBuilder.ToCodeBlock()); } - Profiler.EndSample(); // -------------------------------------------------- // Graph Properties - Profiler.BeginSample("GraphProperties"); + // using (s_profileGraphProperties.Auto()) using (var propertyBuilder = new ShaderStringBuilder(humanReadable: m_HumanReadable)) { subShaderProperties.GetPropertiesDeclaration(propertyBuilder, m_Mode, m_GraphData.graphDefaultConcretePrecision); @@ -1066,11 +1080,10 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo propertyBuilder.AppendLine("// GraphProperties: "); spliceCommands.Add("GraphProperties", propertyBuilder.ToCodeBlock()); } - Profiler.EndSample(); // -------------------------------------------------- // Graph Defines - Profiler.BeginSample("GraphDefines"); + // using(s_profileGraphDefines.Auto()) using (var graphDefines = new ShaderStringBuilder(humanReadable: m_HumanReadable)) { graphDefines.AppendLine("#define SHADERPASS {0}", pass.referenceName); @@ -1129,7 +1142,6 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo // Add to splice commands spliceCommands.Add("GraphDefines", graphDefines.ToCodeBlock()); } - Profiler.EndSample(); // -------------------------------------------------- // Includes @@ -1235,23 +1247,19 @@ void ProcessStackForPass(ContextData contextData, BlockFieldDescriptor[] passBlo string[] sharedTemplateDirectories = pass.sharedTemplateDirectories; if (!File.Exists(passTemplatePath)) - { - Profiler.EndSample(); return; - } // Process Template - Profiler.BeginSample("ProcessTemplate"); var templatePreprocessor = new ShaderSpliceUtil.TemplatePreprocessor(activeFields, spliceCommands, isDebug, sharedTemplateDirectories, m_AssetCollection, m_HumanReadable, m_IncludeCache); - templatePreprocessor.ProcessTemplateFile(passTemplatePath); + // using (s_profileProcessTemplate.Auto()) + templatePreprocessor.ProcessTemplateFile(passTemplatePath); m_Builder.Concat(templatePreprocessor.GetShaderCode()); - Profiler.EndSample(); // Turn off the skip flag so other passes behave correctly correctly. CustomInterpolatorUtils.generatorSkipFlag = false; CustomInterpolatorUtils.generatorNodeOnly = false; - Profiler.EndSample(); + } } } } From 5c355dfd168dd01261c682bffe19c100de719f7b Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Thu, 19 Feb 2026 18:47:38 +0000 Subject: [PATCH 07/16] [Port] [6000.4] [NVUnityPlugin] DLSS 4.5: upgrade SDK to v310.5.0 --- .../deep-learning-super-sampling-in-hdrp.md | 18 ++++++++++-------- .../RenderPipeline/HDRenderPipelineUI.Skin.cs | 2 +- .../RenderPipeline/RenderPass/DLSSPass.cs | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md index 0b4b54c3c2c..15565a39b90 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md @@ -1,6 +1,6 @@ # Deep learning super sampling (DLSS) -[NVIDIA Deep Learning Super Sampling (DLSS)](https://www.nvidia.com/en-us/geforce/technologies/dlss/) is a rendering technology that uses artificial intelligence to increase graphics performance. The High Definition Render Pipeline (HDRP) natively supports DLSS 4 Super Resolution. +[NVIDIA Deep Learning Super Sampling (DLSS)](https://www.nvidia.com/en-us/geforce/technologies/dlss/) is a rendering technology that uses artificial intelligence to increase graphics performance. The High Definition Render Pipeline (HDRP) natively supports DLSS 4.5 Super Resolution. ## Requirements and compatibility @@ -82,18 +82,20 @@ Available presets are marked as '1' in the table below. | Render Preset | Maximum Quality | Balanced | Maximum Performance | Ultra Performance | DLAA | Explanation | AI Model | |- |- |- |- |- |- |- |- | -| Preset F | | | | 1 | 1 | Provides the highest image stability. Default value for UltraPerformance. | CNN | -| Preset J | 1 | 1 | 1| | 1 | Slightly lowers ghosting but increases flickering.
NVIDIA recommends using **Preset K** instead of **Preset J**. | Transformer | -| Preset K | 1 | 1 | 1| | 1 | Provides the highest image quality. | Transformer | +| Preset F | | | | 1 | 1 | Marked for deprecation in upcoming DLSS releases. Don't use for new projects. | CNN | +| Preset J | 1 | 1 | 1| 1 | 1 | Slightly lowers ghosting but increases flickering.
NVIDIA recommends using **Preset K** instead of **Preset J**. | Transformer | +| Preset K | 1 | 1 | 1| 1 | 1 | Default preset for DLAA/Balanced/Quality modes. Requires fewer resources than Preset L. | Transformer | +| Preset L | | | | 1 | | Delivers a sharper, more stable image with less ghosting than Preset J, K, but lowers performance. Recommended for RTX 40 Series GPUs and above. | Transformer Gen 2 | +Provides about the same image quality as **Preset L**. This preset is slower than presets **J** and **K**, but faster than preset **L**. Recommended for RTX 40 Series GPUs and above. The defaults for each quality mode are: | **Quality mode** | **Default render preset** | |- |- | -| **Maximum Quality** | Preset K -| **Balanced** | Preset K -| **Maximum Performance** | Preset K -| **Ultra Performance** | Preset F +| **Maximum Quality** | Preset K | +| **Balanced** | Preset K | +| **Maximum Performance** | Preset M | +| **Ultra Performance** | Preset L | | **DLAA** | Preset K | DLSS render presets are project-specific. Presets are available only from the HDRP Asset settings. You can't override presets on a per-camera basis. diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 99eb168fe30..6615616c454 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -319,7 +319,7 @@ int CountBits(uint bitMask) // System.Numerics.BitOperations not available { if (preset == UnityEngine.NVIDIA.DLSSPreset.Preset_Default) { - labels[(int)quality][iWrite++] = "Default Preset"; + labels[(int)quality][iWrite++] = "Default Preset" + " - " + UnityEngine.NVIDIA.GraphicsDevice.GetDLSSPresetExplanation(preset); continue; } diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DLSSPass.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DLSSPass.cs index 89b93bc27ab..adf939a5990 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DLSSPass.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DLSSPass.cs @@ -183,7 +183,7 @@ private bool ShouldUseAutomaticSettings() static NVIDIA.DLSSPreset Uint2Preset(uint preset) { - if (preset >= (uint)NVIDIA.DLSSPreset.Preset_Default && preset <= (uint)NVIDIA.DLSSPreset.Preset_K) + if (preset >= (uint)NVIDIA.DLSSPreset.Preset_Default && preset <= (uint)NVIDIA.DLSSPreset.Preset_M) return (NVIDIA.DLSSPreset)preset; Debug.LogWarningFormat("Unknown DLSS Preset value {0}, using default value.", preset); return NVIDIA.DLSSPreset.Preset_Default; From cf066cfa1d70af30b266afa5440b85e798ad5ee7 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Thu, 19 Feb 2026 18:47:38 +0000 Subject: [PATCH 08/16] [Port] [6000.4] Web accessibility fixes in Shader Graph documentation --- .../Documentation~/Blackboard.md | 7 +- .../Documentation~/Block-Node.md | 2 - .../Documentation~/Boolean-Node.md | 12 +- .../Documentation~/Channel-Mixer-Node.md | 20 +-- .../Documentation~/Color-Node.md | 14 +- .../Documentation~/Comparison-Node.md | 16 +- .../Documentation~/Cubemap-Asset-Node.md | 12 +- .../Dielectric-Specular-Node.md | 16 +- .../Documentation~/Fresnel-Equation-Node.md | 6 +- .../Documentation~/Gradient-Node.md | 12 +- .../Documentation~/Graph-Target.md | 2 - .../Documentation~/Integer-Node.md | 12 +- .../Documentation~/Internal-Inspector.md | 16 +- .../Documentation~/Master-Stack.md | 6 +- .../Documentation~/Matrix-2x2-Node.md | 12 +- .../Documentation~/Matrix-3x3-Node.md | 12 +- .../Documentation~/Matrix-4x4-Node.md | 12 +- .../Matrix-Construction-Node.md | 24 +-- .../Documentation~/Matrix-Split-Node.md | 20 +-- .../Documentation~/Port-Bindings.md | 24 +-- .../Documentation~/Precision-Modes.md | 10 +- .../Documentation~/Preview-Mode-Control.md | 8 +- .../Documentation~/Rectangle-Node.md | 18 +-- .../Documentation~/Refract-Node.md | 6 +- .../Documentation~/Shader-Graph-Window.md | 22 ++- .../Documentation~/ShaderGraph-Samples.md | 16 +- .../Documentation~/Slider-Node.md | 16 +- .../Split-Texture-Transform-Node.md | 2 +- .../Documentation~/Sticky-Notes.md | 2 - .../Documentation~/TableOfContents.md | 2 +- .../Texture-2D-Array-Asset-Node.md | 12 +- .../Documentation~/Texture-2D-Asset-Node.md | 12 +- .../Documentation~/Texture-3D-Asset-Node.md | 12 +- .../Documentation~/ThreadMapDetail-Node.md | 139 +++--------------- .../Transformation-Matrix-Node.md | 12 +- .../Documentation~/UVCombine-Node.md | 59 +------- .../Documentation~/Upgrade-Guide-10-0-x.md | 10 +- .../images/Active-Inactive-Blocks.PNG | Bin 52826 -> 0 bytes .../images/MasterStack_Empty.png | Bin 14039 -> 0 bytes .../Documentation~/images/StickyNote.png | Bin 25720 -> 0 bytes .../images/blackboardcategories2.png | Bin 87712 -> 0 bytes .../images/blackboardcategories3.png | Bin 55251 -> 0 bytes .../images/materialoverride1.PNG | Bin 60441 -> 0 bytes .../images/materialoverride2.PNG | Bin 67821 -> 0 bytes .../images/previewmodecontrol.png | Bin 40002 -> 0 bytes .../snippets/nodes-compatibility-hdrp.md | 19 +-- .../Documentation~/surface-options.md | 61 ++------ 47 files changed, 239 insertions(+), 456 deletions(-) delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/Active-Inactive-Blocks.PNG delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/MasterStack_Empty.png delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/StickyNote.png delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/blackboardcategories2.png delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/blackboardcategories3.png delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/materialoverride1.PNG delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/materialoverride2.PNG delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/previewmodecontrol.png diff --git a/Packages/com.unity.shadergraph/Documentation~/Blackboard.md b/Packages/com.unity.shadergraph/Documentation~/Blackboard.md index 6e66c3d15d3..22dc6a2c704 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Blackboard.md +++ b/Packages/com.unity.shadergraph/Documentation~/Blackboard.md @@ -3,7 +3,7 @@ ## Description You can use the Blackboard to define, order, and categorize the [Properties](Property-Types.md) and [Keywords](Keywords.md) in a graph. From the Blackboard, you can also edit the path for the selected Shader Graph Asset or Sub Graph. -![image](images/blackboardcategories1.png) +![The blackboard layout with properties, keywords, and categories.](images/blackboardcategories1.png) ## Accessing the Blackboard The Blackboard is visible by default, and you cannot drag it off the graph and lose it. However, you are able to position it anywhere in the [Shader Graph Window](Shader-Graph-Window.md). It always maintains the same distance from the nearest corner, even if you resize the window. @@ -42,8 +42,6 @@ To make the properties in your shader more discoverable, organize them into cate ### Adding, removing, and reordering properties and keywords * To add a property or keyword to a category, expand the category with the foldout (⌄) symbol, then drag and drop the property or keyword onto the expanded category. -![image](images/blackboardcategories2.png) - * To remove a property or keyword, select it and press **Delete**, or right-click and select **Delete**. * To re-order properties or keywords, drag and drop them within a category or move them into other categories. @@ -66,9 +64,6 @@ To copy a specific set of properties: ### Using categories in the Material Inspector To modify a material you have created with a Shader Graph, you can adjust specific property or keyword values in the Material Inspector, or edit the graph itself. -![image](images/blackboardcategories3.png) - - #### Working with Streaming Virtual Textures [Streaming Virtual Texture Properties](https://docs.unity3d.com/Documentation/Manual/svt-use-in-shader-graph.html) sample texture layers. To access these layers in the Material Inspector, expand the relevant **Virtual Texture** section with the ⌄ symbol next to its name. You can add and remove layers via the Inspector. diff --git a/Packages/com.unity.shadergraph/Documentation~/Block-Node.md b/Packages/com.unity.shadergraph/Documentation~/Block-Node.md index 0b8090b83b7..b98826160a4 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Block-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Block-Node.md @@ -26,6 +26,4 @@ If you disable **Automatically Add or Remove Blocks**, Shader Graph doesn't auto Active Block nodes are Blocks that contribute to the final shader. Inactive Block nodes are Blocks that are present in the Shader Graph, but don't contribute to the final shader. -![image](images/Active-Inactive-Blocks.png) - When you change the graph settings, certain Blocks might become active or inactive. Inactive Block nodes and any node streams that are connected only to Inactive Block nodes appear grayed out. diff --git a/Packages/com.unity.shadergraph/Documentation~/Boolean-Node.md b/Packages/com.unity.shadergraph/Documentation~/Boolean-Node.md index 2ff09735709..40196324ee1 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Boolean-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Boolean-Node.md @@ -6,15 +6,15 @@ Defines a constant **Boolean** value in the [Shader Graph](index.md), although i ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Boolean | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Boolean | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Toggle | | Defines the output value. | +| Control | Description | +|:---|:---| +| (Checkbox) | Defines the output value. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Channel-Mixer-Node.md b/Packages/com.unity.shadergraph/Documentation~/Channel-Mixer-Node.md index 5fba552c278..d45d90c2953 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Channel-Mixer-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Channel-Mixer-Node.md @@ -6,19 +6,19 @@ Controls the amount each of the channels of input **In** contribute to each of t ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| In | Input | Vector 3 | None | Input value | -| Out | Output | Vector 3 | None | Output value | +| Name | Direction | Type | Binding | Description | +|:---|:---|:---|:---|:---| +| In | Input | Vector 3 | None | Input value | +| Out | Output | Vector 3 | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Toggle Button Array | R, G, B | Selects the output channel to edit. | -| R | Slider | | Controls contribution of input red channel to selected output channel. | -| G | Slider | | Controls contribution of input green channel to selected output channel. | -| B | Slider | | Controls contribution of input blue channel to selected output channel. | +| Control | Description | +|:---|:---| +| **R**, **G**, **B** (toggle buttons) | Selects the output channel to edit with the sliders. | +| **R** (slider) | Controls the contribution of the input red channel to the selected output channel. | +| **G** (slider) | Controls the contribution of the input green channel to the selected output channel. | +| **B** (slider) | Controls the contribution of the input blue channel to the selected output channel. | ## Shader Function diff --git a/Packages/com.unity.shadergraph/Documentation~/Color-Node.md b/Packages/com.unity.shadergraph/Documentation~/Color-Node.md index 5405913ea97..ba9dcb722d4 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Color-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Color-Node.md @@ -8,16 +8,16 @@ NOTE: In versions prior to 10.0, Shader Graph assumed that HDR colors from the C ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Vector 4 | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Vector 4 | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Color | | Defines the output value. | -| Mode | Dropdown | Default, HDR | Sets properties of the Color field | +| Control | Description | +|:---|:---| +| (Color) | Defines the output value. | +| **Mode** | Sets properties of the Color field. The options are:
  • **Default**
  • **HDR**
| ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Comparison-Node.md b/Packages/com.unity.shadergraph/Documentation~/Comparison-Node.md index e0424ea5ac4..34a352b124e 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Comparison-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Comparison-Node.md @@ -6,17 +6,17 @@ Compares the two input values **A** and **B** based on the condition selected on ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| A | Input | Float | None | First input value | -| B | Input | Float | None | Second input value | -| Out | Output | Boolean | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| A | Input | Float | None | First input value | +| B | Input | Float | None | Second input value | +| Out | Output | Boolean | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Dropdown | Equal, NotEqual, Less, LessOrEqual, Greater, GreaterOrEqual | Condition for comparison | +| Control | Description | +|:---|:---| +| (Dropdown) | Select the condition for comparison between A and B. The options are:
  • **Equal**
  • **NotEqual**
  • **Less**
  • **LessOrEqual**
  • **Greater**
  • **GreaterOrEqual**
| ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Cubemap-Asset-Node.md b/Packages/com.unity.shadergraph/Documentation~/Cubemap-Asset-Node.md index 7afa17f55f2..1b8a40870a6 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Cubemap-Asset-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Cubemap-Asset-Node.md @@ -6,12 +6,12 @@ Defines a constant **Cubemap Asset** for use in the shader. To sample the **Cube ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Cubemap | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Cubemap | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Object Field (Cubemap) | | Defines the cubemap asset from the project. | +| Control | Description | +|:--- |:---| +| (Cubemap)| Defines the cubemap asset from the project. | diff --git a/Packages/com.unity.shadergraph/Documentation~/Dielectric-Specular-Node.md b/Packages/com.unity.shadergraph/Documentation~/Dielectric-Specular-Node.md index ab06b823c35..969c297fd12 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Dielectric-Specular-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Dielectric-Specular-Node.md @@ -10,17 +10,17 @@ You can use **Custom** material type to define your own physically based materia ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Float | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Float | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| Material | Dropdown | Common, RustedMetal, Water, Ice, Glass, Custom | Selects the material value to output. | -| Range | Slider | | Controls output value for **Common** material type. | -| IOR | Slider | | Controls index of refraction for **Custom** material type. | +| Control | Description | +|:---|:---| +| **Material** | Selects the material value to output. The options are:
  • **Common**
  • **RustedMetal**
  • **Water**
  • **Ice**
  • **Glass**
  • **Custom**
| +| **Range** | Controls the output value for a **Common** material type. | +| **IOR** | Controls the index of refraction for a **Custom** material type. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Fresnel-Equation-Node.md b/Packages/com.unity.shadergraph/Documentation~/Fresnel-Equation-Node.md index e6ed9badb8c..d5aeeefed59 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Fresnel-Equation-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Fresnel-Equation-Node.md @@ -35,9 +35,9 @@ You can find Numerical values of refractive indices at [refractiveindex.info](ht ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| Mode | Dropdown | • **Schlick**: This mode produces an approximation based on [Schlick's Approximation](https://en.wikipedia.org/wiki/Schlick%27s_approximation). Use the Schlick mode for interactions between air and dielectric materials.
• **Dielectric**: Use this mode for interactions between two dielectric Materials. For example, air to glass, glass to water, or water to air.
• **DielectricGeneric**: This mode computes a [Fresnel equation](https://seblagarde.wordpress.com/2013/04/29/memo-on-fresnel-equations) for interactions between a dielectric and a metal. For example, clear-coat- to metal, glass to metal, or water to metal.
**Note:** if the **IORMediumK** value is 0, **DielectricGeneric** behaves in the same way as the **Dielectric** mode. || +| Control | Description | +|:---|:---| +| **Mode** | Select an equation mode to affect Material interactions to the Fresnel Component. The options are:
  • **Schlick**: This mode produces an approximation based on [Schlick's Approximation](https://en.wikipedia.org/wiki/Schlick%27s_approximation). Use the Schlick mode for interactions between air and dielectric materials.
  • **Dielectric**: Use this mode for interactions between two dielectric Materials. For example, air to glass, glass to water, or water to air.
  • **DielectricGeneric**: This mode computes a [Fresnel equation](https://seblagarde.wordpress.com/2013/04/29/memo-on-fresnel-equations) for interactions between a dielectric and a metal. For example, clear-coat- to metal, glass to metal, or water to metal.
**Note:** if the **IORMediumK** value is 0, **DielectricGeneric** behaves in the same way as the **Dielectric** mode. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Gradient-Node.md b/Packages/com.unity.shadergraph/Documentation~/Gradient-Node.md index 5e0f92d1a7b..1c1ab010eaa 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Gradient-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Gradient-Node.md @@ -6,15 +6,15 @@ Defines a constant **Gradient** for use in [Shader Graph](index.md), although in ## Ports -| Name | Direction | Type | Description | -|:------------ |:-------------|:-----|:---| -| Out | Output | Gradient | Output value | +| Name | Direction | Type | Description | +|:--- |:---|:---|:---| +| Out | Output | Gradient | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Gradient Field | | Defines the gradient. | +| Control | Description | +|:---|:---| +| (Gradient Field) | Defines the gradient. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md index 05e4feb18b6..d843d493b6f 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md +++ b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md @@ -2,8 +2,6 @@ A Target determines the end point compatibility of a shader you generate using Shader Graph. You can select Targets for each Shader Graph asset, and use the [Graph Settings Menu](Graph-Settings-Tab.md) to change the Targets. -![image](images/GraphSettings_Menu.png) - Targets hold information such as the required generation format, and variables that allow compatibility with different render pipelines or integration features like [Visual Effect Graph](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@latest). You can select any number of Targets for each Shader Graph asset. If a Target you select isn't compatible with other Targets you've already selected, an error message that explains the problem appears. Target Settings are specific to each Target, and can vary between assets depending on which Targets you've selected. Be aware that Universal Render Pipeline (URP) Target Settings and High Definition Render Pipeline (HDRP) Target Settings might change in future versions. diff --git a/Packages/com.unity.shadergraph/Documentation~/Integer-Node.md b/Packages/com.unity.shadergraph/Documentation~/Integer-Node.md index 017eacec8d6..e4a5dbff735 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Integer-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Integer-Node.md @@ -6,15 +6,15 @@ Defines a constant **Float** value in the shader using an **Integer** field. Can ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Float | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Float | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Integer | | Defines the output value. | +| Control | Description | +|:---|:---| +| (Integer) | Defines the output value. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Internal-Inspector.md b/Packages/com.unity.shadergraph/Documentation~/Internal-Inspector.md index afd823e5887..54f4c97a9d6 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Internal-Inspector.md +++ b/Packages/com.unity.shadergraph/Documentation~/Internal-Inspector.md @@ -10,29 +10,29 @@ When you open a Shader Graph, the **Graph Inspector** displays the **[Graph Sett Select a node in the graph to display settings available for that node in the **Graph Inspector**. Settings available for that node appear in the **Node Settings** tab of the Graph Inspector. For example, if you select a Property node either in the graph or the [Blackboard](Blackboard.md), the **Node Settings** tab displays attributes of the Property that you can edit. -![](images/InternalInspectorBlackboardProperty.png) +![The Blackboard with a property selected, and the Graph Inspector showing the property settings.](images/InternalInspectorBlackboardProperty.png) Graph elements that currently work with the Graph Inspector: - [Properties](https://docs.unity3d.com/Manual/SL-Properties.html) - ![](images/InternalInspectorGraphProperty.png) + ![A property selected in the workspace, and the Graph Inspector showing the property settings.](images/InternalInspectorGraphProperty.png) - [Keywords](Keywords.md) - ![](images/keywords_enum.png) + ![The Blackboard with a keyword selected, and the Graph Inspector showing the keyword settings.](images/keywords_enum.png) - [Custom Function nodes](Custom-Function-Node.md) - ![](images/Custom-Function-Node-File.png) + ![A Custom Function node selected in the workspace, and the Graph Inspector showing the node settings.](images/Custom-Function-Node-File.png) - [Subgraph Output nodes](Sub-graph.md) - ![](images/Inspector-SubgraphOutput.png) + ![A subgraph output node selected in the workspace, and the Graph Inspector showing the node settings.](images/Inspector-SubgraphOutput.png) - [Per-node precision](Precision-Modes.md) - ![](images/Inspector-PerNodePrecision.png) + ![A node selected in the workspace, and the Graph Inspector showing the Precision setting.](images/Inspector-PerNodePrecision.png) Graph elements that currently do not work with the Graph Inspector: @@ -44,7 +44,3 @@ Graph elements that currently do not work with the Graph Inspector: ## Material Override Enabling the [Allow Material Override](surface-options.md) option in the Graph Settings makes it possible for you to override certain graph properties via the Material Inspector. - -![](images/materialoverride1.PNG) - -![](images/materialoverride2.PNG) diff --git a/Packages/com.unity.shadergraph/Documentation~/Master-Stack.md b/Packages/com.unity.shadergraph/Documentation~/Master-Stack.md index b0ffbb52f4f..442f31fa5e8 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Master-Stack.md +++ b/Packages/com.unity.shadergraph/Documentation~/Master-Stack.md @@ -4,12 +4,10 @@ The Master Stack is the end point of a Shader Graph that defines the final surface appearance of a shader. Your Shader Graph should always contain only one Master Stack. -![image](images/MasterStack_Populated.png) - The content of the Master Stack might change depending on the [Graph Settings](Graph-Settings-Tab.md) you select. The Master Stack is made up of Contexts, which contain [Block nodes](Block-Node.md). -## Contexts +![The Master Stack display, showing the Vertex and Fragment contexts populated with Block nodes.](images/MasterStack_Populated.png) -![image](images/MasterStack_Empty.png) +## Contexts The Master Stack contains two Contexts: Vertex and Fragment. These represent the two stages of a shader. Nodes that you connect to Blocks in the Vertex Context become part of the final shader's vertex function. Nodes that you connect to Blocks in the Fragment Context become part of the final shader's fragment (or pixel) function. If you connect any nodes to both Contexts, they are executed twice, once in the vertex function and then again in the fragment function. You can't cut, copy, or paste Contexts. diff --git a/Packages/com.unity.shadergraph/Documentation~/Matrix-2x2-Node.md b/Packages/com.unity.shadergraph/Documentation~/Matrix-2x2-Node.md index e796a580c14..b5fed26f801 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Matrix-2x2-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Matrix-2x2-Node.md @@ -6,15 +6,15 @@ Defines a constant **Matrix 2x2** value in the shader. ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Matrix 2 | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Matrix 2 | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Matrix 2x2 | | Sets output value | +| Control | Description | +|:---|:---| +| (Matrix 2x2) | Sets the matrix 2x2 output value. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Matrix-3x3-Node.md b/Packages/com.unity.shadergraph/Documentation~/Matrix-3x3-Node.md index 03284e6b3f4..071fd6ac21b 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Matrix-3x3-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Matrix-3x3-Node.md @@ -6,15 +6,15 @@ Defines a constant **Matrix 3x3** value in the shader. ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Matrix 3 | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Matrix 3 | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Matrix 3x3 | | Sets output value | +| Control | Description | +|:---|:---| +| (Matrix 3x3) | Sets the matrix 3x3 output value. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Matrix-4x4-Node.md b/Packages/com.unity.shadergraph/Documentation~/Matrix-4x4-Node.md index cd33295a17c..4d1ba1d3766 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Matrix-4x4-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Matrix-4x4-Node.md @@ -6,15 +6,15 @@ Defines a constant **Matrix 4x4** value in the shader. ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Matrix 4 | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Matrix 4 | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Matrix 4x4 | | Sets output value | +| Control | Description | +|:---|:---| +| (Matrix 4x4) | Sets the matrix 4x4 output value. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Matrix-Construction-Node.md b/Packages/com.unity.shadergraph/Documentation~/Matrix-Construction-Node.md index b7a639342e2..42b2e7403fe 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Matrix-Construction-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Matrix-Construction-Node.md @@ -15,21 +15,21 @@ For example, connecting **Vector 2** type values to inputs **M0** and **M1** wil ## Ports -| Name | Direction | Type | Description | -|:------------ |:-------------|:-----|:---| -| M0 | Input | Vector 4 | First row or column | -| M1 | Input | Vector 4 | Second row or column | -| M2 | Input | Vector 4 | Third row or column | -| M3 | Input | Vector 4 | Fourth row or column | -| 4x4 | Output | Matrix 4x4 | Output as Matrix 4x4 | -| 3x3 | Output | Matrix 3x3 | Output as Matrix 3x3 | -| 2x2 | Output | Matrix 2x2 | Output as Matrix 2x2 | +| Name | Direction | Type | Description | +|:--- |:---|:---|:---| +| M0 | Input | Vector 4 | First row or column | +| M1 | Input | Vector 4 | Second row or column | +| M2 | Input | Vector 4 | Third row or column | +| M3 | Input | Vector 4 | Fourth row or column | +| 4x4 | Output | Matrix 4x4 | Output as Matrix 4x4 | +| 3x3 | Output | Matrix 3x3 | Output as Matrix 3x3 | +| 2x2 | Output | Matrix 2x2 | Output as Matrix 2x2 | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Dropdown | Row, Column | Selects how the output matrix should be filled | +| Control | Description | +|:---|:---| +| (Dropdown) | Selects how the output matrix should be filled. The options are:
  • **Row**: Input vectors specify matrix rows from top to bottom.
  • **Column**: Input vectors specify matrix columns from left to right.
| ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Matrix-Split-Node.md b/Packages/com.unity.shadergraph/Documentation~/Matrix-Split-Node.md index a0836b235d6..d0b82c8a50b 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Matrix-Split-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Matrix-Split-Node.md @@ -15,19 +15,19 @@ For example, connecting **Matrix 2x2** type to input **In** will return the corr ## Ports -| Name | Direction | Type | Description | -|:------------ |:-------------|:-----|:---| -| In | Input | Dynamic Matrix | Input value | -| M0 | Output | Dynamic Vector | First row or column | -| M1 | Output | Dynamic Vector | Second row or column | -| M2 | Output | Dynamic Vector | Third row or column | -| M3 | Output | Dynamic Vector | Fourth row or column | +| Name | Direction | Type | Description | +|:--- |:---|:---|:---| +| In | Input | Dynamic Matrix | Input value | +| M0 | Output | Dynamic Vector | First row or column | +| M1 | Output | Dynamic Vector | Second row or column | +| M2 | Output | Dynamic Vector | Third row or column | +| M3 | Output | Dynamic Vector | Fourth row or column | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Dropdown | Row, Column | Selects how the output vectors should be filled | +| Control | Description | +|:---|:---| +| (Dropdown) | Selects how the output vectors should be filled. The options are:
  • **Row**: Output vectors are composed of matrix rows from top to bottom.
  • **Column**: Output vectors are composed of matrix columns from left to right.
| ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Port-Bindings.md b/Packages/com.unity.shadergraph/Documentation~/Port-Bindings.md index c441a319273..7f48676d22f 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Port-Bindings.md +++ b/Packages/com.unity.shadergraph/Documentation~/Port-Bindings.md @@ -8,15 +8,15 @@ In practice this means that if no [Edge](Edge.md) is connected to the [Port](Por ## Port Bindings List -| Name | Data Type | Options | Description | -|:------------|:----------|:------------------|:------------| -| Bitangent | Vector 3 | | Vertex or fragment bitangent, label describes expected transform space | -| Color | Vector 4 | |RGBA Color picker | -| ColorRGB | Vector 3 | | RGB Color picker | -| Normal | Vector 3 | | Vertex or fragment normal vector, label describes expected transform space | -| Position | Vector 3 | | Vertex or fragment position, label describes expected transform space | -| Screen Position | Vector 4 | | Default, Raw, Center, Tiled | Vertex or fragment position in screen space. Dropdown selects mode. See [Screen Position Node](Screen-Position-Node.md) for details | -| Tangent | Vector 3 | | Vertex or fragment tangent vector, label describes expected transform space | -| UV | Vector 2 | | UV0, UV1, UV2, UV3 | Mesh UV coordinates. Dropdown selects UV channel. | -| Vertex Color | Vector 4 | | RGBA vertex color value. | -| View Direction | Vector 3 | | Vertex or fragment view direction vector, label describes expected transform space | +| Name | Data Type | Description | +|:---|:---|:---| +| Bitangent | Vector 3 | Vertex or fragment bitangent, label describes expected transform space | +| Color | Vector 4 |RGBA Color picker | +| ColorRGB | Vector 3 | RGB Color picker | +| Normal | Vector 3 | Vertex or fragment normal vector, label describes expected transform space | +| Position | Vector 3 | Vertex or fragment position, label describes expected transform space | +| Screen Position | Vector 4 | Default, Raw, Center, Tiled | Vertex or fragment position in screen space. Dropdown selects mode. See [Screen Position Node](Screen-Position-Node.md) for details | +| Tangent | Vector 3 | Vertex or fragment tangent vector, label describes expected transform space | +| UV | Vector 2 | UV0, UV1, UV2, UV3 | Mesh UV coordinates. Dropdown selects UV channel. | +| Vertex Color | Vector 4 | RGBA vertex color value. | +| View Direction | Vector 3 | Vertex or fragment view direction vector, label describes expected transform space | diff --git a/Packages/com.unity.shadergraph/Documentation~/Precision-Modes.md b/Packages/com.unity.shadergraph/Documentation~/Precision-Modes.md index 88a30a7003c..50cc3676d9c 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Precision-Modes.md +++ b/Packages/com.unity.shadergraph/Documentation~/Precision-Modes.md @@ -23,7 +23,7 @@ To visualize data precision in a graph, set the [**Color Mode**](Color-Modes.md) * **Half** nodes are red * **Switchable** nodes are Green. -![](images/Color-Mode-Precision.png) +![A graph showing nodes with different colors according to their data precision.](images/Color-Mode-Precision.png) ### Setting graph Precision To set the default precision for the entire graph to **Single** or **Half**, open the **Graph Settings** and set the Precision property. Newly-created nodes in a graph default to the **Inherit** precision mode, and inherit the graph's precision. @@ -51,7 +51,7 @@ Simple inheritance refers to the inheritance behaviour of a node with only one p In the figure below, Node A has the **Inherit** mode. Because it has no incoming edge, it takes the **Graph Precision**, which is **Half**. Node B also has the **Inherit** mode, so it inherits the **Half** precision mode from Node A. -![](images/precisionmodes1.png) +![Diagram showing a simple precision inheritance.](images/precisionmodes1.png) #### Complex inheritance @@ -61,7 +61,7 @@ A node reads precision settings from each input port. If you connect a node to s In the figure below, node D has the **Inherit** mode. It receives input from the adjacent edges via inputs 1 and 2. Node B passes the **Half** mode through input 1. Node C passes the **Single** mode through input 2. Because **Single** is 32-bit and **Half** only 16-bit, **Single** takes precedence, so Node D uses **Single** precision. -![](images/precisionmodes2.png) +![Diagram showing a complex precision inheritance.](images/precisionmodes2.png) #### Mixed inheritance @@ -69,13 +69,13 @@ Mixed inheritance refers to the inheritance behaviour on a node with both simple Nodes with no input ports, such as [Input nodes](Input-Nodes.md), inherit the **Graph Precision**. However, complex inheritance rules still affect other nodes in the same group, as illustrated in the figure below. -![](images/precisionmodes3.png) +![Diagram showing a mixed precision inheritance.](images/precisionmodes3.png) ### Switchable precision The **Switchable** mode overrides **Half** mode but not **Single**. -![](images/precisionmodes4.png) +![Diagram showing precision inheritance with the Switchable mode.](images/precisionmodes4.png) ### Sub Graph precision diff --git a/Packages/com.unity.shadergraph/Documentation~/Preview-Mode-Control.md b/Packages/com.unity.shadergraph/Documentation~/Preview-Mode-Control.md index a84d8c4d489..bf896cfda4f 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Preview-Mode-Control.md +++ b/Packages/com.unity.shadergraph/Documentation~/Preview-Mode-Control.md @@ -13,16 +13,16 @@ This mode control functionality also applies to Sub Graph previews. See [Graph S ## How to use For nodes: + 1. Add a node which includes a preview. 2. Select the node. 3. In the Graph Inspector or Node Settings, find the Preview control. 4. Select an option. - For SubGraphs: + * Select a mode in the [Sub Graph](Sub-graph.md) [Graph Settings](Graph-Settings-Tab.md) menu. -![](images/previewmodecontrol.png) +## Additional resources -Related -[Preview node](Preview-Node.md) +* [Preview node](Preview-Node.md) diff --git a/Packages/com.unity.shadergraph/Documentation~/Rectangle-Node.md b/Packages/com.unity.shadergraph/Documentation~/Rectangle-Node.md index 08ae33abe4d..b453bd94122 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Rectangle-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Rectangle-Node.md @@ -8,18 +8,18 @@ NOTE: This [Node](Node.md) can only be used in the **Fragment** [Shader Stage](S ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| UV | Input | Vector 2 | UV | Input UV value | -| Width | Input | Float | None | Rectangle width | -| Height | Input | Float | None | Rectangle height | -| Out | Output | Float | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| UV | Input | Vector 2 | UV | Input UV value | +| Width | Input | Float | None | Rectangle width | +| Height | Input | Float | None | Rectangle height | +| Out | Output | Float | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Dropdown | Fastest, Nicest | Robustness of computation | +| Control | Description | +|:---|:---| +| (Dropdown) | Select the robustness of computation. The options are:
  • **Fastest**
  • **Nicest**
| ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Refract-Node.md b/Packages/com.unity.shadergraph/Documentation~/Refract-Node.md index 8cb41cadb4d..f39b0b57576 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Refract-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Refract-Node.md @@ -25,9 +25,9 @@ The Refract node uses the principles described in [Snell's Law](https://en.wikip ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| Mode | Dropdown | • **Safe:** Returns a null vector result instead of a NaN result at the point of critical angle refraction.
• **CriticalAngle:** Avoids the **Safe** check for a potential NaN result. || +| Control | Description | +|:---|:---| +| **Mode** | Select a mode to handle results at the point of critical angle refraction. The options are:
  • **Safe:** Returns a null vector result instead of a NaN result at the point of critical angle refraction.
  • **CriticalAngle:** Avoids the **Safe** check for a potential NaN result.
| ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Window.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Window.md index d49036d4740..c4f124860b7 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Window.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Window.md @@ -21,18 +21,16 @@ To access the **Shader Graph Window**, you must first create a [Shader Graph Ass Use the **Shader Graph Window** toolbar to manage the shader graph asset, display elements in the window, and more. -| Icon | Item | Description | -|:--------------------|:--------------------|:------------| -| ![Image](images/sg-save-icon.png) | **Save Asset** | Save the graph to update the [Shader Graph Asset](index.md). | -| ![Image](images/sg-dropdown-icon.png) | **Save As** | Save the [Shader Graph Asset](index.md) under a new name. | -| | **Show In Project** | Highlight the [Shader Graph Asset](index.md) in the [Project Window](https://docs.unity3d.com/Manual/ProjectView.html). | -| | **Check Out** | If version control is enabled, check out the [Shader Graph Asset](index.md) from the source control provider. | -| ![Image](images/sg-color-mode-selector.png) | **Color Mode Selector** | Select a [Color Mode](Color-Modes.md) for the graph. | -| ![Image](images/sg-blackboard-icon.png) | **Blackboard** | Toggle the visibility of the [Blackboard](Blackboard.md). | -| ![Image](images/sg-graph-inspector-icon.png) | **Graph Inspector** | Toggle the visibility of the [Graph Inspector](Internal-Inspector.md). | -| ![Image](images/sg-main-preview-icon.png) | **Main Preview** | Toggle the visibility of the [Main Preview](Main-Preview.md). | -| ![Image](images/sg-help_icon.png) | **Help** | Open the Shader Graph documentation in the browser. | -| ![Image](images/sg-dropdown-icon.png) | **Resources** | Contains links to Shader Graph resources (like samples and User forums). | +| Icon | Item | Description | +|:---|:---|:---| +| ![The Save Asset icon](images/sg-save-icon.png) | **Save Asset** | Save the graph to update the [Shader Graph Asset](index.md). | +| ![The asset file management icon](images/sg-dropdown-icon.png) | **Asset file management** | Use additional options to manage the graph asset file. The options are:
  • **Save As**: Save the [Shader Graph Asset](index.md) under a new name.
  • **Show In Project**: Highlight the [Shader Graph Asset](index.md) in the [Project Window](https://docs.unity3d.com/Manual/ProjectView.html).
  • **Check Out**: If version control is enabled, check out the [Shader Graph Asset](index.md) from the source control provider.
| +| ![The Color Mode Selector icon](images/sg-color-mode-selector.png) | **Color Mode Selector** | Select a [Color Mode](Color-Modes.md) for the graph. | +| ![The Blackboard icon](images/sg-blackboard-icon.png) | **Blackboard** | Toggle the visibility of the [Blackboard](Blackboard.md). | +| ![The Graph Inspector icon](images/sg-graph-inspector-icon.png) | **Graph Inspector** | Toggle the visibility of the [Graph Inspector](Internal-Inspector.md). | +| ![The Main Preview icon](images/sg-main-preview-icon.png) | **Main Preview** | Toggle the visibility of the [Main Preview](Main-Preview.md). | +| ![The Help icon](images/sg-help_icon.png) | **Help** | Open the Shader Graph documentation in the browser. | +| ![The Resources icon](images/sg-dropdown-icon.png) | **Resources** | Contains links to Shader Graph resources (like samples and User forums). | ## Workspace diff --git a/Packages/com.unity.shadergraph/Documentation~/ShaderGraph-Samples.md b/Packages/com.unity.shadergraph/Documentation~/ShaderGraph-Samples.md index 430755a769c..7dc00155b2d 100644 --- a/Packages/com.unity.shadergraph/Documentation~/ShaderGraph-Samples.md +++ b/Packages/com.unity.shadergraph/Documentation~/ShaderGraph-Samples.md @@ -22,41 +22,41 @@ The following samples are currently available for Shader Graph. | Procedural Patterns | |:--------------------| -|![](images/Patterns_Page.png) | +|![A visual overview of Procedural Patterns](images/Patterns_Page.png) | | This collection of Assets showcases various procedural techniques possible with Shader Graph. Use them directly in your Project, or edit them to create other procedural patterns. The patterns in this collection are: Bacteria, Brick, Dots, Grid, Herringbone, Hex Lattice, Houndstooth, Smooth Wave, Spiral, Stripes, Truchet, Whirl, Zig Zag. | | Node Reference | |:--------------------| -|![](images/NodeReferenceSamples.png) | +|![A visual overview of Node Reference](images/NodeReferenceSamples.png) | | This set of Shader Graph assets provides reference material for the nodes available in the Shader Graph node library. Each graph contains a description for a specific node, examples of how it can be used, and useful tips. Some example assets also show a break-down of the math that the node is doing. You can use these samples along with the documentation to learn more about the behavior of individual nodes. | | [Feature Examples](Shader-Graph-Sample-Feature-Examples.md) | |:--------------------| -|![](images/FeatureExamplesSample.png) | +|![A visual overview of Feature Examples](images/FeatureExamplesSample.png) | | This is a collection of over 30 Shader Graph files. Each file demonstrates a specific shader technique such as angle blending, triplanar projection, parallax mapping, and custom lighting. While you won’t use these shaders directly in your project, you can use them to quickly learn and understand the various techniques, and recreate them into your own work. Each file contains notes that describe what the shader is doing, and most of the shaders are set up with the core functionality contained in a subgraph that’s easy to copy and paste directly into your own shader. The sample also has extensive documentation describing each of the samples to help you learn. | [Production Ready Shaders](Shader-Graph-Sample-Production-Ready.md) | |:--------------------| -|![](images/ProductionReadySample.png) | +|![A visual example of Production Ready Shaders](images/ProductionReadySample.png) | | The Shader Graph Production Ready Shaders sample is a collection of Shader Graph shader assets that are ready to be used out of the box or modified to suit your needs. You can take them apart and learn from them, or just drop them directly into your project and use them as they are. The sample includes the Shader Graph versions of the HDRP and URP Lit shaders. It also includes a step-by-step tutorial for how to combine several of the shaders to create a forest stream environment. | [UGUI Shaders](Shader-Graph-Sample-UGUI-Shaders.md) | |:--------------------| -|![](images/UIToolsSample.png) | +|![A visual example of UGUI Shaders](images/UIToolsSample.png) | | The Shader Graph UGUI Shaders sample is a collection of Shader Graph subgraphs that you can use to build user interface elements. They speed up the process of building widgets, buttons, and backgrounds for the user interface of your project. With these tools, you can build dynamic, procedural UI elements that don’t require any texture memory and scale correctly for any resolution screen. In addition to the subgraphs, the sample also includes example buttons, indicators, and backgrounds built with the subgraphs. The examples show how the subgraphs function in context and help you learn how to use them. | Custom Material Property Drawers | |:--------------------| -|![](images/CustomMaterialPropertySample.png) | +|![An example result of Custom Material Property Drawers in a material's Inspector](images/CustomMaterialPropertySample.png) | | This sample contains an example of a Custom Material Property Drawer that allows using a Min/Max Slider to control a Vector2 x and y values, often used for range remapping. It comes with a documented Shader Graph example. | | [Custom Lighting](Shader-Graph-Sample-Custom-Lighting.md) | |:--------------------| -|![](images/CustomLightingSample.png) | +|![A visual example of Custom Lighting](images/CustomLightingSample.png) | | The Shader Graph Custom Lighting sample shows how you can create your own custom lighting model in Shader Graph and provides dozens of example templates, shaders, and subgraphs to help you get started with your own custom lighting. | [Terrain Shaders](Shader-Graph-Sample-Terrain-Shaders.md) | |:--------------------| -|![](images/TerrainSample.png) | +|![A visual overview of Terrain Shaders](images/TerrainSample.png) | | The Shader Graph Terrain Sample provides example shaders to learn from and subgraphs that you can use to build your own terrain shaders. Custom terrain shaders can use more advanced features like hexagon tile break-up, parallax occlusion mapping, or triplanar projection. Or you can use techniques like array texture sampling or alternate texture packing methods to make the shader cheaper to render than the default one. Whether you're making faster or more advanced terrain shaders, this sample will help you get the results you're looking for. | diff --git a/Packages/com.unity.shadergraph/Documentation~/Slider-Node.md b/Packages/com.unity.shadergraph/Documentation~/Slider-Node.md index 593c76aebad..7cd0030551c 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Slider-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Slider-Node.md @@ -6,17 +6,17 @@ Defines a constant **Float** value in the shader using a **Slider** field. Can b ## Ports -| Name | Direction | Type | Binding | Description | -|:------------ |:-------------|:-----|:---|:---| -| Out | Output | Float | None | Output value | +| Name | Direction | Type | Binding | Description | +|:--- |:---|:---|:---|:---| +| Out | Output | Float | None | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Slider | | Defines the output value. | -| Min | Float | | Defines the slider parameter's minimum value. | -| Max | Float | | Defines the slider parameter's maximum value. | +| Name | Type | Options | Description | +|:--- |:---|:---|:---| +| | Slider | | Defines the output value. | +| Min | Float | | Defines the slider parameter's minimum value. | +| Max | Float | | Defines the slider parameter's maximum value. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Split-Texture-Transform-Node.md b/Packages/com.unity.shadergraph/Documentation~/Split-Texture-Transform-Node.md index e63a7294c5c..6a619f89c58 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Split-Texture-Transform-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Split-Texture-Transform-Node.md @@ -7,7 +7,7 @@ This node outputs the texture with its tiling set to (0,0) and scale set to (1,1 Another term you may hear for tiling in this context is scale. Both terms refer to the size of the texture tiles. -![](images/node-splittexturetransform.png) +![The Split Texture Transform node](images/node-splittexturetransform.png) ### Ports diff --git a/Packages/com.unity.shadergraph/Documentation~/Sticky-Notes.md b/Packages/com.unity.shadergraph/Documentation~/Sticky-Notes.md index bb391f76915..ab0f3ffb3f2 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Sticky-Notes.md +++ b/Packages/com.unity.shadergraph/Documentation~/Sticky-Notes.md @@ -13,8 +13,6 @@ To create a Sticky Note, right-click an empty space in the graph view and, in th * **Title**: The text area at the top of the Sticky Note is the title. You can use it to concisely describe what information the Sticky Note contains. * **Body**: The larger text area below the title area is the body. You can write the full contents of the note here. -![](images/StickyNote.png) - ### Editing text To edit text on a Sticky Note, double-click on a text area. This also selects the entire text area, so be sure to move the cursor before you edit the text. diff --git a/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md b/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md index 17083ee1ac5..93467ed6904 100644 --- a/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md +++ b/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md @@ -121,7 +121,7 @@ * [Gradient](Gradient-Node.md) * [Sample Gradient](Sample-Gradient-Node.md) * High Definition Render Pipeline - * [Custom Color Buffer](HD-Custom-Color-Node.md) + * [Custom Color Buffer](Custom-Color-Buffer-Node.md) * [Custom Depth Buffer](HD-Custom-Depth-Node.md) * [Diffusion Profile](Diffusion-Profile-Node.md) * [Exposure](Exposure-Node.md) diff --git a/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Array-Asset-Node.md b/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Array-Asset-Node.md index 37120cce91a..b9eda3a25ff 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Array-Asset-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Array-Asset-Node.md @@ -6,15 +6,15 @@ Defines a constant **Texture 2D Array Asset** for use in the shader. To sample t ## Ports -| Name | Direction | Type | Description | -|:------------ |:-------------|:-----|:---| -| Out | Output | Texture 2D Array | Output value | +| Name | Direction | Type | Description | +|:--- |:---|:---|:---| +| Out | Output | Texture 2D Array | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Object Field (Texture 2D Array) | | Defines the texture 2D array asset from the project. | +| Control | Description | +|:--- |:---| +| (Texture 2D Array) | Defines the texture 2D array asset from the project. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Asset-Node.md b/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Asset-Node.md index 76f924e8b40..8868ed3c05b 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Asset-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Texture-2D-Asset-Node.md @@ -6,15 +6,15 @@ Defines a constant **Texture 2D Asset** for use in the shader. To sample the **T ## Ports -| Name | Direction | Type | Description | -|:------------ |:-------------|:-----|:---| -| Out | Output | Texture 2D | Output value | +| Name | Direction | Type | Description | +|:--- |:---|:---|:---| +| Out | Output | Texture 2D | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Object Field (Texture) | | Defines the texture 3D asset from the project. | +| Control | Description | +|:--- |:---| +| (Texture) | Defines the texture 3D asset from the project. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/Texture-3D-Asset-Node.md b/Packages/com.unity.shadergraph/Documentation~/Texture-3D-Asset-Node.md index 82bbddd03b9..efa5a10b0b7 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Texture-3D-Asset-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Texture-3D-Asset-Node.md @@ -6,15 +6,15 @@ Defines a constant **Texture 3D Asset** for use in the shader. To sample the **T ## Ports -| Name | Direction | Type | Description | -|:------------ |:-------------|:-----|:---| -| Out | Output | Texture 3D | Output value | +| Name | Direction | Type | Description | +|:--- |:---|:---|:---| +| Out | Output | Texture 3D | Output value | ## Controls -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| | Object Field (Texture 3D) | | Defines the texture 3D asset from the project. | +| Control | Description | +|:--- |:---| +| (Texture 3D) | Defines the texture 3D asset from the project. | ## Generated Code Example diff --git a/Packages/com.unity.shadergraph/Documentation~/ThreadMapDetail-Node.md b/Packages/com.unity.shadergraph/Documentation~/ThreadMapDetail-Node.md index 2594ce32ebf..c765cd3af94 100644 --- a/Packages/com.unity.shadergraph/Documentation~/ThreadMapDetail-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/ThreadMapDetail-Node.md @@ -26,131 +26,30 @@ The ThreadMapDetail node is under the **Utility** > **High Definition Render [!include[nodes-inputs](./snippets/nodes-inputs.md)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeBindingDescription
Use Thread MapBooleanNoneUse the port's default input to enable or disable the ThreadMapDetail node. You can also connect a node that outputs a Boolean to choose when to enable or disable the thread map.
ThreadMapTexture 2DNoneThe texture that contains the detailed information of a fabric's thread pattern. The texture should contain 4 channels: -
    -
  • R - The ambient occlusion
  • -
  • G - The normal Y-axis
  • -
  • B - The smoothness
  • -
  • A - The normal X-axis
  • -
-
UVVector 2UVThe UV coordinates the ThreadMapDetail node should use to map the ThreadMap texture on the geometry.
NormalsVector 3NoneThe base normal map that you want your Shader Graph to apply to the geometry before it applies the thread map.
SmoothnessFloatNoneThe base smoothness value that you want your Shader Graph to apply to the geometry before it applies the thread map.
AlphaFloatNoneThe base alpha value that you want your Shader Graph to apply to the geometry before it applies the thread map.
Ambient OcclusionFloatNoneThe base ambient occlusion value that you want your Shader Graph to apply to the geometry before it applies the thread map.
Thread AO StrengthFloatNoneSpecify a value of 0 or 1 to determine how the ThreadMap's ambient occlusion should impact the final shader result: -
    -
  • If you provide a value of 0, the ThreadMap's ambient occlusion has no effect on the final output of the shader.
  • -
  • If you provide a value of 1, Shader Graph multiplies your base Ambient Occlusion value by the ambient occlusion value specified in your ThreadMap to determine the final output of the shader.
Thread Normal StrengthFloatNoneSpecify a value of 0 or 1 to determine how the ThreadMap's normal should impact the final shader result: -
    -
  • If you provide a value of 0, the ThreadMap's normal has no effect on the final output of the shader.
  • -
  • If you provide a value of 1, Shader Graph blends the values from your base Normals with the normal specified in your ThreadMap to determine the final output of the shader.
Thread Smoothness StrengthFloatNoneSpecify a value of 0 or 1 to determine how the ThreadMap's smoothness should impact the final shader result: -
    -
  • If you provide a value of 0, the ThreadMap's smoothness value has no effect on the final output of the shader.
  • -
  • If you provide a value of 1, Shader Graph adds the smoothness value specified in your ThreadMap to your base Smoothness value to determine the final output of the shader. For this calculation, Shader Graph remaps the value of your ThreadMap's smoothness from (0,1) to (-1, 1).
+| **Name** | **Type** | **Binding** | **Description** | +| :--- | :--- | :--- | :--- | +| **Use Thread Map** | Boolean | None | Use the port's default input to enable or disable the ThreadMapDetail node. You can also connect a node that outputs a Boolean to choose when to enable or disable the thread map. | +| **ThreadMap** | Texture 2D | None | The texture that contains the detailed information of a fabric's thread pattern. The texture should contain 4 channels: