not-fl3 / miniquad

Cross platform rendering in Rust
Apache License 2.0
1.54k stars 173 forks source link

graphics: Implement MSAA render textures #478

Closed not-fl3 closed 1 month ago

not-fl3 commented 1 month ago

Gleaned the idea from sokol:

With sample_count > 1, render buffer object will be created instead of a regulat texture, allowing us to have anti-aliased render targets on GLES3. For those textures, at the end_render_pass, render buffer will be blit into a resolve texture.

A new example, examples/msaa_render_texture.rs, illustrates the idea.