Techsets are rather simple and there is not much to know about them really. They just define different techniques for different lighting/rendering states within the game.
There is one thing thats kinda tricky tho, … knowing what states are needed and what they are needed for.
1. Techset Suffixes
Different suffixes and multiple techsets might be needed, depending on where you use your material.
2. Techsets for ShaderModel 2
Like stated in the introduction: Techsets in root\raw\techsets will be used by GPUs running ShaderModel 3, but CoD4 also supports ShaderModel 2
so you have to create copies of your techsets and place them into root\raw\techsets\sm2 (otherwise get’ll errors when linking your fastfile).
These will obv. not work on SM2 hardware but I personally do not care about that.
3. Assigning Techniques
Only a single technique can be assigned to a state but multiple states can be assigned to a single technique.
Not defining a state used by the game results in .. ? (unsure)
2D only techsets
"Model techsets with suffix "mc_"
World techsets with suffix "wc_"
Sky techsets with suffix "wc_"
4. Additional Information
Creating “lit” world-materials is hard and I wasn’t able to get them to work. It seems like the game is prepending “l_hsm_“ to techset names even tho they are not referenced by anything within my material chain. I guess thats something done by the engine at runtime and these are probably used for instanced lighting / baked lighting. I’m not really sure.
Creating “lit” model-materials is easier, but still requires multiple shaders to fully support each and every lighting state. Tbh. I’m fine with doing it like in the example I posted above.
Looking at stock techsets and techniques can help you quite alot :)