summaryrefslogtreecommitdiff
path: root/gpu_tonemapper
diff options
context:
space:
mode:
Diffstat (limited to 'gpu_tonemapper')
-rw-r--r--gpu_tonemapper/forward_tonemap.inl7
1 files changed, 5 insertions, 2 deletions
diff --git a/gpu_tonemapper/forward_tonemap.inl b/gpu_tonemapper/forward_tonemap.inl
index a008949e..db23cf1f 100644
--- a/gpu_tonemapper/forward_tonemap.inl
+++ b/gpu_tonemapper/forward_tonemap.inl
@@ -28,8 +28,11 @@ const char* forward_tonemap_shader = ""
"out vec4 fs_color; \n"
"void main() \n"
"{ \n"
- "vec4 rgb = texture(externalTexture, uv); \n"
- "#if defined(USE_NONUNIFORM_SAMPLING) \n"
+ "vec2 flipped = uv; \n"
+ "flipped.y = 1.0 - flipped.y; \n"
+ "flipped.x = flipped.x; \n"
+ "vec4 rgb = texture(externalTexture, flipped); \n"
+ "#ifdef USE_NONUNIFORM_SAMPLING \n"
"float r = texture(xform, vec2(r, 0.0f)).r; \n"
"float g = texture(xform, vec2(g, 0.0f)).g; \n"
"float b = texture(xform, vec2(b, 0.0f)).b; \n"