Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visual horros with Lodestone and Rubidium #12

Open
CipherUnknown opened this issue Apr 12, 2023 · 17 comments
Open

visual horros with Lodestone and Rubidium #12

CipherUnknown opened this issue Apr 12, 2023 · 17 comments
Assignees
Labels
1.18 1.19 bug Something isn't working Interaction only a problem when another mod is used

Comments

@CipherUnknown
Copy link

When combining the mod with Rubidium and Lodestone (Malum's library mod) blocks flick between light and black colors, seemingly at random.

Minecraft version: 1.18.2
Forge version: 40.2.1
Rubidium Version: 0.5.5
Lodestone: 1.3
Phosphophyllite: 0.6.0-beta1.6
Quartz Version: 0.0.0-beta.1.4
with only these mods

image
^ This rapidly flicks between normal and completely black

Log: https://pastebin.com/WjWXWNVS
(Same error for 28,000 lines)

@RogueLogix
Copy link
Member

Try building a bigger reactors turbine with glass. If that fixes the visual issues while its in view, this is likely the same issue that was just patched in 1.19.

@CipherUnknown
Copy link
Author

Did some testing around, building a turbine at first had no effect, and after a couple of seconds it seemed fixed. Found out that if was fixed as long as you hold any item in you hand. Holding nothing broke everything as usual.

Keeping the turbine built, kept the creative inventory open for maybe 2 minutes and after closing everything seemed, once again stable. Shortly after, everything back to black. Randomly breaking and fixing itself with the turbine built.

image

Again, only using the mentioned mods.

@embeddedt
Copy link

I looked into this briefly since I'm working on a more reliable Rubidium fork, but I don't think it's caused by Rubidium.

Please keep in mind I'm quite inexperienced with modern OpenGL, but I suspect either Lodestone or Quartz are tearing down their render state too aggressively and unbinding some buffer type that Sodium uses, but vanilla does not. This would explain why the issue isn't seen with the vanilla renderer.

In particular, the code here looks rather suspicious (it would be cleaner to save the old state and restore it, but I don't know how that affects performance). This issue can't be reproduced with Rubidium and only one of the mods at a time though, so it must be some type of interaction between their rendering hooks.

The issue on Lodestone's end has a pointer to what part of their rendering code is relevant, if anyone else happens across this and wants to dig in further.

embeddedt added a commit to FiniteReality/embeddium that referenced this issue Sep 1, 2023
We should not need to do this. Mods should use RenderSystem

Works around:
* BiggerSeries/Quartz#12
* LodestarMC/Lodestone#9
@embeddedt
Copy link

I found a kludge to prevent the flickering, but I think the 1.18 version of Quartz has a flawed design: it calls many OpenGL methods directly and bypasses vanilla Minecraft's RenderSystem. RenderSystem caches OpenGL state to increase performance, but if any OpenGL state is changed behind its back and not restored to the exact same value, the cache will be out of sync and cause problems (in Sodium's case it causes rebinding of the lightmap to be skipped, since the cache believes it's already bound).

@RogueLogix
Copy link
Member

bypassing the entirety of Mojang's OpenGL code is intentional, that said i wouldn't be surprised if there is a part of the state that is changed by Quartz in a way that normally is a non-issue, but does cause an issue in this case. if lodstone runs before quartz and changes state via RenderSystem to match what mojang will want later and quartz changes that, that is likely the cause.

it would be cleaner to save the old state and restore it, but I don't know how that affects performance

glGet* calls to save the state are generally quite expensive, as they may require a client to server thread sync, or worst case a sync to GPU, with a subsequent stall following that.

@Cicopath
Copy link

Is there any temporary solution to this issue?

I don't know by which mod end this issue is being caused, but I'm currently on version 1.18.2, and my world looks like... well, let the pictures explain themselves. I'm in F1 mode, but when I'm not in it, it looks as if some of the blocks are "z-fighting".

Minecraft version: 1.18.2
Forge: 40.2.10

Rubidium: 0.5.6
Rhino: 1802.2.21 build 255
Oculus: 1.6.4

Phosphophyllite: 0.6.0 beta 1.6
Quartz: 0.0.0 beta 1.4

Lodestone: 1.4.2

2023-10-09_23 40 06
2023-10-09_01 54 31

@embeddedt
Copy link

You can try using Embeddium instead of Rubidium.

@RogueLogix RogueLogix added bug Something isn't working Interaction only a problem when another mod is used 1.18 1.19 labels Nov 4, 2023
@RogueLogix RogueLogix self-assigned this Nov 4, 2023
@RogueLogix
Copy link
Member

thread on discord where the issue is replicated on 1.19 as well.
https://discord.com/channels/767811985844469810/1170452736916070521

RogueLogix added a commit that referenced this issue Jan 7, 2024
@RogueLogix
Copy link
Member

OpenGL state mismatch issue, as expected, updating state tracker fixed the issue. I'm going to leave this issue open until i backport to 1.18

@Zelioth
Copy link

Zelioth commented May 8, 2024

Hey I am working on our mod pack for 1.19.2 I recently discovered a issue where when using the latest version of Embeddium and RogueLogix mods (Quartz, Bigger Reactor, Phosphophyllite) that there is some sort of visual bug that breaks all textures. I can't downgrade your mods because you've deleted versions in between so none match when downgrading to test and testing older versions of embeddium mods do not seem to fix it either.

The issue is when using embeddium with RogueLogix it breaks textures on 1.19.2 Forge 43.3.9.

This issue is within every version and fixes when removing one or the other but Friends United would like to use both. So what would you recommend for a fix?
image

@RogueLogix
Copy link
Member

can you provide exact versions of all four mods?

@Zelioth
Copy link

Zelioth commented May 8, 2024

Well I have tested all open released that work together for your three mods. (There aren't many that work together with versions missing in between haha)

Bigger Reactors - biggerreactors-1.19.2-0.6.0-beta.6.4.jar
quartz - quartz-1.19.2-0.1.0-beta.2.2.jar
Phosphophyllite - phosphophyllite-1.19.2-0.6.0-beta.8.jar
Embeddium - embeddium-0.3.18+mc1.19.2.jar

@RogueLogix
Copy link
Member

oh, i never pushed this change to curseforge, that would explain that, lemme go ahead and do that

@Zelioth
Copy link

Zelioth commented May 8, 2024

Please and thank you :D I really appreciate that. Always loved Bigger Reactors and I am trying to update our 1.19.2 Friends United pack and didn't want to without your mods as well :D

@RogueLogix
Copy link
Member

1.19.2-0.1.0-beta.1.3 should be on curseforge soon (just need to wait for it to be built)

@Zelioth
Copy link

Zelioth commented May 8, 2024

I can confirm that it is now fixed.

@dddVolodyabbb
Copy link

Hello. I want to report my problem. Lighting (for example: from torches) does not work with the "quartz" mod when shaders are enabled. Without shaders, the bug appears as black chest lids. I attached 2 screenshots with shaders turned on and off... with and without the "quartz" library.

Minecraft 1.20.1
Forge 47.3.1
Rubidium 0.7.1
Oculus 1.6.9 / Iris 1.6.9
Phosphophyllite 0.7.0-alpha.0.1
Quartz 0.2.0-alpha.0.1
Bigger Reactors 0.6.0 beta-10.4

2024-06-23_21-11-04
2024-06-23_21-12-18
2024-06-23_21-17-11
2024-06-23_21-17-38

I don’t understand programming and can’t help, but I don’t want to give up your mods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.18 1.19 bug Something isn't working Interaction only a problem when another mod is used
Projects
None yet
Development

No branches or pull requests

6 participants