Skip to content

Fix rendering of UP face for waterlogged blocks with translucent sides - #3775

Open
Auth0x78 wants to merge 4 commits into
CaffeineMC:devfrom
Auth0x78:fix-culled-fluid-up-face
Open

Fix rendering of UP face for waterlogged blocks with translucent sides#3775
Auth0x78 wants to merge 4 commits into
CaffeineMC:devfrom
Auth0x78:fix-culled-fluid-up-face

Conversation

@Auth0x78

Copy link
Copy Markdown

Occlude the UP face only when the waterlogged fluid height is below 1.0f, as the side faces may be translucent.

Issue resolved:
#3197

@douira douira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be more appropriate if we used the voxel shape that we construct based on the fluid height for culling the fluid against the block that contains it. This voxel shape is used to cull the fluid against other blocks, and we could also use it to clear the fluid against its own block. Passing the fluid height into the shape comparison goes against the idea of the shape comparison system.

I appreciate your effort in resolving this issue, but I think there's a more appropriate solution than this.

@Auth0x78

Auth0x78 commented Jun 26, 2026

Copy link
Copy Markdown
Author

I have done the necessary changes. I get that passing fluidHeight is redundant and defeats the whole point of shape comparision. So removed it from func parameter and so now before calling the main function for checking visibility of fluid with self we construct a VoxelShape that better represents the fluid block.

Thank you for the feedback.

@Auth0x78

Copy link
Copy Markdown
Author

@douira any other changes, I will make them

@Auth0x78
Auth0x78 requested a review from douira June 27, 2026 18:21
@Auth0x78

Auth0x78 commented Jun 29, 2026

Copy link
Copy Markdown
Author

I found that we dont require to manually calculate height and then construct VoxelShape for accurate fluid shape, we can simply query fluid.getShape() to get the exact shape of the fluid, avoiding unnecessary height calculations & creation.

@Auth0x78

Auth0x78 commented Jul 6, 2026

Copy link
Copy Markdown
Author

@douira any update on this PR or any changes I might need to do?

Thanks

@jellysquid3 jellysquid3 added the T-bug Type: Bug label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-bug Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants