فهرست منبع

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 1 سال پیش
والد
کامیت
af36c1c8aa
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  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 ) {