0

How can I draw lines similar to the negative axis in Google Sketchup ? I know I can parametrize the line using texture coordinates and draw the line in homogenous coordinates. But if my pixel shader has some logic like tex.u%5<1, surely sometimes I'll get 2 pixel dashes or 0 pixel dashes. How exactly would I get exactly 1 pixel dashes every say 5 pixels like in the screenshot ?

Thanks!

enter image description here

Community
  • 1
  • 1
vlad2048
  • 93
  • 7

1 Answers1

1

Styled and pattern lines are best drawn using Direct2D. With DirectX 11.1 or later, interop is quite easy.

See MSDN

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81
  • Yes, that sounds like the right thing to do actually. Thanks! – vlad2048 Mar 11 '17 at 22:07
  • Although, using Direct2D will make it less easy to draw it using the zbuffer ? Or I guess, I draw it to a texture using Direct2D and draw that using the zbuffer. That should work nicely. Just thinking out loud, hopefully this can help someone. – vlad2048 Mar 12 '17 at 11:20