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 #3

Merged
merged 1 commit into from
Feb 23, 2021
Merged

Conversation

stormdirus2
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
@stormdirus2 stormdirus2 merged commit 899b051 into stormdirus2:1.16.x/next Feb 23, 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)
1 participant