Is Forced Gamma node
Note
Use this node only in shaders with Material set to UI for UI Toolkit. Using it elsewhere can lead to unexpected behavior or errors. For information on how to create shaders for UI Toolkit, refer to UI Shader Graph.
The Is Forced Gamma node outputs whether the UI Toolkit renderer is currently rendering the element with Force Gamma Rendering enabled. Use this node to create custom logic that behaves differently when the renderer forces gamma-space compositing, for example to skip a gamma conversion the renderer already applies.
Force Gamma Rendering is a Panel Settings option that keeps a panel in gamma color space even in a Linear Color Space project. Unity enables it automatically when a panel renders to a Render Texture.
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
| Out | Output | Boolean | True when Force Gamma Rendering is enabled for the UI element. |