diff options
Diffstat (limited to 'intern/cycles/subd/subd_dice.cpp')
-rw-r--r-- | intern/cycles/subd/subd_dice.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/intern/cycles/subd/subd_dice.cpp b/intern/cycles/subd/subd_dice.cpp index 301f30c8d95..4f27eaf7d1b 100644 --- a/intern/cycles/subd/subd_dice.cpp +++ b/intern/cycles/subd/subd_dice.cpp @@ -58,10 +58,9 @@ void EdgeDice::reserve(int num_verts, int num_tris) int EdgeDice::add_vert(Patch *patch, float2 uv) { - float3 P, N, dPdu, dPdv; + float3 P, N; - patch->eval(&P, &dPdu, &dPdv, uv.x, uv.y); - N = normalize(cross(dPdu, dPdv)); + patch->eval(&P, NULL, NULL, &N, uv.x, uv.y); assert(vert_offset < params.mesh->verts.size()); @@ -81,7 +80,7 @@ int EdgeDice::add_vert(Patch *patch, float2 uv) void EdgeDice::add_triangle(Patch *patch, int v0, int v1, int v2) { - params.mesh->add_triangle(v0, v1, v2, params.shader, params.smooth); + params.mesh->add_triangle(v0, v1, v2, params.shader, params.smooth, false); if(params.ptex) { Attribute *attr_ptex_face_id = params.mesh->attributes.add(ATTR_STD_PTEX_FACE_ID); @@ -159,7 +158,7 @@ float3 QuadDice::eval_projected(SubPatch& sub, float u, float v) float2 uv = map_uv(sub, u, v); float3 P; - sub.patch->eval(&P, NULL, NULL, uv.x, uv.y); + sub.patch->eval(&P, NULL, NULL, NULL, uv.x, uv.y); if(params.camera) P = transform_perspective(¶ms.camera->worldtoraster, P); |