Monitor bug: TConstruct fluid tanks nearby un-render contents when monitor is placed while computer is running
fatboychummy opened this issue ยท 9 comments
Minecraft Version
1.16.x
Version
1.101.0
Details
Monitors are rendering about a pixel up and left of where they should be, they seem to also be making the rendered fluid in nearby Tinker tanks disappear.
Other tanks with fluids in it (non-tinkers) seem to cause the tinker tanks to render properly.
Overall issue + pixel offset issue
ding151.mp4
Testing issue + other mods' tanks
https://cdn.discordapp.com/attachments/477911902152949771/1037961268998443008/ding152.mp4 (video too large to upload to github)
Test with just CC and TConstruct
There should be lava in the tanks in the above image. Pixel offset is interestingly not noticed here, there may be another mod interfering there. It's way too late currently for me to continue searching however, so for now I will just name the modpack I am running that is experiencing the offset: "Stacia Expert"
Reported on Tinker's repository as well in case it is not on CC's end: SlimeKnights/TinkersConstruct#5017
Tanks not showing up appears to be a TBO-only issue, so you can work around this by switching to the VBO renderer.
I thought I'd fixed the border issues way back in ba976f9, so interesting it's still showing up.
It's also worth noting that things appear (I haven't tested thoroughly) to reset across chunk boundaries: tanks will render fine as long as they're in different chunks. Not actually sure why this is, I didn't think BE rendering was batched in the same way that chunks are!
The one thing that makes fluids weird is they use a custom render type, I have seen similar issues with them being invisible on fabulous until I found the right setting that is not used on fast/fancy, could be another similar property that needs to be set.
To be clear, what is it in CC that causes the tanks to stop rendering? Normally this type of bug is because the render state is not properly reset like expected before my code runs, is there something CC tweaked needs to reset?
So this is the code in question. There's a lot going on here (we're using shaders for one), but I'm not aware of other it causing issues elsewhere so it's very odd. Unfortunately RenderDoc doesn't appear to work on 1.16.x (I guess due to it still using legacy OpenGL), so not sure quite what is going on in the render state.