I came across an interesting blog post describing how Super Mario Sunshine, with its Gamecube-era hardware, rendered water. While it mostly seems like a simple multi-texture panning effect to get the waves, the crux of the post is an interesting trick that Nintendo used to get around not having programmable shaders in their hardware: how do they emulate the Brewster’s angle?

Each of the stages are given WebGL 2 canvas examples.

The answer is pretty clever: load different textures into your various mipmap levels. Along with correcting the artifacts associated with sharp textures being viewed far away, it gives Nintendo the opportunity to draw something different. In Super Mario Sunshine, this corresponded to brighter wave glare textures at the distance that would look like the angle that polarized light reflects on.

It will be an inaccurate effect, of course, but there wasn’t much that Nintendo could do without running a script at each pixel that actually knows properties of the scene. It also depends on the resolution being drawn, which is tightly controlled in a standard-definition console, but it is a source of headaches for emulator developers.

Check out the blog if you’re interested! It also links to a Dolphin blog post, here.