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

Add order-independent transparency for translucent blocks #1

Closed
wants to merge 1 commit into from

Conversation

python-b5
Copy link
Owner

The algorithm used is "Weighted, Blended Order-Independent Transparency"1, which allows for a
fast and simple implementation at a small cost to color accuracy. This should solve all issues of
translucent faces not rendering behind others, such as with water behind stained glass or with blocks
containing translucent faces, such as slime and honey blocks.

More testing is required to confirm compatibility with limited OpenGL 2.0 implementations, such as
those of macOS or older iGPUs, as well as to determine the impact on performance.

Fixes CaffeineMC#38

The algorithm used is "Weighted, Blended Order-Independent Transparency"[1], which allows for a
fast and simple implementation at a small cost to color accuracy. This should solve all issues of
translucent faces not rendering behind others, such as with water behind stained glass or with blocks
containing translucent faces, such as slime and honey blocks.

More testing is required to confirm compatibility with limited OpenGL 2.0 implementations, such as
those of macOS or older iGPUs, as well as to determine the impact on performance.

Fixes CaffeineMC#38

[1]: https://casual-effects.blogspot.com/2015/03/implemented-weighted-blended-order.html
@cittyinthecloud
Copy link

Heads up, you're PRing into your own repo, and not the CaffeineMC one

@python-b5 python-b5 closed this Jun 21, 2021
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

Successfully merging this pull request may close these issues.

Translucent blocks do not render correctly (fixed in Sodium 0.6)
2 participants