[Bf-blender-cvs] [5371102] master: BI "Real Sky" option works incorrectly for environment texture.

Alexander Romanov noreply at git.blender.org
Wed Jan 13 09:55:58 CET 2016


Commit: 53711020396a706418ebf3f24065b9c26eae5b06
Author: Alexander Romanov
Date:   Wed Jan 13 11:38:48 2016 +0300
Branches: master
https://developer.blender.org/rB53711020396a706418ebf3f24065b9c26eae5b06

BI "Real Sky" option works incorrectly for environment texture.

How to check?

1) Set Rendered mode for 3d View
2) Set "Blend Sky" and "Real Sky" flags for world.
Rotate view you will see right color blending from Horizon to Zenith color.
3) Add environment texture
Rotate view and you will see incorrect texture mapping that is not correspond to color blending that was observed in previous step.

So I conclude that this is a bug.

This issue must be solved before the patch D1414 because BI behavior is the viewport target.

Example: {F273051}

Alexander (Blend4Web Team)

Reviewers: sergey

Reviewed By: sergey

Subscribers: Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1729

===================================================================

M	source/blender/render/intern/source/pixelshading.c

===================================================================

diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 104cde0..f577333 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,7 @@ 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) {
-		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, dxyview, hor, zen, &blend, skyflag, thread);
 	}
 	
 	if (blend>1.0f) blend= 1.0f;




More information about the Bf-blender-cvs mailing list