I’m having some problems with a custom decal I created. A bit hard to explain, but they say a picture is worth a thousand words, so here we go:
I made a window in photoshop and added some shadow as seen on the alpha channel.
However, ingame the shadow doesn’t blend as it does in the alpha channel: Instead I get a very harsh/ non blending shadow…
I used the shader from the ‘oilslick’ texture as a base for my own window shader: ( textures/decals/oil_slick.tga)
textures/ronda_b3/ff_cruz_window
{
qer_editorimage textures/ronda_b3/ff_cruz_window.tga
surfaceparm trans
surfaceparm nonsolid
surfaceparm pointlight
surfaceparm nomarks
polygonOffset
{
map textures/ronda_b3/ff_cruz_window.tga
alphaFunc GE128
rgbGen vertex
}
}
For my previous maps(s) I already made some custom commandmap-icons that worked correct: So I tried the same shader that’s being used for the commandmap-icons:
textures/ronda_b3/ff_cruz_window
{
nomipmaps
nopicmip
{
map textures/ronda_b3/ff_cruz_window.tga
blendfunc blend
rgbgen vertex
}
}
Now I get the right blend, and everything looks the way I intended (as seen in the first screenshot) But now I also get some nasty z_fighting on the window! :???:
Any ideas? I’m pretty sure that the problem / answer must be in the shader…