Hey, I’m trying to recreate enter the gungeons “room reveal” system, where the room seems to be utilizing a shader to simply remove the black to reveal the room. They do this really smoothly and I needa very similar system for my 2D game, but mine constantly just looks like im turning down the opacity on a square and never as realistic as theirs. I am not an expert in shaders, is there anybody who can help with this?
This is actually a very good question for better understanding shader a useful shader technique.
Here’s a YouTube video that gets to the heart of the matter, manipulating gradients:
For your case, you want to keep the smooth effect, so you’re just offsetting what’s already on the gradient texture over time.
You should be able to tinker with the math in Shader Graph to get a similar output.
The Gungeon transitions are sometimes oriented toward a particular point. The screenspace equivalent can be passed as a material property to the shader. Perhaps it’s good to pick a point further offscreen (extend a Ray2d). And - another important lesson - distances are a inherit gradient. It needs to be remapped to a usable range (0…1 or close to it), but you can actually skip the gradient texture when you have a point to slide toward.
Hope that helps get you started.