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

Enchantment glints have z-fighting in the nether and end #158

Closed
coderbot16 opened this issue Jul 21, 2021 · 2 comments
Closed

Enchantment glints have z-fighting in the nether and end #158

coderbot16 opened this issue Jul 21, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@coderbot16
Copy link

gbuffers_armor_glint uses a series of matrix multiplications, but gbuffers_textured uses ftransform. The matrix multiplications introduce precision errors compared to ftransform that cause the vertex depths to be subtly different, which is enough to cause issues with the glint effect. The glint must have the exact same transformations as the content it's being applied to in order to work properly, otherwise issues like this show up.

Reccomended fix: Replace the content of lines 27-29 of gbuffers_armor_glint.vsh with gl_Position = ftransform();

Notably, the overworld is not affected by this issue, only the nether and end. It seems like this is because the nether and end copy code from the overworld, but aren't updated in sync with the overworld, introducing discrepancies like this. If possible, I'd recommend using the #include system to share code between dimensions to avoid issues like this in the future.

Enchantment glint z-fighting in the nether and end

@coderbot16
Copy link
Author

To clarify: This has been observed on Sildur's Vibrant Shaders Lite v1.29, but likely happens on other profiles of the pack too.

@Sildurs-shaders Sildurs-shaders added the bug Something isn't working label Sep 19, 2021
@Sildurs-shaders
Copy link
Owner

Fixed in upcoming version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants