Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-07-13 18:31:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-07-21 16:50:35 +0300
commite022753d7a675604e507b156b2dae658cd6d7a0c (patch)
tree6c9cc65bec18fc3502cd9067af50fbadbb41e97e /source/blender/draw/engines/eevee_next/eevee_velocity.hh
parent2bad3577c079a738030ec252e906122c24315e98 (diff)
EEVEE-Next: Add Temporal-AntiAliasing
The improvements over the old implementation are: - Improved history reprojection filter (catmull-rom) - Use proper velocity for history reprojection. - History clipping is now done in YCoCg color space using better algorithm. - Velocity is dilated to keep correct edge anti-aliasing on moving objects. As a result, the 3x3 blocks that made the image smoother in the previous implementation are no longer visible is replaced by correct antialiasing. This removes the velocity resolve pass in order to reduce the bandwidth usage. The velocities are just resolved as they are loadded in the film pass.
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_velocity.hh')
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_velocity.hh61
1 files changed, 3 insertions, 58 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_velocity.hh b/source/blender/draw/engines/eevee_next/eevee_velocity.hh
index e2606c061e1..826cd631a96 100644
--- a/source/blender/draw/engines/eevee_next/eevee_velocity.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_velocity.hh
@@ -27,8 +27,6 @@ namespace blender::eevee {
/** Container for scene velocity data. */
class VelocityModule {
- friend class VelocityView;
-
public:
struct VelocityObjectData : public VelocityIndex {
/** ID to retrieve the corresponding #VelocityGeometryData after copy. */
@@ -69,15 +67,6 @@ class VelocityModule {
eVelocityStep step_ = STEP_CURRENT;
- DRWPass *resolve_ps_ = nullptr;
-
- /** Reference only. Not owned. */
- GPUTexture *input_depth_tx_;
- GPUTexture *velocity_view_tx_;
- GPUTexture *velocity_camera_tx_;
-
- int3 resolve_dispatch_size_ = int3(1, 1, 1);
-
public:
VelocityModule(Instance &inst) : inst_(inst)
{
@@ -89,6 +78,7 @@ class VelocityModule {
}
for (CameraDataBuf *&step_buf : camera_steps) {
step_buf = new CameraDataBuf();
+ /* */
}
};
@@ -121,56 +111,11 @@ class VelocityModule {
void bind_resources(DRWShadingGroup *grp);
+ bool camera_has_motion() const;
+
private:
bool object_has_velocity(const Object *ob);
bool object_is_deform(const Object *ob);
-
- void resolve_camera_motion(GPUTexture *depth_tx,
- GPUTexture *velocity_view_tx,
- GPUTexture *velocity_camera_tx);
-};
-
-/** \} */
-
-/* -------------------------------------------------------------------- */
-/** \name Velocity
- *
- * \{ */
-
-/**
- * Per view module.
- */
-class VelocityView {
- private:
- Instance &inst_;
-
- StringRefNull view_name_;
-
- TextureFromPool velocity_camera_tx_ = {"velocity_camera_tx_"};
- TextureFromPool velocity_view_tx_ = {"velocity_view_tx_"};
-
- public:
- VelocityView(Instance &inst, const char *name) : inst_(inst), view_name_(name){};
- ~VelocityView(){};
-
- void sync();
-
- void acquire(int2 extent);
- void release();
-
- void resolve(GPUTexture *depth_tx);
-
- /**
- * Getters
- **/
- GPUTexture *view_vectors_get() const
- {
- return velocity_view_tx_;
- }
- GPUTexture *camera_vectors_get() const
- {
- return (velocity_camera_tx_.is_valid()) ? velocity_camera_tx_ : velocity_view_tx_;
- }
};
/** \} */