Is there anything like polygon offset for GL_LINES?
Subject says it all. I'm doing solid wireframing, and pushing the solid geometry back into the depth buffer before rendering the wireframes works, but causes noticeable artifacts when rendering shadows.
Ideally, I'd just "pull in" the line fragments, but GL_POLYGON_OFFSET_LINE doesn't seem to work for GL_LINES primitives... unless I'm missing something. My understanding is that that's for when you've set glPolygonMode to GL_LINES.
Any ideas?
In principle, I could write a fragment shader to do it, but I don't know how I'd modulate the outgoing fragment's depth in a manner consistent with glPolygonOffset.
Ideally, I'd just "pull in" the line fragments, but GL_POLYGON_OFFSET_LINE doesn't seem to work for GL_LINES primitives... unless I'm missing something. My understanding is that that's for when you've set glPolygonMode to GL_LINES.
Any ideas?
In principle, I could write a fragment shader to do it, but I don't know how I'd modulate the outgoing fragment's depth in a manner consistent with glPolygonOffset.
I can't see anything except for polygon offsets. The only thing I can suggest is to change the fill mode to GL_LINE, and draw polygons. Other than that, the only solution, AFAIK, is to write a fragment shader to handle it for you. Unless you can re-work your rendering pipeline so everything but the lines are offset the way you need them, in a kind of reverse logic.
I thought about changing the fill mode, but I'm not actually rendering triangle edges, but specific edges generated by analyzing the geometry.
Anyway, it's not really a big deal. My rendering looks better with wireframing turned off anyhow
Anyway, it's not really a big deal. My rendering looks better with wireframing turned off anyhow
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Polygon budgets | Kerome | 1 | 2,381 |
Mar 7, 2010 04:55 AM Last Post: mikey |
|
| Getting the Normal for a polygon. | Jaden | 3 | 4,667 |
May 1, 2009 01:47 PM Last Post: Nosredna |
|
| 2d Polygon Intersection | bizimCity | 6 | 5,968 |
Aug 31, 2006 05:29 PM Last Post: reubert |
|
| keep always visible a polygon face...!!! | alert | 5 | 3,876 |
Apr 14, 2005 09:46 AM Last Post: alert |
|
| polygon smoothing problem | Sord | 6 | 3,764 |
Mar 21, 2005 01:12 PM Last Post: Sord |
|

