Call of Duty - Shaders, Shader Types and Textures
Thanks to Shoot for the work that went into this tutorial.
Shaders appear to be handled a bit differently in CoD than in the other games I have dealth with - not in the sense that the shader script is any different but in how the shaders are applied to the various textures by the game engine. CoD uses a stype shader system or Shader Type system.
If you have looked at the actual texture names you will see that they have an @ in them - for example: normandy\walls\email@example.com
The brick@ refers to the stype shadertypes\world\brick.stype.
Other than the basic named stype there appears to be other offshoots of them - Example:
I know this is pretty basic info and doesnt go into how to develop new stype shader files but that will come with time. Ihave to get a handle on some of the new shader script that is included in these files - I am sure that a lot of it has to do with Call of Duty's use of Direct X and that is where I will start my search - there is advanced shader support in Direct X as well as a lot of the newer video cards.
But in the mean time - if you want a new custom texture for Call of Duty - simply pick a stype and add it to the name - no shader scripting for you!!! lucky dog!!.
My New Wall Texture - funkybrick.dds
I would use the DDS format for this - I know there are tga and jpg files used as textures in the game - not sure exactly why but with the plugins available it is really easy to create a DDS image with mipmaps.
I recomend creating a custom folder inside the textures folder and then creating what ever folder you need inside of there - for example the path to funnybrick.dds would be: textures/custom/walls/funnybrick.dds
Once in be sure to apply the stype you want - in this case brick - or brick@
for an end result of firstname.lastname@example.org
It will then show in radiant and be able to be used in mapping - also it will be able to have a shader applied to it when compiling and you didnt have to script it.
Just be sure to include the texture with the correct path when you pk3 the map and distribute it.
Like I said - this is basic but it's a start. More to come.......
Shader Type Information from Stock stypes
There are 71 stypes for World Textures
There are 53 stypes for Model Textures
There are 5 stypes for Hud and Text Display
Shaders - stype