Beer's Law

I added Beer's law causing light that travels through water to be attenuated based on the inverse exponential of the distance traveled. This means that increasing depth will give the water a darker appearance, as seen in the render below:

I also switched to an implicit representation of the water surface, reducing the memory requirements. In addition I compute the normal vector based on the water surface equation instead of indirectly based on the height map, meaning the water surface is now bump mapped, and the geometrical resolution doesn't need to be that high in order to get high frequency details in the light reflection and refraction.

No comments: