Jump to content
  • Advertisement
SR D

3D solid wireframe shader

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!