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:
authorTon Roosendaal <ton@blender.org>2005-03-07 15:41:23 +0300
committerTon Roosendaal <ton@blender.org>2005-03-07 15:41:23 +0300
commitd6f6d13f3ac328284eb9a6afa9942d067c018846 (patch)
tree820e938f27bc669410ff8114f72cdcf06991b63d
parentfb94fcd4e72055dc774e8030546361000d59845a (diff)
Bug fix #2292
Bumpmaps for skin on Env's dinosaurs appeared to be less nice in 2.36. This was caused by the bugfix to make bumpmapping correct for rotations, which should only work for flat/cube mapping. It also rotated it for sphere/tube though, which gives less interesting bumps. So; now the correction is skipped for tube/sphere mapping bumping.
-rw-r--r--source/blender/render/intern/source/texture.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index d6847a3f70d..d8d2c86575d 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -1625,13 +1625,16 @@ void do_material_tex(ShadeInput *shi)
// rotate to global coords
if(mtex->texco==TEXCO_ORCO || mtex->texco==TEXCO_UV) {
- if(shi->vlr && shi->vlr->ob) {
- float len= Normalise(texres.nor);
- // can be optimized... (ton)
- Mat4Mul3Vecfl(shi->vlr->ob->obmat, texres.nor);
- Mat4Mul3Vecfl(R.viewmat, texres.nor);
- Normalise(texres.nor);
- VecMulf(texres.nor, len);
+ // hrms, for sphere/tube map this rotating doesn't work nice
+ if(mtex->mapping==MTEX_FLAT || mtex->mapping==MTEX_CUBE) {
+ if(shi->vlr && shi->vlr->ob) {
+ float len= Normalise(texres.nor);
+ // can be optimized... (ton)
+ Mat4Mul3Vecfl(shi->vlr->ob->obmat, texres.nor);
+ Mat4Mul3Vecfl(R.viewmat, texres.nor);
+ Normalise(texres.nor);
+ VecMulf(texres.nor, len);
+ }
}
}
}