User Tools

Site Tools


tremulous:assets

3D Modeling Resources:

Skinning and Texturing with Shaders:

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]

Example portal.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
	}
}

Example of different OpenGL blend functions in action:

Shader resources

tremulous/assets.txt · Last modified: by grangerhub