Shader-数据类型

来源:互联网 发布:java web是做什么的 编辑:程序博客网 时间:2024/06/11 19:52
float 32位浮点数half 16位浮点数int   32位整形数fixed 12位定点数bool  布尔数据sampler 纹理对象的句柄 共有:sampler、sampler1D、sampler2D、sampler3D、samplerCUBE、和samplerRECT六种。string 字符串,其实没有必要在CG中用到字符串
float2×4 matrix; //表示2×4阶矩阵,包含8个float类型数据
 1.精度够用就好 2.颜色和单位向量,使用fixed 3.其他情况,尽量使用half(即范围在[-6万,+6万]、精确的小数点3.3位);否则才使用用float

原创粉丝点击