I have a sectioning texture and I want to create 1 pixel thick, pixel perfect outlines on the parts with different colors using a screen space full screen pass. This sounds so simple but no matter what I try I can't seem to make it work. Currently it checks upper and right pixel and if it is different it draws an outline, but this way it is not pixel-perfect or centered. I tried checking up, left, right down pixels and than drawing an outline only if the center pixel is further than the others. That also caused issues because two faces of the same objects have nearly same depth and the outline looked weird on the inner edges that way. Help
#creating pixel perfect, 1 pixel thick outlines from a sectioning texture.
1 messages · Page 1 of 1 (latest)
Is it intentional that the objects in the left image have shading and arent fully unlit? The outline already looks quite good though to me
I wonder if you can combine the depth method with the colours of the mesh to ignore depth on the same object
oh my bad, I forgot to say that. the red and green channels of the texture are used for sectioning and the blue channel is used for lighting.
wait that might actually work
I might be able to switch methods by checking the depth distance between pixels
yeah, I already like the outline too. But it is just pixel perfect on some parts and not pixel perfect on some. It gets noticeable and kind of annoying if you pay attention to it.
A diagonal line will satisfy "difference to the left" on one object's pixel and right next to it "difference up" on another object