最开始没有在trigo节点中找到atan2
只有atan
(另外不得不吐槽这个trigo函数的名字)
本来想构造一个的但是看起有点麻烦
然后只能求助于osl
幸好里面直接就有
shader simple_atan2(
float x = 10,
float y = 10,
output float result = 0)
{
result = atan2(y,x);
}
atan2对于制作一些圆形的变换比较方便
不会有奇怪的返回值
最开始没有在trigo节点中找到atan2
只有atan
(另外不得不吐槽这个trigo函数的名字)
本来想构造一个的但是看起有点麻烦
然后只能求助于osl
幸好里面直接就有
shader simple_atan2(
float x = 10,
float y = 10,
output float result = 0)
{
result = atan2(y,x);
}
atan2对于制作一些圆形的变换比较方便
不会有奇怪的返回值