KITASENJU DESIGN BLOG

memo, html, javascript, unity

Entries from 2022-11-07 to 1 day

勾配のみの可視化

勾配の強弱を考えず、勾配の方向のみを可視化する float dx = tex(0,0) - tex(1,0);//x方向の勾配ベクトル float dy = tex(0,0) - tex(0,1);//y方向の勾配ベクトル float rad = atan(dy,dx);//勾配の方向(ラジアン) float red = 0.5 + 0.5*cos(rad); float…

"FOOTER"