Mobs behind portals are sometimes visible through portals
reedrw opened this issue ยท 9 comments
Two pigmen behind a portal (as seen here) are visible from the other side of the portal (as seen here) despite the fact that they should not be in the portal's line of sight.
This is easily reproducible by setting a portal and a mob similarly to how I have pictured below.
I had other mods installed when I discovered this bug. However, I have been able to reproduce this on a newly created instance where the only mods installed are BP and Optifine at default settings (other than changing the FOV to 90, if that makes any difference), which suggests that this is not an issue of mod compatibility.
The setup I'm using is like this
This scenario in particular seems to consistently cause the mob to render through the portal, as I've been able to recreate the effect multiple times in this fashion.
Strangely enough, A set up like this:
Results in only the villager on the right being erroneously rendered, as seen in this clip:
https://files.catbox.moe/hzlhhl.mp4
Could you please verify that this happens without OF as well?
The last screenshot suggests that this might be related in some way to the order in which entities are rendered. Could you tell me which way is north in that screenshot, so I can try to reproduce it as close as possible?
Edit: nvm, I got it reproduced by placing the villager not directly in front of the portal (ftr: the bottom being north for me).
Note to future self when fixing this: Probably introduced in 2aff2c1. If entities fail the AABB check, they should still be subject to clipping plane 5 (the global one) but as is they aren't. I.e. those on the same side and with passing AABB check should be skipped but those on the same side without passing AABB check should still be clipped.
@Umitrix Yes. That doesn't seem at all related to this issue though.
well, the texture wasn't showing up in the previous version and seeing it does now made me think there was some conflict on a modpack i'm using.
@Umitrix 0.1.x didn't render the original portal texture. I added that functionality in 0.2 because of popular demand.