[Bf-blender-cvs] [d21e254] master: Fix GLSL drawing of math absolute node.

Antony Riakiotakis noreply at git.blender.org
Wed Nov 26 15:46:46 CET 2014


Commit: d21e254907df5fcb299c4806e6d67eb6b83fd925
Author: Antony Riakiotakis
Date:   Wed Nov 26 15:46:03 2014 +0100
Branches: master
https://developer.blender.org/rBd21e254907df5fcb299c4806e6d67eb6b83fd925

Fix GLSL drawing of math absolute node.

Patch by Romanov Alexander of blen4web team!

Differential: D842

Thanks for the patch!

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

M	source/blender/nodes/shader/nodes/node_shader_math.c

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

diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c
index eb018e6..be2e3dc 100644
--- a/source/blender/nodes/shader/nodes/node_shader_math.c
+++ b/source/blender/nodes/shader/nodes/node_shader_math.c
@@ -233,7 +233,7 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
 	static const char *names[] = {"math_add", "math_subtract", "math_multiply",
 		                          "math_divide", "math_sine", "math_cosine", "math_tangent", "math_asin",
 		                          "math_acos", "math_atan", "math_pow", "math_log", "math_min", "math_max",
-                                  "math_round", "math_less_than", "math_greater_than", "math_modulo", "math_absolute"};
+                                  "math_round", "math_less_than", "math_greater_than", "math_modulo", "math_abs"};
 
 	switch (node->custom1) {
 		case NODE_MATH_ADD:
@@ -256,6 +256,7 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
 		case NODE_MATH_ACOS:
 		case NODE_MATH_ATAN:
 		case NODE_MATH_ROUND:
+		case NODE_MATH_ABS:
 			if (in[0].hasinput || !in[1].hasinput) {
 				/* use only first item and terminator */
 				GPUNodeStack tmp_in[2];




More information about the Bf-blender-cvs mailing list