Add shaded outline to procedural tool textures#3366
Conversation
|
not to be that guy but some picture examples when holding the tool would also be useful instead of just inventory screenshot |
|
I like this. |
Yes, but that wouldn't work with some of our tool textures, some areas are only 2 pixels wide, so the whole thing would be outlines. I think it would be best to just manually update the tool textures (i will do this) |
New pickaxe / iron ingot outline colors
|
I made another PR for the rest of the tools. The only other thing I encountered is that our swords are no longer pointy: Again, I don't have any ideas. Otherwise, this seems to be good, I could move this into code review once you merge my PR. |





This adds a shaded outline consistent with the item's existing lighting model, using 2 new colors per material, one for the side facing the light, one for the side away from it.
MaterialgainsoutlineColorLightandoutlineColorShadowfields. They can be set via new optionaloutlineColorLightandoutlineColorShadowhex keys in a material's.zig.zondata, and otherwise default to darkened versions of the material's existingcolorspalette extremes.TextureGenerator.generatenow paints background pixels that border an occupied cell with the neighboring material's outline color, picking light vs shadow based on the same heightmap-derivedlightvalue already used for interior shading (this was factored out into a newcalculateLighthelper). ThecolorInttoColorconversion was also factored intocolorFromIntand reused.Closes #1062