Hi, I tried to create my own tree branch texture with a transparent shader. Here's the code:
textures/trees/vetev
{
qer_editorimage textures/trees/vetev.tga
surfaceparm nomarks
surfaceparm nonsolid
cull enable
{
map textures/trees/vetev.tga
depthWrite
alphaFunc GE128
}
{
map $lightmap
blendfunc subtract
tcGen lightmap
depthFunc equal
}
}
But there are a few issues:
* The shader has to be one-sided because if I disable culling, both sides share the same portion of the lightmap, which looks weird.
* The surfaceparm nonsolid and surfaceparm nomarks parameters don't seem to work
* I want the surface to occlude the sunlight and cast nice shadows, which it doesn't (view the attached picture)
Edit: The bushes in the attached picture consist of three crossing planes, which in turn consist of two 3x3 patch meshes, so that these planes are visible from both sides (as I said, using just one patch mesh and making the shader two-sided would look odd)