Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualQuat

Posted 01 September 2013 - 02:01 PM

Hi,

 

I am expanding lines using the geometry shader to make them "thick."  I do the expansion in projective NDC space in 2D.  My first approach was to just expand in the direction of the line normal in 2D.  However, this creates discontinuities where line segments meet in a line strip (see left side of http://postimg.org/image/f5frxyp1v/).  My 2nd approach was to use line strip with adjacency, and access the adjacent lines to do a sort of normal averaging.  This works well if the lines do not take "sharp turns", however, there are cases where the averaged normal isn't a good choice and it creates a thin quad (see right side of http://postimg.org/image/f5frxyp1v/). 

 

Does anyone know a good strategy for handling the "sharp" line turns?


#1Quat

Posted 01 September 2013 - 01:59 PM

Hi,

 

I am expanding lines using the geometry shader to make them "thick."  I do the expansion in projective NDC space in 2D.  My first approach was to just expand in the direction of the line normal in 2D.  However, this creates discontinuities where line segments meet in a line strip (see left side of

 

Does anyone know a good strategy for handling the "sharp" line turns?


PARTNERS