diff options
| author | 3gg <3gg@shellblade.net> | 2026-01-01 09:49:59 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2026-01-01 09:49:59 -0800 |
| commit | 7e48c57e1c76d4ef874a2e15bfe9fd43e33f60a8 (patch) | |
| tree | 2e6f9435c62ef5212a41ff4d0ae952a0408bb98f /src | |
| parent | 7b9162ea7f4c78aa56a4a73187b22593b5d54913 (diff) | |
Notes on coordinate systems
Diffstat (limited to 'src')
| -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); |
