diff options
Diffstat (limited to 'src/swgfx.c')
| -rw-r--r-- | src/swgfx.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/swgfx.c b/src/swgfx.c index 3bec663..7ade051 100644 --- a/src/swgfx.c +++ b/src/swgfx.c | |||
| @@ -272,8 +272,6 @@ void SetDepth(swgfx* gfx, const sgVec2i p, R depth) { | |||
| 272 | sgPixel Sample(const sgTexture_t* texture, sgVec2 uv) { | 272 | sgPixel Sample(const sgTexture_t* texture, sgVec2 uv) { |
| 273 | assert(texture); | 273 | assert(texture); |
| 274 | assert(texture->pixels); | 274 | assert(texture->pixels); |
| 275 | // TODO: (1/2, 1/2) is the center of the pixel. Do we need to do something | ||
| 276 | // about it here? | ||
| 277 | #define INDEX(X,Y) texture->pixels[(Y) * texture->width + (X)] | 275 | #define INDEX(X,Y) texture->pixels[(Y) * texture->width + (X)] |
| 278 | // Doing a nearest sample for now. TODO: Other sampling strategies. | 276 | // Doing a nearest sample for now. TODO: Other sampling strategies. |
| 279 | const int x = (int)(uv.x * (R)texture->width); | 277 | const int x = (int)(uv.x * (R)texture->width); |
