Hi!
I just had a question of how to implement a specific effect for my game, and I'm not well versed with shaders so I thought I'd ask here on the forum.
I've been working on my game for a while and I'm making great progress. I had made a hacky but simple water shader for one area of my game before that I wanted to reimplement in a new scenario.
The way this shader was implemented was that I just used SCREEN_TEXTURE to get the texture, flipped it, and made it move back and forth a bit to "shimmer". I actually put a blue background underneath for the water's color, but essentially this works fine for this scene because it reflects what I want it to.
Now I essentially wanted to reuse this effect for outside of that cutscene (It's a boxing game), since I wanted this water based enemy to have a wave attack to jump over (He's a mantis shrimp).
However, this implementation seems to be based off of the priority of the nodes themselves, so it only renders the ring itself and the background in the scene, which is basically everything I didn't want to render. I just wanted a reflection of the player and the opponent in the water, which I wanted rendered on a polygon2D (what I had previously) or something else that can be scaled out.
I already tried rethinking the layers of the scene so that this could work without having to find a new solution, but I don't think this will work considering that the layers that are supposed to be in front have to be behind the reflection to render.
Since this seems like an inherent limitation, does anyone have a suggestion for a different way to render a copy of the the combatants on an object? I tried using backbuffer copy, but I was surprised that there's not really any documentation on it at all, shocking since everything else has been written up pretty well. I try to not ask about things I could easily look up, but that doesn't seem to be the case here, so does anyone know if that would be a good solution, and if so how to go about implementing it?
I think something of note would be that the player and opponent are both instantiated from a scene, and it seemed that the backbuffer copy works with nodes that are its children from the one video on it I could find (He said he didn't know much about it either), so if the sprite nodes have to be direct children of the backbuffer that may not work.
Thanks so much