Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-02 13:08:43 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-02 13:08:43 +0400
commitbee2523a41c37a43df7e4bf93dce32ec45d8f132 (patch)
treef66e0caa4122bb496e9c8997440da911d3a0d8df /source/blender/gpu/intern
parent5aef2f1ae2aaa1f8b45b473e4b403a548855b9be (diff)
Related to bug #27004: there is now an option to disable color management for
GLSL. I've tried to find a quicker way to do it that still looks the same, but couldn't find a formula that didn't have major color shifts.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_material.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 4155b7a8ac0..134bffc7b8c 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1011,7 +1011,8 @@ static void do_material_tex(GPUShadeInput *shi)
}
if(tex->type==TEX_IMAGE)
- if(mat->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
+ if((mat->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) &&
+ !((mat->scene->gm.flag & GAME_GLSL_NO_COLOR_MANAGEMENT)))
GPU_link(mat, "srgb_to_linearrgb", tcol, &tcol);
if(mtex->mapto & MAP_COL) {
@@ -1363,7 +1364,8 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
GPU_link(mat, "shade_alpha_obcolor", shr->combined, GPU_builtin(GPU_OBCOLOR), &shr->combined);
}
- if(mat->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
+ if((mat->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) &&
+ !((mat->scene->gm.flag & GAME_GLSL_NO_COLOR_MANAGEMENT)))
GPU_link(mat, "linearrgb_to_srgb", shr->combined, &shr->combined);
}