diff options
author | Arun Kumar K.R <akumarkr@codeaurora.org> | 2016-12-16 02:28:20 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-12 02:33:07 -0800 |
commit | f3a6f1a9baf542e21953987a544f9e01216555f8 (patch) | |
tree | 7d57ef7ad4438a1d76c6da41ca941d9fe66f195d /gpu_tonemapper | |
parent | eb5c32bed2b2a73c4b68efd3ad18ed9a76a2aeb1 (diff) | |
download | display-f3a6f1a9baf542e21953987a544f9e01216555f8.tar.gz |
gpu_tonemapper: Fix forward tonemap shader
Fix the in-correct handling of the verticies in the forward
tonemap shader which led to the vertical flip of tonemap out.
Change-Id: I17ed607c35f41a349fd39646066b108c792534a0
Crs-fixed: 1106032
Diffstat (limited to 'gpu_tonemapper')
-rw-r--r-- | gpu_tonemapper/forward_tonemap.inl | 7 |
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" |