I’ve tried a few different lighting and material modes for this, but it doesn’t seem to work. As you can see, there is a line of pixels on the edge of each of these planes, which contain a masked material. Is there a way around this?
Are these decals or quad static meshes?
Are you using a texture atlas?
It seems like some noise in the data you are using as alpha. Can you share the texture?
The meshes are BSP planes.
Yes, these are in a texture atlas.
Here’s a small version of the alpha mask below in JPG (fullsize wouldn’t fit). Apparently I can’t upload TGA files here.
Oh I remember now where I’ve seen those always pixel thin (independent from distance) artifacts: they showed up when I used frac() to tile a sub image in an atlas. The pixel garbage happens because the UVs suddenly change (from 0.99999 to 0) thanks to the frac(). That trips the texture filtering: the GPU tries to blend together two not neighbouring texels and thus squeezes in everything between them in the original texture.
Anyway, lose the frac() and see if it helps. Also, it is not recommended to use BSP for anything rendered so go with either decals or static mesh quads.
And this is the material. It uses the green and red inputs to adjust the UV so that I can use an atlas like that.
That did it. I’m not even sure what the Frac thing was doing in there, I was following a tutorial.