X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=footer.comp;h=17175d9c717777665c0ec537d91cc95e6524c835;hp=a28014d684b69af8985b9fe911b2db400c089a6c;hb=17a469f38066d783158e02c983f24396c9fb4a92;hpb=e683d4e49549b2d4c6906d2ebc4184904f4fe9f8 diff --git a/footer.comp b/footer.comp index a28014d..17175d9 100644 --- a/footer.comp +++ b/footer.comp @@ -5,6 +5,10 @@ #define SQUARE_ROOT_TRANSFORMATION 0 #endif +#ifndef FLIP_ORIGIN +#define FLIP_ORIGIN 0 +#endif + void main() { INPUT(); @@ -30,5 +34,10 @@ void cs_output(ivec2 coord, vec4 val) // Make sure we don't give negative values to sqrt. val.rgb = sqrt(max(val.rgb, 0.0)); #endif - imageStore(outbuf, coord, val); + +#if FLIP_ORIGIN + coord.y = imageSize(tex_outbuf).y - coord.y - 1; +#endif + + imageStore(tex_outbuf, coord, val); }