diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index 5050275a992..b0df3bb5b47 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -8,12 +8,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Added subshadergraphs for SpeedTree 8 shadergraph support: SpeedTree8Wind, SpeedTree8ColorAlpha, SpeedTree8Billboard. -- Added an HLSL file implementing a version of the Unity core LODDitheringTransition function which can be used in a Shader Graph +- Added an HLSL file implementing a version of the Unity core LODDitheringTransition function which can be used in a Shader Graph\ +- Added View Vector Node doc ### Changed - Only ShaderGraph keywords count towards the shader permutation variant limit, SubGraph keywords do not. ### Fixed +- Updated/corrected View Direction doc - Fixed an issue where horizontal scrollbars in graph sub windows could not have their lower scroll button used due to being overlapped by the resize handles [1320993] - Fixed an issue where nodes with ports on one side would appear incorrectly on creation [1262050] - Fixed a broken link in the TOC to Main Preview diff --git a/com.unity.shadergraph/Documentation~/View-Direction-Node.md b/com.unity.shadergraph/Documentation~/View-Direction-Node.md index ec1e8cc6802..72a6369c262 100644 --- a/com.unity.shadergraph/Documentation~/View-Direction-Node.md +++ b/com.unity.shadergraph/Documentation~/View-Direction-Node.md @@ -2,7 +2,16 @@ ## Description -Provides access to the mesh vertex or fragment's **View Direction** vector. This is the vector from the vertex or fragment to the camera. The coordinate space of the output value can be selected with the **Space** dropdown parameter. +Provides access to the mesh vertex or fragment's **View Direction** vector. This is the vector from the vertex or fragment to the camera. Select a **Space** to modify the coordinate space of the output value. +In versions prior to version 11.0, the **View Direction Node** works differently in HDRP than in URP. In URP, it only stored Object space vectors normalized. HDRP stores all vectors normalized. + +From 11.0 onwards, this node stores all vectors normalized in both the **High-Definition Render Pipeline** and the **Universal Render Pipeline**. + +If you want to keep using the old behavior in URP outside of object space, replace this node with a **View Vector Node**. + + + + ## Ports diff --git a/com.unity.shadergraph/Documentation~/View-Vector-Node.md b/com.unity.shadergraph/Documentation~/View-Vector-Node.md new file mode 100644 index 00000000000..dfe7f0cfa62 --- /dev/null +++ b/com.unity.shadergraph/Documentation~/View-Vector-Node.md @@ -0,0 +1,19 @@ +# View Vector Node + +## Description + +This node provides access to the mesh vertex or fragment's **View Direction** vector. It does not normalize any of the values it stores. +Select a **Space** to modify the coordinate space of the output value. + +## Ports + +| Name | Direction | Type | Binding | Description | +|:------------ |:-------------|:-----|:---|:---| +| Out | Output | Vector 3 | None |View Direction for the Mesh Vertex/Fragment. | + + +## Controls + +| Name | Type | Options | Description | +|:------------ |:-------------|:-----|:---| +| Space | Dropdown | Object, View, World, Tangent | Selects coordinate space of View Direction to output. |