Version: Unity 6 Beta (6000.0)
LanguageEnglish
  • C#

ShaderPropertyFlags

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Flags that control how a shader property behaves.

When the Unity Editor compiles a ShaderLab script, it assigns shader property flags to its shader properties based on the attributes you assign to those properties. For example, if you add the "[HideInInspector]" attribute to a shader property declaration, Unity sets the HideInInspector flag when it compiles the script. If you add more than one attribute to a property, the Editor combines the flags using a bitwise OR operation.

Properties

NoneNo flags are set.
HideInInspectorSignifies that Unity hides the property in the default Material Inspector.
PerRendererDataIn the Material Inspector, Unity queries the value for this property from the Renderer's MaterialPropertyBlock, instead of from the Material. The value will also appear as read-only.
NoScaleOffsetDo not show UV scale/offset fields next to Textures in the default Material Inspector.
NormalSignifies that values of this property contain Normal (normalized vector) data.
HDRSignifies that values of this property contain High Dynamic Range (HDR) data.
GammaSignifies that values of this property are in gamma space. If the active color space is linear, Unity converts the values to linear space values.
NonModifiableTextureDataYou cannot edit this Texture property in the default Material Inspector.
MainTextureSignifies that value of this property contains the main texture of the Material.
MainColorSignifies that value of this property contains the main color of the Material.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961