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.
This commit is contained in:
parent
98bee41c8a
commit
a394aac8b4
Notes:
blender-bot
2024-05-02 21:33:31 +02:00
Referenced by issue #78666, Non-Uniform scaling of hair emitters results in incorrect Cycles renders
|
@ -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())) {
|
||||
|
|
Loading…
Reference in New Issue