栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

Unity Shader(表面着色器Surface Shader)

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Unity Shader(表面着色器Surface Shader)

基本数据类型
float32位浮点数

float2——float2(float,float)

float3——float3(float,float,float)

float4——float4(float,float,float,float)

half16位浮点数

half2——half2(half,half)

half3——half3(half,half,half)

half4——half4(half,half,half,half)

int32位整型

int2——int2(int,int)

int3——int3(int,int,int)

int4——int4(int,int,int,int)

fixed12位定点数

取值范围0-1之间的小数,或整数

bool布尔值
string字符串
sampler2D纹理对象
编译指令
CGPROGRAM(开头)

#pragma surface surfaceFunction lightModel[optionalparams]

||

#pragma surface surf Lambert

surfaceFunction函数名称

lightModel光照类型———Lambert漫反射

void surf(Input IN,inout SurfaceOutput o)

ENDCG(结尾)

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/737939.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号