forked from bartvdbraak/blender
Bugfix #4999
The Sky render option "Ang Map", which should support spherical probes, was always in local camera view space, instead of world space. Check this report, it has cool images! http://projects.blender.org/tracker/index.php?func=detail&aid=4999&group_id=9&atid=125
This commit is contained in:
parent
0d4f5335bf
commit
b50a32ce9d
@ -2083,12 +2083,16 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
|
||||
/* Grab the mapping settings for this texture */
|
||||
switch(mtex->texco) {
|
||||
case TEXCO_ANGMAP:
|
||||
|
||||
fact= (1.0/M_PI)*acos(lo[2])/(sqrt(lo[0]*lo[0] + lo[1]*lo[1]));
|
||||
tempvec[0]= lo[0]*fact;
|
||||
tempvec[1]= lo[1]*fact;
|
||||
tempvec[2]= 0.0;
|
||||
/* move view vector to global world space */
|
||||
VECCOPY(tempvec, lo);
|
||||
Mat4Mul3Vecfl(R.viewinv, tempvec);
|
||||
co= tempvec;
|
||||
|
||||
/* note, this converion assumes 'sphere probes' are front view */
|
||||
fact= (1.0f/M_PI)*acos(co[1])/(sqrt(co[0]*co[0] + co[2]*co[2]));
|
||||
co[0]= co[0]*fact;
|
||||
co[1]= co[2]*fact;
|
||||
co[2]= 0.0f;
|
||||
break;
|
||||
|
||||
case TEXCO_H_SPHEREMAP:
|
||||
|
Loading…
Reference in New Issue
Block a user