With a ps1.1 pixelshader, it's possible to blend up to 4 textures per terrain in a single pass (using vertex colors/alpha to blend instead of a blendmap is always better in performance, memory, and ease of use... thanks for not giving us those, Conitec ). Doing several passes allows 4 more per pass.

If I were designing such a shader, and planning on a wide range of system support for shaders; I would design it with a base of 4 textures (rgba*1 from vertex colors) that would cover the bare minumum and still look good; from there I would do another pass for additional textures using an alpha and 3 textures (rgb*a from vertex colors); and if needed; a last pass with detail mapping overtop for closeups. This would all function on ps1.1, then go forward and create a shader for ps2.0 that combines all of this into 1 or 2 passes. So on, so forth.

Having direct access to customize your vertex formats, d3d renderstates, and more access to the shader architecture makes a huge difference. This could be done in a DLL for 3DGS, using another format (mdl does not have vertex colors). You could also do it using a blendmap, which takes another texture slot, and another texture read. You can make the blendmap at the same resolution as vertices in the terrain, use point mip/mag/minmapping, and shift 0.5f textels left and up to mimic vertex coloring exactly. Using another cycle in your shader for the sake of something that should not require such is pretty painful though...

Ah, the fun I'd have with conitecs engine if we got source code . Give me a week, and the engine would look nothing the same.

-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog