Cycles OSL: small optimization to geometry node, tangent output still was

not properly optimized out in some cases.

For reference, setting this will give detailed information about OSL shaders:
export OSL_OPTIONS="statistics:level=1,debug=1,llvm_debug=1"
This commit is contained in:
Brecht Van Lommel
2012-12-16 09:37:32 +00:00
parent e114459ba3
commit 176292067e
2 changed files with 1 additions and 5 deletions

View File

@@ -172,9 +172,6 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
break; break;
} }
case OSL::ClosurePrimitive::Emissive: { case OSL::ClosurePrimitive::Emissive: {
if (sd->num_closure == MAX_CLOSURE)
return;
/* sample weight */ /* sample weight */
float sample_weight = fabsf(average(weight)); float sample_weight = fabsf(average(weight));

View File

@@ -56,8 +56,7 @@ shader node_geometry(
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.5, -0.5, 0.0, 1.0); 0.5, -0.5, 0.0, 1.0);
vector T = transform(project, generated); vector T = transform("object", "world", transform(project, generated));
T = transform("object", "world", T);
Tangent = cross(Normal, normalize(cross(T, Normal))); Tangent = cross(Normal, normalize(cross(T, Normal)));
} }
else { else {