summaryrefslogtreecommitdiff
path: root/src/shaders/lake.moon
blob: bac2c42948163ff879352f5c209fb64713082dbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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