- Home /
drawing aliased lines
I would like to draw wireframe objects using simple aliased lines. I have managed to do it using GL_LINES and turning off MSAA. However this only works in 2D view. Switching to 3D always starts to antialias drawing.
What are my options here? Project and draw lines using GUI? Is there any other approach avaiable?
There's a script called Drawing.cs on the user wiki. It has or at least had optional AA for it's lines.
Answer by rostok · Feb 11, 2018 at 11:34 PM
Okay, drawing aliased lines with GL_LINES works flawlessly with MSAA turned off. As I wanted to have only edges of objects visible but not totally transparent I first draw black triangles using MeshRenderer and then draw the outline in an overrinden OnRenderObject function.
I had a problem with z-fighting between those two shaders. Separating their queues and modifyinf Ztest
yielded no results. My finals solution was to use Offset 1, 1
on my black shader. Other settings (like -1, -1 on wireframe shader) didn't work.
Your answer
Follow this Question
Related Questions
Render wireframe on cut section of polygons 2 Answers
Wireframe Rendering on Android 0 Answers
Anti-aliasing textures in Unity Mobile 1 Answer
Floor - aliasing 0 Answers