Skip to content

Sodium patch and optimizations for 1.21.1#12

Open
sunshinekitsune wants to merge 8 commits into
Noodlegamer76:1.21.1from
sunshinekitsune:1.21.1
Open

Sodium patch and optimizations for 1.21.1#12
sunshinekitsune wants to merge 8 commits into
Noodlegamer76:1.21.1from
sunshinekitsune:1.21.1

Conversation

@sunshinekitsune

Copy link
Copy Markdown
  1. 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.

  2. Added missing blockstates for Eclipse and Ps1 skyblock blocks, which fixes missing texture when mined.

  3. Ported the missing Eclipse texture from the 26.1.1 branch and fixed the .gitignore. I was mindful of the texture orientations!

  4. Skyboxes are now only rendered if their respective block is rendered. They are determined visible or not based on the previously rendered frame.

  5. 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.

@sunshinekitsune

Copy link
Copy Markdown
Author

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.

@sunshinekitsune

Copy link
Copy Markdown
Author

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.

@tlitookilakin

Copy link
Copy Markdown

Wow, thanks for putting in all this work.

@notanonion733 notanonion733 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help me i am smoothe brained I have no god damn clue what i am doing how do I do this

@sunshinekitsune

Copy link
Copy Markdown
Author

@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?

@notanonion733

Copy link
Copy Markdown

@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?

@sunshinekitsune

Copy link
Copy Markdown
Author

How do I fix?

Uhh fix what?

@notanonion733

Copy link
Copy Markdown

How do I fix?

Uhh fix what?

The block does not show for me, it must not work with sodium

@sunshinekitsune

Copy link
Copy Markdown
Author

Do you have logs or anything? For me it works fine. This PR fixes compatabiltiy with sodium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants