diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-07-07 15:47:59 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-07-07 16:08:21 +0300 |
commit | a394aac8b473962061eb3d6b3dbcf9429cbac67e (patch) | |
tree | 8c2ed36662f8897cae59ed53eae70817d3287a38 /intern/cycles | |
parent | 98bee41c8a3f78c612f0c4ee587fceb2730f26b4 (diff) |
Fix T78666: Cycles non-uniformly scaled hair renders wrong for static objects
Don't apply the matrix transform optimization in this case, curve points and
radius can't represent non-uniform scale the way is possible with triangle
meshes and vertices.
This would cause abrupt change if objects had e.g. motion blur in one frame
and not in the next.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/render/object.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index c45ae5553a8..f200e409b9e 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -823,6 +823,12 @@ void ObjectManager::apply_static_transforms(DeviceScene *dscene, Scene *scene, P Mesh *mesh = static_cast<Mesh *>(geom); apply = apply && mesh->subdivision_type == Mesh::SUBDIVISION_NONE; } + else if (geom->type == Geometry::HAIR) { + /* Can't apply non-uniform scale to curves, this can't be represented by + * control points and radius alone. */ + float scale; + apply = apply && transform_uniform_scale(object->tfm, scale); + } if (apply) { if (!(motion_blur && object->use_motion())) { |