aboutsummaryrefslogtreecommitdiff
path: root/src/shaders/lake.moon
diff options
context:
space:
mode:
authorAlex Pickering <alex@cogarr.net>2026-02-01 13:14:32 -0600
committerAlexander M Pickering <alex@cogarr.net>2026-02-01 13:14:32 -0600
commit3a975db66a3711f34e8b64bb27a8eaca79fdeca9 (patch)
treefcc12f8f9d638ff575c1963796de76b7628854b4 /src/shaders/lake.moon
downloadggj26-3a975db66a3711f34e8b64bb27a8eaca79fdeca9.tar.gz
ggj26-3a975db66a3711f34e8b64bb27a8eaca79fdeca9.tar.bz2
ggj26-3a975db66a3711f34e8b64bb27a8eaca79fdeca9.zip
Initial commitHEADmaster
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