diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-29 14:09:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-29 14:09:20 +0400 |
commit | 3f06cab75eb1203ae8f68535763cce456f52a895 (patch) | |
tree | 01d370da9292da4079482064744fb5515a812f54 /source/blender/gpu/intern/gpu_material.c | |
parent | 25762f4945daf2c582f804d46c996f584a56e103 (diff) |
Fix #23073: glsl and 3d view background color didn't take color managment into
account yet, should now be consistent with render.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 9ed7729fea3..429eaea9b43 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1004,6 +1004,10 @@ static void do_material_tex(GPUShadeInput *shi) else GPU_link(mat, "set_value_one", &tin); } + + if(tex->type==TEX_IMAGE) + if(mat->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) + GPU_link(mat, "srgb_to_linearrgb", tcol, tcol); if(mtex->mapto & MAP_COL) { GPUNodeLink *colfac; @@ -1244,6 +1248,9 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr) mat->obcolalpha = 1; GPU_link(mat, "shade_alpha_obcolor", shr->combined, GPU_builtin(GPU_OBCOLOR), &shr->combined); } + + if(mat->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) + GPU_link(mat, "linearrgb_to_srgb", shr->combined, &shr->combined); } GPUNodeLink *GPU_blender_material(GPUMaterial *mat, Material *ma) |