Shader 常用函数可视化展示

| 分类 好好玩游戏  | 标签 Unity  函数  Shader  数学  可视化  desmos  thebookofshaders 

函数可视化的网站是 https://www.desmos.com/calculator?lang=zh-CN

比如我们在数学中经常定义的函数: y = x, 0 < x < 1,对应在https://www.desmos.com/calculator?lang=zh-CN 效果如下

y = x ^ 2

y = x ^ 3

y = sin(x) 正弦函数

y = cos(x) 余弦函数

y = floor(sin(x))

y = ceil(cos(x))

y = abs(cos(x * 9) * sin(x * 3))

Shader Function

更多的 Shader Function 可以参考The Book of Shaders

比如https://thebookofshaders.com/05/

基于这些函数可以帮助我们“绘制”各种好看的效果

smoothstep

clamp

step

fract

floor

ceil

另外推荐Shader 函数可视化




如果本篇文章对您有所帮助,您可以通过微信(左)或支付宝(右)对作者进行打赏!


上一篇     下一篇