diff options
Diffstat (limited to 'source/blender/render/intern/source/pixelshading.c')
-rw-r--r-- | source/blender/render/intern/source/pixelshading.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 104cde0a0b5..97d6b060e0a 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -492,7 +492,7 @@ int shadeHaloFloat(HaloRen *har, float col[4], int zz, /* Only view vector is important here. Result goes to col_r[3] */ void shadeSkyView(float col_r[3], const float rco[3], const float view[3], const float dxyview[2], short thread) { - float lo[3], zen[3], hor[3], blend, blendm; + float zen[3], hor[3], blend, blendm; int skyflag; /* flag indicating if we render the top hemisphere */ @@ -521,15 +521,16 @@ void shadeSkyView(float col_r[3], const float rco[3], const float view[3], const /* Careful: SKYTEX and SKYBLEND are NOT mutually exclusive! If */ /* SKYBLEND is active, the texture and color blend are added. */ if (R.wrld.skytype & WO_SKYTEX) { + float lo[3]; copy_v3_v3(lo, view); if (R.wrld.skytype & WO_SKYREAL) { - + mul_m3_v3(R.imat, lo); - + SWAP(float, lo[1], lo[2]); - + } - do_sky_tex(rco, lo, dxyview, hor, zen, &blend, skyflag, thread); + do_sky_tex(rco, view, lo, dxyview, hor, zen, &blend, skyflag, thread); } if (blend>1.0f) blend= 1.0f; |