To be consistent with data protection laws, we’re asking you to take a moment to review key points of our Privacy Policy, which covers all Google services and describes how we use data and what options you have. We'll need you to do this today.
One thing I didn't mention: if you want to make deeper water look murky then you can add something like this into the fragment shader: refractColour = mix(refractColour, murkyWaterColour, clamp(waterDepth/60.0, 0.0, 1.0));
Common Problems:
-If the edges of the water quad look a bit glitchy and jagged (especially when you zoom out with the camera) then you may have a problem with the precision of the depth buffer. This can be fixed by increasing the NEAR_PLANE value of your projection matrix in the MasterRenderer, or by changing "new PixelFormat()" to "new PixelFormat().withDepthBits(24)" when creating the display.
Series Overview:
1. Introduction 2. Rendering to textures 3. Clipping planes 4. Projective texturing 5. Du Dv Maps 6. Fresnel Effect 7. Lighting 8. Depth Effects