-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Wield Items are Shaded Incorrectly #6697
Comments
When the player view is level, the wielditem is unaligned to the world, tilted forward, and you view the sides of the object not the top. Since face shading depends continuously on face angle it is expected that wielditem faces would have slightly different shading to world nodes. |
@paramat Shading is computed before the wieldmesh is rotated, so should be exactly the same as in world. The difference in color on my screenshot is probably due to blue emphasis or something similar applied to nodes but not to the wieldmesh. |
Thanks, seems correct then. |
This is from git commit 20a85d7 (or last known sfan5 windows build)
When compared against the same texture generated for an entity, (64x64 texture in the Minecraft 1.8 format) it is generally darker than the entity, and the player entity in third person.
Code relevant to this issue (generates both colour for both wield item and player entities);
https://github.com/Jordach/Solar_Plains/blob/master/mods/wardrobe/init.lua#L899
and
https://github.com/Jordach/Solar_Plains/blob/master/mods/wardrobe/hands.lua#L36
A visual demonstration of this issue can be seen here:
https://jordach.net/images/duggcklzgpllfucve.png
(Both models use the same base skin texture and clothing parts.)
Where, given the hex value #FFFFFF, the wield item turns into a medium grey, or #9f9f9f and #c6c6c6 hex values, respectively. This also occurs on regular, extruded tools, such as a pickaxe or shovel.
This shading is almost consistent with world mesh - but is inconsistent with entity meshes, which use the same set of origin textures.
This can lead to wield items looking wrong despite the original texture looking fine in the first place.
Edit:
Potential solutions - give wield meshes a brightness level (and side shading) that is closer to entities rather than world mesh.
Alternatively, for the challenge, unify the shading algorithms between the world, wield and entity mesh systems.
The text was updated successfully, but these errors were encountered: