Skip to content

Commit c0d944f

Browse files
sebastienlagardealindmanUnitysharlenet
authored
Renamed UI Vector1 to Float / Renamed enum Float precision to Single (V2) (#1979)
* rename precision from float to single * rename vector 1 to float * rename vector1 in the documentation * Update Compositor-User-Guide.md * Update Upgrade-Guide-10-0-x.md * fix precision test * add search synonym to upgraded node * update precision test graph * Fixed extra whitespaces and minor rewording * Rename also all enum which a Vector1 inside to get correct string conversion as float * Renamed Float.md and updated links to it * Revert "Rename also all enum which a Vector1 inside to get correct string conversion as float" This reverts commit 3d5fe9b. * rename property type to have correct type display * Update DiffusionProfileShaderProperty.cs * Fix blackboard info name after merge of Antoie PR * rename the uss color mode to keep correct banding color Co-authored-by: Alex Lindman <[email protected]> Co-authored-by: Sharlene Tan <[email protected]>
1 parent 789a9dd commit c0d944f

File tree

111 files changed

+3193
-552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+3193
-552
lines changed

TestProjects/ShaderGraph/Assets/CommonAssets/Editor/PrecisionTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void LoadGraph()
3434
}
3535

3636
[Test]
37-
public void CanSetNodeToFloat()
37+
public void CanSetNodeToSingle()
3838
{
3939
m_Graph.ValidateGraph();
4040

@@ -43,7 +43,7 @@ public void CanSetNodeToFloat()
4343
if(!m_TestNodes.TryGetValue(testName, out testNode))
4444
throw new Exception($"Failed to find test node for {testName}");
4545

46-
Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
46+
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
4747
}
4848

4949
[Test]
@@ -60,7 +60,7 @@ public void CanSetNodeToHalf()
6060
}
6161

6262
[Test]
63-
public void CanCastToFloat()
63+
public void CanCastToSingle()
6464
{
6565
m_Graph.ValidateGraph();
6666

@@ -69,7 +69,7 @@ public void CanCastToFloat()
6969
if(!m_TestNodes.TryGetValue(testName, out testNode))
7070
throw new Exception($"Failed to find test node for {testName}");
7171

72-
Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
72+
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
7373
}
7474

7575
[Test]
@@ -86,7 +86,7 @@ public void CanCastToHalf()
8686
}
8787

8888
[Test]
89-
public void CanSetPropToFloat()
89+
public void CanSetPropToSingle()
9090
{
9191
m_Graph.ValidateGraph();
9292

@@ -95,7 +95,7 @@ public void CanSetPropToFloat()
9595
if(!m_TestNodes.TryGetValue(testName, out testNode))
9696
throw new Exception($"Failed to find test node for {testName}");
9797

98-
Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
98+
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
9999
}
100100

101101
[Test]
@@ -160,7 +160,7 @@ public void CanResolveInheritance()
160160
if(!m_TestNodes.TryGetValue(testName, out testNode))
161161
throw new Exception($"Failed to find test node for {testName}");
162162

163-
Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
163+
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
164164
}
165165
}
166166
}

TestProjects/ShaderGraph/Assets/CommonAssets/Graphs/Precision.shadergraph

Lines changed: 2854 additions & 220 deletions
Large diffs are not rendered by default.

com.unity.render-pipelines.high-definition/Documentation~/Compositor-User-Guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To specify the output image, the Graphics Compositor uses a graph of compositing
1515

