I have figured out what causes this, it seems like mentioned to be Mesa 25, and have found a fix for it.
This is due to a “use after free” issue, which takes place in VertexFormat#uploadImmediateVertexBuffer & VertexFormat#uploadImmediateIndexBuffer where when closing the buffer then re-assigning it, can cause a “use after free” issue. The fix is to store the current buffer in a temp variable, create the new buffer in another variable, then call close on the old buffer variable, then assign the buffer to the new buffer variable
The fix to this is to make (MOJMAP) PlayerRenderer#getRenderOffset return Vec3d.ZERO / just removing this method entirely because it is the cause of the issue.
Also to note for affected versions, it would affect every version 1.14/1.15+
This is because in 1.13 and below, there was a toggle known as "VBOs" which you could disable/enable in Video Settings. This sky would only show if VBOs were turned off, because that was how it was coded unfortunately.
Ever since 1.14 though, that setting was removed and starting with 1.15 (the massive render update), the concept of VBOs being OFF was removed in all of the code, making VBOs be forced always ON and be the default.
The code I have put below would return this sky, it would function exactly how it did back then. This is just to note tho on how it worked and what happend.
You can still get this sky in 1.13 by disabling VBOs, ever since 1.14, VBOs have been on by default & the toggle was removed, and in 1.15 the option/code to disable VBOs was removed making VBOs being on a permanent thing. But I have found the code that renders/shows the bottom portion of the sky and have gotten it to work in 1.20 with VBOs.
This is because on Java, there is now 2 textures for glint since 1.19.4, making armor more subtle
But also, bedrock never updated the glint format like Java did in 1.15 causing it to be outdated & also Bedrock uses pixelated glint, you can see especially on enchanted books
What is your mesa drivers current version?
Are you able to reproduce still when updating to 25.0.3?
I have figured out what causes this, it seems like mentioned to be Mesa 25, and have found a fix for it.
[media]This is due to a “use after free” issue, which takes place in VertexFormat#
uploadImmediateVertexBuffer
& VertexFormat#uploadImmediateIndexBuffer
where when closing the buffer then re-assigning it, can cause a “use after free” issue. The fix is to store the current buffer in a temp variable, create the new buffer in another variable, then call close on the old buffer variable, then assign the buffer to the new buffer variableExample From My Mixin I made (Mojmap):
Here is the updated code for 1.21.4+ (using Mojmap mappings)
Depth is:
Sky Color Integer is:
NOTE: This should be called/happen at the end after SkyRenderer#renderDarkDisc in LevelRenderer#renderSky
Couldn't reproduce
The fix to this is to make (MOJMAP) PlayerRenderer#getRenderOffset return Vec3d.ZERO / just removing this method entirely because it is the cause of the issue.
where else do we chat?
and yea I saw your mod, it is not the same code that I have (extracted from a 1.14 snapshot before the pre-releases)
ok I boiled my code down and I think I know why its so weird now, I just gotta figure out how to implement this new thing I found
yo do you have a github? cause I have the code that was removed, but when I added it back, it works but feels off somewhat
Smajlo Slovakian
I have the code to fix this
This was in the the 1.10-pre 1 changelog ^
Also to note for affected versions, it would affect every version 1.14/1.15+
This is because in 1.13 and below, there was a toggle known as "VBOs" which you could disable/enable in Video Settings. This sky would only show if VBOs were turned off, because that was how it was coded unfortunately.
Ever since 1.14 though, that setting was removed and starting with 1.15 (the massive render update), the concept of VBOs being OFF was removed in all of the code, making VBOs be forced always ON and be the default.
The code I have put below would return this sky, it would function exactly how it did back then. This is just to note tho on how it worked and what happend.
I had to change it a bit because in 1.13/1.14 the code was still using old non-vbo code, so I figured out how to update it to use modern vbos
NOTE: I updated this comment with my new updated code for 1.21.2
heres my code snipped (Using YARN, Fabric 1.20.5)
You can still get this sky in 1.13 by disabling VBOs, ever since 1.14, VBOs have been on by default & the toggle was removed, and in 1.15 the option/code to disable VBOs was removed making VBOs being on a permanent thing. But I have found the code that renders/shows the bottom portion of the sky and have gotten it to work in 1.20 with VBOs.
This is because on Java, there is now 2 textures for glint since 1.19.4, making armor more subtle
But also, bedrock never updated the glint format like Java did in 1.15 causing it to be outdated & also Bedrock uses pixelated glint, you can see especially on enchanted books
Even when changing player permission to operator, you still cant change gamemodes