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

Implement dither transparency as one solution for order independent transparency #5159

Closed
mvaligursky opened this issue Mar 16, 2023 · 5 comments · Fixed by #5903
Closed
Assignees
Labels
area: graphics Graphics related issue feature
Milestone

Comments

@mvaligursky
Copy link
Contributor

Not a general solution, but cheap and useful.
https://danielilett.com/2020-04-19-tut5-5-urp-dither-transparency/

image

@querielo
Copy link
Contributor

I'm not sure that it has to be a part of the engine since it can be done without it. Also, it is not clear what kind of pattern should be used: Bayer, white noise, blue noise and so on.

Example.

Source code: https://github.com/querielo/playcanvas-dither-transparency

Project: https://playcanvas.com/project/1051789/overview/dither-transparency

@LeXXik
Copy link
Contributor

LeXXik commented Mar 18, 2023

Is the project private?

@querielo
Copy link
Contributor

querielo commented Mar 19, 2023

Ouch. I forgot about it :-)

Fixed.

https://playcanv.as/p/qdYtm4jw/
https://playcanvas.com/project/1051789/overview/dither-transparency

I thought also about influencing on shadow map (so, we get shadows for transparent objects with usage noises/patterns). But I need to understand where to place discard into the shadow pass code.

It looks like impossible without rewriting/changing the internal _fsGetShadowPassCode function.

@yaustar
Copy link
Collaborator

yaustar commented Mar 20, 2023

I'm not sure that it has to be a part of the engine since it can be done without it.

IIRC, the goal was to have a script that was officially supported by PlayCanvas rather than adding it to the engine directly. So it would live here: https://github.com/playcanvas/engine/tree/main/scripts

@mvaligursky
Copy link
Contributor Author

Script vs in engine is not something that was decided yet, it can go either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature
Projects
Development

Successfully merging a pull request may close this issue.

6 participants