Index: release/scripts/startup/nodeitems_builtins.py
===================================================================
--- release/scripts/startup/nodeitems_builtins.py	(Revision 61250)
+++ release/scripts/startup/nodeitems_builtins.py	(Arbeitskopie)
@@ -199,6 +199,7 @@
         NodeItem("ShaderNodeTexWave"),
         NodeItem("ShaderNodeTexVoronoi"),
         NodeItem("ShaderNodeTexMusgrave"),
+        NodeItem("ShaderNodeTexLyapunov"),
         NodeItem("ShaderNodeTexGradient"),
         NodeItem("ShaderNodeTexMagic"),
         NodeItem("ShaderNodeTexChecker"),
@@ -389,6 +390,7 @@
         NodeItem("TextureNodeTexMarble"),
         NodeItem("TextureNodeTexWood"),
         NodeItem("TextureNodeTexMusgrave"),
+        NodeItem("TextureNodeTexLyapunov"),
         NodeItem("TextureNodeTexStucci"),
         ]),
     TextureNodeCategory("TEX_CONVERTOR", "Converter", items=[
Index: release/scripts/startup/bl_ui/properties_texture.py
===================================================================
--- release/scripts/startup/bl_ui/properties_texture.py	(Revision 61250)
+++ release/scripts/startup/bl_ui/properties_texture.py	(Arbeitskopie)
@@ -372,7 +372,57 @@
         col.prop(tex, "turbulence")
         col.prop(tex, "nabla")
 
+class TEXTURE_PT_lyapunov(TextureTypePanel, Panel):
+    bl_label = "Lyapunov"
+    tex_type = 'LYAPUNOV'
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
+    def draw(self, context):
+        layout = self.layout
+        tex = context.texture
+
+        layout.prop(tex, "lyap_color_type", expand=True)
+
+        row = layout.row()
+        if tex.lyap_color_type in {'RGB', 'RGBA'}:
+            row.prop(tex, "lyap_neg_color_r", text="")
+            row.prop(tex, "lyap_mid_color_r", text="")
+            row.prop(tex, "lyap_pos_color_r", text="")
+        else:
+            row.prop(tex, "lyap_intensity_spreading")
+
+        split = layout.split()
+        row = split.row()
+
+        sub = row.row()
+        sub.active = tex.lyap_render_type in {'ALL', 'NEG'}
+        sub.prop(tex, "lyap_neg_invert")
+        sub.prop(tex, "lyap_neg_scale")
+
+        sub1 = row.row()
+        sub1.active = tex.lyap_render_type in {'ALL', 'POS'}
+        sub1.prop(tex, "lyap_pos_invert")
+        sub1.prop(tex, "lyap_pos_scale")
+
+        layout.prop(tex, "lyap_render_type", expand=True)
+
+        split = layout.split()
+        col = split.column()
+
+        col.prop(tex, "lyap_iteration_pre")
+        col.prop(tex, "lyap_iteration_main")
+
+        col = split.column()
+
+        col.prop(tex, "lyap_param1")
+        col.prop(tex, "lyap_param2")
+
+        split = layout.split()
+        row = split.row()
+
+        row.prop(tex, "noise_scale", text="Size")
+        row.prop(tex, "nabla")
+
 class TEXTURE_PT_magic(TextureTypePanel, Panel):
     bl_label = "Magic"
     tex_type = 'MAGIC'
Index: intern/cycles/blender/blender_shader.cpp
===================================================================
--- intern/cycles/blender/blender_shader.cpp	(Revision 61250)
+++ intern/cycles/blender/blender_shader.cpp	(Arbeitskopie)
@@ -638,6 +638,16 @@
 		get_tex_mapping(&musgrave->tex_mapping, b_musgrave_node.texture_mapping());
 		node = musgrave;
 	}
+	else if (b_node.is_a(&RNA_ShaderNodeTexLyapunov)) {
+		BL::ShaderNodeTexLyapunov b_lyapunov_node(b_node);
+		LyapunovTextureNode *lyapunov = new LyapunovTextureNode();
+
+		lyapunov->lyap_fac_type = LyapunovTextureNode::fac_type_enum[(int)b_lyapunov_node.lyap_fac_type()];
+		lyapunov->lyap_render_type = LyapunovTextureNode::render_type_enum[(int)b_lyapunov_node.lyap_render_type()];
+
+		get_tex_mapping(&lyapunov->tex_mapping, b_lyapunov_node.texture_mapping());
+		node = lyapunov;
+	}
 	else if (b_node.is_a(&RNA_ShaderNodeTexCoord)) {
 		BL::ShaderNodeTexCoord b_tex_coord_node(b_node);
 		TextureCoordinateNode *tex_coord = new TextureCoordinateNode();
Index: intern/cycles/blender/addon/ui.py
===================================================================
--- intern/cycles/blender/addon/ui.py	(Revision 61250)
+++ intern/cycles/blender/addon/ui.py	(Arbeitskopie)
@@ -1347,6 +1347,7 @@
         types.TEXTURE_PT_wood,
         types.TEXTURE_PT_marble,
         types.TEXTURE_PT_magic,
+        types.TEXTURE_PT_lyapunov,
         types.TEXTURE_PT_blend,
         types.TEXTURE_PT_stucci,
         types.TEXTURE_PT_image,
Index: intern/cycles/render/nodes.cpp
===================================================================
--- intern/cycles/render/nodes.cpp	(Revision 61250)
+++ intern/cycles/render/nodes.cpp	(Arbeitskopie)
@@ -1046,6 +1046,126 @@
 	compiler.add(this, "node_magic_texture");
 }
 
+/* Lyapunov Texture */
+static ShaderEnum lyap_fac_type_init()
+{
+	ShaderEnum enm;
+	enm.insert("spread", NODE_LYAPUNOV_SPREAD);
+	enm.insert("abs", NODE_LYAPUNOV_ABS);
+	enm.insert("real", NODE_LYAPUNOV_REAL);
+	enm.insert("color", NODE_LYAPUNOV_COLOR);
+	return enm;
+}
+
+static ShaderEnum lyap_render_type_init()
+{
+	ShaderEnum enm;
+	enm.insert("negative", NODE_LYAPUNOV_NEG);
+	enm.insert("both", NODE_LYAPUNOV_ALL);
+	enm.insert("positive", NODE_LYAPUNOV_POS);
+	return enm;
+}
+
+ShaderEnum LyapunovTextureNode::fac_type_enum = lyap_fac_type_init();
+ShaderEnum LyapunovTextureNode::render_type_enum = lyap_render_type_init();
+
+LyapunovTextureNode::LyapunovTextureNode()
+: TextureNode("lyapunov_texture")
+{
+	lyap_fac_type = ustring("SPREAD");
+	lyap_render_type = ustring("ALL");
+
+	add_input("Vector", SHADER_SOCKET_POINT, ShaderInput::TEXTURE_GENERATED);
+	add_input("Color pos", SHADER_SOCKET_COLOR);
+	add_input("Color mid", SHADER_SOCKET_COLOR);
+	add_input("Color neg", SHADER_SOCKET_COLOR);
+	add_input("Pos Scale", SHADER_SOCKET_FLOAT, 0.5f);
+	add_input("Neg Scale", SHADER_SOCKET_FLOAT, 0.5f);
+	add_input("Pre Iterations", SHADER_SOCKET_FLOAT, 0.0f);
+	add_input("Main Iterations", SHADER_SOCKET_FLOAT, 1.0f);
+	add_input("Param1", SHADER_SOCKET_FLOAT, 0.2f);
+	add_input("Param2", SHADER_SOCKET_FLOAT, 0.2f);
+	add_input("Scale", SHADER_SOCKET_FLOAT, 0.25f);
+
+	add_output("Color", SHADER_SOCKET_COLOR);
+	add_output("Fac", SHADER_SOCKET_FLOAT);
+}
+
+void LyapunovTextureNode::compile(SVMCompiler& compiler)
+{
+	ShaderInput *vector_in = input("Vector");
+	ShaderInput *lyap_pos_color_in = input("Color pos");
+	ShaderInput *lyap_mid_color_in = input("Color mid");
+	ShaderInput *lyap_neg_color_in = input("Color neg");
+	ShaderInput *lyap_pos_scale_in = input("Pos Scale");
+	ShaderInput *lyap_neg_scale_in = input("Neg Scale");
+	ShaderInput *lyap_iteration_pre_in = input("Pre Iterations");
+	ShaderInput *lyap_iteration_main_in = input("Main Iterations");
+	ShaderInput *lyap_param1_in = input("Param1");
+	ShaderInput *lyap_param2_in = input("Param2");
+	ShaderInput *scale_in = input("Scale");
+
+	ShaderOutput *color_out = output("Color");
+	ShaderOutput *fac_out = output("Fac");
+
+	//if(vector_in->link) compiler.stack_assign(vector_in);
+	compiler.stack_assign(vector_in);
+	compiler.stack_assign(lyap_pos_color_in);
+	compiler.stack_assign(lyap_mid_color_in);
+	compiler.stack_assign(lyap_neg_color_in);
+	if(lyap_pos_scale_in->link) compiler.stack_assign(lyap_pos_scale_in);
+	if(lyap_neg_scale_in->link) compiler.stack_assign(lyap_neg_scale_in);
+	if(lyap_iteration_pre_in->link) compiler.stack_assign(lyap_iteration_pre_in);
+	if(lyap_iteration_main_in->link) compiler.stack_assign(lyap_iteration_main_in);
+	if(lyap_param1_in->link) compiler.stack_assign(lyap_param1_in);
+	if(lyap_param2_in->link) compiler.stack_assign(lyap_param2_in);
+	if(scale_in->link) compiler.stack_assign(scale_in);
+
+	int vector_offset = vector_in->stack_offset;
+
+	if(!tex_mapping.skip()) {
+		vector_offset = compiler.stack_find_offset(SHADER_SOCKET_VECTOR);
+		tex_mapping.compile(compiler, vector_in->stack_offset, vector_offset);
+	}
+
+	if(!fac_out->links.empty())
+		compiler.stack_assign(fac_out);
+	if(!color_out->links.empty())
+		compiler.stack_assign(color_out);
+
+	compiler.add_node(NODE_TEX_LYAPUNOV,
+		compiler.encode_uchar4(fac_type_enum[lyap_fac_type], render_type_enum[lyap_render_type],
+					color_out->stack_offset, fac_out->stack_offset),
+		compiler.encode_uchar4(vector_offset, scale_in->stack_offset,
+					lyap_iteration_pre_in->stack_offset, lyap_iteration_main_in->stack_offset),
+		compiler.encode_uchar4(lyap_pos_color_in->stack_offset, lyap_mid_color_in->stack_offset,
+					lyap_neg_color_in->stack_offset));
+	
+	compiler.add_node( //node2
+		compiler.encode_uchar4(lyap_pos_scale_in->stack_offset, lyap_neg_scale_in->stack_offset,
+						lyap_param1_in->stack_offset, lyap_param2_in->stack_offset),
+		__float_as_int(scale_in->value.x),
+		__float_as_int(lyap_iteration_pre_in->value.x),
+		__float_as_int(lyap_iteration_main_in->value.x));
+	
+	compiler.add_node( //node3
+		__float_as_int(lyap_pos_scale_in->value.x),
+		__float_as_int(lyap_neg_scale_in->value.x),
+		__float_as_int(lyap_param1_in->value.x),
+		__float_as_int(lyap_param2_in->value.x));
+
+	if(vector_offset != vector_in->stack_offset)
+		compiler.stack_clear_offset(vector_in->type, vector_offset);
+}
+
+void LyapunovTextureNode::compile(OSLCompiler& compiler)
+{
+	tex_mapping.compile(compiler);
+	compiler.parameter("Fac Type", lyap_fac_type);
+	compiler.parameter("Render Type", lyap_render_type);
+	compiler.add(this, "node_lyapunov_texture");
+}
+
 /* Checker Texture */
 
 CheckerTextureNode::CheckerTextureNode()
Index: intern/cycles/render/nodes.h
===================================================================
--- intern/cycles/render/nodes.h	(Revision 61250)
+++ intern/cycles/render/nodes.h	(Arbeitskopie)
@@ -165,6 +165,17 @@
 	int depth;
 };
 
