Skip to content

Commit 34f5d65

Browse files
olivierpratEvergreen
authored andcommitted
UUM-129249 : Deprecate Reflection Probe Node
1 parent f4b1535 commit 34f5d65

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

Packages/com.unity.shadergraph/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
Version Updated
1111
The version number for this package has increased due to a version update of a related graphics package.
1212

13+
### Changed
14+
15+
- Deprecated Reflection Probe node as its behavior can be incompatible with specific render paths.
16+
1317
## [17.4.0] - 2025-10-22
1418

1519
This version is compatible with Unity 6000.4.0a4.

Packages/com.unity.shadergraph/Documentation~/Input-Nodes.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ Supply shaders with essential data such as constants, mesh attributes, gradients
3939
| [Gradient](Gradient-Node.md) | Defines a constant Gradient in the shader. |
4040
| [Sample Gradient](Sample-Gradient-Node.md) | Samples a Gradient given the input of Time. |
4141

42+
## Lighting
43+
44+
| **Topic** | **Description** |
45+
|--------------------------------------------------------|------------------------------------------------------------------------------|
46+
| [Ambient](Ambient-Node.md) | Provides access to the Scene's Ambient color values. |
47+
| [Baked GI](Baked-GI-Node.md) | Provides access to the Baked GI values at the vertex or fragment's position. |
48+
| [Main Light Direction](Main-Light-Direction-Node.md) | Provides access to the direction of the main directional light in the scene. |
49+
| [Reflection Probe](Reflection-Probe-Node.md) | Provides access to the nearest Reflection Probe to the object. |
50+
4251
## Matrix
4352

4453
| **Topic** | **Description** |
@@ -72,12 +81,9 @@ Supply shaders with essential data such as constants, mesh attributes, gradients
7281

7382
| **Topic** | **Description** |
7483
|----------------------------------------------|------------------------------------------------------------------------------|
75-
| [Ambient](Ambient-Node.md) | Provides access to the Scene's Ambient color values. |
7684
| [Camera](Camera-Node.md) | Provides access to various parameters of the current Camera. |
7785
| [Fog](Fog-Node.md) | Provides access to the Scene's Fog parameters. |
78-
| [Baked GI](Baked-GI-Node.md) | Provides access to the Baked GI values at the vertex or fragment's position. |
7986
| [Object](Object-Node.md) | Provides access to various parameters of the Object. |
80-
| [Reflection Probe](Reflection-Probe-Node.md) | Provides access to the nearest Reflection Probe to the object. |
8187
| [Scene Color](Scene-Color-Node.md) | Provides access to the current Camera's color buffer. |
8288
| [Scene Depth](Scene-Depth-Node.md) | Provides access to the current Camera's depth buffer. |
8389
| [Screen](Screen-Node.md) | Provides access to parameters of the screen. |
@@ -106,4 +112,4 @@ Supply shaders with essential data such as constants, mesh attributes, gradients
106112
|-------------|------------------|
107113
| [Element Texture UV](element-texture-uv-node.md) | Provides the texture coordinates (UV) typically used to sample the texture assigned to a UI element. |
108114
| [Element Layout UV](element-layout-uv-node.md) | Provides the layout UV coordinates within a UI element's layout rectangle. |
109-
| [Element Texture Size](element-texture-size-node.md) | Provides the size of the texture assigned to a UI element. |
115+
| [Element Texture Size](element-texture-size-node.md) | Provides the size of the texture assigned to a UI element. |

Packages/com.unity.shadergraph/Documentation~/Reflection-Probe-Node.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Reflection Probe Node
22

3+
> [!NOTE]
4+
> The Reflection Probe node is deprecated. Use the [Custom Function node](Custom-Function-Node.md) instead to replicate the [generated code example](#generated-code-example).
5+
36
## Description
47

58
Provides access to the nearest **Reflection Probe** to the object. Requires **Normal** and **View Direction** to sample the probe. You can achieve a blurring effect by sampling at a different Level of Detail using the **LOD** input.
@@ -9,7 +12,7 @@ Note: The behavior of this [Node](Node.md) is undefined globally. Shader Graph d
912
Different Render Pipelines may produce different results. If you're building a shader in one Render Pipeline that you want to use in both, try checking it in both pipelines before production. A [Node](Node.md) might be defined in one Render Pipeline and undefined in the other. If this [Node](Node.md) is undefined, it returns 0 (black).
1013

1114
#### Unity Render Pipelines Support
12-
- Universal Render Pipeline
15+
- Universal Render Pipeline, if you use the Forward or Deferred rendering path. If you use the Forward+ or Deferred+ rendering path, the node returns the skybox instead of the nearest reflection probe.
1316

1417
The High Definition Render Pipeline does **not** support this Node.
1518

Packages/com.unity.shadergraph/Editor/Data/Nodes/Input/Lighting/ReflectionProbeNode.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ public ReflectionProbeNode()
1313
}
1414

1515
public override bool hasPreview { get { return false; } }
16+
// Hide the node in the search window as it is deprecated.
17+
internal override bool ExposeToSearcher => false;
1618

1719
protected override MethodInfo GetFunctionToConvert()
1820
{
1921
return GetType().GetMethod("Unity_ReflectionProbe", BindingFlags.Static | BindingFlags.NonPublic);
2022
}
2123

24+
public override void ValidateNode()
25+
{
26+
base.ValidateNode();
27+
owner.AddValidationError(this.objectId, "Reflection Probe Node is deprecated. Use a Custom Function Node instead.", Rendering.ShaderCompilerMessageSeverity.Warning);
28+
}
29+
2230
static string Unity_ReflectionProbe(
2331
[Slot(0, Binding.ObjectSpaceViewDirection)] Vector3 ViewDir,
2432
[Slot(1, Binding.ObjectSpaceNormal)] Vector3 Normal,

0 commit comments

Comments
 (0)