1616
When you create a Composition Graph, there are two main types of input property you can expose:
1717
- **Composition Layer**: Any **Texture2D** properties act as Composition Layers which correspond to a layer the graph composites to generate the final frame. These properties appear automatically as Composition Layers in the [Render Schedule](#render-schedule) section of the Graphics Compositor window. The **Mode** option for them in Shader Graph corresponds to the default value the Shader uses when you toggle off the visibility of the layer in the Render Schedule list.<br/> **Note**: By default, this value is set to white, but for many compositing operations and behaviors, you may want to set this to black instead.
18-
- **Composition Parameters**: This refers to any exposed property that is not a Texture2D. Composition Parameters can control various aspects of the composition. Examples of Composition Parameters include a Vector1 input to control the overall brightness or a Color input to tint a Texture2D. These properties appear automatically in the [Composition Parameters](#composition-parameters) section of the Graphics Compositor window.
18+
- **Composition Parameters**: This refers to any exposed property that is not a Texture2D. Composition Parameters can control various aspects of the composition. Examples of Composition Parameters include a Float input to control the overall brightness or a Color input to tint a Texture2D. These properties appear automatically in the [Composition Parameters](#composition-parameters) section of the Graphics Compositor window.
1919

2020
The following graph contains examples of the property types described above. The **Logo** property is an example of a Composition Layer and the **Opacity** property is an example of an input property to control an aspect of the composition:
2121

@@ -47,5 +47,5 @@ The [Sub-layer Properties](Compositor-User-Options.md#Sub-layer-properties) sect
4747
The Render Schedule is a re-orderable list of Composition Layers and Sub-layers. Sub-layers appear indented below their corresponding parent Composition Layer, which makes it easier to see the hierarchical relationship. When multiple Sub-layers appear below a parent layer, they form a camera stack. Unity renders layers at the top first. To re-order the list, you can click and move both Composition Layers and Sub-layers. You can use this to change the rendering order in a camera stack or move a Sub-layer from one parent Composition Layer to another.
4848

4949
## Composition Parameters
50-
This section shows every exposed property that is not an input Composition Layer (for example, a Vector1 to control the brightness of the final composition or a Color to tint a Texture2D). In this section, the window allows you to edit each property value outside of the Composition Graph. It is good practice to expose properties from the graph to the Graphics Compositor window, instead of hard-coding their values. This helps you to share composition profiles between Projects because those you do not need to open the Composition Graph to edit any values.
50+
This section shows every exposed property that is not an input Composition Layer (for example, a Float to control the brightness of the final composition or a Color to tint a Texture2D). In this section, the window allows you to edit each property value outside of the Composition Graph. It is good practice to expose properties from the graph to the Graphics Compositor window, instead of hard-coding their values. This helps you to share composition profiles between Projects because those you do not need to open the Composition Graph to edit any values.
5151

com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Decal.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ The following table describes the input ports on a Decal Master Node, including
2929
| --------------------- | -------- | -------- | ------------------------------------------------------------ |
3030
| **Position** | Vector 3 | Vertex | Set the object space position of the Material per vertex. |
3131
| **BaseColor** | Vector 3 | Fragment | Set the color of the Material. To assign an image, connect a sampled Texture2D to this Master Node. |
32-
| **BaseColor Opacity** | Vector 1 | Fragment | Set the Material's opacity. 0 is fully transparent, and 1 is fully opaque. |
32+
| **BaseColor Opacity** | Float | Fragment | Set the Material's opacity. 0 is fully transparent, and 1 is fully opaque. |
3333
| **Normal** | Vector 3 | Fragment | Set the Material's normal value. The normals you assign should be in Tangent Space. |
34-
| **Normal Opacity** | Vector 1 | Fragment | Set the blend factor for the Material’s normals. A decal modifies the normals of the Material the decal projects onto. A value of 0 means that the decal does not affect the normals of the surface it projects onto. A value of 1 means that the decal fully overrides the normals of the surface. |
35-
| **Metallic** | Vector 1 | Fragment | Define how metallic the Material's appearance is (that is, how shiny it looks, and how much its appearance is based on the colours of the environment around it). 0 is completely non-metallic, and 1 is the maximum level of metallic appearance that Unity can achieve via this setting. |
36-
| **Ambient Occlusion** | Vector 1 | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to 0 to remove all global illumination. |
37-
| **Smoothness** | Vector 1 | Fragment | Set 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. |
38-
| **MAOS Opacity** | Vector 1 | Fragment | Set the opacity of the **Metallic**, **Ambient Occlusion** and **Smoothness** values. |
34+
| **Normal Opacity** | Float | Fragment | Set the blend factor for the Material’s normals. A decal modifies the normals of the Material the decal projects onto. A value of 0 means that the decal does not affect the normals of the surface it projects onto. A value of 1 means that the decal fully overrides the normals of the surface. |
35+
| **Metallic** | Float | Fragment | Define how metallic the Material's appearance is (that is, how shiny it looks, and how much its appearance is based on the colors of the environment around it). 0 is completely non-metallic, and 1 is the maximum level of metallic appearance that Unity can achieve via this setting. |
36+
| **Ambient Occlusion** | Float | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to 0 to remove all global illumination. |
37+
| **Smoothness** | Float | Fragment | Set 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. |
38+
| **MAOS Opacity** | Float | Fragment | Set the opacity of the **Metallic**, **Ambient Occlusion** and **Smoothness** values. |
3939
| **Emission** | Vector 3 | Fragment | Set 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. <br/>**Emission** only works on an Opaque Decal Shader. |
4040

4141
<a name="SettingsMenu"></a>

com.unity.render-pipelines.high-definition/Documentation~/Master-Node-Fabric.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ The following table describes the input ports on a Fabric Master Node, including
3333
| ---------------------- | ----------------- | --------- | ------------------------------------------------------------ |
3434
| **Vertex Position** | Vector 3 | Vertex | The object space position of the Material per vertex. |
3535
| **Vertex Normal** | Vector 3 | Vertex | The object space normals of the Material. |
36-
| **Vertex Tangent** | Vector3 | Vertex | The object space tangent of the Material. |
36+
| **Vertex Tangent** | Vector 3 | Vertex | The object space tangent of the Material. |
3737
| **BaseColor** | Vector 3 | Fragment | The color of the Material. To assign an image, connect a sampled Texture2D to this Master Node. |
38-
| **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**. |
38+
| **SpecularOcclusion** | Float | Fragment | A multiplier for the intensity of specular global illumination. This port only appears when you set **Specular Occlusion Mode** to **Custom**. |
3939
| **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. |
4040
| **BentNormal** | Vector 3 | Fragment | The [bent normal](Glossary.md#BentNormalMap) of the point. |
41-
| **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. |
42-
| **AmbientOcclusion** | Vector1 | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to **0** to remove all global illumination. |
43-
| **SpecularColor** | Vector3 | Fragment | The color of the specular highlight. To assign an image, connect a sampled Texture2D to this Master Node. |
41+
| **Smoothness** | Float | 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. |
42+
| **AmbientOcclusion** | Float | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to **0** to remove all global illumination. |
43+
| **SpecularColor** | Vector 3 | Fragment | The color of the specular highlight. To assign an image, connect a sampled Texture2D to this Master Node. |
4444
| **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**. |
45-
| **SubsurfaceMask** | Vector1 | Fragment | Indicates whether subsurface scattering should affect the shaded point. This port only appears when you enable the **Subsurface Scattering** setting. |
46-
| **Thickness** | Vector1 | Fragment | The thickness of the surface that HDRP uses to evaluate transmission. This port only appears when you enable the **Transmission** setting. |
47-
| **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**. |
48-
| **Anisotropy** | Vector1 | Fragment | The degree of asymmetry in the specular term with regards to the local basis of the point.This port only appears when you set **Material Type** to **Silk**. |
45+
| **SubsurfaceMask** | Float | Fragment | Indicates whether subsurface scattering should affect the shaded point. This port only appears when you enable the **Subsurface Scattering** setting. |
46+
| **Thickness** | Float | Fragment | The thickness of the surface that HDRP uses to evaluate transmission. This port only appears when you enable the **Transmission** setting. |
47+
| **Tangent** | Vector 3 | 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**. |
48+
| **Anisotropy** | Float | Fragment | The degree of asymmetry in the specular term with regards to the local basis of the point. This port only appears when you set **Material Type** to **Silk**. |
4949
| **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**. |
50-
| **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**. |
51-
| **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. |
52-
| **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. |
53-
| **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. |
54-
| **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**. |
50+
| **Alpha** | Float | 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**. |
51+
| **AlphaClipThreshold** | Float | 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. |
52+
| **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. |
53+
| **BakedBackGI** | Vector 3 | 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. |
54+
| **DepthOffset** | Float | 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**. |
5555

5656
<a name="SettingsMenu"></a>
5757

0 commit comments

Comments
 (0)