Page MenuHome

Fix T75539: Cycles. Update geometry when switching displacements
Needs ReviewPublic

Authored by Joan Bonet Orantos (LaTerreta) on Tue, Sep 15, 11:58 AM.

Details

Summary

We only updated the mesh attribute request to undisplaced position
when switching from "Displacement and Bump" to "Bump Only", but
we forgot to do it when switching from "Displacement Only" to
"Bump Only"

Diff Detail

Repository
rB Blender
Branch
T75539 (branched from master)
Build Status
Buildable 10203
Build 10203: arc lint + arc unit

Event Timeline

Joan Bonet Orantos (LaTerreta) requested review of this revision.Tue, Sep 15, 11:58 AM
Joan Bonet Orantos (LaTerreta) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Tue, Sep 15, 12:43 PM

Undisplaced positions are only needed for "Displacement and Bump", and always enabling them for "Displacement" wastes memory.

Adding them here will indirectly force the geometry to be updated, but we need a more direct solution. Probably the geometry could store if it has been displaced, and then if displacement method is bump and there is displaced geometry, it can be marked for update.

This revision now requires changes to proceed.Tue, Sep 15, 12:43 PM
  • track if geometry was displaced, and mark it for update if displace method is BUMP

Did you mean something like this? I am getting familiar with the code, so I hope I am not that off