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>2011-09-30 13:55:21 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-09-30 13:55:21 +0400
commit79307369fe8908aca6e746f65aea0ade7218c280 (patch)
treee7601f6ff94dc5d80ae7147541a673eae1cdd210 /source/blender/gpu
parenta92cfcd74ee6045a141e92fbd9c1e0b8138caade (diff)
Bump maps flip: now white means salience, black means concavity
Files created in blender before this revision should be rendered in exactly the same way they used to render before. Patch by Morten Mikkelsen, finished by Ton and me.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_material.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index f435b507a2a..a792b51e1cf 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1101,7 +1101,12 @@ static void do_material_tex(GPUShadeInput *shi)
if( mtex->texflag & MTEX_BUMP_TEXTURESPACE )
hScale = hScaleTex;
- norfac = hScale * mtex->norfac;
+
+ // The negate on norfac is done because the
+ // normal in the renderer points inward which corresponds
+ // to inverting the bump map. Should this ever change
+ // this negate must be removed.
+ norfac = -hScale * mtex->norfac;
tnorfac = GPU_uniform(&norfac);
if(GPU_link_changed(stencil))