"Parametric" horizon mapping ideas

What resolution do you need for horizon mapping to look good?

At least on NV3x class hardware, fetching from 3D textures can be twice as slow as other texture fetches. I was thinking that it might be interesting to encode the horizon in a different manner to compress the horizon map bandwidth and possibly storage.

The horizon is essentially a 1D real function that is encoded along one of the axes of the 3D texture. Instead of this, what if you used a harmonic or parametric encoding and stored coefficients/parameters in the color channels? If you know what the surface tends to look like, you can tune your basis functions to look like the bumps you plan on modelling. Maybe the basis functions are stored in a separate atlas texture, or are hard-coded in fragment shaders. Higher order coefficients can be loaded from another texture on demand. You can also probably get away with lower resolution on the coefficients (particularly on higher order coefficients), so texture compression becomes available.

Anyone hear of anything like this being done?

-Won

I did this for a project at school. I used 8 directions (encoded in 2 4-component textures) and sinusoidal basis functions. The sinusoidal basis functions are attractive because they are very fast to calculate in a shader. I was quite happy with the results, but didn’t do any detailed comparisons with other horizon mapping methods.