-
Notifications
You must be signed in to change notification settings - Fork 417
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
WorldRenderEvents.AFTER_SETUP fires immediately before a glClear() preventing rendering in MC 1.21.3 #4195
Comments
How can I participate? I'm new to Java, OpenGL and also in GitHub. |
It seems like the cause of this issue is that It sounds like you would need a new So basically: public class WorldRenderer {
public void render(...) {
// other code...
if (!thickFogEnabled) {
renderSky(...);
}
// --> Inject new AFTER_SKY event here. <--
renderMain(...);
// other code...
}
} This is all assuming that it wouldn't make more sense to move the I also don't know if adding this event would be considered out of scope for Fabric API. That's up to the maintainers to decide. Either way, I hope these findings help to move this issue forward and look forward to seeing Distant Horizons work in 1.21.3. 👍 |
You were on the right track here, but the actual event needed to be fired after the terrain fog shader was set up, this was moved to renderMain, so I just fire a new event directly after that |
Is moving the injection point sufficient? |
From an API perspective I feel like it'd be better to fix the existing event vs adding a new one. But that's not my decision to make and I can work with either. |
Minecraft added a
glClear
call right after theWorldRenderEvents.AFTER_SETUP
call is fired, preventing any rendering from happening during that event.This is a blocking issue for Distant Horizons since the next event in the stack
BEFORE_ENTITIES
is fired too late in Minecraft's rendering pipeline (I need to draw into the skybox).If this is expected behavior moving forward please let me know so I can look into other solutions, thanks!
Previous behavior: MC 1.21.1
Fabric API
0.107.0+1.21.1
Final Frame:
Render Doc OpenGL event list:
New behavior: MC 1.21.3
Fabric API
0.107.0+1.21.3
Final Frame:
Render Doc OpenGL event list:
Here are render doc snapshots of both Minecraft versions in case you want to look closer:
render dock snapshots.zip
The text was updated successfully, but these errors were encountered: