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

Fix weird vanilla shading for rotated model elements #2493

Open
muzikbike opened this issue May 10, 2024 · 1 comment
Open

Fix weird vanilla shading for rotated model elements #2493

muzikbike opened this issue May 10, 2024 · 1 comment
Labels
S-needs-triage Status: Needs triage T-enhancement Type: Enhancement

Comments

@muzikbike
Copy link

Request Description

May be related to #461 and/or fixable alongside it; like most of my recent reports, this is a vanilla bug that I'm curious if Sodium can fix.

For rotated elements in models, it's possible for two differently-defined planes or cuboids that should mathematically evaluate to the same thing to end up having completely different shading calculations. For example, a south-facing plane rotated 45 degrees clockwise would be shaded very differently from a west-facing plane rotated 45 degrees anticlockwise.

The resource pack attached to https://bugs.mojang.com/browse/MC-262644 makes this easy to see - the three types of torches are remodeled so that normal torches are composed of two yz planes rotated -45 degrees, soul torches are composed of two xy planes rotated +45 degrees, and redstone torches are composed of one of each type of plane. The brightness difference is very clearly visible, with redstone torches containing both in the same block space.

2024-05-10_22 48 41

It's probably possible to fix this in a way that only affects shaded, rotated block planes, which comprise only a minority of vanilla block models. I don't know if it would be preferable to leave this alone in the interests of not affecting resource packs and modded block models, but as a resource pack creator myself this does annoy me fairly often.

@muzikbike muzikbike added S-needs-triage Status: Needs triage T-enhancement Type: Enhancement labels May 10, 2024
@jellysquid3
Copy link
Member

The Fabric Rendering API also has to try and prevent this issue for custom model geometry. Probably the resolution to this issue will be us just enforcing whatever it is already doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-triage Status: Needs triage T-enhancement Type: Enhancement
Development

No branches or pull requests

2 participants