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

Particles always appear behind translucent objects #366

Open
Paril opened this issue Oct 29, 2024 · 3 comments
Open

Particles always appear behind translucent objects #366

Paril opened this issue Oct 29, 2024 · 3 comments

Comments

@Paril
Copy link

Paril commented Oct 29, 2024

This is probably an annoying bug to fix given how particles work, but it has some gameplay implications since it can be hard to spot a rail trail if water or glass happens to be in the scene. Even with partstyle 1 they can be made really dark depending on the texture they're visible through.


We had this same bug with re-release too, but it's the opposite problem - particles in re-release are drawn last, so they're not affected by glass, so it can look weird to fire under the water.

EDIT: oh I guess entities with alpha are also affected, which might be a problem with the Invisibility powerup since it makes players super hard to spot. good ol' ordered transparency problem.

@skullernet
Copy link
Owner

Might be worth exploring order independent transparency techniques.
This looks interesting, for example: https://jcgt.org/published/0002/02/09/

@Paril
Copy link
Author

Paril commented Oct 31, 2024

I've actually looked into WB-OIT a long time ago. I still haven't completely wrapped my head around it. I don't entirely understand how an accumulation buffer can make fragments appear correctly depending on the layer they're being rendered in - but clearly the technique works, it just has to be tuned to the specific scene I guess? https://learnopengl.com/Guest-Articles/2020/OIT/Weighted-Blended
Funnily enough this mentions needing BlendFunci though :p

@Paril
Copy link
Author

Paril commented Oct 31, 2024

I'm not sure where your reply disappeared to, but the screenshot you shared here looked promising! I did hear it was slow, though, since it requires two passes?

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

2 participants