I am using sock’s shader in my new map in a skinny area and it looks great, but I have a couple LARGE areas that it looks terrible in.
When I’ve tried to scale them up with the surface inspector, they do not scale up. If I scale them up in the shader file, they scale up but the secondary shader stays tiny. Even so I might be able to work something out, but…
I tried messing around with the the dot product shader that Szico used in Atlantica map (a jka map), and he used JPEG files instead of TGA files, which I didn’t know would work. Is there any disadvantage to this?
Also unlike TGA files…his shader scaled up when you used the surface inspector. What gives? Also his secondary shader (grass in this case) also scaled up when you used the surface inspector.
Anyone have any insight into this?
Also did Szico added extra shader commands in order to make jpegs blend rather than using the alpha channels in a tga file?
Here is Szico’s shader
################################
////// DotProduct2 Blends //////
################################
textures/atlantica/atlantica_ter_rockgrass
{
qer_editorimage textures/yavin/rock3
q3map_lightmapMergable
q3map_nonplanar
q3map_shadeangle 120
q3map_notjunc
{
map textures/yavin/rock3
tcMod scale 0.5 0.5
}
{
map textures/atlantica/atlantica_ter_grass
tcMod scale 0.5 0.5
alphaGen oneMinusVertex
blendfunc blend
}
{
map $lightmap
blendFunc filter
}
}
textures/atlantica/atlantica_ter_rockgrass2
{
qer_editorimage textures/atlantica/atlantica_rock2
q3map_shadeangle 180
q3map_nonplanar
q3map_notjunc
{
map textures/atlantica/atlantica_rock2
tcMod scale 1 1
}
{
map textures/atlantica/atlantica_ter_grass
tcMod scale 0.5 0.5
alphaGen oneMinusVertex
blendfunc blend
}
{
map $lightmap
blendFunc filter
}
}
textures/atlantica/atlantica_ter_cliffgrass
{
qer_editorimage textures/quicktrip/qt_Uncut
q3map_lightmapMergable
q3map_nonplanar
q3map_shadeangle 120
q3map_notjunc
{
map textures/quicktrip/qt_Uncut
tcMod scale 0.25 0.25
}
{
map textures/atlantica/atlantica_ter_grass
tcMod scale 0.25 0.25
alphaGen oneMinusVertex
blendfunc blend
}
{
map $lightmap
blendFunc filter
}
}
textures/atlantica/atlantica_ter_soilrock
{
qer_editorimage textures/atlantica/atlantica_ter_soil
q3map_lightmapMergable
q3map_nonplanar
q3map_shadeangle 180
q3map_notjunc
{
map textures/atlantica/atlantica_ter_soil
tcMod scale 1 1
detail
}
{
map textures/atlantica/atlantica_rock2
tcMod scale 1 1
alphaGen oneMinusVertex
blendfunc blend
}
{
map $lightmap
blendFunc filter
}
}
textures/atlantica/atlantica_void
{
qer_editorimage textures/atlantica/atlantica_void
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm nonopaque
q3map_nolightmap
q3map_notjunc
{
map textures/atlantica/atlantica_void
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc LT128
}
}
Here is SIMON OC’s
////
//
// terrain_example.shader for Q3 by Sock
// Website : http://www.planetquake.com/simland/
//
////
//
textures/terrain_example/blacksky // Used for testing boxmaps
{
qer_editorimage textures/terrain_example/blacksky.tga
surfaceparm noimpact
surfaceparm nolightmap
{
map textures/terrain_example/blacksky.tga
}
}
// ======================================================================
// DotProduct2 Terrain blending
// ======================================================================
textures/terrain_example/ter_dirtmud
{
qer_editorimage textures/terrain_example/ter_dirtmud.tgaq3map_nonplanar
q3map_shadeangle 120
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 )
{
map textures/terrain_example/ter_dirt1.tga // Primary
rgbGen identity
}
{
map textures/terrain_example/ter_mud1.tga // Secondary
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
textures/terrain_example/ter_mossmud
{
qer_editorimage textures/terrain_example/ter_mossmud.tgaq3map_nonplanar
q3map_shadeangle 120
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 ){
map textures/terrain_example/ter_moss1.tga // Primary
rgbGen identity
}
{
map textures/terrain_example/ter_mud1.tga // Secondary
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
textures/terrain_example/ter_rockmud
{
qer_editorimage textures/terrain_example/ter_rockmud.tgaq3map_nonplanar
q3map_shadeangle 120
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 ){
map textures/terrain_example/ter_rock3.tga // Primary
rgbGen identity
}
{
map textures/terrain_example/ter_mud1.tga // Secondary
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
// ======================================================================
// Hong Phonged textures
// ======================================================================
textures/terrain_example/ter_rock2
{
q3map_nonplanar
q3map_shadeangle 120
qer_editorimage textures/terrain_example/ter_rock2.tga
{
map $lightmap
rgbGen identity
}
{
map textures/terrain_example/ter_rock2.tga
blendFunc filter
}
}
// ======================================================================
// Alpha blending without dotProduct2 and ivector
// ======================================================================
textures/terrain_example/bld_rock2moss1 // Normal texture blending
{
qer_editorimage textures/terrain_example/bld_rock2moss1.tgaq3map_nonplanar
q3map_shadeAngle 120{
map textures/terrain_example/ter_rock2.tga // Primary
rgbGen identity
}
{
map textures/terrain_example/ter_moss1.tga // Secondary
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
textures/terrain_example/dcl_moss1 // Decal blending
{
qer_editorimage textures/terrain_example/ter_moss1.tga
q3map_nonplanar
q3map_shadeangle 120
surfaceparm trans
surfaceparm nonsolid
surfaceparm nomarks
polygonoffset
{
map textures/terrain_example/ter_moss1.tga
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
depthFunc equal
}
}
// ======================================================================
// alpha fade shaders
// © 2004 randy reddig
// http://www.shaderlab.com
// distribution, in part or in whole, in any medium, permitted
// ======================================================================
//
// These shaders are not fixed to this directory location, they can
// be moved around. They exist here for convenience only.
//
textures/terrain_example/alpha_000 // Primary texture ONLY
{
q3map_alphaMod volume
q3map_alphaMod set 0
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/terrain_example/alpha_025
{
q3map_alphaMod volume
q3map_alphaMod set 0.25
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/terrain_example/alpha_050 // Perfect mix of both Primary + Secondary
{
q3map_alphaMod volume
q3map_alphaMod set 0.50
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/terrain_example/alpha_075
{
q3map_alphaMod volume
q3map_alphaMod set 0.75
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/terrain_example/alpha_085
{
q3map_alphaMod volume
q3map_alphaMod set 0.85
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/terrain_example/alpha_100 // Secondary texture ONLY
{
q3map_alphaMod volume
q3map_alphaMod set 1.0
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}