With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Find or post mapping tutorials.

Moderators: Joe Kari, Pardner, Breli

SG's specific shaders

Postby Joe Kari » Sat Jan 22, 2011 1:29 pm

I will try to maintain here every shaders instruction that are specific to SG.

First, in case you don't know, here is the reference for all Q3 based game: The Obsidian Shader Manual.

Since revisions 554, I'm trying to add few missing feature in our game, and tweaking others...

Limits that have been raised

* animMap now support up to 24 images (was 8 )
* a single shaders now support up to 5 deformVertex (was 3)
* a shader now support up to 5 tcMod (was 4)



tcGen environment_X
It uses the X-axis, same as the old tcGen environment

tcGen environment_Y
It uses the Y-axis

tcGen environment_Z
It uses the Z-axis. This one could be really usefull for reflecting water.

tcGen customEnvironment vector normal_weight_vector
It uses a custom projection vector (so you can use non-axial projection), and you can set up a custom weight for normals.

vector: the direction where the center of your texture is projected

normal_weight_vector: it weight all the 3 composante of the normals vector

Interesting value for normal_weight_vector are:
* ( 0 0 0 ) for a skybox-like environment map, normals of the surface are not used
* ( 2 2 2 ) for the default Q3 environment map, this is for mirror and reflecting things
* ( 4 4 4 ) for an environment map with more deformation

The former tcGen environment is the same as tcGen customEnvironment ( 1 0 0 ) ( 2 2 2 ).
User avatar
Joe Kari
SG Team
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France

Return to Tutorials

Show Sidebar
Show Sidebar

User Control Panel