Explorar o código

Disable transmission pass if override material is enabled (#26944)

Original object materials are ignored in rendering in case an override material is used, so rendering the transmission pass is not necessary in this case.

This contribution is funded by https://higharc.com/
Olli Etuaho hai 1 ano
pai
achega
af36c1c8aa
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/renderers/WebGLRenderer.js

+ 8 - 0
src/renderers/WebGLRenderer.js

@@ -1329,6 +1329,14 @@ class WebGLRenderer {
 
 		function renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) {
 
+			const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;
+
+			if ( overrideMaterial !== null ) {
+
+				return;
+
+			}
+
 			const isWebGL2 = capabilities.isWebGL2;
 
 			if ( _transmissionRenderTarget === null ) {