Modify the fragment shader in Program 15.8 so that the water caustics are also rendered when the

Question:

Modify the fragment shader in Program 15.8 so that the water caustics are also rendered when the camera is above the top surface as well. Do you think that the scene appears more realistic or less realistic with the caustics included in this case? If the latter, try to find a way to tune the caustics so that they increase realism rather than detracting from it.

Program 15.8Fragment Shader (for floor) float getCausticValue(float x, float y, float z) { float w = 8; float strength =float colorB = clamp(color.z + causticColor, 0.0, 1.0); color = vec4(colorR, colorG, colorB, 1.0); } // add

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Graphics Programming In OpenGL With JAVA

ISBN: 9781683922193

2nd Edition

Authors: V. Scott Gordon PhD, John L. Clevenger PhD

Question Posted: