ドキュメント

Unity Engine


Unity Engine


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

LoadDOTSInstancedData_RenderingLayer
Returns the renderingLayerMask for the draw command.
LoadDOTSInstancedData_MotionVectorsParams
Returns the motion vector generation mode for the draw command. This is formatted as a float4, which is what Unity shaders expect.
LoadDOTSInstancedData_WorldTransformParams
Returns whether to draw the instance with a flipped triangle winding. See FlipWinding.
LoadDOTSInstancedData_LightData
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.
LoadDOTSInstancedData_LODFade
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.