Fix for rendering procedual bump maps, mapped in world space, since the new bump map kernel uses direction, this bug became a real issue, with bumps suddenly changing direction
Fix provided due to a long session on IRC with Morten S. Mikkelsen (sparky_)
This commit is contained in:
@@ -431,9 +431,9 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
|
|||||||
|
|
||||||
if(shi->osatex) {
|
if(shi->osatex) {
|
||||||
VECCOPY(shi->dxgl, shi->dxco);
|
VECCOPY(shi->dxgl, shi->dxco);
|
||||||
mul_m3_v3(R.imat, shi->dxco);
|
mul_mat3_m4_v3(R.viewinv, shi->dxgl);
|
||||||
VECCOPY(shi->dygl, shi->dyco);
|
VECCOPY(shi->dygl, shi->dyco);
|
||||||
mul_m3_v3(R.imat, shi->dyco);
|
mul_mat3_m4_v3(R.viewinv, shi->dygl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1013,12 +1013,9 @@ void shade_input_set_shade_texco(ShadeInput *shi)
|
|||||||
mul_m4_v3(R.viewinv, shi->gl);
|
mul_m4_v3(R.viewinv, shi->gl);
|
||||||
if(shi->osatex) {
|
if(shi->osatex) {
|
||||||
VECCOPY(shi->dxgl, shi->dxco);
|
VECCOPY(shi->dxgl, shi->dxco);
|
||||||
// TXF: bug was here, but probably should be in convertblender.c, R.imat only valid if there is a world
|
mul_mat3_m4_v3(R.viewinv, shi->dxgl);
|
||||||
//mul_m3_v3(R.imat, shi->dxco);
|
|
||||||
mul_mat3_m4_v3(R.viewinv, shi->dxco);
|
|
||||||
VECCOPY(shi->dygl, shi->dyco);
|
VECCOPY(shi->dygl, shi->dyco);
|
||||||
//mul_m3_v3(R.imat, shi->dyco);
|
mul_mat3_m4_v3(R.viewinv, shi->dygl);
|
||||||
mul_mat3_m4_v3(R.viewinv, shi->dyco);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user