Q3MAP2 Shader examples
Author: KleskBYGeneral shaders for your game/map.
Tree leafs:
textures/tree/pine_leaf
{
surfaceparm alphashadow
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm noimpact
surfaceparm nolightmap
nopicmip
dp_noshadow
cull none
surfaceparm trans
deformVertexes wave 15 sin 0 2 0 .1 //animation
{
map textures/tree/pine_leaf
rgbGen vertex
depthWrite
alphaFunc GE128
}
}
Grass:
textures/grass/grass01
{
surfaceparm alphashadow
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm noimpact
surfaceparm nolightmap
nopicmip
dp_noshadow
cull disable
surfaceparm trans
deformVertexes wave 15 sin 0 2 0 .1 //animation
deformVertexes autoSprite //look into camera
{
map textures/grass/grass01.tga
rgbGen vertex
depthWrite
alphaFunc GE128
}
}
Sky:
textures/sky
{
qer_editorimage env/sky1_bk
surfaceparm noimpact
surfaceparm nomarks
surfaceparm nolightmap
surfaceparm sky
nopicmip
nomipmaps
q3map_sun 1.15 .52 0.53 75 45 30
q3map_surfacelight 55
skyparms env/sky1 - -
}
textures/sky_grey
{
qer_editorimage env/sky1_bk
surfaceparm noimpact
surfaceparm nomarks
surfaceparm nolightmap
surfaceparm sky
nopicmip
nomipmaps
//q3map_sun 1 1 0.5 150 30 60
q3map_sun .9 .9 1 70 45 30
//q3map_sun .8 .82 0.83 75 45 30
q3map_surfacelight 45
skyparms env/sky1 - -
}
textures/sky_test
{
surfaceparm noimpact
surfaceparm nomarks
surfaceparm nolightmap
surfaceparm sky
nopicmip
nomipmaps
q3map_sun .8 .82 0.83 75 45 30
q3map_surfacelight 45
skyparms lolg - -
}
textures/sky_nosun
{
qer_editorimage env/sky_bk
surfaceparm noimpact
surfaceparm nomarks
surfaceparm nolightmap
surfaceparm sky
nopicmip
nomipmaps
skyparms env/sky - -
}
Decals (trash on the ground):
textures/decal/decal09
{
surfaceparm trans
surfaceparm nonsolid
surfaceparm noimpact
nopicmip
dp_noshadow
cull back
{
map textures/decal/decal09
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GT0
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
Fence/grate:
textures/fence/fence01
{
surfaceparm trans
surfaceparm metalsteps
surfaceparm noimpact
surfaceparm nonsolid
surfaceparm nomarks
cull none
qer_alphaFunc gequal 0.5
// A GRATE OR GRILL THAT CAN BE SEEN FROM BOTH SIDES
{
map textures/fence/fence01
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GT0
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
Tags: mapping, trenchbroom, Q3MAP