Browse Source

Fix SSR being executed even when disabled

TothBenoit 7 months ago
parent
commit
aebc1a2872
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hrt/prefab/rfx/SSR.hx

+ 2 - 0
hrt/prefab/rfx/SSR.hx

@@ -225,6 +225,8 @@ class SSR extends RendererFX {
 	}
 	}
 
 
 	function execute( r : h3d.scene.Renderer, step : h3d.impl.RendererFX.Step ) {
 	function execute( r : h3d.scene.Renderer, step : h3d.impl.RendererFX.Step ) {
+		if ( !checkEnabled() )
+			return;
 		if ( !useRoughness && !useMask )
 		if ( !useRoughness && !useMask )
 			return;
 			return;
 		r.mark("SSR");
 		r.mark("SSR");