• Advertisement
Sign in to follow this  

Pixel coordinates

This topic is 2628 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When a pixel is rasterized to be sent to the pixel shader, are the coordinates of the pixel in the top left corner, the center, or some other corner? Does it depend on any flags or options?

That is, given a pixel at (4, 5), is the pixel's bounds (4,5) to (5,6), or (3.5, 4.5) to (4.5, 5.5)?

I've tried looking through a few different sources, but I can't find a concrete answer. I could write a test to find out, but I'm betting someone knows off hand.

Share this post


Link to post
Share on other sites
Advertisement
This would be DX9 (XNA actually).

Just so I'm sure I understand, when you say Texel centers are at 0.5, does that mean only when sampling from a texture inside a shader? Otherwise, when triangles are rasterized to be sent to the pixel shader, their pixels are sampled at the center of the pixel?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement