1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

charge effectっぽいものをshader graphでつくってみる (SGL003)

Last updated at Posted at 2022-01-14

シェーダグラフで毎日1つなんか作って見る運動

完成品

集中線がなんか回転しながら伸びたり縮んだりするようなエフェクトを作りたかった

全体像

shader graph overview

つくりかた

concentration lines

極座標をθとrに分解して、θ似関してgradient noiseをかける.
rは範囲内に収まるように適当にremapする
addして合成すると集中線っぽいものができる

add theta

集中線のθは時間のsin波から適当に0-1で回転をつけて合成する.

image.png

smoothstepで線をくっきりさせるが、その閾値を時間sin波で波立たせることで、集中線の大きさの強弱をつける.

あとはBaseColorに接続して完成!

code

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?