Access render settings during runtime

I’m trying to optimize fps by changing the resolution mode in render settings to fixed and rendering 1/2 the size of the screen. Is there a way to access render settings during runtime?

Hi @noah_mizrahi,

Yes there is a single method which you can use to change both the resolution mode and its width/height, available in your this.app instance:

https://developer.playcanvas.com/en/api/pc.Application.html#setCanvasResolution

Perfect. Thank you.

You may also be interested in this project where only the world is rendered at a lower resolution and the UI layer is rendered at standard resolution.

This may help performance while keeping the UI nice and sharp.

https://developer.playcanvas.com/en/tutorials/resolution-scaling/

1 Like

I’ve made this little tool to experiment. You can attach to any object in the scene and play with resolution at run time.

1 Like