- fix for AA of mirroring.

It appeared that the Osa vectors for view vector, and for rendered coord
  had an opposite sign...
This commit is contained in:
Ton Roosendaal
2003-12-12 15:03:01 +00:00
parent 7ea1d94032
commit 55c3082c6b
2 changed files with 5 additions and 5 deletions

View File

@@ -1523,9 +1523,9 @@ void ray_mirror(int mask)
for(j=0; j<R.osa; j++) {
if(mask & 1<<j) {
vec[0]= ref[0] + 1.0*(jit[j][0]-0.5)*dxref[0] + 1.0*(jit[j][1]-0.5)*dyref[0] ;
vec[1]= ref[1] + 1.0*(jit[j][0]-0.5)*dxref[1] + 1.0*(jit[j][1]-0.5)*dyref[1] ;
vec[2]= ref[2] + 1.0*(jit[j][0]-0.5)*dxref[2] + 1.0*(jit[j][1]-0.5)*dyref[2] ;
vec[0]= ref[0] + (jit[j][0]-0.5)*dxref[0] + (jit[j][1]-0.5)*dyref[0] ;
vec[1]= ref[1] + (jit[j][0]-0.5)*dxref[1] + (jit[j][1]-0.5)*dyref[1] ;
vec[2]= ref[2] + (jit[j][0]-0.5)*dxref[2] + (jit[j][1]-0.5)*dyref[2] ;
/* prevent normal go to backside */
i= vec[0]*rvno[0]+ vec[1]*rvno[1]+ vec[2]*rvno[2];

View File

@@ -2102,8 +2102,8 @@ void shadepixel(float x, float y, int vlaknr, int mask)
if(R.osatex) {
if( (R.matren->texco & TEXCO_REFL) ) {
O.dxview= 1.0/fac;
O.dyview= R.ycor/fac;
O.dxview= -1.0/fac;
O.dyview= -R.ycor/fac;
}
}