ドキュメント

Unity Engine

Unity Engine

Configure when Unity uses a shader

Resources for using tags and blocks in a shader to configure how and when Unity uses the shader.
読み終わるまでの所要時間 1 分最終更新 2ヶ月前

Resources for using
#pragma
and
Tag
blocks in ShaderLab to configure when Unity compiles and runs a shader.

Page

Description

Set the rendering pipeline and render pass for a shaderUse a
Tag
statement to set the render pipeline and render order for a shader.
Set a shader to require a packageUse a
PackageRequirements
block to add package requirements to a subshader or a pass.
Set a shader to require a shader model or GPU featureUse a
#pragma target
or
#pragma require
statement to set the minimum shader model or GPU feature for a shader.
Set the graphics API or platform for a shaderUse a
#pragma only_renderers
or
#pragma exclude_renderers
statement to set the graphics API or platform for a shader.

Additional resources