}
if (phase->is_compute_shader) {
- frag_shader.append(read_file("footer.compute"));
+ frag_shader.append(read_file("footer.comp"));
phase->output_node->effect->register_uniform_vec2("inv_output_size", (float *)&phase->inv_output_size);
phase->output_node->effect->register_uniform_vec2("output_texcoord_adjust", (float *)&phase->output_texcoord_adjust);
} else {
--- /dev/null
+void main()
+{
+ INPUT();
+}
+
+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);
+}
// 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)