Advertisement

solid wireframe shader

Started by September 07, 2019 09:30 PM
2 comments, last by _WeirdCat_ 5 years, 5 months ago

Hi,

I have a small piece of code that displays models using Ogre3d on Linux as a wireframe. The renderer is GL3+.

The problem is that I now need to render it as a solid wireframe and it was suggested that I use a shader to make it more professional looking as opposed to doing two passes, one for the wires and one for the solid surfaces which could have z-fighting issues and doesn't appear as nice.

So my question is, how might I go about this with a shader as I've never done a shader before.

Any help much appreciated.

https://catlikecoding.com/unity/tutorials/advanced-rendering/flat-and-wireframe-shading/

https://github.com/Chaser324/unity-wireframe

3DGraphics,Direct3D12,Vulkan,OpenCL,Algorithms

Advertisement

i did it like this

each face has a set of vertices, if this is the case for you you could draw the face using GL_LINE_LOOP

This topic is closed to new replies.

Advertisement