Jump to content

  • Log In with Google      Sign In   
  • Create Account

Is there a way to draw super precise lines?

  • You cannot reply to this topic
1 reply to this topic

#1 DwarvesH   Members   -  Reputation: 479


Posted Today, 09:34 AM

So I'm creating a top down/2.5D/polygons + 2 top down camera game.


I snap the polygons to a grid but the game is not pixely.


I would also like to add borders to walls. How I did this is drawing the walls a second time, but this time with lines. 


But I have found that the rasterizer does not behave exactly as it does for filling polygons as it does for drawing lines. Randomly the end points are not draw, especially for horizontal lines.


One can see this in screenshots if you zoom in a bit:




The outlines look a bit rounder at corners.


Is there a way to get DirectX to fill the exact border of a triangle with a line? In a portable way?


Or maybe I'm overthinking things and shouldn't really care about one pixel.



#2 Josh Petrie   Moderators   -  Reputation: 4469


Posted Today, 10:11 AM

Review the rasterization rules and compare them to your code; they are likely related to your issue.

Edited by Josh Petrie, Today, 10:11 AM.