DOTS Instancing shader functions reference for URP
Explore the built-in functions you can use to load the values of constants directly from the draw command data.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Alongside the access macros, Unity provides shader functions that load the values of constants directly from the draw command data. Shaders that Unity provides use these functions.
Unity provides the following shader functions:
Shader function | Description |
|---|---|
| Returns the renderingLayerMask for the draw command. |
| Returns the motion vector generation mode for the draw command. This is formatted as a float4, which is what Unity shaders expect. |
| Returns whether to draw the instance with a flipped triangle winding. See FlipWinding. |
| Returns whether the scene's main Directional Light is active for the instance. The main light can be deactivated for multiple reasons, for example if the light already included in light maps. |
| Returns the 8 bit crossfade value you set if the LODCrossFade flag is set. If the flag is not set, the return value is undefined. |