Sunday, December 6, 2009

More fun with Waterwarps

OK, decision time.

I've dug out some of my old HLSL code and have re-implemented waterwarps in a pixel shader. It's been a little fine-tuned in that it is now properly capable of falling back to the old (non-HLSL) way if your card doesn't support the required version of pixel shaders. I've also cleaned up the old code a little (lot!) and rewrote the shader so that it gives a result that's virtually identical (higher quality in some places) to the old way.

I guess that this is now the best compromise; pixel shaders can be used for a better result (with much higher performance) if you support them, but you don't actually need them.