-
Bug
-
Resolution: Unresolved
-
None
-
1.20.4
-
Confirmed
-
Performance
-
Normal
-
Gameplay
The bug
Glass panes and their stained variants are fairly commonly and extensively used blocks, but can contribute to frame drops in many occasions due to using a rather primitive multipart system to display connections. For example, a "straight" window-type pane with no branching will utilize three texture planes for the full face, when it really only requires one.
It is possible to optimize the models such that for side faces, the minimum number of faces is used to render the desired result, which results in a client performance bonus. This requires completely ripping out the old multipart system, model files and templates that pane blocks currently use, and replacing it with a new one. This system is more complex (nine models are required per pane type instead of five, and the blockstates file for each pane is twice as long), but performance is verifiably improved as a result. The appearances of panes should be unaffected aside from fixing some vanilla mapping issues.
I haven't optimized the top and bottom faces since ideally these should be culled by other pane blocks above and below them with respect to the shape of said panes, however this does not happen for some reason (MC-264676). See also MC-50349.
How to reproduce
- Create a creative superflat world with the following preset:
minecraft:barrier;minecraft:the_void
- Set the render distance to 12
- Run the command
/tp @s 0 -20 0 0 0
- Set up walls of panes by running the following six commands:
/fill -60 -63 30 60 63 30 glass_pane
,
/fill -60 -63 32 60 63 32 glass_pane
,
/fill -60 -63 34 60 63 34 glass_pane
,
/fill -60 -63 36 60 63 36 glass_pane
,
/fill -60 -63 38 60 63 38 glass_pane
,
/fill -60 -63 40 60 63 40 glass_pane
- Open the performance graph using F3+2
- Observe with the default resources versus the attached fix pack
Expected results
Good framerates with vanilla resources.
Actual results
The resource pack gives better performance.
How to fix
Remove all of the glass-pane related model files from the vanilla models/block directory and replace them with those in the resource pack, and replace the blockstates files in vanilla with those in the resource pack. I give full permission or whatever to Mojang to use these. Billions of computers will thank you.
- relates to
-
MC-262427 Flower pots and potted objects have very poorly optimized models and strange texture mapping
- Open
-
MC-262452 Hopper models are unoptimized and cause rendering lag
- Open
-
MC-262461 Stair models are unoptimized and can cause rendering lag
- Open
-
MC-262470 Cauldron models are very unoptimized, causing render lag
- Open
-
MC-262527 Item frame models are quite unoptimized
- Open
-
MC-262641 Chorus flower models are incredibly unoptimized and cause serious rendering lag
- Open
-
MC-262689 Hanging mangrove propagule models are comically unoptimized
- Open
-
MC-262953 Fence gate models are very unoptimized, causing lag among other issues
- Open
-
MC-267127 Composter model is unoptimized, causing extra rendering lag
- Open
-
MC-267281 Fence multipart model system performance optimization
- Open
-
MC-260296 Pink petal block models are not optimized
- Resolved
-
MC-262652 Dragon egg's side texture is mapped strangely as of 1.8 (and the model is also unoptimized)
- Resolved
-
MC-267864 Two-tall plant model/rendering not optimized
- Open
- testing discovered
-
MC-267871 Top/bottom textures of glass panes are mapped incorrectly
- Open