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>2010-11-11 19:50:04 +0300
committerTon Roosendaal <ton@blender.org>2010-11-11 19:50:04 +0300
commit4d9684ebdf3d6b6ad88babcb963801ed29717465 (patch)
tree7e17d0755f823c60f8974d2944bb11f0528881d1 /source/blender/render
parentd9e7e716758467627557a29294653411f419130b (diff)
Bugfix #20027
Texture Nodes didn't work for normal output anymore anymore. It was caused by new handling of bump code using derivatives, but that's not how texture nodes work now. In case a texture has nodes, it uses the old (2.4) method.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/texture.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index cdac27f352a..b7ef64ba98e 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -1667,7 +1667,7 @@ void do_material_tex(ShadeInput *shi)
float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3]={0.0f, 0.0f, 0.0f}, Tnor=1.0;
int tex_nr, rgbnor= 0, warpdone=0;
float nu[3] = {0,0,0}, nv[3] = {0,0,0}, nn[3] = {0,0,0}, dudnu = 1.f, dudnv = 0.f, dvdnu = 0.f, dvdnv = 1.f; // bump mapping
- int nunvdone= 0;
+ int nunvdone= 0, newbump;
if (R.r.scemode & R_NO_TEX) return;
/* here: test flag if there's a tex (todo) */
@@ -1683,6 +1683,9 @@ void do_material_tex(ShadeInput *shi)
tex= mtex->tex;
if(tex==0) continue;
+ /* XXX texture node trees don't work for this yet */
+ newbump= (mtex->texflag & MTEX_NEW_BUMP) && !(tex->nodetree && tex->use_nodes);
+
/* which coords */
if(mtex->texco==TEXCO_ORCO) {
if(mtex->texflag & MTEX_DUPLI_MAPTO) {
@@ -1844,7 +1847,8 @@ void do_material_tex(ShadeInput *shi)
co= tempvec;
}
- if(mtex->texflag & MTEX_NEW_BUMP) {
+ /* XXX texture node trees don't work for this yet */
+ if(newbump) {
// compute ortho basis around normal
if(!nunvdone) {
// render normal is negated
@@ -2169,7 +2173,8 @@ void do_material_tex(ShadeInput *shi)
}
}
else {
- if (mtex->texflag & MTEX_NEW_BUMP) {
+ /* XXX texture node trees don't work for this yet */
+ if (newbump) {
shi->vn[0] = texres.nor[0];
shi->vn[1] = texres.nor[1];
shi->vn[2] = texres.nor[2];