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
path: root/source
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2009-05-19 00:23:38 +0400
committerDalai Felinto <dfelinto@gmail.com>2009-05-19 00:23:38 +0400
commitd35a556d6603d021cf3297ed3b2519e46b74871b (patch)
treea3f78c5ea79dde681836aa7403ca47a8dff547ce /source
parent9c8f09d2a0ade9eefb430c6cab3c98c23b0e188a (diff)
Bug fix for: [#18761] GLSL Negative light option in Blender does not work in the GE
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_material.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index f7052694fc7..93604e76527 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1309,9 +1309,9 @@ void GPU_lamp_update(GPULamp *lamp, int lay, float obmat[][4])
void GPU_lamp_update_colors(GPULamp *lamp, float r, float g, float b, float energy)
{
lamp->la->energy = energy;
- lamp->la->r = r;
- lamp->la->g = g;
- lamp->la->b = b;
+ lamp->la->r = fabs(r);
+ lamp->la->g = fabs(g);
+ lamp->la->b = fabs(b);
lamp->col[0]= lamp->la->r*lamp->energy;
lamp->col[1]= lamp->la->g*lamp->energy;