Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader Incompatibility #23

Open
LemonadeFlashbang opened this issue Jan 25, 2022 · 0 comments
Open

Shader Incompatibility #23

LemonadeFlashbang opened this issue Jan 25, 2022 · 0 comments

Comments

@LemonadeFlashbang
Copy link

In order to make a sprite flash white in Godot, you need to apply a shader. This is a common use case for when you want a player or enemy to flash white upon, say, taking damage.

However, applying a shader to a Creature node inside of Godot causes any transparency specified in your animation set to vanish. For example:

image
In this image, we see the player character's hose isn't spraying any goop- and the enemy character has no blood droplets present.

image
The image above shows what happens when we apply any shader material to our Creature sprite- every element present in the initial mesh reappears.

This effectively causes all Creature animated objects to be incompatible with shaders entirely- which can be a substantial issue.

My guess is that different portions of the mesh are being hidden by the Creature node via a shader behind the scenes. I'm also guessing that fixing this issue might be relatively complicated.

However, if that's the case I was wondering if it would be possible to expose that shader's code, so we could then extend it via new functionality in our own projects. Ex: Copy the shader present, but then add the white-out variable and functionality to all non-transparent elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant