![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Sk1ppeR |
Basically if any of you have played Battlefield 3 or any modern first person shooter, when you get low HP all you hear is your heartbeat (that’s easy) and then there’s a pulsating screen effect that’s a bit opaque but it has blood splatter and turns on a reddish filter.
In extension to this question I would like to know how to make screen space pixel shaders? I’ve been following a lot of guides about it, managed to make a fog but you know, the fog itself is a node that has a pixel shader and I have to move it around with code, it’s not like I can attach it to the camera, can I?
Where can I find some literature about screen space effects? I’ve been coding fog elements and attaching them with pivot points to the player character. That’s great when the camera follows the player around, but as soon as you change the camera to some level based camera and the screen space effect is janky. Depending on the position you might not get fog at all for instance.
I’m not looking for complete solutions, I’m not going to waste your time with that, but I would like to know where I can read something and learn. I have set a quite ambitious project to myself (well ambitious based on my current abilities) and I’d like to get it done and learn something in the process.
What I’ve tried so far is using the “WorldEnvironment” node but turning on things and changing settings has no effect in 2D games. Other things I’ve tried is, like I said, Position2D nodes attached to the player character and with children’s the size of camera’s viewport. This brought me plethora of headaches when I started resizing the game, but that’s a question for another thread.
Thank you in advance.
Have you tried adding a CanvasLayer
and using the shader on that? A CanvasLayer
is usually what’s drawn above everything else. So using the “pulsating” shader on that may work.
Ertain | 2021-04-04 19:41