Fix #29715: cycles and glsl normal node not working correct.

This commit is contained in:
Brecht Van Lommel 2011-12-28 19:42:22 +00:00
parent c9830549ea
commit 9d3f5ea334
3 changed files with 1533 additions and 1603 deletions

@ -25,9 +25,9 @@ __device void svm_node_normal(KernelGlobals *kg, ShaderData *sd, float *stack, u
float3 normal = stack_load_float3(stack, in_normal_offset);
float3 direction;
direction.x = node1.x;
direction.y = node1.y;
direction.z = node1.z;
direction.x = __int_as_float(node1.x);
direction.y = __int_as_float(node1.y);
direction.z = __int_as_float(node1.z);
direction = normalize(direction);
if (stack_valid(out_normal_offset))

@ -306,7 +306,7 @@ void vec_math_negate(vec3 v, out vec3 outv)
void normal(vec3 dir, vec3 nor, out vec3 outnor, out float outdot)
{
outnor = dir;
outnor = nor;
outdot = -dot(dir, nor);
}

File diff suppressed because it is too large Load Diff