+class LyapunovTextureNode : public TextureNode {
+public:
+	SHADER_NODE_CLASS(LyapunovTextureNode)
+
+	ustring lyap_fac_type;
+	ustring lyap_render_type;
+
+	static ShaderEnum fac_type_enum;
+	static ShaderEnum render_type_enum;
+};
+
 class CheckerTextureNode : public TextureNode {
 public:
 	SHADER_NODE_CLASS(CheckerTextureNode)
Index: intern/cycles/kernel/CMakeLists.txt
===================================================================
--- intern/cycles/kernel/CMakeLists.txt	(Revision 61250)
+++ intern/cycles/kernel/CMakeLists.txt	(Arbeitskopie)
@@ -98,6 +98,7 @@
 	svm/svm_math.h
 	svm/svm_mix.h
 	svm/svm_musgrave.h
+	svm/svm_lyapunov.h
 	svm/svm_noise.h
 	svm/svm_noisetex.h
 	svm/svm_normal.h
Index: intern/cycles/kernel/shaders/CMakeLists.txt
===================================================================
--- intern/cycles/kernel/shaders/CMakeLists.txt	(Revision 61250)
+++ intern/cycles/kernel/shaders/CMakeLists.txt	(Arbeitskopie)
@@ -36,6 +36,7 @@
 	node_layer_weight.osl
 	node_light_falloff.osl
 	node_light_path.osl
+	node_lyapunov_texture.osl
 	node_magic_texture.osl
 	node_mapping.osl
 	node_math.osl
Index: intern/cycles/kernel/svm/svm_types.h
===================================================================
--- intern/cycles/kernel/svm/svm_types.h	(Revision 61250)
+++ intern/cycles/kernel/svm/svm_types.h	(Arbeitskopie)
@@ -58,6 +58,7 @@
 	NODE_TEX_MUSGRAVE,
 	NODE_TEX_WAVE,
 	NODE_TEX_MAGIC,
+	NODE_TEX_LYAPUNOV,
 	NODE_TEX_NOISE,
 	NODE_SHADER_JUMP,
 	NODE_SET_DISPLACEMENT,
@@ -280,6 +281,19 @@
 	NODE_MUSGRAVE_HETERO_TERRAIN
 } NodeMusgraveType;
 
