Make display mode lighting accurate and add shading modes - #3716
Open
ewanhowell5195 wants to merge 27 commits into
Open
Make display mode lighting accurate and add shading modes#3716ewanhowell5195 wants to merge 27 commits into
ewanhowell5195 wants to merge 27 commits into
Conversation
✅ Deploy Preview for blockbench-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ading # Conflicts: # js/preview/preview_scenes.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Display mode lighting used to be really off. Items were lit like a block sitting in the world, evenly from both sides, when the game lights them from one side in the inventory. It is game accurate now, with the GUI slot using the inventory lighting and every other slot using the entity lighting.
Old GUI side light vs new accurate GUI side light

Old GUI front light vs new accurate GUI front light

The default shading was slightly off too. It matched the game on flat faces but not in between, so rotated cubes were inaccurate. That is fixed.
Old default lighting

New default lighting - The main difference is noticed on cubes rotated more than one axis (the top three)

I also decided to build this as a system of shading modes rather than hardcoding it, so plugins can extend it and formats can pick a preferred one. That made a set of presets worth having, so entity formats use entity lighting instead of block lighting, the dimensions have their own, and preview scenes can just name one.
There is a new Shading Mode setting to override all of it. It defaults to Automatic, which leaves the choice to the preview scene, and then the format.
All the values come from the game rather than being eyeballed. This is based on my work from https://github.com/ewanhowell5195/block-model-renderer.
JannisX11/blockbench-scenes#2 is the companion change for the nether, night and end scenes, and should go in when this releases.