TrajansRow wrote:This was sort of a dirty modification I threw in while I was in the process of updating some shaders for OpenGL ES2. The work might be useful in the main engine when it’s further along.
To make it work in the current Aleph One, we need an additional vec4 uniform fed into the various fragment shaders, which represents the plane of the media in the polygon being rendered. Then in the shader, you just do a dot product to see whether the fragment is above or below the media, and tint accordingly.
I have no idea what any of that means, but I sure hope someone who does takes interest.
From the scenario developer's perspective, we would need to be able to specify the colour. For example, grabbing what colour to use from the media fader for the appropriate liquid as it is specified in MML would be convenient enough that it could be backwards-compatible with scenarios that already have custom liquids.