Version: 2023.2

ScalableBufferManager

class in UnityEngine

切换到手册

描述

如果目标平台/图形 API 支持动态分辨率,缩放渲染纹理以支持动态分辨率。

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)

静态变量

heightScaleFactor用于控制动态分辨率的高度缩放因子。
widthScaleFactor用于控制动态分辨率的宽度缩放因子。

静态函数

ResizeBuffers用于调整标记为 DynamicallyScalable 的所有缓冲区大小的函数。