Version: 2023.2
LanguageEnglish
  • C#

ScalableBufferManager

class in UnityEngine

/

Implemented in:UnityEngine.CoreModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Scales render textures to support dynamic resolution if the target platform/graphics API supports it.

The ScalableBufferManager handles the scaling of any render textures that you have marked as DynamicallyScalable, when ResizeBuffers is called. All render textures marked as DynamicallyScalable are scaled by a width and height scale factor. The scale is controlled through a scale factor and not with a specific width and height value because render textures are of different sizes but need to be scaled by a common factor. The scaled dimensions are calculated as follows:

width = ceil(renderTexture.width * ScalableBufferManager.widthScaleFactor) height = ceil(renderTexture.height * ScalableBufferManager.heightScaleFactor)

Static Properties

heightScaleFactorHeight scale factor to control dynamic resolution.
widthScaleFactorWidth scale factor to control dynamic resolution.

Static Methods

ResizeBuffersFunction to resize all buffers marked as DynamicallyScalable.