|
@@ -5,7 +5,9 @@ import { ShaderMaterial } from '../../materials/ShaderMaterial.js';
|
|
import { Color } from '../../math/Color.js';
|
|
import { Color } from '../../math/Color.js';
|
|
import { Mesh } from '../../objects/Mesh.js';
|
|
import { Mesh } from '../../objects/Mesh.js';
|
|
import { ShaderLib } from '../shaders/ShaderLib.js';
|
|
import { ShaderLib } from '../shaders/ShaderLib.js';
|
|
-import { cloneUniforms } from '../shaders/UniformsUtils.js';
|
|
|
|
|
|
+import { cloneUniforms, getUnlitUniformColorSpace } from '../shaders/UniformsUtils.js';
|
|
|
|
+
|
|
|
|
+const _rgb = { r: 0, b: 0, g: 0 };
|
|
|
|
|
|
function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha ) {
|
|
function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha ) {
|
|
|
|
|
|
@@ -193,7 +195,9 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
|
|
|
|
|
|
function setClear( color, alpha ) {
|
|
function setClear( color, alpha ) {
|
|
|
|
|
|
- state.buffers.color.setClear( color.r, color.g, color.b, alpha, premultipliedAlpha );
|
|
|
|
|
|
+ color.getRGB( _rgb, getUnlitUniformColorSpace( renderer ) );
|
|
|
|
+
|
|
|
|
+ state.buffers.color.setClear( _rgb.r, _rgb.g, _rgb.b, alpha, premultipliedAlpha );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|