The Meta-Shader

The shader is the group or family of related shaders used to texture a terrain entity. The shader key/value pair in the entity identifies the metashader to be used. The suffix (either _# for a root shader or #to# for a blended shader. For each root shader that you want to blend, you need a blend shader. Note that you only need to make the blend once. If you have mpterra2_0to2, you dont need mpterra2_2to0. Example Terrain Shader This was the shader used to map textures on mpterra2 (hence the metashader name) //**************************************************** // ************************************************* // * // * MPTerra2 terrain shaders // * // ************************************************* textures/terrain/mpterra2_0 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock9b_2.tga rgbGen vertex tcmod scale 0.125 0.125 } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } textures/terrain/mpterra2_1 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock12b_2.tga rgbGen vertex tcmod scale 0.1 0.1 } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } textures/terrain/mpterra2_2 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock10b_2.tga tcmod scale 0.05 0.05 rgbGen vertex } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } textures/terrain/mpterra2_0to1 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock9b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.125 0.125 } { map textures/stone/pjrock12b_2.tga tcmod scale 0.1 0.1 rgbGen vertex alphaGen vertex blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } textures/terrain/mpterra2_0to2 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock9b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.125 0.125 } { map textures/stone/pjrock10b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.05 0.05 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } textures/terrain/mpterra2_1to2 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock12b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.1 0.1 } { map textures/stone/pjrock10b_2.tga tcmod scale 0.05 0.05 rgbGen vertex alphaGen vertex blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } Back - Table of Contents - Lighting the Terrain

-21-