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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-09-03 17:17:21 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-09-03 17:17:21 +0400
commit1f64aecb303a47ff1a441aa0149e46fa49217169 (patch)
tree10b908a8f46db4b079e8e8fe2dc8e98ad6c3d825 /source/blender/gpu/intern/gpu_material.c
parentd6ec4b874b99f096ce2aa1c2864609bb2e4b58ad (diff)
Fix for usage of un-initialized memory.
Checked by Brecht when were in Blender Institute. Discovered when was looking into #32296: Node Texture - Node Material - GLSL Viewport rendering issue
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-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 81b80b83166..c831b92936f 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1396,10 +1396,10 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
GPU_material_enable_alpha(mat);
if ((mat->scene->gm.flag & GAME_GLSL_NO_LIGHTS) || (ma->mode & MA_SHLESS)) {
- shr->combined = shi->rgb;
- shr->alpha = shi->alpha;
GPU_link(mat, "set_rgb", shi->rgb, &shr->diff);
GPU_link(mat, "set_rgb_zero", &shr->spec);
+ GPU_link(mat, "set_value", shi->alpha, &shr->alpha);
+ shr->combined = shr->diff;
}
else {
if (GPU_link_changed(shi->emit) || ma->emit != 0.0f) {
@@ -1418,7 +1418,8 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
material_lights(shi, shr);
shr->combined = shr->diff;
- shr->alpha = shi->alpha;
+
+ GPU_link(mat, "set_value", shi->alpha, &shr->alpha);
if (world) {
/* exposure correction */