Skip to content

This open-source Unity library provides a flexible solution for developers to manage 3D rendering and UI resolutions independently. By decoupling these settings, it optimizes performance on lower-end hardware without compromising user interface clarity.

Notifications You must be signed in to change notification settings

CyberAgentGameEntertainment/ResoDynamix

Repository files navigation

ResoDynamix ResoDynamix

ResoDynamix

license license license

Documentation (日本語)

1. Overview

ResoDynamix is a dynamic resolution change library that allows you to change the rendering resolution of base cameras and overlay cameras.
While uGUI-based UI rendering can be rendered at a different resolution from the base camera by specifying Overlay as the Render Mode, this library allows you to render at a different resolution from the base camera even when the Render Mode is not Overlay.

If you are using Unity 2022 or Unity 6 (Compatible mode), please use the code from the compatible-mode branch. For details, refer to the document below.

Documentation (Unity 2022 or Compatible)

2. How To Use

2.1 Installation to Project

Installation is performed with the following steps.

  1. Select Window > Package Manager
  2. Select "+" button > Add package from git URL
  3. Enter the following to install

Package Manager

Alternatively, open Packages/manifest.json and add the following to the dependencies block.

{
    "dependencies": {
        "jp.co.cyberagent.reso-dynamix": "https://github.com/CyberAgentGameEntertainment/ResoDynamix.git?path=/Assets/ResoDynamix"
    }
}

To specify a version, write as follows.

Note that if you see a message like No 'git' executable was found. Please install Git on your system and restart Unity, you need to set up Git on your machine.

To update the version, rewrite the version using the above procedure.
If you don't specify a version, you can update by opening the package-lock.json file and rewriting the hash for this library.

{
  "dependencies": {
      "jp.co.cyberagent.reso-dynamix": {
      "version": "git+ssh://git@github.com:CyberAgentGameEntertainment/ResoDynamix.git?path=/Assets/ResoDynamix",
      "depth": 0,
      "source": "git",
      "dependencies": {},
      "hash": "..."
    }
  }
}

2.2 Add Create Dynamix Resolution Image Feature to Universal Renderer Data

Add Create Dynamix Resolution Image Feature to the Universal Renderer Data used for scene rendering.
Add Create Dynamix Resolution Image Feature

2.3 Add ResoDynamix

Add the ResoDynamix component to the scene. Note that this component can only be placed once per scene.
ResoDynamix component

2.4 Add ResoDynamixController

Add ResoDynamixController to the scene. This component can be placed multiple times in the scene.
ResoDynamixController component

2.5 Specify Base Camera to Change Resolution

Specify the base camera whose resolution you want to change in the BaseCamera field of ResoDynamixController.

Specify base camera

2.6 Add ResoDynamixController to ResoDynamix

Add the ResoDynamixController placed in step 2.4 to the Controllers field of the ResoDynamix placed in step 2.3.

Add ResoDynamixController

3. Reso Dynamix Component Parameters

Reso Dynamix component

Property Name Description
Controllers Reso Dynamix Controllers placed in the scene.
All controllers placed in the scene must be registered here.

4. Reso Dynamix Controller Component Parameters

Reso Dynamix Controller component

Property Name Description
Base Camera Render Scale Rendering scale of the Base Camera.
You can change the rendering resolution of the Base Camera by changing this value. When the Render Scale is 1.0, Reso Dynamix processing is skipped.
Result Render Scale Rendering scale of the final hybrid image.
You can also change the UI resolution by changing this resolution secondarily, so specify 1 or less when you want to reduce UI rendering load.
However, when this render scale is set to 1 or less, intermediate textures are required, which increases memory usage accordingly.
Base Camera Base Camera
Use Depth Texture With Overlay Camera Checkbox for whether to use depth texture in overlay camera rendering.
Check this if you want to use depth testing or stencil masks in the overlay camera.

About

This open-source Unity library provides a flexible solution for developers to manage 3D rendering and UI resolutions independently. By decoupling these settings, it optimizes performance on lower-end hardware without compromising user interface clarity.

Resources

Stars

Watchers

Forks

Packages

No packages published