Realtime shadow casting on 2D terrain

Barney Codes
Barney Codes
115.7 هزار بار بازدید - 11 ماه پیش - Become a member!
Become a member!
https://www.seevid.ir/c/BarneyCodes/...

Join the discord!
Discord: discord

Original reddit post:
Reddit: comparison_with_and_without_raytracing_for_my_2d

Code from the video:
https://editor.p5js.org/BarneyCodes/s...

Chapters:
0:00 Intro
0:37 Height maps
1:03 Generating the terrain
1:50 Shadows
3:37 Limitations
4:16 Next steps

Shadows have always seemed like a bit of an elusive effect to me but in this video I show you how to create a shader for real time shadows using ray casting for 2D height map terrain.
I think the islands created with this method look really cool and I'm excited to share how I did it with you!
If you know a better way of achieving this, please let me know in the comments!

Follow me:
Twitter: Twitter: barney_codes
Reddit: Reddit: BarneyCodes

#shaders #glsl #p5js
11 ماه پیش در تاریخ 1402/09/02 منتشر شده است.
115,706 بـار بازدید شده
... بیشتر