ShaderLab 属性,特性声明

  • 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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 我想变成小树,悄悄展开枝丫,看着您工作。当您劳累的时候,我要将树枝伸到您的窗前,让您看到我嫩绿的树叶,缓解...
    幸福来得突然阅读 1,315评论 0 1
  • 3 一位女乘务员朝我这边走来,应该是来检票的。我整理好衣着,看了看窗户,确认自己很帅,正襟危坐,等她过来。她一步步...
    Lee_7283阅读 1,067评论 0 0
  • 昨晚在睡前就调好早起了闹钟,希望能在一个月的第一天有一个美好的开始,没有想到还没有有等到闹钟的呼唤,自己却醒来了...
    mczhang13阅读 1,427评论 0 1
  • 我梦想的团队, 朝气阳光,充满活力,每天都象征着希望,可以影响着身边的每一个人。 我梦想的团队, 专业高效,各有所...
    重拾言说阅读 2,817评论 0 1
  • “枯山水”这一概念真正形成应该是与禅宗相呼应,具有山水画精神,以砂为水,以石为山,以景喻禅,完全脱离池泉,作为独立...
    阿东的坏品味阅读 4,030评论 0 1

友情链接更多精彩内容