Is there any way to make DH work with stacked dimensions?
As the title says, couldnt find anyone else mentioning it but when playing with DH and immersive portals dimension stack, the LODs work perfectly for the overworld but do not generate at all in stacked dimensions, i guess because it registers that you are still in the overworld. is there any way around it?

13 Replies
DH does not work with Immersive Portals because the world change is not detected by DH. It will keep rendering the dimension you started in, so leaving the game and joining again after changing dimensions will "fix" it - but then of course you have the inverse problem when going back.
I am unsure how feasible it is to fix this at all. Maybe @пшш or @James Seibel GMT-5 has any ideas.
fair enough since i guess it doesnt trigger the "join dimension" so the game isnt told that it should render those LODs, maybe it is possible to hook into the mod with a custom addon or smth? unsure how performance heavy it would be, probably twice the load then since it would have to do two dimensions at once 💀
It's probably fine to only do DH rendering in the world you're actually in, just to keep things simple.
It could be possible to create an add on to solve this, yeah. DH has an API that other developers can hook into, so if you're able to detect whatever shenanigans Immersive Portals is doing, then you could tell DH to render the correct world/dimension.
Ohhhh true i could look into that and see if i can do something about it if there is no pre-existing solution
:ASsalute: my new mission
Long term DH should probably just handle level loading at the same time as rendering, so if the load/unload event isn’t triggered rendering will still happen.
The biggest hurtle will be determining when a level is no longer needed so it can be unloaded.
The API doesn’t currently have any ability to load/unload levels or trigger render events (might be interesting to try out some day).
For now you’d have to look into the core DH code and mess around there.
If you can find a way to cleanly handle level loading/unloading I’d be willing to look at your merge request.
Immersive Portals keeps multiple levels loaded at the same time, so I think it would have to be based on player position
But I don't know the technical details of how Immersive Portals achieves what it does
unload could be done a few seconds after last frame render
but with imp it's still probably gonna be problematic tho
We wouldn’t want anything immersive portals specific, so the only thing we can work with is MC triggering a render call.
Fair enough.
I think I had to use soft references to handle level unloading somewhere so we could probably just use that.
Well it also renders multiple levels at the same time, so idk how that would work 🤔
DH doesn’t care since we just inject into MC’s rendering pipeline, so where/when the rendering happens doesn’t really matter to us.
Right, but we wouldn't need to care about the fact the there are multiple renderers active?
Or in other words; DH is already written in such a way that multiple instances of the rendering code can run at the same time?
unsure but it does register switching between the dimensions at least, f3 displays the dimension switching so id assume a call is being done somewhere, havent done a ton of mixins other than worldgen but maybe i could put some kinda bump in there?:Think: will have to take a looki deeper into how they handle it tho
Yes, DH’s renderer is (kinda) stateless.
It just needs the correct args passed in at the right time relative to the GL state.