In Quake 4, we use a shortcut version for writing textures called a guide. This section covers how to on writing texture shaders in a long hand form. This way is useful if you want the texture to do something else. (Alpha, modulations, glow passes, etc)

Definition: Most of the lines have been defined in Section 1, except qer_editorimage. Qer_editorimage is used mainly in textures. What this line does is add an image that is viewed only in the editor. Its useful if something has alpha or uses a flat color. (like glass) The Image is used so the designers can have a point of reference when they place a texture on a brush. It is used only in the editor.

The easiest thing to do is find a shader that is working like you want, copy it and paste it into the .mtr you’d like to use.

Here’s an example of a complete long hand texture shader:

textures/terminal/t1_wall1_d
{
        qer_editorimage textures/terminal/t1_wall1_d.tga

        diffusemap              textures/terminal/t1_wall1_d.tga
        bumpmap addnormals      ( textures/terminal/t1_wall1_local.tga, heightmap ( textures/terminal/t1_wall1_h.tga, 1 ) )
        specularmap             textures/terminal/t1_wall1_s.tga       
}

Nine times out of ten you won’t be writing textures this way, but by doing this, you’ll be able to understand how texture guides work, (shortcuts) and be able to write them yourself. Otherwise, you’ve added a new texture entry in the textures/terminal/directory called t1_wall1_d, which will appear in the editor at textures/terminal/t1_wall1_d.

ArtReference Q4Shaders Textures (last edited 2005-11-04 21:37:27 by MattVainio)