X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=footer.comp;h=c59a93de6f3eb271c26fa4d05f99df7a629b357f;hp=c4d1305be8512bcb1c77e17b3e24ee2266dc5686;hb=10bcc7948c3911f1e4459c98205726334998229e;hpb=a48d62d61ada1226caaa9fd42846672cfe0249e8 diff --git a/footer.comp b/footer.comp index c4d1305..c59a93d 100644 --- a/footer.comp +++ b/footer.comp @@ -26,9 +26,12 @@ void cs_output(uvec2 coord, vec4 val) void cs_output(ivec2 coord, vec4 val) { - // Run the value through any preprocessing steps we might have. + // Run the value through any postprocessing steps we might have. + // Note that we need to give in the actual coordinates, since the + // effect could have multiple (non-compute) inputs, and would also + // be allowed to make effects based on the texture coordinate alone. CS_OUTPUT_VAL = val; - val = CS_POSTPROC(vec2(0.0, 0.0)); + val = CS_POSTPROC(NORMALIZE_TEXTURE_COORDS(coord)); #if SQUARE_ROOT_TRANSFORMATION // Make sure we don't give negative values to sqrt. @@ -36,8 +39,8 @@ void cs_output(ivec2 coord, vec4 val) #endif #if FLIP_ORIGIN - coord.y = imageSize(outbuf).y - coord.y - 1; + coord.y = imageSize(tex_outbuf).y - coord.y - 1; #endif - imageStore(outbuf, coord, val); + imageStore(tex_outbuf, coord, val); }