incorrect number of arguments to numeric"/>
RampDiffuse纠错——Error:incorrect number of arguments to numeric
看着Shaders and Effects Cookbook的书籍学习shader,照着说上写ramp Diffuse这个shader时,报了个错。
Shader书上的源代码是这样的:
画红线的那一行报了这样的一个错:
最终正确代码如下:
猜测原因是旧版的unity支持的是float2(diff)支持,新版的是float2(param1,param2)
有更详细的解释的可以说明,欢迎交流
更多推荐
RampDiffuse纠错——Error:incorrect number of arguments to numeric
发布评论