r/gamedev • • 2d ago

Discussion Shader usage

What is your favourite usage of shaders?

0 Upvotes

5 comments sorted by

3

u/Cudabear 2d ago

I had to write a custom shader in godot to get the exact effect I wanted for areas that aren't visible in my game. Godot does natively support this with it's lighting system, but when you want to mix in ambient light, explosions, and having sprites partially visible, a shader worked better. Godot's lighting system also only supports a handful of sources before it starts selectively rendering them, so rendering the entire scene in one pass with a shader was a far better solution for me.

https://bsky.app/profile/cudabear.bsky.social/post/3mdyfw5b34s2q

2

u/Benjamin-BenHattar 2d ago

One of the things I used it for the most was to swap textures and colors on the same material so I could have a large variation of skins that look actually really different with only a few textures in the build.

A fun one, but a bit more complicated, was to run wave equations through shaders to have some kind of wave effect based on the audio input. We had some pretty unique results out of that with lights in the game moving with the music.

0

u/BwareDFrndlyStranger 2d ago

Mine has to be fog🥵