i have a dot2product shader with alpha blend to help control it. The brushwork is of cliffs and flat ground. The base texture is rock and then grass is belnded over the flat areas
What i want to achive is having the rock texture to always show from the side regardles of what direction the plane the image is on is facing
also i want the grass texture to always show from the xy plane regadless of the normal of the plane its on
if i uses the comand
// q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
i get the entire shader applied over the xy axis but i only want the grass to do this. iv tried using this just in the section of the shader concerning the grass but it then does not show in game
here is my shader. any help is greatly apreciated
textures/Carnagecliffs/phongcliff
{qer_editorimage textures/carnagecliffs/phongcliff.tga
q3map_nonplanar
q3map_shadeangle 70
// q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 ){
map textures/terrain/cliff_m05dcon.tga // Primary texture
rgbGen identity}
{
map textures/terrain/grass_dm01.tga // Secondary
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen identity
alphaGen vertex
}{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
