|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
HadrianDev |
I’m relatively new to Godot and to shaders.
I added a shader to my game that has chromatic aberration, it looks pretty cool. But it messes with other text labels that are not its parent or child node, and I don’t really understand why that happens.
Here are the screenshots.
Thank you!
|
|
|
|
Reply From: |
horsecar123 |
You are giving your screen texture and screen cordinates to shader as an input so shader affects you whole screen without looking your node tree. There 2 ways to deal with it.
1-) Replace all “SCREEN_TEXTURE” with “TEXTURE” and “SCREEN_UV” with “UV” in your shader and add your shader material one by one to all nodes except for your labels.(easy way)
2-)You can use your screen as a texture with using viewport node and later add your labels above it. Documents explain this well(Custom post-processing — Godot Engine (stable) documentation in English)(if there is something you don’t understand please ask)