
Originally Posted by
mcunha98
Zappa
But the doubt is how do it on editor ?
screenshot-712.png
For example,
- first brush has nodraw texture and alpha texture
- second brush was placed into the wall, but not render correctly (as you did via script on video)
Yeah, z-fighting is what you will get if both surfaces are on the same plane. Even though you shouldn't get it with decals as their polygons are offset, you can actually sometimes still get z-fighting, which I have experienced in the past, so I tend to use r_offsetunits of -45 to alleviate that issue.
It's also worth mentioning that you can add custom decals to the in-game menu shown in the video by modifying the ui/decals.URC file and adding your own shaders to the "decals list". Just add: additem "shader_name_here" to the list.
An example of a decal shader definition would be:
shader_name_here
{
polygonOffset
surfaceparm paper
cull none
{
clampmap textures/decals/some_texture.tga
blendfunc blend
alphagen vertex
rgbgen vertex
}
}
Edit: Oh, and another thing to be wary, is that because decals duplicate the geometry they are placed over (they assume its shape), placing them over complex geometry like bezier patches and terrain can sometimes create an overabundance of debug lines (the lines you see in-game when you have a decal selected). This can sometimes cause MAX_DEBUG_LINES to be hit, spamming the console and causing your game to chug. This is only an issue when you are in edit mode and have that specific decal selected, but if you still want to keep it and can't manipulate it easily, you can temporarily turn off dcl_showcurrent.