diff options
author | Ton Roosendaal <ton@blender.org> | 2004-04-07 16:55:45 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-04-07 16:55:45 +0400 |
commit | 69f2ff45cb3419c4bdb4a6800aefffee64887f6a (patch) | |
tree | 6b168b9d3651e51d75bf0c86b6748a6190c03e69 /source | |
parent | d748c8c38284c99f1b57923b4ce29d65c402c447 (diff) |
bug fix 1064
Credits go to blendix! Well done!
Reported were errors in using procedural textures on "Map input" UV type.
It was due to un-initialized uv[2] members, which were actually still
used by texture.c for some coord flip magic.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index d9044a08e3d..8c12ed47b48 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -2262,7 +2262,8 @@ void shade_input_set_coords(ShadeInput *shi, float u, float v, int i1, int i2, i shi->uv[0]= -1.0 + 2.0*(l*uv3[0]-u*uv1[0]-v*uv2[0]); shi->uv[1]= -1.0 + 2.0*(l*uv3[1]-u*uv1[1]-v*uv2[1]); - + shi->uv[2]= 0.0; // texture.c assumes there are 3 coords + if(shi->osatex) { float duv[2]; @@ -2293,6 +2294,7 @@ void shade_input_set_coords(ShadeInput *shi, float u, float v, int i1, int i2, i else { shi->uv[0]= 2.0*(u+.5); shi->uv[1]= 2.0*(v+.5); + shi->uv[2]= 0.0; // texture.c assumes there are 3 coords } } if(texco & TEXCO_NORM) { |