Announcement

Collapse
No announcement yet.

Accurate velocities from vertex deformation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Accurate velocities from vertex deformation

    I am working on a shader with heavy use of dynamic displacement and at some point I'd like to befriend it with motion blur and TAA.
    The problem arises from not getting accurate velocities, because world position offset for previous frame relies on simulation-driven data, that exists for current frame only.
    Am I correct assuming that I would need a set of displacement data for previous frame? Any other ways? Ideas?

    #2
    Just double buffer the previous data. There is no other way if your simulation cannot be run on vertex shader in determistic manner.

    Comment


      #3
      Indeed, there seems to be no other way and that is sad.

      Anyhow, while implementing previous frame buffer for my data and testing the results, I ran into two bugs, which apparently existed in the engine for quite some time.

      The first being PreviosFrameSwitch material expression working only with WPO, but not displacement. It should work for both.
      The second lies in fact that with tessellated surface, velocity output is simply erroneous.
      Left part of the image uses displacement and is a blurry mess, while right uses WPO. Notice the artifacting in velocity buffer.

      Comment

      Working...
      X