Skip to content

Commit

Permalink
[Port] [2021.3] Fix broken links and formatting in Shader Graph docs …
Browse files Browse the repository at this point in the history
…(DOCATT-589 and DOCATT-1045

*[This PR is intended to fix broken links and formatting issues in the Shader Graph documentation for the following JIRA tickets:

- DOCATT-589
- DOCATT-1045 ]*
  • Loading branch information
svc-reach-platform-support authored and Evergreen committed Oct 23, 2024
1 parent 0f84ba8 commit 5458e2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Packages/com.unity.shadergraph/Documentation~/Keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Although some fields are specific to certain types of Keywords, all Keywords hav
| ------------------ | -------- | ------------------------------------------------------------ |
| **Display Name** | String | The display name of the Keyword. Unity shows this name in the title bar of nodes that reference the corresponding Keyword, and also in the Material Inspector if you expose that Keyword. |
| **Exposed** | Boolean | When you set this parameter to **true**, Unity displays this Keyword in the Material Inspector. If you set it to **false**, the Keyword does not appear in the Material Inspector.<br/><br/>If you intend to access a GLOBAL shader variable, be sure to add it as you would normally add an input variable, but deselect **Exposed**.|
| **Reference Name** | String | The internal name for the Keyword in the shader.<br/><br/>If you overwrite the Reference Name parameter, take note of the following:<ul><li>Keyword Reference Names are always in full capitals, so Unity converts all lowercase letters to uppercase.<li/><li>If the Reference Name contains any characters that HLSL does not support, Unity replaces those characters with underscores.<li/><li>Right-click on a Reference Name, and select **Reset Reference** to revert to the default Reference Name.<li/><ul/> |
| **Definition** | Enum | Sets how the Keyword is defined in the shader. Determines when to compile keyword variants.<br/><br/>There are three available options:<ul><li>**Shader Feature**: Unity only compiles keyword variants when a Material selects the relevant option. For this option to be available in the Player, a Material selecting it must exist at build-time.<li/><li>**Multi Compile**: Pre-compiles all the variant possibilities. This is slower and uses more memory, but allows the option to be dynamically switched in the Player.<li/><li>**Predefined**: The render pipeline defines this keyword and controls the settings for it.<li/><ul/> |
| **Scope** | Enum | Sets the scope at which to define the Keyword.<br/><br/>The following options are available:<ul><li>**Global Keywords**: Defines Keyword for the entire project, and it counts towards the global keyword limit.<li/><li>**Local Keywords**: Defines Keyword for only one shader, which has its own local keyword limit.<li/><ul/>When you use Predefined Keywords, Unity disables this field. |
| **Stages** | | Set the stage the keyword applies to.<br/><br/>The following options are available:<ul><li>**All** - Applies this keyword to all shader stages.<li/><li>**Vertex** - Applies this keyword to the vertex stage.<li/><li>**Fragment** - Applies this keyword to the fragment stage.<li/><ul/> |
| **Reference Name** | String | The internal name for the Keyword in the shader.<br/><br/>If you overwrite the Reference Name parameter, take note of the following:<ul><li>Keyword Reference Names are always in full capitals, so Unity converts all lowercase letters to uppercase.<li>If the Reference Name contains any characters that HLSL does not support, Unity replaces those characters with underscores.<li> Right-click on a Reference Name, and select **Reset Reference** to revert to the default Reference Name.</ul> |
| **Definition** | Enum | Sets how the Keyword is defined in the shader. Determines when to compile keyword variants.<br/><br/>There are three available options:<ul><li>**Shader Feature**: Unity only compiles keyword variants when a Material selects the relevant option. For this option to be available in the Player, a Material selecting it must exist at build-time.<li>**Multi Compile**: Pre-compiles all the variant possibilities. This is slower and uses more memory, but allows the option to be dynamically switched in the Player.<li>**Predefined**: The render pipeline defines this keyword and controls the settings for it.</ul> |
| **Scope** | Enum | Sets the scope at which to define the Keyword.<br/><br/>The following options are available:<ul><li>**Global Keywords**: Defines Keyword for the entire project, and it counts towards the global keyword limit.<li>**Local Keywords**: Defines Keyword for only one shader, which has its own local keyword limit.</ul>When you use Predefined Keywords, Unity disables this field. |
| **Stages** | | Set the stage the keyword applies to.<br/><br/>The following options are available:<ul><li>**All** - Applies this keyword to all shader stages.<<li>**Vertex** - Applies this keyword to the vertex stage.<li>**Fragment** - Applies this keyword to the fragment stage.</ul> |

<a name="BooleanKeywords"></a>
## Boolean Keywords
Expand Down Expand Up @@ -63,7 +63,7 @@ In addition to the common parameters listed above, Enum Keywords have the follow
| **Name** | **Type** | **Description** |
| ----------- | ---------------- | ------------------------------------------------------------ |
| **Default** | Enum | Select an entry from the drop-down menu to determine which value to use for the Keyword when Shader Graph generates previews. This also defines the Keyword's default value when you use this shader to create a new Material. When you edit the Entries list, Shader Graph automatically updates the options in this control. |
| **Entries** | Reorderable List | This list defines all the states for the Keyword. Each state has a separate **Display Name** and **Reference Suffix**.<br/><br/>&#8226; **Display Name**: Appears in drop-down menus for the Keyword on the [Internal Inspector](Internal-Inspector.md) and the Material Inspector. Shader Graph also uses this name for port labels on nodes that reference the Keyword.<br/>&#8226; **Reference Suffix**: This is the final keyword, presented in the format <code>Reference_ReferenceSuffix</code>. |
| **Entries** | Reorderable List | This list defines all the states for the Keyword. Each state has a separate **Display Name** and **Reference Suffix**.<ul><li> **Display Name**: Appears in drop-down menus for the Keyword on the [Internal Inspector](Internal-Inspector.md) and the Material Inspector. Shader Graph also uses this name for port labels on nodes that reference the Keyword.<li> **Reference Suffix**: This is the final keyword, presented in the format <code>Reference_ReferenceSuffix</code>.</ul> |

<a name="BuiltinKeywords"></a>
## Built-in Keywords
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Provides access to the current **Camera**'s color buffer using input **UV**, whi

The behavior of the Scene Color node isn't defined globally. The executed HLSL code for the Scene Color node is defined per **Render Pipeline**, and different **Render Pipelines** can produce different results. Custom **Render Pipelines** that wish to support the Scene Color node need to explicitly define the behavior for it. If the behavior is undefined, the Scene Color node returns 0 (black).

In the **Universal Render Pipeline** the Scene Color node returns the value of the **Camera Opaque Texture**. Refer to the **Universal Render Pipeline** for more documentation on this feature. The contents of this texture are only available for **Transparent** objects. Set the **Surface Type** dropdown on the **Material Options** panel of the [Master Node](Master-Node.md) to **Transparent** to receive the correct values from this node.
In the **Universal Render Pipeline** the Scene Color node returns the value of the **Camera Opaque Texture**. Refer to the **Universal Render Pipeline** for more documentation on this feature. The contents of this texture are only available for **Transparent** objects. Set the **Surface Type** dropdown on the [**Graph Settings** tab](Graph-Settings-Tab.md) of the [**Graph Inspector**](Internal-inspector.md) to **Transparent** to receive the correct values from this node.

>[!NOTE]
>You can only use the Scene Color node in the **Fragment** [Shader Stage](Shader-Stage.md).
Expand Down

0 comments on commit 5458e2d

Please sign in to comment.