Browse Source

Don't render SAO post process if intensity is 0.0

clementlandrin 1 year ago
parent
commit
82fe5607bf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hrt/prefab/rfx/Sao.hx

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

@@ -39,6 +39,8 @@ class Sao extends RendererFX {
 
 	override function begin( r : h3d.scene.Renderer, step : h3d.impl.RendererFX.Step ) {
 		if( step == Lighting ) {
+			if ( intensity <= 0.0 )
+				return;
 			r.mark("SSAO");
 			if( sao == null ) sao = new h3d.pass.ScalableAO();
 			var ctx = r.ctx;