diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-08-30 21:42:04 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-08-30 21:42:04 +0400 |
commit | b25ca62f20d03b400454156e5b26b26e469844dc (patch) | |
tree | 479445ea33c3e35ccbf028de24c30b0ace5d79a0 /source/blender/gpu/intern/gpu_draw.c | |
parent | f9bccc069c3ec2d6dc049f615b1f3ce8769a5b0b (diff) |
Fix #32404: GLSL normal maps using float images were incorrectly getting
color managed.
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index d03913af417..4314a784511 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -422,7 +422,7 @@ static void gpu_verify_reflection(Image *ima) } } -int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int mipmap) +int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int mipmap, int ncd) { ImBuf *ibuf = NULL; unsigned int *bind = NULL; @@ -492,7 +492,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int } /* TODO unneeded when float images are correctly treated as linear always */ - if (ibuf->profile == IB_PROFILE_LINEAR_RGB) + if (!ncd && ibuf->profile == IB_PROFILE_LINEAR_RGB) do_color_management = TRUE; if (ibuf->rect==NULL) @@ -807,7 +807,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap, int alphablend) gpu_verify_alpha_blend(alphablend); gpu_verify_reflection(ima); - if (GPU_verify_image(ima, NULL, tface->tile, 1, mipmap)) { + if (GPU_verify_image(ima, NULL, tface->tile, 1, mipmap, FALSE)) { GTS.curtile= GTS.tile; GTS.curima= GTS.ima; GTS.curtilemode= GTS.tilemode; |