X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=footer.comp;h=c4d1305be8512bcb1c77e17b3e24ee2266dc5686;hp=a28014d684b69af8985b9fe911b2db400c089a6c;hb=a48d62d61ada1226caaa9fd42846672cfe0249e8;hpb=12a1f8177c22386171ded47947b9422f27f5f1b2 diff --git a/footer.comp b/footer.comp index a28014d..c4d1305 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 + +#if FLIP_ORIGIN + coord.y = imageSize(outbuf).y - coord.y - 1; +#endif + imageStore(outbuf, coord, val); }