17cupsofcoffee / tetra

🎮 A simple 2D game framework written in Rust
MIT License
909 stars 63 forks source link

Support multisampled canvases #237

Closed 17cupsofcoffee closed 3 years ago

17cupsofcoffee commented 3 years ago

Summary:

Currently, MSAA can only be applied to the main backbuffer. This is only really sufficient for super basic use cases.

I've put off implementing this in the past due to the added complexity (and I may continue to), but I think I have a handle on what needs doing now:

This means that once you switch away from a canvas, you will have the anti-aliased version in the associated texture. The multi-sampled texture is effectively an implementation detail.

Why is this needed?

@tesselode will be sad otherwise

17cupsofcoffee commented 3 years ago

2021-02-01_17-17-29

It works!

17cupsofcoffee commented 3 years ago

Done on the 0.6 branch!