Quote from: Dune on August 13, 2019, 07:29:11 AMI'd use a displacement to scalar (2x) and subtract those.
I was about to suggest the same, but somehow I get the feeling he already tried that since he said:
Quote from: cyphyr on August 13, 2019, 07:04:39 AMAlso the river is part of a GeoTiff, so there is no way of subtracting the river element from the terrain element.
So I'm not sure, but that's definitely what I'd try first too.
Technically the network is being parsed from the bottom up, so if you have a plane/disc object for the water you should be able to use a get altitude node to sample the altitude at each shading point on the water plane/disc and indeed, subtract that from the get altitude from your terrain, however...that only works if that get altitude somehow gets down to the planet node, so we would need a work-around to get the Y scalar. If you do not do that you are basically subtracting two get altitude nodes resulting in a black mask, since downstream of the network they "end up" at the same object.
To get a Y scalar I would connect a displacement shader to vector node to the compute terrain, followed by a Y to scalar. Now you have the altitude in a scalar value. Subtract that from the get altitude from your water object and you should have a waterdepth mask.
Or not. Sometimes TG's ways are...difficult