diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-26 18:46:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-26 18:46:16 +0400 |
commit | 62fe4bcd770c1076f8223792e74284726012f6a9 (patch) | |
tree | 75edebe1e49a9d13dff742687b04e1fc284398c7 /source/blender/render | |
parent | bed40ed8e3f981ce97268edb01fecf599d940633 (diff) |
Fix #22749: texture view mapping for spot lamps wasn't doing perspective
division, giving incorrect projection.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/texture.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index 5938b64dedf..c8a15372e21 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -2881,6 +2881,9 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef if(la->type==LA_SPOT) { tempvec[0]*= la->spottexfac; tempvec[1]*= la->spottexfac; + /* project from 3d to 2d */ + tempvec[0] /= -tempvec[2]; + tempvec[1] /= -tempvec[2]; } co= tempvec; |