[Bf-blender-cvs] [82c90a4] master: Fix T41921: MapUV node alpha setting broken.

Lukas Tönne noreply at git.blender.org
Tue Sep 23 16:59:19 CEST 2014


Commit: 82c90a44c2db62fbf14dd23481ae2f43b4322667
Author: Lukas Tönne
Date:   Tue Sep 23 16:57:11 2014 +0200
Branches: master
https://developer.blender.org/rB82c90a44c2db62fbf14dd23481ae2f43b4322667

Fix T41921: MapUV node alpha setting broken.

The UV values includes the image width/height now. To restore the
previous method as close as possible (even though it is not documented
anywhere how this is supposed to work), we have to ignore this scaling.

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

M	source/blender/compositor/operations/COM_MapUVOperation.cpp

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

diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index 87ad1d6..6bf7302 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -62,7 +62,7 @@ void MapUVOperation::executePixelSampled(float output[4], float x, float y, Pixe
 	 */
 	float du = len_v2(deriv[0]);
 	float dv = len_v2(deriv[1]);
-	float factor = 1.0f - threshold * (du + dv);
+	float factor = 1.0f - threshold * (du / m_inputColorProgram->getWidth() + dv / m_inputColorProgram->getHeight());
 	if (factor < 0.f) alpha = 0.f;
 	else alpha *= factor;




More information about the Bf-blender-cvs mailing list