RampDiffuse纠错——Error:incorrect number of arguments to numeric

编程入门 行业动态 更新时间:2024-10-05 23:18:59

RampDiffuse纠错——Error:<a href=https://www.elefans.com/category/jswz/34/1740603.html style=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

本文发布于:2024-02-28 02:43:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1767534.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:incorrect   Error   RampDiffuse   numeric   arguments

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!