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-07-28 18:28:27 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-07-28 18:28:27 +0400
commitb8dcf3a662f35fef388294c635386b952f6bf981 (patch)
tree75b997193235d0d6da3a7583f6cceffefe8dfc83
parentb948459031dd6d0f1ccc81d607a589fd7d1e8ab2 (diff)
Fix part of #27944: color managment discrepancy in GLSL materials with nodes.
-rw-r--r--source/blender/gpu/intern/gpu_material.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 806c70d841f..274884000db 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1371,9 +1371,6 @@ 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(gpu_do_color_management(mat))
- GPU_link(mat, "linearrgb_to_srgb", shr->combined, &shr->combined);
}
static GPUNodeLink *GPU_blender_material(GPUMaterial *mat, Material *ma)
@@ -1408,6 +1405,10 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma)
GPU_material_output_link(mat, outlink);
}
+ if(gpu_do_color_management(mat))
+ if(mat->outlink)
+ GPU_link(mat, "linearrgb_to_srgb", mat->outlink, &mat->outlink);
+
/*if(!GPU_material_construct_end(mat)) {
GPU_material_free(mat);
mat= NULL;