+typedef enum NodeLyapunovFacType {
+	NODE_LYAPUNOV_SPREAD,
+	NODE_LYAPUNOV_ABS,
+	NODE_LYAPUNOV_REAL,
+	NODE_LYAPUNOV_COLOR
+} NodeLyapunovFacType;
+
+typedef enum NodeLyapunovRenderType {
+	NODE_LYAPUNOV_NEG,
+	NODE_LYAPUNOV_ALL,
+	NODE_LYAPUNOV_POS
+} NodeLyapunovRenderType;
+
 typedef enum NodeWaveType {
 	NODE_WAVE_BANDS,
 	NODE_WAVE_RINGS
Index: intern/cycles/kernel/svm/svm.h
===================================================================
--- intern/cycles/kernel/svm/svm.h	(Revision 61250)
+++ intern/cycles/kernel/svm/svm.h	(Arbeitskopie)
@@ -161,6 +161,7 @@
 #include "svm_invert.h"
 #include "svm_light_path.h"
 #include "svm_magic.h"
+#include "svm_lyapunov.h"
 #include "svm_mapping.h"
 #include "svm_normal.h"
 #include "svm_wave.h"
@@ -275,6 +276,9 @@
 			case NODE_TEX_MAGIC:
 				svm_node_tex_magic(kg, sd, stack, node, &offset);
 				break;
+			case NODE_TEX_LYAPUNOV:
+				svm_node_tex_lyapunov(kg, sd, stack, node, &offset);
+				break;
 			case NODE_TEX_CHECKER:
 				svm_node_tex_checker(kg, sd, stack, node);
 				break;
Index: intern/cycles/app/cycles_xml.cpp
===================================================================
--- intern/cycles/app/cycles_xml.cpp	(Revision 61250)
+++ intern/cycles/app/cycles_xml.cpp	(Arbeitskopie)
@@ -404,6 +404,12 @@
 			xml_read_int(&magic->depth, node, "depth");
 			snode = magic;
 		}
+		else if(string_iequals(node.name(), "lyapunov_texture")) {
+			LyapunovTextureNode *lyapunov = new LyapunovTextureNode();
+			xml_read_enum(&lyapunov->lyap_fac_type, LyapunovTextureNode::color_type_enum, node, "lyap_fac_type");
+			xml_read_enum(&lyapunov->lyap_render_type, LyapunovTextureNode::render_type_enum, node, "lyap_render_type");
+			snode = lyapunov;
+		}
 		else if(string_iequals(node.name(), "noise_texture")) {
 			NoiseTextureNode *dist = new NoiseTextureNode();
 			snode = dist;
Index: source/blender/editors/space_node/drawnode.c
===================================================================
--- source/blender/editors/space_node/drawnode.c	(Revision 61250)
+++ source/blender/editors/space_node/drawnode.c	(Arbeitskopie)
@@ -830,6 +830,19 @@
 	uiItemR(layout, ptr, "turbulence_depth", 0, NULL, ICON_NONE);
 }
 
