|
|
@@ -64,7 +64,7 @@ class Renderer {
|
|
|
* @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. This parameter can set to any other integer value than 0
|
|
|
* to overwrite the default.
|
|
|
* @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted.
|
|
|
- * @property {number} [colorBufferType=HalfFloatType] - Defines the type of color buffers. The default `HalfFloatType` is recommend for best
|
|
|
+ * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best
|
|
|
* quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though.
|
|
|
* @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported.
|
|
|
*/
|
|
|
@@ -97,7 +97,7 @@ class Renderer {
|
|
|
antialias = false,
|
|
|
samples = 0,
|
|
|
getFallback = null,
|
|
|
- colorBufferType = HalfFloatType,
|
|
|
+ outputBufferType = HalfFloatType,
|
|
|
multiview = false
|
|
|
} = parameters;
|
|
|
|
|
|
@@ -584,7 +584,7 @@ class Renderer {
|
|
|
this.onDeviceLost = this._onDeviceLost;
|
|
|
|
|
|
/**
|
|
|
- * Defines the type of color buffers. The default `HalfFloatType` is recommend for
|
|
|
+ * Defines the type of output buffers. The default `HalfFloatType` is recommend for
|
|
|
* best quality. To save memory and bandwidth, `UnsignedByteType` might be used.
|
|
|
* This will reduce rendering quality though.
|
|
|
*
|
|
|
@@ -592,7 +592,7 @@ class Renderer {
|
|
|
* @type {number}
|
|
|
* @default HalfFloatType
|
|
|
*/
|
|
|
- this._colorBufferType = colorBufferType;
|
|
|
+ this._outputBufferType = outputBufferType;
|
|
|
|
|
|
/**
|
|
|
* A cache for shadow nodes per material
|
|
|
@@ -1084,13 +1084,27 @@ class Renderer {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns the color buffer type.
|
|
|
+ * Returns the output buffer type.
|
|
|
*
|
|
|
- * @return {number} The color buffer type.
|
|
|
+ * @return {number} The output buffer type.
|
|
|
*/
|
|
|
- getColorBufferType() {
|
|
|
+ getOutputBufferType() {
|
|
|
|
|
|
- return this._colorBufferType;
|
|
|
+ return this._outputBufferType;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Returns the output buffer type.
|
|
|
+ *
|
|
|
+ * @deprecated since r182. Use `.getOutputBufferType()` instead.
|
|
|
+ * @return {number} The output buffer type.
|
|
|
+ */
|
|
|
+ getColorBufferType() { // @deprecated, r182
|
|
|
+
|
|
|
+ warnOnce( 'Renderer: ".getColorBufferType()" has been renamed to ".getOutputBufferType()".' );
|
|
|
+
|
|
|
+ return this.getOutputBufferType();
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -1266,7 +1280,7 @@ class Renderer {
|
|
|
frameBufferTarget = new RenderTarget( width, height, {
|
|
|
depthBuffer: depth,
|
|
|
stencilBuffer: stencil,
|
|
|
- type: this._colorBufferType,
|
|
|
+ type: this._outputBufferType,
|
|
|
format: RGBAFormat,
|
|
|
colorSpace: ColorManagement.workingColorSpace,
|
|
|
generateMipmaps: false,
|