[Bf-blender-cvs] [89b1805df62] master: BGE: Fix silly typo that invalidates negative scaling camera feature.

Benoit Bolsee noreply at git.blender.org
Tue May 2 20:14:05 CEST 2017


Commit: 89b1805df624bf665336baaf51650928c556456b
Author: Benoit Bolsee
Date:   Tue May 2 20:11:02 2017 +0200
Branches: master
https://developer.blender.org/rB89b1805df624bf665336baaf51650928c556456b

BGE: Fix silly typo that invalidates negative scaling camera feature.

Negative scale on camera is a nice trick to invert render image on one
axis at no extra CPU cost. It was implemented in the Decklink branch but
I introduced a typo when porting it to master. It is now fixed.

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

M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp

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

diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 3f82c513f7d..339f27aa86e 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -994,8 +994,8 @@ void RAS_OpenGLRasterizer::SetViewMatrix(const MT_Matrix4x4 &mat,
 	}
 
 	bool negX = (scale[0] < 0.0f);
-	bool negY = (scale[0] < 0.0f);
-	bool negZ = (scale[0] < 0.0f);
+	bool negY = (scale[1] < 0.0f);
+	bool negZ = (scale[2] < 0.0f);
 	if (negX || negY || negZ) {
 		m_viewmatrix.tscale((negX)?-1.0f:1.0f, (negY)?-1.0f:1.0f, (negZ)?-1.0f:1.0f, 1.0);
 	}




More information about the Bf-blender-cvs mailing list