[quote=Avoc;341941]I dont think he wants the light to flicker, he just wants the brush to show up, right?
What you need to do, is to make a new shader. You can simply copy the existing shader from the lights.shader (or whatever its called) and paste it into your own shader file (remember to place it into the shaderlist.txt or you wont be able to see it).
At the top, you need to add ‘polygonOffset’ - your shader will look something like this:
textures/yourfolder/light_decal
{
qer_editorimage textures/lights/light_c01.tga
q3map_lightimage textures/lightimage/light_c01_color.tga
q3map_surfacelight 500
polygonOffset
surfaceparm trans
surfaceparm nonsolid
surfaceparm pointlight
surfaceparm nomarks
{
map textures/lights/light_c01.tga
rgbGen vertex
}
{
map textures/lights/light_c01.blend.tga
blendfunc GL_ONE GL_ONE
rgbGen identity
}
}
The easiest way to explain ‘polygonOffset’ is that, it makes your texture always appear at the top of texture that does not have the ‘polygonOffset’ in their shader. However, you can’t use two polygonOffset textures on eachother, as they will also either flicker, or one of them simply won’t appear.
You do not need to use the _decal entity in order to make this work. Just apply it to a brush. Just make sure you don’t apply all sides of the brush with the same texture, as it might create some funky lighting effects in your map.[/quote]
As you can see i already used the light decal shader and also my own decal shader was working fine with a
simple brush. It also worked with the _decal entity, but only when that one wall on the screenshot where the
decal is shown is deleted. If that wall is present the decal is not drawn on the floor.
With a simple brush where only the top gets a texture seems to always work on my floor, no matter if the wall
is present or deleted.
So the question is still open:
Why is the decal not shown when the wall is present(using _decal entity with patch targeting a info_null
entity)?
The answere is very important, because i may replace the flat floor with an uneven terrain where an usual
brush can’t be placed exactly on the floor, there i need to use the _decal entity system.
That is my custom decal shader. But i don’t think the shader is the problem, because the standard light decal
shader i used to test has the same effect.
textures/l2_giran/sd_floordecal01
{
qer_editorimage textures/l2_giran/...
// for _decal entry decals prevents Z-fighting
polygonOffset
// for _decal entity decal, if problems with depth sorting occours
sort 6
// we want that decal to be like the floor itself, apply the lightmap on it
{
map $lightmap
rgbGen identity
}
// the decal texture, blend it over the lightmap(50%/50%)
{
map textures/l2_giran/...
blendFunc GL_DST_COLOR GL_ZERO
}
}