Unity干货

[笔记]ShaderLab——Properties

2017-11-30  本文已影响5人  阿飞咯
Properties
{
    _WaveScale ("Wave scale", Range (0.02,0.15)) = 0.07 // sliders
    _ReflDistort ("Reflection distort", Range (0,1.5)) = 0.5
    _RefrDistort ("Refraction distort", Range (0,1.5)) = 0.4
    _RefrColor ("Refraction color", Color) = (.34, .85, .92, 1) // color
    _ReflectionTex ("Environment Reflection", 2D) = "" {} // textures
    _RefractionTex ("Environment Refraction", 2D) = "" {}
    _Fresnel ("Fresnel (A) ", 2D) = "" {}
    _BumpMap ("Bumpmap (RGB) ", 2D) = "" {}
}
Properties { Property [Property ...] }
- 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" {} //2d纹理
name ("display name", Cube) = "defaulttexture" {} //3d纹理
name ("display name", 3D) = "defaulttexture" {} //3D (volume) 

在Subshader中可以使用方括号中的属性名称来访问属性值:[name]

上一篇 下一篇

猜你喜欢

热点阅读