Sodium patch and optimizations for 1.21.1#12
Conversation
…kyblock block is visible
… (but it actually works)
|
Also by the way I have a fix for it flashing white the first time a skybox is rendered, but I recommend against fixing it. For a single frame a (probably changeable) white flash shows up where the block is placed because the visibility list has a frame of delay. This could be fixed by pre rendering all the textures but I don't recommend this because this would waste VRAM on high resolution textures that the client might not even see (think in the context of modpacks rather than people downloading this mod specifically). Doing it dynamically like this is more efficient. It's worth mentioning that ideally the best is a way to just load the texture in time before the block is rendered, but I don't know how to know what blocks will be rendered until after its too late to render the sky. |
|
I have thought of a way to avoid the initial flash and also have Iris compatibility, I'll hopefully get to it sometime within the next few days. |
|
Wow, thanks for putting in all this work. |
notanonion733
left a comment
There was a problem hiding this comment.
Please help me i am smoothe brained I have no god damn clue what i am doing how do I do this
|
@notanonion733 I'm sorry my english can be weak, what are you asking? Are you asking what this PR does or how to build the mod with this PR or something else? |
How do I fix? |
Uhh fix what? |
The block does not show for me, it must not work with sodium |
|
Do you have logs or anything? For me it works fine. This PR fixes compatabiltiy with sodium |
Fixed Incompatible with Sodium (1.21.1) #5 and Incompatibility with sodium #8 by copying the pose matrix, to make sure Sodium's PoseStack pooling doesn't cache references.
Added missing blockstates for Eclipse and Ps1 skyblock blocks, which fixes missing texture when mined.
Ported the missing Eclipse texture from the 26.1.1 branch and fixed the .gitignore. I was mindful of the texture orientations!
Skyboxes are now only rendered if their respective block is rendered. They are determined visible or not based on the previously rendered frame.
Changed renderSkyBlocks and renderCubeWithRenderType to reuse a instance of PoseStack rather than many new ones every frame.
I tested everything I changed but there could always be some sort of edge case or "works on my machine" moment so if there's any issues or changes I should make let me know.