|
Blender V5.3
|
#include <eevee_velocity.bsl.hh>
Public Member Functions | |
| float4 | equirect_motion_wrap (float4 motion) const |
| float4 | surface_velocity (float3 P_prv, float3 P, float3 P_nxt) const |
| float4 | surface_velocity_local (const ViewMatrices &view, float3 P_prv, float3 P, float3 P_nxt) const |
| float3 | background_world_direction (const ViewMatrices &view, float2 uv) const |
| float4 | resolve_local (const ViewMatrices &view, float4 vector_local, float2 uv, float depth) const |
| float4 | resolve_local (const draw::View &views, sampler2D vector_tx, int2 texel, float depth) const |
| float4 | local_to_panoramic (const ViewMatrices &view, float4 local_motion, float2 uv, float depth) const |
| bool | panoramic_uv_is_valid (CameraData cam, float3 dir, float2 uv) const |
| bool | panoramic_validate_uvs (float3 curr_dir, float2 curr_uv, float3 prev_dir, float2 prev_uv, float3 next_dir, float2 next_uv) const |
| float4 | resolve_panoramic (const draw::View &views, sampler2D vector_tx, int2 texel, float depth) const |
Public Attributes | |
| const CameraData & | camera_prev |
| const CameraData & | camera_curr |
| const CameraData & | camera_next |
Definition at line 64 of file eevee_velocity.bsl.hh.
|
inline |
Definition at line 156 of file eevee_velocity.bsl.hh.
References ViewMatrices::point_screen_to_view(), transform_direction(), ViewMatrices::view_incident_vector(), and ViewMatrices::viewinv.
Referenced by resolve_local(), and resolve_panoramic().
Definition at line 69 of file eevee_velocity.bsl.hh.
References abs, camera_curr, M_TAU, and round.
Referenced by local_to_panoramic(), resolve_panoramic(), and surface_velocity().
|
inline |
Converts local NDC motion (see resolve_local()) to panoramic UV.
Definition at line 225 of file eevee_velocity.bsl.hh.
References camera_curr, camera_next, camera_prev, equirect_motion_wrap(), normalize, P, panoramic_validate_uvs(), ViewMatrices::point_screen_to_world(), surface_velocity_local(), transform_point(), and eevee::camera::uv_from_view().
Referenced by resolve_panoramic().
|
inline |
Whether uv, from uv_from_view(cam, dir), actually maps back to dir.
Definition at line 261 of file eevee_velocity.bsl.hh.
References dot(), and eevee::camera::view_from_uv().
Referenced by panoramic_validate_uvs().
|
inline |
Shared by local_to_panoramic() and resolve()'s background case to whether the 3 reprojected uvs are in range and panoramic_uv_is_valid() for their camera.
Definition at line 274 of file eevee_velocity.bsl.hh.
References abs, any(), camera_curr, camera_next, camera_prev, greaterThan, isnan, and panoramic_uv_is_valid().
Referenced by local_to_panoramic(), and resolve_panoramic().
|
inline |
Load and resolve correct velocity as some pixels might still not have correct motion data for performance reasons. Returns motion vector in this cubeface's own local NDC space.
Definition at line 216 of file eevee_velocity.bsl.hh.
References draw::View::get(), resolve_local(), texelFetch(), and textureSize().
|
inline |
Resolves RenderBuffers::vector_tx into this cubeface's own local NDC space. Real motion is a plain unpack, already written by surface_velocity_local() in the depth pre-pass. Background/no-data pixels fall back to reprojecting a static point/direction.
Definition at line 168 of file eevee_velocity.bsl.hh.
References abs, any(), background_world_direction(), camera_curr, camera_next, camera_prev, greaterThan, isnan, P, ViewMatrices::point_screen_to_world(), project_point(), surface_velocity_local(), transform_direction(), eevee::velocity::unpack(), V, VELOCITY_INVALID, ViewMatrices::viewmat, ViewMatrices::winmat, and float4::x.
Referenced by resolve_local(), and resolve_panoramic().
|
inline |
Panoramic UV variant of resolve_local().
Definition at line 295 of file eevee_velocity.bsl.hh.
References background_world_direction(), camera_curr, camera_next, camera_prev, equirect_motion_wrap(), draw::View::get(), local_to_panoramic(), panoramic_validate_uvs(), resolve_local(), texelFetch(), textureSize(), transform_direction(), eevee::camera::uv_from_view(), V, and VELOCITY_INVALID.
|
inline |
Given a triple of position, compute the previous and next motion vectors. Returns uv space motion vectors in pairs (motion_prev.xy, motion_next.xy).
Definition at line 82 of file eevee_velocity.bsl.hh.
References any(), camera_curr, camera_next, camera_prev, equirect_motion_wrap(), isnan, P, project_point(), transform_point(), and eevee::camera::uv_from_view().
Referenced by surface_velocity_local().
|
inline |
Face-local variant of surface_velocity(), for RenderBuffers::vector_tx. Called from the depth pre-pass with the true P_prv/P_nxt, and from resolve_local()'s static-geometry fallback with P_prv == P == P_nxt.
Definition at line 129 of file eevee_velocity.bsl.hh.
References abs, any(), camera_curr, camera_next, camera_prev, greaterThan, isnan, P, project_point(), surface_velocity(), transform_point(), ViewMatrices::viewmat, and ViewMatrices::winmat.
Referenced by local_to_panoramic(), and resolve_local().
| const CameraData& eevee::CameraVelocity::camera_curr |
Definition at line 66 of file eevee_velocity.bsl.hh.
Referenced by equirect_motion_wrap(), local_to_panoramic(), panoramic_validate_uvs(), resolve_local(), resolve_panoramic(), surface_velocity(), and surface_velocity_local().
| const CameraData& eevee::CameraVelocity::camera_next |
Definition at line 67 of file eevee_velocity.bsl.hh.
Referenced by local_to_panoramic(), panoramic_validate_uvs(), resolve_local(), resolve_panoramic(), surface_velocity(), and surface_velocity_local().
| const CameraData& eevee::CameraVelocity::camera_prev |
Definition at line 65 of file eevee_velocity.bsl.hh.
Referenced by local_to_panoramic(), panoramic_validate_uvs(), resolve_local(), resolve_panoramic(), surface_velocity(), and surface_velocity_local().