hecrj / coffee

An opinionated 2D game engine for Rust
https://docs.rs/coffee
MIT License
1.08k stars 55 forks source link

Draw an `Image` with nearest-neighbor interpolation #110

Closed dlight closed 4 years ago

dlight commented 4 years ago

Hello, is there any way to draw a texture with nearest-neighbor interpolation? Like GL_NEAREST or ggez's FilterMode::Nearest.

(right now, instead of drawing the image I issue multiple draw commands, one rect for each pixel)

hecrj commented 4 years ago

Nearest neighbor interpolation is the only supported filtering mode as of now (#9).

dlight commented 4 years ago

Oops, you're right. When I tested it, my colors were too close to each other to see it pixelated. 😅