|
@@ -12128,13 +12128,22 @@ function cloneUniformsGroups( src ) {
|
|
|
|
|
|
function getUnlitUniformColorSpace( renderer ) {
|
|
function getUnlitUniformColorSpace( renderer ) {
|
|
|
|
|
|
- if ( renderer.getRenderTarget() === null ) {
|
|
|
|
|
|
+ const currentRenderTarget = renderer.getRenderTarget();
|
|
|
|
+
|
|
|
|
+ if ( currentRenderTarget === null ) {
|
|
|
|
|
|
// https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398
|
|
// https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398
|
|
return renderer.outputColorSpace;
|
|
return renderer.outputColorSpace;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // https://github.com/mrdoob/three.js/issues/27868
|
|
|
|
+ if ( currentRenderTarget.isXRRenderTarget === true ) {
|
|
|
|
+
|
|
|
|
+ return currentRenderTarget.texture.colorSpace;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
return ColorManagement.workingColorSpace;
|
|
return ColorManagement.workingColorSpace;
|
|
|
|
|
|
}
|
|
}
|
|
@@ -29451,9 +29460,10 @@ class WebGLRenderer {
|
|
|
|
|
|
_transmissionRenderTarget = new WebGLRenderTarget( 1, 1, {
|
|
_transmissionRenderTarget = new WebGLRenderTarget( 1, 1, {
|
|
generateMipmaps: true,
|
|
generateMipmaps: true,
|
|
- type: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,
|
|
|
|
|
|
+ type: ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ) ? HalfFloatType : UnsignedByteType,
|
|
minFilter: LinearMipmapLinearFilter,
|
|
minFilter: LinearMipmapLinearFilter,
|
|
- samples: 4
|
|
|
|
|
|
+ samples: 4,
|
|
|
|
+ stencilBuffer: stencil
|
|
} );
|
|
} );
|
|
|
|
|
|
// debug
|
|
// debug
|
|
@@ -30329,7 +30339,7 @@ class WebGLRenderer {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- const halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || ( extensions.has( 'EXT_color_buffer_float' ) ) );
|
|
|
|
|
|
+ const halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) );
|
|
|
|
|
|
if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // Edge and Chrome Mac < 52 (#9513)
|
|
if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( _gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // Edge and Chrome Mac < 52 (#9513)
|
|
textureType !== FloatType && ! halfFloatSupportedByExt ) {
|
|
textureType !== FloatType && ! halfFloatSupportedByExt ) {
|