美文网首页
ShaderLab 属性,特性声明

ShaderLab 属性,特性声明

作者: 晓龙酱 | 来源:发表于2017-10-03 11:14 被阅读15次
    • Numbers and Sliders
    name ("display name", Range (min, max)) = number
    name ("display name", Float) = number
    name ("display name", Int) = number
    
    • Colors and Vectors
    name ("display name", Color) = (number,number,number,number)
    name ("display name", Vector) = (number,number,number,number)
    
    • Textures
    name ("display name", 2D) = "defaulttexture" {}
    name ("display name", Cube) = "defaulttexture" {}
    name ("display name", 3D) = "defaulttexture" {}
    

    Attribute

    • [HideInInspector]
      does not show the property value in the material inspector.

    • [NoScaleOffset]
      material inspector will not show texture tiling/offset fields for texture properties with this attribute.

    • [Normal]
      indicates that a texture property expects a normal-map.

    • [HDR]
      indicates that a texture property expects a high-dynamic range (HDR) texture.

    • [Gamma]
      indicates that a float/vector property is specified as sRGB value in the UI (just like colors are), and possibly needs conversion according to color space used. See Properties in Shader Programs.

    • [PerRendererData]
      indicates that a texture property will be coming from per-renderer data in the form of a MaterialPropertyBlock. Material inspector changes the texture slot UI for these properties.

    https://docs.unity3d.com/Manual/SL-Properties.html

    相关文章

      网友评论

          本文标题:ShaderLab 属性,特性声明

          本文链接:https://www.haomeiwen.com/subject/ihgxyxtx.html