Selaa lähdekoodia

added SinusDeform

ncannasse 11 vuotta sitten
vanhempi
commit
cec8b1bcff
1 muutettua tiedostoa jossa 19 lisäystä ja 0 poistoa
  1. 19 0
      h3d/shader/SinusDeform.hx

+ 19 - 0
h3d/shader/SinusDeform.hx

@@ -0,0 +1,19 @@
+package h3d.shader;
+
+class SinusDeform extends hxsl.Shader {
+
+	static var SRC = {
+
+		@param var time : Float;
+		@param var frequency : Float;
+		@param var amplitude : Float;
+
+		var calculatedUV : Vec2;
+
+		function fragment() {
+			calculatedUV.x += sin(calculatedUV.x * frequency + time) * amplitude;
+		}
+
+	};
+
+}