OpenArena Message Boards

OpenArena Contributions => Graphics => Topic started by: fromhell on March 08, 2011, 01:10:16 AM



Title: Standard detail texture procedure
Post by: fromhell on March 08, 2011, 01:10:16 AM
For best result (and fastest for the renderer's multitexturing path), have the detail stage AFTER the lightmap.

If you use q3ase to build shaders, ignore its warnings about the detail layer. It knows nothing.

For example:
Code:
textures/base_floor/clang_floor
{
surfaceparm metalsteps
{
map textures/base_floor/clang_floor.tga
rgbGen identity
}
{
map $lightmap
blendfunc filter
rgbGen identity
tcGen lightmap
}
{
map gfx/fx/detail/d_met.tga
blendfunc gl_dst_color gl_src_color
rgbGen identity
tcMod scale 8 8
detail
}
}

Yeah, now I have to go back and fix a lot of my detail shaders. OA has so many textures to stick a detail on this is going to take a while, and some i'm not even sure what material to use (i.e. slimefac's abstract patterns).


Grates, and other alphatest stuff

Don't forget your depthFunc equals on the detail stage :)
Code:

textures/base_support/x_support
{
surfaceparm metalsteps
{
map textures/base_support/x_support.tga
rgbGen identity
depthWrite
alphaFunc GE128
}
{
map $lightmap
blendfunc filter
rgbGen identity
tcGen lightmap
depthFunc equal
}
{
map gfx/fx/detail/d_met2.tga
blendfunc gl_dst_color gl_src_color
rgbGen identity
tcMod scale 8 8
depthFunc equal
detail
}
}