Iris icon indicating copy to clipboard operation
Iris copied to clipboard

Can't differentiate between water and flowing_water

Open amlib opened this issue 7 months ago • 3 comments

What happened?

I'm trying to mask flowing water from still water in an attempt to handle their rendering in different ways, but it seems like they both always get accounted as the same water block type. I'm not sure if this is a bug or a limitation of Iris/Optifine.

In block.properties I tried:

block.8 = minecraft:water
block.9 = minecraft:flowing_water

And then in gbuffers_water vertex shader I do the usual mc_Entity == x to filter the block ID I want, but no matter what I do they both count as ID 8.

I would like to do this because there seems to be no way (as far as I know) to tell how deep a body of water is other than using the (solid) depth from the scene. This approach works mostly fine for actual bodies of water like rivers, lakes and oceans. But, for example, waterfalls which might actually just be a single block of depth will register as being as deep as the scene is, which could potentially be a wall right behind it (fine again) or a wall hundreds of blocks away (bad case), making any volumetric effect look wrong for that kind of water.

By masking the flowing_water type I was hoping to work around this and cap the maximum depth or using a different volumetric effect. I'm open to other solutions if anyone has any idea how to properly solve this.

As you can see on the uploaded screenshot, the waterfall takes a very dark appearance when against the sky or even fairly near geometry that is just a few dozen blocks away. Even this is enough to make the water fog/volumetric effect darken it by allot.

Screenshots

image

Log output

No response

Minecraft Version

Minecraft 1.20.1

Iris Version

1.7.1

Operating System

Manjaro Linux

What is your GPU?

Radeon 6700XT

Additional context

No response

amlib avatar Jun 27 '24 16:06 amlib