Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
1 Active | 48 Guests
Online:

LATEST FORUM THREADS

»
Using Teamspeak
Teamspeak Servers

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Textures: Shaders
Versions: You must be logged in to view history.
How to create and/or edit shaders
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: normandywallsbrick@churchwall2.dds
The brick@ refers to the stype shadertypesworldbrick.stype.

Code:
{

surfaceparm brick
{
map $texturename
rgbGen exactVertex
}
{
map $lightmap
blendFunc filter
}
}



Other than the basic named stype there appears to be other offshoots of them - Example:

brick.stype
brick_clampx
brick_clampy

glass.stype
glass_blend_in.stype
glass_blend_out.stype
glass_light.stype
glass_masked.stype
glass_nosight.stype

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 o­n 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!!.
Example:

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 textures/custom/walls/brick@funnybrick.dds
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.......

Shoot...Out


-----------------------------------------------------------------------------------
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


  • alphashadow
  • asphalt
  • asphalt_clampx
  • asphalt_clampy
  • autosprite2_masked
  • bark
  • brick
  • brick_clampx
  • brick_clampy
  • carpet
  • cloth
  • cloth_blend
  • cloth_light
  • cloth_masked
  • concrete
  • decal
  • decal_asphalt
  • decal_clamp
  • decal_clampx
  • decal_clampy
  • decal_depthwrite
  • decal_metalnomask
  • decal_solid_clampy
  • decalclamp
  • dirt
  • dirt_clampx
  • dirt_clampy
  • flesh
  • foliage
  • foliage_blend
  • foliage_clamp
  • foliage_clampy
  • foliage_masked
  • foliage_snow
  • glass
  • glass_blend_in
  • glass_blend_out
  • glass_light
  • glass_masked
  • glass_nosight
  • grass
  • grass_clampx
  • grass_clampy
  • gravel
  • gravel_clampy
  • ice
  • ice_masked
  • metal
  • metal_cullnone
  • metal_decal
  • metal_fence
  • metal_fence_nonsolid
  • metal_masked
  • metal_masked_solid
  • metal_objective
  • mud
  • paper
  • plaster
  • rock
  • rock_clampx
  • rock_clampy
  • sand
  • snow
  • snow_clamp
  • snow_clampx
  • snow_clampy
  • water
  • wood
  • wood_clampx
  • wood_clampy
  • wood_masked

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»