For screen back buffer, it’s possible to use root.resize
to customize back buffer resolution, it affects the back buffer size.
Otherwise, I have proposed a feature request in our engine repo
opened 03:47AM - 07 Jun 23 UTC
Feature Request
Env: Native
Module: PAL
### Use Case
Screen size API is important for Desktop apps, and dynamic adjust … should be available at runtime.
Passive screen resize now involves back buffer size, all cameras and re-adaptation of UI, but developers could also benefits from active screen resize APIs.
On the other hand, even with constant screen size, developers can also have performance benefit if we allow user to customize its resolution. This is important on mobile devices and web.
### Problem Description
Currently we only have [`root.resize`](https://docs.cocos.com/creator/3.7/api/en/class/Root?id=resize) API, but it's too low level, we need `Screen` level customization which could actively handle all relative changes.
Request received form the forum too:
https://discuss.cocos2d-x.org/t/feature-request-configure-renderer-resolution/58888
### Proposed Solution
Proposed APIs
- Support `windowSize` for other desktop platforms in [screen](https://github.com/cocos/cocos-engine/blob/v3.7.4/cocos/core/platform/screen.ts#L81)
- Add `resolutionScale` to [screen](https://github.com/cocos/cocos-engine/blob/v3.7.4/cocos/core/platform/screen.ts)
### How it works
_No response_
### Alternatives Considered
Nothing to add
### Additional Information
_No response_
Besides, in Cyberpunk demo , we have a resolution solution with custom render pipeline, so you can refer to this post for how it supports different resolution
When you’ve made an excellent 3D game, you definitely want it to run on more devices, not just high-end ones, as this would mean losing many users. In this article, I will share the methods I’ve learned from over a decade of 3D game development to...
Reading time: 6 mins 🕑
Likes: 2 ❤