+static void node_shader_buts_tex_lyapunov(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+{
+	uiLayout *col, *row;
+	
+	col = uiLayoutColumn(layout, TRUE);
+
+	row = uiLayoutRow(col, FALSE);
+	uiItemR(row, ptr, "lyap_fac_type", 0, NULL, ICON_NONE);
+	row = uiLayoutRow(col, FALSE);
+	uiItemR(row, ptr, "lyap_render_type", 0, NULL, ICON_NONE);
+
+}
+
 static void node_shader_buts_tex_brick(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
 {
 	uiLayout *col;
@@ -1034,6 +1047,9 @@
 		case SH_NODE_TEX_MAGIC:
 			ntype->uifunc = node_shader_buts_tex_magic;
 			break;
+		case SH_NODE_TEX_LYAPUNOV:
+			ntype->uifunc = node_shader_buts_tex_lyapunov;
+			break;
 		case SH_NODE_TEX_BRICK:
 			ntype->uifunc = node_shader_buts_tex_brick;
 			break;
@@ -2560,6 +2576,19 @@
 			uiItemR(row, &tex_ptr, "noise_basis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
 			break;
 
+		case TEX_LYAPUNOV:
+			row = uiLayoutRow(col, FALSE);
+			uiItemR(row, &tex_ptr, "lyap_color_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+			row = uiLayoutRow(col, FALSE);
+			uiItemR(row, &tex_ptr, "lyap_intensity_spreading", UI_ITEM_R_EXPAND, IFACE_("spread"), ICON_NONE);
+			row = uiLayoutRow(col, FALSE);
+			uiItemR(row, &tex_ptr, "lyap_pos_invert", UI_ITEM_R_EXPAND, IFACE_("invert pos"), ICON_NONE);
+			row = uiLayoutRow(col, FALSE);
+			uiItemR(row, &tex_ptr, "lyap_neg_invert", UI_ITEM_R_EXPAND, IFACE_("invert neg"), ICON_NONE);
+			row = uiLayoutRow(col, FALSE);
+			uiItemR(row, &tex_ptr, "lyap_render_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+			break;
+
 		case TEX_MAGIC:
 			uiItemR(col, &tex_ptr, "noise_depth", 0, NULL, ICON_NONE);
 			break;
Index: source/blender/render/intern/source/render_texture.c
===================================================================
--- source/blender/render/intern/source/render_texture.c	(Revision 61250)
+++ source/blender/render/intern/source/render_texture.c	(Arbeitskopie)
@@ -406,7 +406,170 @@
 }
 
 /* ------------------------------------------------------------------------- */
+static float lyap_index(Tex *tex, float a, float b, float c)
+{
+	int iter_pre =  (int)floor(tex->lyap_iteration_pre);
+	int iter_main = (int)floor(tex->lyap_iteration_main);
+	float nabla_pre = tex->lyap_iteration_pre - (float)iter_pre;
+	float nabla_main = tex->lyap_iteration_main - (float)iter_main;
+	float p1 = tex->lyap_param1;
+	float p2 = tex->lyap_param2;
+	float x = 0.0f;
+	float x_pre;
+	float index = 0.0f;
+	float index_pre;
+	float ableitung;
 
+	int i;
+	int iter = 0;
+
+	/* pre-iteration */
+	for(i = 0; i < iter_pre; i++)
+	{
+			x = p1*sin(x+a)*sin(x+a)+p2;
+			x = p1*sin(x+b)*sin(x+b)+p2;
+			x = p1*sin(x+c)*sin(x+c)+p2;
+	}
+
+	if (nabla_pre != 0.0f)
+	{
+		x_pre = x;
+		x = p1*sin(x+a)*sin(x+a)+p2;
+		x = p1*sin(x+b)*sin(x+b)+p2;
+		x = p1*sin(x+c)*sin(x+c)+p2;
+		x = x*nabla_pre + x_pre*(1.0f-nabla_pre);
+	}
+
+	/* main-iteration */
+	for(i = 0; i < iter_main; i++)
+	{
+		x = p1*sin(x+a)*sin(x+a)+p2;
+		ableitung = 2.0f*p1*sin(x+a)*cos(x+a);
+		if (ableitung != 0.0f) { index += log(fabs(ableitung)); iter++; }
+
+		x = p1*sin(x+b)*sin(x+b)+p2;
+		ableitung = 2.0f*p1*sin(x+b)*cos(x+b);
+		if (ableitung != 0.0f) { index += log(fabs(ableitung)); iter++; }
+
+		x = p1*sin(x+c)*sin(x+c)+p2;
+		ableitung = 2.0f*p1*sin(x+c)*cos(x+c);
+		if (ableitung != 0.0f) { index += log(fabs(ableitung)); iter++; }
+	}
+
+
+	if (nabla_main == 0.0f)
+	{
+		index = (iter != 0) ? index/(float)(iter) : 0.0f;
+	}
+	else
+	{
+		index_pre = (iter != 0) ? index/(float)(iter) : 0.0f;
+
+		x = p1*sin(x+a)*sin(x+a)+p2;
+		ableitung = 2.0f*p1*sin(x+a)*cos(x+a);
+		if (ableitung != 0.0f) { index += log(fabs(ableitung)); iter++; }
+
+		x = p1*sin(x+b)*sin(x+b)+p2;
+		ableitung = 2.0f*p1*sin(x+b)*cos(x+b);
+		if (ableitung != 0.0f) { index += log(fabs(ableitung)); iter++; }
+
+		x = p1*sin(x+c)*sin(x+c)+p2;
+		ableitung = 2.0f*p1*sin(x+c)*cos(x+c);
+		if (ableitung != 0.0f) { index += log(fabs(ableitung)); iter++; }
+
+		index = (iter != 0) ? index/(float)(iter) : 0.0f;
+		index = index*nabla_main + index_pre*(1.0f-nabla_main);
+	}
+
+	return(index);
+}
+
+static int lyapunov(Tex *tex, float *texvec, TexResult *texres)
+{
+	int rv = TEX_INT;
+	float index;
+
+	index = lyap_index(tex, texvec[0]*tex->noisesize*4,texvec[1]*tex->noisesize*4,texvec[2]*tex->noisesize*4);
+
+	if ( index > 0.0f && (tex->lyap_render_type != TEX_LYAP_NEG) )	{
+		index *= tex->lyap_pos_scale;
+		if (tex->lyap_flag & 2) {
+			if (index > 1.0f) { index = 1.0f; }
+			index = 1.0f - index;
+		}
+		if (tex->lyap_flag & 1) {
+			texres->tin = 0.5f + index/2.0f;
+		}
+		else {
+			texres->tin = fabs(index);
+		}
+	}
+	else if ( index < 0.0f && (tex->lyap_render_type != TEX_LYAP_POS) ) {
+		index *= tex->lyap_neg_scale;
+		if (tex->lyap_flag & 4) {
+			if (index < -1.0f) { index = -1.0f; }
+			index = -1.0f - index;
+		}
+		if (tex->lyap_flag & 1) {
+			texres->tin = 0.5f + index/2.0f;
+		}
+		else {
+			texres->tin = fabs(index);
+		}
+	}
+	else {
+		if (tex->lyap_flag & 1) {
+			texres->tin = 0.5f;
+		}
+		else {
+			texres->tin = 0.0f;
+		}
+	}
+
+
+	if (tex->lyap_color_type == TEX_LYAP_RGB) {
+		// calculate RGBA Values
+		if ( index > 0.0f && (tex->lyap_render_type != TEX_LYAP_NEG)) {
+
+			if (index > 1.0f) { index = 1.0f; }
+			texres->tr = (tex->lyap_pos_color_r - tex->lyap_mid_color_r)*index+tex->lyap_mid_color_r;
+			texres->tg = (tex->lyap_pos_color_g - tex->lyap_mid_color_g)*index+tex->lyap_mid_color_g;
+			texres->tb = (tex->lyap_pos_color_b - tex->lyap_mid_color_b)*index+tex->lyap_mid_color_b;
+			texres->ta = (tex->lyap_pos_color_a - tex->lyap_mid_color_a)*index+tex->lyap_mid_color_a;
+		}
+		else if ( index < 0.0f && (tex->lyap_render_type != TEX_LYAP_POS)) {
+
+			if (index < -1.0f) { index = -1.0f; }			
+			texres->tr = (tex->lyap_mid_color_r - tex->lyap_neg_color_r)*index+tex->lyap_mid_color_r;
+			texres->tg = (tex->lyap_mid_color_g - tex->lyap_neg_color_g)*index+tex->lyap_mid_color_g;
+			texres->tb = (tex->lyap_mid_color_b - tex->lyap_neg_color_b)*index+tex->lyap_mid_color_b;
+			texres->ta = (tex->lyap_mid_color_a - tex->lyap_neg_color_a)*index+tex->lyap_mid_color_a;
+		}
+		else {
+			texres->tr = tex->lyap_mid_color_r;
+			texres->tg = tex->lyap_mid_color_g;
+			texres->tb = tex->lyap_mid_color_b;
+			texres->ta = tex->lyap_mid_color_a;
+		}
+
+		rv |= TEX_RGB;
+	}
+
+	if (texres->nor!=NULL) {
+		// calculate bumpnormal
+		texres->nor[0] =  0.5f + lyap_index(tex, (texvec[0] + tex->nabla*tex->noisesize), texvec[1]*tex->noisesize, texvec[2]*tex->noisesize)/2.0f;
+		texres->nor[1] =  0.5f + lyap_index(tex, texvec[0]*tex->noisesize, (texvec[1] + tex->nabla)*tex->noisesize, texvec[2]*tex->noisesize)/2.0f;
+		texres->nor[2] =  0.5f + lyap_index(tex, texvec[0]*tex->noisesize, texvec[1]*tex->noisesize, (texvec[2] + tex->nabla)*tex->noisesize)/2.0f;
+		tex_normal_derivate(tex, texres);
+		rv |= TEX_NOR;
+	}
+
+	BRICONT;
+	return rv;
+}
+
+/* ------------------------------------------------------------------------- */
+
 static int magic(Tex *tex, const float texvec[3], TexResult *texres)
 {
 	float x, y, z, turb;
@@ -1124,6 +1287,9 @@
 			case TEX_MARBLE:
 				retval = marble(tex, texvec, texres);
 				break;
+			case TEX_LYAPUNOV:
+				retval= lyapunov(tex, texvec, texres);
+				break;
 			case TEX_MAGIC:
 				retval = magic(tex, texvec, texres);
 				break;
Index: source/blender/makesdna/DNA_node_types.h
===================================================================
--- source/blender/makesdna/DNA_node_types.h	(Revision 61250)
+++ source/blender/makesdna/DNA_node_types.h	(Arbeitskopie)
@@ -787,6 +787,13 @@
 	int pad;
 } NodeTexMagic;
 
+typedef struct NodeTexLyapunov {
+	NodeTexBase base;
+	int lyap_fac_type;
+	int lyap_render_type;
+	//int pad;
+} NodeTexLyapunov;
+
 typedef struct NodeShaderAttribute {
 	char name[64];
 } NodeShaderAttribute;
@@ -940,6 +947,15 @@
 #define SHD_MUSGRAVE_RIDGED_MULTIFRACTAL	3
 #define SHD_MUSGRAVE_HETERO_TERRAIN			4
 
+/* lyapunov texture */
+#define SHD_LYAPUNOV_SPREAD					0
+#define SHD_LYAPUNOV_ABS					1
+#define SHD_LYAPUNOV_REAL					2
+#define SHD_LYAPUNOV_COLOR					3
+#define SHD_LYAPUNOV_NEG					0
+#define SHD_LYAPUNOV_ALL					1
+#define SHD_LYAPUNOV_POS					2
+
 /* wave texture */
 #define SHD_WAVE_BANDS		0
 #define SHD_WAVE_RINGS		1
Index: source/blender/makesdna/DNA_texture_types.h
===================================================================
--- source/blender/makesdna/DNA_texture_types.h	(Revision 61250)
+++ source/blender/makesdna/DNA_texture_types.h	(Arbeitskopie)
@@ -254,7 +254,30 @@
 	
 	char use_nodes;
 	char pad[7];
-	
+
+	/* Lyapunov parameters */
+	short lyap_render_type , lyap_color_type, lyap_flag, pad4;
+	float lyap_iteration_pre, lyap_iteration_main;
+
+	float lyap_neg_scale, lyap_pos_scale;
+
+	float lyap_param1, lyap_param2;
+
+	float lyap_neg_color_r;
+	float lyap_neg_color_g;
+	float lyap_neg_color_b;
+	float lyap_neg_color_a;
+
+	float lyap_mid_color_r;
+	float lyap_mid_color_g;
+	float lyap_mid_color_b;
+	float lyap_mid_color_a;
+
+	float lyap_pos_color_r;
+	float lyap_pos_color_g;
+	float lyap_pos_color_b;
+	float lyap_pos_color_a;
+
 } Tex;
 
 /* used for mapping and texture nodes. note: rot is now in radians */
@@ -315,6 +338,7 @@
 #define TEX_POINTDENSITY	14
 #define TEX_VOXELDATA		15
 #define TEX_OCEAN		16
+#define TEX_LYAPUNOV	17
 
 /* musgrave stype */
 #define TEX_MFRACTAL		0
@@ -607,6 +631,14 @@
 #define TEX_OCN_GENERATE_NORMALS	1	
 #define TEX_OCN_XZ				2	
 	
+/******************** Lyapunov **************************/
+#define TEX_LYAP_ALL			0
+#define TEX_LYAP_POS			1
+#define TEX_LYAP_NEG			2
+
+#define TEX_LYAP_INT			0
+#define TEX_LYAP_RGB			1
+
 #ifdef __cplusplus
 }
 #endif
Index: source/blender/gpu/shaders/gpu_shader_material.glsl
===================================================================
--- source/blender/gpu/shaders/gpu_shader_material.glsl	(Revision 61250)
+++ source/blender/gpu/shaders/gpu_shader_material.glsl	(Arbeitskopie)
@@ -2243,6 +2243,12 @@
 	fac = 1.0;
 }
 
+void node_tex_lyapunov(vec3 p, float scale, float lyap_iteration_pre, out vec4 color, out float fac)
+{
+	color = vec4(1.0);
+	fac = 1.0;
+}
+
 void node_tex_musgrave(vec3 co, float scale, float detail, float dimension, float lacunarity, float offset, float gain, out vec4 color, out float fac)
 {
 	color = vec4(1.0);
Index: source/blender/makesrna/intern/rna_texture.c
===================================================================
--- source/blender/makesrna/intern/rna_texture.c	(Revision 61250)
+++ source/blender/makesrna/intern/rna_texture.c	(Arbeitskopie)
@@ -70,6 +70,7 @@
 	{TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_IMAGE_DATA,
 	             "Environment Map", "Create a render of the environment mapped to a texture"},
 	{TEX_IMAGE, "IMAGE", ICON_IMAGE_DATA, "Image or Movie", "Allow for images or movies to be used as textures"},
+    {TEX_LYAPUNOV, "LYAPUNOV", ICON_TEXTURE, "Lyapunov", "Procedural - color texture based on Lyapunovs fat fractals"},
 	{TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", "Procedural - color texture based on trigonometric functions"},
 	{TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", "Procedural - marble-like noise texture with wave generated bands"},
 	{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", "Procedural - highly flexible fractal noise texture"},
@@ -135,6 +136,8 @@
 			return &RNA_EnvironmentMapTexture;
 		case TEX_IMAGE:
 			return &RNA_ImageTexture;
+		case TEX_LYAPUNOV:
+			return &RNA_LyapunovTexture;
 		case TEX_MAGIC:
 			return &RNA_MagicTexture;
 		case TEX_MARBLE:
@@ -1088,6 +1091,119 @@
 
 }
 
+static void rna_def_texture_lyapunov(BlenderRNA *brna)
+{
+	StructRNA *srna;
+	PropertyRNA *prop;
+
+	static EnumPropertyItem prop_render_type[] = {
+	    {TEX_LYAP_NEG, "NEG", 0, "negativ", "Negative Lyapunov indices only"},
+	    {TEX_LYAP_ALL, "ALL", 0, "both", "Positive and negative indices"},
+	    {TEX_LYAP_POS, "POS", 0, "positive", "Positive Lyapunov indices only"},
+		{0, NULL, 0, NULL, NULL}
+	};
+
+	static EnumPropertyItem prop_color_type[] = {
+	    {TEX_LYAP_INT, "INTENSITY", 0, "intensity", "Intensity only, you can use a color ramp to colorize"},
+		{TEX_LYAP_RGB, "RGB", 0, "colors", "Renders RGBA values"},
+		{0, NULL, 0, NULL, NULL}
+	};
+
+	srna = RNA_def_struct(brna, "LyapunovTexture", "Texture");
+	RNA_def_struct_ui_text(srna, "Lyapunov Texture", "semmi's procedural fat fractal texture");
+	RNA_def_struct_sdna(srna, "Tex");
+
+	prop = RNA_def_property(srna, "lyap_render_type", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_items(prop, prop_render_type);
+	RNA_def_property_ui_text(prop, "Render Type", "");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_color_type", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_items(prop, prop_color_type);
+	RNA_def_property_ui_text(prop, "Color Type", "");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_iteration_pre", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, 0, 10);
+	RNA_def_property_ui_range(prop, 0, 100, 1, 4);
+	RNA_def_property_ui_text(prop, "Pre Iteration ", "How many steps the dynamic system iterate it's start value");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_iteration_main", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, 1, 100);
+	RNA_def_property_ui_range(prop, 1, 100, 10, 4);
+	RNA_def_property_ui_text(prop, "Main Iteration", "How many steps the dynamic system iterate (keep small to reduce rendertime)");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+
+	prop = RNA_def_property(srna, "lyap_neg_color_r", PROP_FLOAT, PROP_COLOR);
+	RNA_def_property_array(prop, 4);
+	RNA_def_property_ui_text(prop, "Neg Color", "Color for negative Lyapunov indices");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_mid_color_r", PROP_FLOAT, PROP_COLOR);
+	RNA_def_property_array(prop, 4);
+	RNA_def_property_ui_text(prop, "Mid Color", "Color for Lyapunov indices near Zero");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_pos_color_r", PROP_FLOAT, PROP_COLOR);
+	RNA_def_property_array(prop, 4);
+	RNA_def_property_ui_text(prop, "Pos Color", "Color for positive Lyapunov indices");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_neg_scale", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, 0, 2);
+	RNA_def_property_ui_range(prop, 0, 2, 1, 2);
+	RNA_def_property_ui_text(prop, "neg scale", "Scale negative Lyapunov indices");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_pos_scale", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, 0, 2);
+	RNA_def_property_ui_range(prop, 0, 2, 1, 2);
+	RNA_def_property_ui_text(prop, "pos scale", "Scale positive Lyapunov indices");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_intensity_spreading", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "lyap_flag", 1);
+	RNA_def_property_ui_text(prop, "spread Lyapunov indices", "Negative indices to intensity<0.5, positive indices to intensity>0.5 (good for col.ramps)");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_pos_invert", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "lyap_flag", 2);
+	RNA_def_property_ui_text(prop, "", "Reverse positive Lyapunov indices");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_neg_invert", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "lyap_flag", 4);
+	RNA_def_property_ui_text(prop, "", "Reverse nagative Lyapunov indices");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_param1", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, -100, 100);
+	RNA_def_property_ui_range(prop, -100, 100, 1, 2);
+	RNA_def_property_ui_text(prop, "1.Param", "First parameter for function of dynamic system");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "lyap_param2", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, -100, 100);
+	RNA_def_property_ui_range(prop, -100, 100, 1, 2);
+	RNA_def_property_ui_text(prop, "2.Param", "Second parameter for function of dynamic system");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_float_sdna(prop, NULL, "noisesize");
+	RNA_def_property_range(prop, 0.0001, FLT_MAX);
+	RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+	RNA_def_property_ui_text(prop, "Size", "Scaling the Lyapunov fractal set");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+	prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, 0.001, 0.1);
+	RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
+	RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
+	RNA_def_property_update(prop, 0, "rna_Texture_update");
+}
+
 static void rna_def_texture_magic(BlenderRNA *brna)
 {
 	StructRNA *srna;
@@ -2094,6 +2210,7 @@
 	rna_def_texture_pointdensity(brna);
 	rna_def_texture_voxeldata(brna);
 	rna_def_texture_ocean(brna);
+	rna_def_texture_lyapunov(brna);
 	/* XXX add more types here .. */
 
 	RNA_api_texture(srna);
Index: source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- source/blender/makesrna/intern/rna_nodetree.c	(Revision 61250)
+++ source/blender/makesrna/intern/rna_nodetree.c	(Arbeitskopie)
@@ -3469,6 +3469,57 @@
 	RNA_def_property_update(prop, 0, "rna_Node_update");
 }
 
+static void def_sh_tex_lyapunov(StructRNA *srna)
+{
+	static EnumPropertyItem prop_fac_type[] = {
+	    {SHD_LYAPUNOV_SPREAD, "SPREAD", 0, "spread", "spread indices for fac output"},
+		{SHD_LYAPUNOV_ABS, "ABS", 0, "abs", "absolute values from indices"},
+		{SHD_LYAPUNOV_REAL, "REAL", 0, "real", "real indices"},
+		{SHD_LYAPUNOV_COLOR, "COLOR", 0, "color", "get fac output from used colors"},
+		{0, NULL, 0, NULL, NULL}
+	};
+
+	static EnumPropertyItem prop_render_type[] = {
+	    {SHD_LYAPUNOV_NEG, "NEG", 0, "negative", "Negative Lyapunov indices only"},
+	    {SHD_LYAPUNOV_ALL, "ALL", 0, "both", "Positive and negative indices"},
+	    {SHD_LYAPUNOV_POS, "POS", 0, "positive", "Positive Lyapunov indices only"},
+		{0, NULL, 0, NULL, NULL}
+	};
+
+	PropertyRNA *prop;
+
+	RNA_def_struct_sdna_from(srna, "NodeTexLyapunov", "storage");
+	def_sh_tex(srna);
+
+	/*
+	prop = RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "depth");
+	RNA_def_property_range(prop, 0, 10);
+	RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
+	RNA_def_property_update(prop, 0, "rna_Node_update");
+	*/
+
+	/*
+	RNA_def_struct_ui_text(srna, "Lyapunov Texture", "semmi's procedural fat fractal texture");
+	RNA_def_struct_sdna(srna, "Tex");
+	RNA_def_property_update(prop, 0, "rna_Node_update");
+	*/
+
+	prop = RNA_def_property(srna, "lyap_fac_type", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_sdna(prop, NULL, "lyap_fac_type");
+	RNA_def_property_enum_items(prop, prop_fac_type);
+	RNA_def_property_ui_text(prop, "Fac Type", "");
+	RNA_def_property_update(prop, 0, "rna_Node_update");
+
+	prop = RNA_def_property(srna, "lyap_render_type", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_sdna(prop, NULL, "lyap_render_type");
+	RNA_def_property_enum_items(prop, prop_render_type);
+	RNA_def_property_ui_text(prop, "Render Type", "");
+	RNA_def_property_update(prop, 0, "rna_Node_update");
+
+
+}
+
 static void def_sh_tex_musgrave(StructRNA *srna)
 {
 	static EnumPropertyItem prop_musgrave_type[] = {
Index: source/blender/makesrna/RNA_access.h
===================================================================
--- source/blender/makesrna/RNA_access.h	(Revision 61250)
+++ source/blender/makesrna/RNA_access.h	(Arbeitskopie)
@@ -337,6 +337,7 @@
 extern StructRNA RNA_LineStyleThicknessModifier_DistanceFromObject;
 extern StructRNA RNA_LineStyleThicknessModifier_Material;
 extern StructRNA RNA_LockedTrackConstraint;
+extern StructRNA RNA_LyapunovTexture;
 extern StructRNA RNA_Macro;
 extern StructRNA RNA_MagicTexture;
 extern StructRNA RNA_MarbleTexture;
Index: source/blender/nodes/texture/nodes/node_texture_proc.c
===================================================================
--- source/blender/nodes/texture/nodes/node_texture_proc.c	(Revision 61250)
+++ source/blender/nodes/texture/nodes/node_texture_proc.c	(Arbeitskopie)
@@ -170,6 +170,52 @@
 ProcNoInputs(blend)
 ProcDef(blend)
 
+/* -- LYAPUNOV -- */
+static bNodeSocketTemplate lyapunov_inputs[]= {
+	COMMON_INPUTS,
+	{ SOCK_RGBA, 1, "Neg Color", 0.0f, 0.0f, 1.0f, 1.0f },
+	{ SOCK_RGBA, 1, "Mid Color", 0.0f, 0.0f, 0.0f, 1.0f },
+	{ SOCK_RGBA, 1, "Pos Color", 1.0f, 0.0f, 0.0f, 1.0f },
+	{ SOCK_FLOAT, 1, N_("Neg Scale"), 0.5f, 0.0f, 0.0f, 0.0f,   0.0f, 2.0f, PROP_UNSIGNED },
+	{ SOCK_FLOAT, 1, N_("Pos Scale"), 0.5f, 0.0f, 0.0f, 0.0f,   0.0f, 2.0f, PROP_UNSIGNED },
+	{ SOCK_FLOAT, 1, N_("Prev Iter"), 0.0f, 0.0f, 0.0f, 0.0f,   0.0f, 10.0f, PROP_UNSIGNED },
+	{ SOCK_FLOAT, 1, N_("Main Iter"), 1.0f, 0.0f, 0.0f, 0.0f,   1.0f, 100.0f, PROP_UNSIGNED },
+	{ SOCK_FLOAT, 1, N_("1.Param"), 2.0f, 0.0f, 0.0f, 0.0f,   -100.0f, 100.0f, PROP_NONE },
+	{ SOCK_FLOAT, 1, N_("2.Param"), 2.0f, 0.0f, 0.0f, 0.0f,   -100.0f, 100.0f, PROP_NONE },
+	{ SOCK_FLOAT, 1, N_("Size"),   0.25f, 0.0f, 0.0f, 0.0f,   0.0001f, 2.0f, PROP_UNSIGNED },
+	{ -1, 0, "" }
+};
+static void lyapunov_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
+{
+	float out[4];
+	tex_input_rgba(out, in[I+0], p, thread);
+	tex->lyap_neg_color_r = out[0];
+	tex->lyap_neg_color_g = out[1];
+	tex->lyap_neg_color_b = out[2];
+	tex->lyap_neg_color_a = out[3];
+
+	tex_input_rgba(out, in[I+1], p, thread);
+	tex->lyap_mid_color_r = out[0];
+	tex->lyap_mid_color_g = out[1];
+	tex->lyap_mid_color_b = out[2];
+	tex->lyap_mid_color_a = out[3];
+
+	tex_input_rgba(out, in[I+2], p, thread);
+	tex->lyap_pos_color_r = out[0];
+	tex->lyap_pos_color_g = out[1];
+	tex->lyap_pos_color_b = out[2];
+	tex->lyap_pos_color_a = out[3];
+
+	tex->lyap_neg_scale = tex_input_value(in[I+3], p, thread);
+	tex->lyap_pos_scale = tex_input_value(in[I+4], p, thread);
+	tex->lyap_iteration_pre = tex_input_value(in[I+5], p, thread);
+	tex->lyap_iteration_main = tex_input_value(in[I+6], p, thread);
+	tex->lyap_param1 = tex_input_value(in[I+7], p, thread);
+	tex->lyap_param2 = tex_input_value(in[I+8], p, thread);
+	tex->noisesize = tex_input_value(in[I+9], p, thread);
+}
+ProcDef(lyapunov)
+
 /* -- MAGIC -- */
 static bNodeSocketTemplate magic_inputs[] = {
 	COMMON_INPUTS,
@@ -323,3 +369,4 @@
 TexDef(TEX_NOISE,     C,  noise,     "Noise"    )
 TexDef(TEX_STUCCI,    CV, stucci,    "Stucci"   )
 TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise" )
+TexDef(TEX_LYAPUNOV,  CV, lyapunov,  "Lyapunov" )
Index: source/blender/nodes/NOD_static_types.h
===================================================================
--- source/blender/nodes/NOD_static_types.h	(Revision 61250)
+++ source/blender/nodes/NOD_static_types.h	(Arbeitskopie)
@@ -109,6 +109,7 @@
 DefNode( ShaderNode,     SH_NODE_TEX_GRADIENT,       def_sh_tex_gradient,    "TEX_GRADIENT",       TexGradient,      "Gradient Texture",  ""       )
 DefNode( ShaderNode,     SH_NODE_TEX_NOISE,          def_sh_tex_noise,       "TEX_NOISE",          TexNoise,         "Noise Texture",     ""       )
 DefNode( ShaderNode,     SH_NODE_TEX_MAGIC,          def_sh_tex_magic,       "TEX_MAGIC",          TexMagic,         "Magic Texture",     ""       )
+DefNode( ShaderNode,     SH_NODE_TEX_LYAPUNOV,       def_sh_tex_lyapunov,    "TEX_LYAPUNOV",       TexLyapunov,      "Lyapunov Texture",  ""       )
 DefNode( ShaderNode,     SH_NODE_TEX_WAVE,           def_sh_tex_wave,        "TEX_WAVE",           TexWave,          "Wave Texture",      ""       )
 DefNode( ShaderNode,     SH_NODE_TEX_MUSGRAVE,       def_sh_tex_musgrave,    "TEX_MUSGRAVE",       TexMusgrave,      "Musgrave Texture",  ""       )
 DefNode( ShaderNode,     SH_NODE_TEX_VORONOI,        def_sh_tex_voronoi,     "TEX_VORONOI",        TexVoronoi,       "Voronoi Texture",   ""       )
@@ -231,6 +232,7 @@
 DefNode( TextureNode,    TEX_NODE_PROC+TEX_VORONOI, 0,                    "TEX_VORONOI",    TexVoronoi,       "Voronoi",           ""              )
 DefNode( TextureNode,    TEX_NODE_PROC+TEX_BLEND, 0,                      "TEX_BLEND",      TexBlend,         "Blend",             ""              )
 DefNode( TextureNode,    TEX_NODE_PROC+TEX_MAGIC, 0,                      "TEX_MAGIC",      TexMagic,         "Magic",             ""              )
+DefNode( TextureNode,    TEX_NODE_PROC+TEX_LYAPUNOV, 0,                   "TEX_LYAPUNOV",   TexLyapunov,      "Lyapunov",          ""              )
 DefNode( TextureNode,    TEX_NODE_PROC+TEX_MARBLE, 0,                     "TEX_MARBLE",     TexMarble,        "Marble",            ""              )
 DefNode( TextureNode,    TEX_NODE_PROC+TEX_CLOUDS, 0,                     "TEX_CLOUDS",     TexClouds,        "Clouds",            ""              )
 DefNode( TextureNode,    TEX_NODE_PROC+TEX_WOOD, 0,                       "TEX_WOOD",       TexWood,          "Wood",              ""              )
Index: source/blender/nodes/CMakeLists.txt
===================================================================
--- source/blender/nodes/CMakeLists.txt	(Revision 61250)
+++ source/blender/nodes/CMakeLists.txt	(Arbeitskopie)
@@ -190,6 +190,7 @@
 	shader/nodes/node_shader_tex_environment.c
 	shader/nodes/node_shader_tex_gradient.c
 	shader/nodes/node_shader_tex_image.c
+	shader/nodes/node_shader_tex_lyapunov.c
 	shader/nodes/node_shader_tex_magic.c
 	shader/nodes/node_shader_tex_musgrave.c
 	shader/nodes/node_shader_tex_noise.c
Index: source/blender/nodes/NOD_texture.h
===================================================================
--- source/blender/nodes/NOD_texture.h	(Revision 61250)
+++ source/blender/nodes/NOD_texture.h	(Arbeitskopie)
@@ -72,6 +72,7 @@
 void register_node_type_tex_proc_voronoi(void);
 void register_node_type_tex_proc_blend(void);
 void register_node_type_tex_proc_magic(void);
+void register_node_type_tex_proc_lyapunov(void);
 void register_node_type_tex_proc_marble(void);
 void register_node_type_tex_proc_clouds(void);
 void register_node_type_tex_proc_wood(void);
Index: source/blender/nodes/NOD_shader.h
===================================================================
--- source/blender/nodes/NOD_shader.h	(Revision 61250)
+++ source/blender/nodes/NOD_shader.h	(Arbeitskopie)
@@ -121,6 +121,7 @@
 void register_node_type_sh_tex_voronoi(void);
 void register_node_type_sh_tex_gradient(void);
 void register_node_type_sh_tex_magic(void);
+void register_node_type_sh_tex_lyapunov(void);
 void register_node_type_sh_tex_wave(void);
 void register_node_type_sh_tex_musgrave(void);
 void register_node_type_sh_tex_noise(void);
Index: source/blender/blenkernel/BKE_node.h
===================================================================
--- source/blender/blenkernel/BKE_node.h	(Revision 61250)
+++ source/blender/blenkernel/BKE_node.h	(Arbeitskopie)
@@ -716,6 +716,7 @@
 #define SH_NODE_TEX_WAVE				149
 #define SH_NODE_TEX_NOISE				150
 #define SH_NODE_TEX_MUSGRAVE			152
+#define SH_NODE_TEX_LYAPUNOV			153
 #define SH_NODE_TEX_COORD				155
 #define SH_NODE_ADD_SHADER				156
 #define SH_NODE_TEX_ENVIRONMENT			157
Index: source/blender/blenkernel/intern/texture.c
===================================================================
--- source/blender/blenkernel/intern/texture.c	(Revision 61250)
+++ source/blender/blenkernel/intern/texture.c	(Arbeitskopie)
@@ -515,7 +515,36 @@
 	tex->vn_mexp = 2.5;
 	tex->vn_distm = 0;
 	tex->vn_coltype = 0;
+	/* lyapunov */
+	tex->lyap_render_type = TEX_LYAP_ALL;
+	tex->lyap_color_type = TEX_LYAP_INT;
+	tex->lyap_iteration_pre = 0.0f;
+	tex->lyap_iteration_main = 1.0f;
 
+	tex->lyap_neg_scale = 0.5f;
+	tex->lyap_pos_scale = 0.5f;
+
+	tex->lyap_flag = 1;
+
+	tex->lyap_param1 = 2.0f;
+	tex->lyap_param2 = 2.0f;
+
+	tex->lyap_neg_color_r = 0.0f;
+	tex->lyap_neg_color_g = 0.0f;
+	tex->lyap_neg_color_b = 1.0f;
+	tex->lyap_neg_color_a = 1.0f;
+
+	tex->lyap_mid_color_r = 0.0f;
+	tex->lyap_mid_color_g = 0.0f;
+	tex->lyap_mid_color_b = 0.0f;
+	tex->lyap_mid_color_a = 1.0f;
+
+	tex->lyap_pos_color_r = 1.0f;
+	tex->lyap_pos_color_g = 0.0f;
+	tex->lyap_pos_color_b = 0.0f;
+	tex->lyap_pos_color_a = 1.0f;
+	/* -------- */
+
 	if (tex->env) {
 		tex->env->stype = ENV_ANIM;
 		tex->env->clipsta = 0.1;
Index: source/blender/blenkernel/intern/node.c
===================================================================
--- source/blender/blenkernel/intern/node.c	(Revision 61250)
+++ source/blender/blenkernel/intern/node.c	(Arbeitskopie)
@@ -3505,6 +3505,7 @@
 	register_node_type_sh_tex_musgrave();
 	register_node_type_sh_tex_gradient();
 	register_node_type_sh_tex_magic();
+	register_node_type_sh_tex_lyapunov();
 	register_node_type_sh_tex_checker();
 	register_node_type_sh_tex_brick();
 }
@@ -3551,6 +3552,7 @@
 	register_node_type_tex_proc_blend();
 	register_node_type_tex_proc_magic();
 	register_node_type_tex_proc_marble();
+	register_node_type_tex_proc_lyapunov();
 	register_node_type_tex_proc_clouds();
 	register_node_type_tex_proc_wood();
 	register_node_type_tex_proc_musgrave();
