Procházet zdrojové kódy

RendererFXVolume: add modulate

lviguier před 3 měsíci
rodič
revize
2261dca6ec
2 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. 8 0
      hrt/prefab/rfx/ColorGrading.hx
  2. 4 0
      hrt/prefab/rfx/RendererFX.hx

+ 8 - 0
hrt/prefab/rfx/ColorGrading.hx

@@ -95,6 +95,14 @@ class ColorGrading extends RendererFX {
 		}
 	}
 
+	override function modulate(t : Float) {
+		var c = new ColorGrading(null, null);
+		c.size = this.size;
+		c.texturePath = this.texturePath;
+		c.intensity = t;
+		return c;
+	}
+
 	override function transition( r1 : h3d.impl.RendererFX, r2 : h3d.impl.RendererFX, t : Float ) {
 		if (t <= 0) return r1;
 		if (t >= 1) return r2;

+ 4 - 0
hrt/prefab/rfx/RendererFX.hx

@@ -19,6 +19,10 @@ class RendererFX extends Prefab implements h3d.impl.RendererFX {
 		return null;
 	}
 
+	public function modulate( t : Float ) : h3d.impl.RendererFX {
+		return null;
+	}
+
 	inline function checkEnabled() {
 		return enabled #if editor && enableInEditor && !inGameOnly #end;
 	}