Hi all,
I’ve been playing around with dotproduct terrain for the ET conversion of UrT recently, but I’m having problems getting foliage to appear on the correct parts. The shader below seems to work fine, but of the three foliage models, only dd_grassfoliage33d.ase (i.e. the one using inverse alpha) appears, and it does so on the rock_1.tga texture, whereas i want it to appear on grass_1.tga. Can anyone tell me what I need to change in the shader to achieve this?
(BTW I realise the odds part of the foliage lines are very high, I just tried higher and higher values in the hope of getting them to appear. Also, the foliage models all work ok as foliage on a normal texture so dodgy models can’t be the reason for their non-appearance).
Cheers,
DD
textures/ut_terrain/grassrockdot04
{
q3map_lightImage textures/ut_terrain/kt_stone3mod.tga
q3map_forceMeta
q3map_nonplanar
q3map_shadeAngle 179
q3map_lightmapAxis z
//q3map_foliage <model> <scale> <density> <odds> <use inverse alpha>
q3map_foliage models/mapobjects/aamjs_mod/dd_grassfoliage23d.ase 1.5 4 0.25 0
q3map_foliage models/mapobjects/aamjs_mod/dd_grassfoliage33d.ase 1.5 4 0.1 1
q3map_foliage models/mapobjects/aamjs_mod/dd_grassfoliage13d.ase 1.5 4 0.9 0
q3map_lightmapSampleOffset 8
q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
q3map_tcMod rotate 33
q3map_alphaMod dotproduct2 ( 0 0 0.8 )
q3map_clipModel
q3map_lightmapSampleSize 8
q3map_globalTexture
{
map textures/ut_terrain/kt_stone3mod.tga
rgbGen identity
}
{
map textures/ut_terrain/rock_1.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen oneMinusVertex
}
{
map textures/ut_terrain/grass_1.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}


