]> git.sesse.net Git - movit/blob - header.comp
Invert the meaning of the last_phase boolean to execute_phase().
[movit] / header.comp
1 #version 150
2 #extension GL_ARB_compute_shader : enable
3 #extension GL_ARB_shader_image_load_store : enable
4
5 // FIXME this needs to be auto-output or something
6 layout(rgba16f) uniform restrict writeonly image2D outbuf;
7
8 vec4 tex2D(sampler2D s, vec2 coord)
9 {
10         return texture(s, coord);
11 }
12
13 void cs_output(uvec2 coord, vec4 val)
14 {
15         imageStore(outbuf, ivec2(coord), val);
16 }
17
18 void cs_output(ivec2 coord, vec4 val)
19 {
20         imageStore(outbuf, coord, val);
21 }
22
23 #define OUTPUT(tc, val) cs_output(tc, val)