tremulous:assets

Intro to Shaders

What is a shader and what does it do, how is it used?

The Quake 3 shader manual states:

Shaders are short text scripts that define the properties of a surface as it appears and functions in a game world (or compatible editing tool). By convention, the documents that contain these scripts usually has the same name as the texture set which contains the textures being modified (e.g; base, hell, castle, etc,). Several specific script documents have also been created to handle special cases, like liquids, sky and special effects.

For Tremulous, .shader files are located in the Tremulous/base/scripts folder

More info:

ioquake3 opengl2 renderer Materials

Quick and Dirty Material Shader Primer [Doom3World.org]

Examples:

<Code:none linenums:0 |Example shader for portal effects: portals.shader> models/fx/portal/bluering {

surfaceparm nodlight
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nomarks
cull disable
{
	map models/fx/portal/bluering.tga
	blendfunc add
	rgbGen identity
	tcMod scroll -0.2 0
}

}

models/fx/portal/bluecenter {

portal
surfaceparm nodlight
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nomarks
cull disable
{
	map models/fx/portal/bluecenter.tga
	blendfunc add
	rgbGen identity
	tcMod rotate -5
}

}

</Code>

Image:

  • tremulous/assets.txt
  • Last modified: 2021/01/25 16:23
  • by romdos