AdRoll / rustenstein

Wolfenstein 3D port written in Rust
https://tech.nextroll.com/blog/dev/2022/02/02/rustenstein.html
MIT License
229 stars 9 forks source link

Use the full window resolution for pixel drawing #19

Closed facundoolano closed 2 years ago

facundoolano commented 2 years ago

This fixes pixel distortion of the wall textures. This was produced because we were always using a 320x200 video buffer, regardless of the window resolution, and scaling it up every time we presented to the canvas.

Now the buffer has the same resolution as the window (defaults to 960x600), making the walls look better. Note that, in my laptop, the debug target is now slow at this resolution, but it works fine on a release build because of optimizations (we could look into optimizing to make it run smoothly in debug at higher resolutions).

Screen Shot 2022-02-28 at 5 05 44 PM