I am using wgpu and I can't find anywhere how to render at a given resolution. I have tried with setting the Surface width and height but that didn't seem to do anything. I also couldn't find any methods in the render or surface structs I am using either.
Asked
Active
Viewed 169 times
1 Answers
1
If you want to render at a lower resolution than the Surface
you're displaying to then you have to
- create a texture of the size you want,
- render to that (in exactly the same way you'd render to the surface), and
- in a separate render pass, render that texture to the surface by putting it on a triangle that covers the entire screen.
A fair bit of setup, but the second render pass is also a useful opportunity to do things like tone mapping and other screen-space effects.

Kevin Reid
- 37,492
- 13
- 80
- 108