Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void LoadGraph()
}

[Test]
public void CanSetNodeToFloat()
public void CanSetNodeToSingle()
{
m_Graph.ValidateGraph();

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

Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
}

[Test]
Expand All @@ -60,7 +60,7 @@ public void CanSetNodeToHalf()
}

[Test]
public void CanCastToFloat()
public void CanCastToSingle()
{
m_Graph.ValidateGraph();

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

Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
}

[Test]
Expand All @@ -86,7 +86,7 @@ public void CanCastToHalf()
}

[Test]
public void CanSetPropToFloat()
public void CanSetPropToSingle()
{
m_Graph.ValidateGraph();

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

Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
}

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

Assert.AreEqual(ConcretePrecision.Float, testNode.concretePrecision);
Assert.AreEqual(ConcretePrecision.Single, testNode.concretePrecision);
}
}
}
3,074 changes: 2,854 additions & 220 deletions TestProjects/ShaderGraph/Assets/CommonAssets/Graphs/Precision.shadergraph

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To specify the output image, the Graphics Compositor uses a graph of compositing

When you create a Composition Graph, there are two main types of input property you can expose:
- **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.
- **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.
- **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.

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:

Expand Down Expand Up @@ -47,5 +47,5 @@ The [Sub-layer Properties](Compositor-User-Options.md#Sub-layer-properties) sect
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.

## Composition Parameters
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.
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.

Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ The following table describes the input ports on a Decal Master Node, including
| --------------------- | -------- | -------- | ------------------------------------------------------------ |
| **Position** | Vector 3 | Vertex | Set the object space position of the Material per vertex. |
| **BaseColor** | Vector 3 | Fragment | Set the color of the Material. To assign an image, connect a sampled Texture2D to this Master Node. |
| **BaseColor Opacity** | Vector 1 | Fragment | Set the Material's opacity. 0 is fully transparent, and 1 is fully opaque. |
| **BaseColor Opacity** | Float | Fragment | Set the Material's opacity. 0 is fully transparent, and 1 is fully opaque. |
| **Normal** | Vector 3 | Fragment | Set the Material's normal value. The normals you assign should be in Tangent Space. |
| **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. |
| **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. |
| **Ambient Occlusion** | Vector 1 | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to 0 to remove all global illumination. |
| **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. |
| **MAOS Opacity** | Vector 1 | Fragment | Set the opacity of the **Metallic**, **Ambient Occlusion** and **Smoothness** values. |
| **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. |
| **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. |
| **Ambient Occlusion** | Float | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to 0 to remove all global illumination. |
| **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. |
| **MAOS Opacity** | Float | Fragment | Set the opacity of the **Metallic**, **Ambient Occlusion** and **Smoothness** values. |
| **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. |

<a name="SettingsMenu"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@ The following table describes the input ports on a Fabric Master Node, including
| ---------------------- | ----------------- | --------- | ------------------------------------------------------------ |
| **Vertex Position** | Vector 3 | Vertex | The object space position of the Material per vertex. |
| **Vertex Normal** | Vector 3 | Vertex | The object space normals of the Material. |
| **Vertex Tangent** | Vector3 | Vertex | The object space tangent of the Material. |
| **Vertex Tangent** | Vector 3 | Vertex | The object space tangent of the Material. |
| **BaseColor** | Vector 3 | Fragment | The color of the Material. To assign an image, connect a sampled Texture2D to this Master Node. |
| **SpecularOcclusion** | Vector 1 | Fragment | A multiplier for the intensity of specular global illumination. This port only appears when you set **Specular Occlusion Mode** to **Custom**. |
| **SpecularOcclusion** | Float | Fragment | A multiplier for the intensity of specular global illumination. This port only appears when you set **Specular Occlusion Mode** to **Custom**. |
| **Normal** | Vector 3 | Fragment | The normal of the point in tangent space. To handle this property, you should use multiple maps. One map for the base and one map for the fabric thread that adds the additional details. |
| **BentNormal** | Vector 3 | Fragment | The [bent normal](Glossary.md#BentNormalMap) of the point. |
| **Smoothness** | Vector 1 | Fragment | The appearance of the primary specular highlight. Every light ray that hits a smooth surface bounces off at predictable and consistent angles. For a perfectly smooth surface that reflects light like a mirror, set this to a value of 1. For a rougher surface, set this to a lower value. |
| **AmbientOcclusion** | Vector1 | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to **0** to remove all global illumination. |
| **SpecularColor** | Vector3 | Fragment | The color of the specular highlight. To assign an image, connect a sampled Texture2D to this Master Node. |
| **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. |
| **AmbientOcclusion** | Float | Fragment | A multiplier for the intensity of diffuse global illumination. Set this to **0** to remove all global illumination. |
| **SpecularColor** | Vector 3 | Fragment | The color of the specular highlight. To assign an image, connect a sampled Texture2D to this Master Node. |
| **Diffusion Profile** | Diffusion Profile | Fragment | Specifies which [Diffusion Profile](Diffusion-Profile.md) the Material uses for subsurface scattering and/or transmission. This port only appears when you enable **Subsurface Scattering** or **Transmission**. |
| **SubsurfaceMask** | Vector1 | Fragment | Indicates whether subsurface scattering should affect the shaded point. This port only appears when you enable the **Subsurface Scattering** setting. |
| **Thickness** | Vector1 | Fragment | The thickness of the surface that HDRP uses to evaluate transmission. This port only appears when you enable the **Transmission** setting. |
| **Tangent** | Vector3 | Fragment | The tangent of the point in tangent space. This is useful when the surface has a non-null anisotropy value. This port only appears when you set **Material Type** to **Silk**. |
| **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**. |
| **SubsurfaceMask** | Float | Fragment | Indicates whether subsurface scattering should affect the shaded point. This port only appears when you enable the **Subsurface Scattering** setting. |
| **Thickness** | Float | Fragment | The thickness of the surface that HDRP uses to evaluate transmission. This port only appears when you enable the **Transmission** setting. |
| **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**. |
| **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**. |
| **Emission** | Vector 3 | Fragment | The Material's emission color value. The RGB values you assign should be between 0-255. The Intensity value should be within the range **-10** and **10**. |
| **Alpha** | Vector 1 | Fragment | The Material's alpha value. The Material uses this for transparency and/or alpha clip. HDRP expects a range from **0** to **1**. This port only appears when you set **Material Type** to **Silk**. |
| **AlphaClipThreshold** | Vector 1 | Fragment | The alpha value limit that HDRP uses to determine whether it should render each pixel of the Material. If the alpha value of the pixel is equal to or higher than this threshold then HDRP renders the pixel. If the value is lower than this threshold then HDRP does not render the pixel. This port only appears when you enable the **Alpha Clipping** setting. |
| **BakedGI** | Vector 3 | Fragment | Replaces the built-in diffuse global illumination (GI) solution with a value that you can set. This is for the front [face](Glossary.md#Face) of the Mesh only.This port only appears when you enable the **Override Baked GI** setting. |
| **BakedBackGI** | Vector3 | Fragment | Replaces the built-in diffuse GI solution with a value that you can set. This is for the back [face](Glossary.md#Face) of the Mesh only.This port only appears when you enable the **Override Baked GI** setting. |
| **DepthOffset** | Vector 1 | Fragment | The value that the Shader uses to increase the depth of the fragment by.. This port only appears when you enable the **Depth Offset setting**. |
| **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**. |
| **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. |
| **BakedGI** | Vector 3 | Fragment | Replaces the built-in diffuse global illumination (GI) solution with a value that you can set. This is for the front [face](Glossary.md#Face) of the Mesh only. This port only appears when you enable the **Override Baked GI** setting. |
| **BakedBackGI** | 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. |
| **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**. |

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

Expand Down
Loading