I am using Direct3D to draw a tile map to the screen. Why can get the edges to match properly?
This is due to the algorithm used to determine what pixels to draw when rendering a triangle, which is determined by whether the center of each pixel is enclosed by the triangle. The pixel centers lie on integer values, so if you are using integer coordinates to define a rectangle the sides will straddle pixels. To account for this, expand your pre-transformed primitives by 0.5 pixels in each direction. For an example of this, look at the source code in A Simple Blit Function for Direct3D.
Related Questions
- I have the GoogleMaps application installed and when I try to Map a query result, the screen just flashes and returns to the application launcher. Whats wrong?
- After connecting MH720 to TV and switching it on, why does the screen not display properly?
- Isn the screen size of a smartphone too small to display a map?