1
votes

If in a shader I create a 2D vertex at position (x: -1.0 y: -1.0) directly in NDC, does that create the vertex at the center of the bottom-left pixel on screen, or at the bottom-left corner of that pixel?

I'm trying to align a quad to be drawn with perfect pixel position and size and can't figure out where the vertex is placed in the sub-pixel, the center or the edge.

1

1 Answers

2
votes

(-1,-1) is at the bottom-left corner of the bottom-left pixel.

(+1,+1) is at the top-right corner of the top-right pixel.