You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/renderers/common/Renderer.js
+23-9Lines changed: 23 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ class Renderer {
64
64
* @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
65
65
* to overwrite the default.
66
66
* @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted.
67
-
* @property {number} [colorBufferType=HalfFloatType] - Defines the type of color buffers. The default `HalfFloatType` is recommend for best
67
+
* @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best
68
68
* quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though.
69
69
* @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported.
70
70
*/
@@ -97,7 +97,7 @@ class Renderer {
97
97
antialias =false,
98
98
samples =0,
99
99
getFallback =null,
100
-
colorBufferType=HalfFloatType,
100
+
outputBufferType=HalfFloatType,
101
101
multiview =false
102
102
}=parameters;
103
103
@@ -584,15 +584,15 @@ class Renderer {
584
584
this.onDeviceLost=this._onDeviceLost;
585
585
586
586
/**
587
-
* Defines the type of color buffers. The default `HalfFloatType` is recommend for
587
+
* Defines the type of output buffers. The default `HalfFloatType` is recommend for
588
588
* best quality. To save memory and bandwidth, `UnsignedByteType` might be used.
589
589
* This will reduce rendering quality though.
590
590
*
591
591
* @private
592
592
* @type {number}
593
593
* @default HalfFloatType
594
594
*/
595
-
this._colorBufferType=colorBufferType;
595
+
this._outputBufferType=outputBufferType;
596
596
597
597
/**
598
598
* A cache for shadow nodes per material
@@ -1084,13 +1084,27 @@ class Renderer {
1084
1084
}
1085
1085
1086
1086
/**
1087
-
* Returns the color buffer type.
1087
+
* Returns the output buffer type.
1088
1088
*
1089
-
* @return {number} The color buffer type.
1089
+
* @return {number} The output buffer type.
1090
1090
*/
1091
-
getColorBufferType(){
1091
+
getOutputBufferType(){
1092
1092
1093
-
returnthis._colorBufferType;
1093
+
returnthis._outputBufferType;
1094
+
1095
+
}
1096
+
1097
+
/**
1098
+
* Returns the output buffer type.
1099
+
*
1100
+
* @deprecated since r182. Use `.getOutputBufferType()` instead.
1101
+
* @return {number} The output buffer type.
1102
+
*/
1103
+
getColorBufferType(){// @deprecated, r182
1104
+
1105
+
warnOnce('Renderer: ".getColorBufferType()" has been renamed to ".getOutputBufferType()".');
Copy file name to clipboardExpand all lines: src/renderers/webgpu/WebGPURenderer.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ class WebGPURenderer extends Renderer {
40
40
* @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not.
41
41
* @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported.
42
42
* @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead.
43
-
* @property {number} [colorBufferType=HalfFloatType] - Defines the type of color buffers. The default `HalfFloatType` is recommend for best
43
+
* @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best
44
44
* quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though.
0 commit comments