summaryrefslogtreecommitdiff
path: root/src/shaders/lake.moon
diff options
context:
space:
mode:
Diffstat (limited to 'src/shaders/lake.moon')
-rw-r--r--src/shaders/lake.moon29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/shaders/lake.moon b/src/shaders/lake.moon
new file mode 100644
index 0000000..bac2c42
--- /dev/null
+++ b/src/shaders/lake.moon
@@ -0,0 +1,29 @@
+
+shader_shim = require("shader_shim")
+win = require("window")
+world = require("world")
+
+node = shader_shim.lake\append(am.bind({
+ MV: mat4(
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ (-win.width / 2), (-win.height/2), 0, 1
+ ),
+ P: mat4(1)
+ lake: am.vec3_array({})
+ light1: am.vec4_array({})
+ light2: am.vec4_array({})
+ light3: am.vec4_array({})
+ world_x: 0
+ world_y: 0
+ time: am.current_time()
+}))\append(am.draw("triangles"))
+
+node\action((self) ->
+ self("bind").time = am.current_time!
+ self("bind").world_x = world.world_x
+ self("bind").world_y = world.world_y
+)
+
+node