[Bf-blender-cvs] [8478d41] object_nodes: Use (1, 0, 0) and (0, 1, 0) as derivatives of texvec when no explicit derivatives are given.

Lukas Tönne noreply at git.blender.org
Wed May 25 17:36:10 CEST 2016


Commit: 8478d4127e93aea42d28f7dc41793ce4c22528bf
Author: Lukas Tönne
Date:   Wed May 25 17:34:46 2016 +0200
Branches: object_nodes
https://developer.blender.org/rB8478d4127e93aea42d28f7dc41793ce4c22528bf

Use (1,0,0) and (0,1,0) as derivatives of texvec when no explicit derivatives are given.

This is a bit stupid, but allows testing the system without major changes
to old textures or the displacement modifier.

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

M	source/blender/blenvm/intern/bvm_api.cc

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

diff --git a/source/blender/blenvm/intern/bvm_api.cc b/source/blender/blenvm/intern/bvm_api.cc
index 5abf92c..3a47fb9 100644
--- a/source/blender/blenvm/intern/bvm_api.cc
+++ b/source/blender/blenvm/intern/bvm_api.cc
@@ -665,11 +665,11 @@ void BVM_eval_texture_llvm(struct BVMEvalContext *UNUSED(ctx), struct BVMFunctio
 	if (dxt)
 		coord_v.set_dx(float3(dxt[0], dxt[1], dxt[2]));
 	else
-		coord_v.set_dx(float3(0.0f, 0.0f, 0.0f));
+		coord_v.set_dx(float3(1.0f, 0.0f, 0.0f));
 	if (dyt)
 		coord_v.set_dy(float3(dyt[0], dyt[1], dyt[2]));
 	else
-		coord_v.set_dy(float3(0.0f, 0.0f, 0.0f));
+		coord_v.set_dy(float3(0.0f, 1.0f, 0.0f));
 	
 	fp(&r_color, &r_normal, &coord_v, cfra, osatex);
 #else




More information about the Bf-blender-cvs mailing list