Hey, that's cool!

I have a friend in South Africa who made something like that, only it's software based and thus isn't a "shader" in the common sense of the word at all (although it does draw texture mapped spheres). In his own words:

"The idea is to project the 3D sphere to a 2D conic section, which (being a quadratic object) can be perfectly scan-converted and rasterized. [The Texture Mapping] works by projecting the sides of a cube onto the sphere, and then mapping the U/V coordinates on the sphere (which are acquired along with the normal vector) directly to the X/Y coordinates of the cube face.  This is a very fast method of texture mapping, but the trick is to find the correct face.  In this implementation, the sphere is divided into 6 curved surfaces, found by cutting the sphere with 6 great circles.  Each surface is then individually mapped with its own texture."


Eats commas for breakfast.

Play Barony: Cursed Edition!