diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2025-01-21 16:02:51 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2025-01-21 16:02:51 -0600 |
| commit | 0370d64b3bd7914be55358817e52bbc8a529a7d3 (patch) | |
| tree | a717bb9582f8a4c8dc7caf0d455e25113c7b8704 /src/shaders/lake.moon | |
| parent | da9dd31f504d30f33922cdf362a7c01673a6b927 (diff) | |
| download | ggj25-0370d64b3bd7914be55358817e52bbc8a529a7d3.tar.gz ggj25-0370d64b3bd7914be55358817e52bbc8a529a7d3.tar.bz2 ggj25-0370d64b3bd7914be55358817e52bbc8a529a7d3.zip | |
work
Diffstat (limited to 'src/shaders/lake.moon')
| -rw-r--r-- | src/shaders/lake.moon | 29 |
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 |
