]> git.sesse.net Git - movit/blobdiff - header.comp
Move compute shader functions from the header to the footer; easier to unify with...
[movit] / header.comp
index 266e24fc83b4519c3bd3a7247b711a23bb7b87c9..d922e33efedaaf511f61a9406a1b6bf6a8db7a51 100644 (file)
@@ -5,19 +5,9 @@
 // FIXME this needs to be auto-output or something
 uniform restrict writeonly image2D outbuf;
 
-vec4 tex2D(sampler2D s, vec2 coord)
-{
-       return texture(s, coord);
-}
-
-void cs_output(uvec2 coord, vec4 val)
-{
-       imageStore(outbuf, ivec2(coord), val);
-}
-
-void cs_output(ivec2 coord, vec4 val)
-{
-       imageStore(outbuf, coord, val);
-}
+// Defined in footer.comp.
+vec4 tex2D(sampler2D s, vec2 coord);
+void cs_output(uvec2 coord, vec4 val);
+void cs_output(ivec2 coord, vec4 val);
 
 #define OUTPUT(tc, val) cs_output(tc, val)