浏览代码

added SinusDeform

ncannasse 11 年之前
父节点
当前提交
cec8b1bcff
共有 1 个文件被更改,包括 19 次插入0 次删除
  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;
+		}
+
+	};
+
+}