Skip to content
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

More intelligent culling/triangulation for fluid side texture planes #2921

Open
muzikbike opened this issue Dec 7, 2024 · 1 comment
Open
Labels
A-vanilla-issue Area: Vanilla issue T-enhancement Type: Enhancement

Comments

@muzikbike
Copy link
Contributor

Request Description

This probably wouldn't improve performance but is something to consider when fixing other reported issues with the fluid renderer (#1210, #1211, #1212, #2470, #2471, etc.)

Here's a simple setup with water and slabs:
2024-12-07_16 00 52
2024-12-07_16 01 01
2024-12-07_16 01 09
2024-12-07_16 07 51

The shallower sections are correctly culled by the sides of the slabs. However, for the deeper region, since some of the water level is above the slabs, the game does not cull them at all. This looks fine in most situations, but when you look under the surface, this means that a dark water texture occludes the slab, which does not happen for the shallower sections, and there is a hard line between where this is the case and where it is not.

It would probably look considerably better in this section to take a middle ground and only render the side of the water over the area not occluded by the slab, and render nothing on the occluded area.

Here's another case with farmland as the occluding block. At normal height, the water's inner planes aren't rendered against the farmland as the water level is lower than the height of the farmland. Raising the height of the water to a full block will cause those planes to render. The ideal case would be for the side textures to only render one pixel high at the very top, which would look much better.
2024-12-07_16 03 03
2024-12-07_16 03 05

@muzikbike muzikbike added S-needs-triage Status: Needs triage T-enhancement Type: Enhancement labels Dec 7, 2024
@douira
Copy link
Collaborator

douira commented Dec 7, 2024

The problem with fixing this is that you'd need to "mask" out the part of the water that is occluded by the neighboring block, which may be arbitrarily complex. If the block is a stair, it's basically impossible to mask out just part of the water quad to only render it where it doesn't overlap with the stair. I'm not sure if it's even possible to extract a "height" with which we can crop the water quad from the neighboring block's shape.

@jellysquid3 jellysquid3 added A-vanilla-issue Area: Vanilla issue and removed S-needs-triage Status: Needs triage labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-vanilla-issue Area: Vanilla issue T-enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants