diff options
author | Ton Roosendaal <ton@blender.org> | 2005-01-08 17:22:27 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-01-08 17:22:27 +0300 |
commit | 9393e490aff163594ec5a07350247da18a5253e3 (patch) | |
tree | 464c21cf62a3039baf23149553e2cc4cdb380b39 /source/blender/render | |
parent | d56680bc389d968f40b0dd3771dec13103df245a (diff) |
Fix for commit of yesterday, where wire render + mist was solved.
Had moved normalizing the view vector just a couple of lines to much...
causing OSA vectors to be calculated wrong, and image texture to show
much to filtered (nearly invisible)
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index d3b87980939..80df485090d 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -2022,15 +2022,6 @@ void *shadepixel(float x, float y, int z, int facenr, int mask, float *col) shi.view[2]= -panosi*u + panoco*v; } - fac= Normalise(shi.view); - - if(shi.osatex) { - if( (shi.mat->texco & TEXCO_REFL) ) { - shi.dxview= -1.0/fac; - shi.dyview= -R.ycor/fac; - } - } - /* wire cannot use normal for calculating shi.co */ if(shi.mat->mode & MA_WIRE) { float zco; @@ -2072,6 +2063,17 @@ void *shadepixel(float x, float y, int z, int facenr, int mask, float *col) } } + /* cannot normalise earlier, code above needs it at pixel level */ + fac= Normalise(shi.view); + zcor*= fac; + + if(shi.osatex) { + if( (shi.mat->texco & TEXCO_REFL) ) { + shi.dxview= -1.0/fac; + shi.dyview= -R.ycor/fac; + } + } + /* calcuate normals, texture coords, vertex colors, etc */ if(facenr & 0x800000) shade_input_set_coords(&shi, 1.0, 1.0, 0, 2, 3); |