Blender  V3.3
eevee_velocity_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
4 
5 /* -------------------------------------------------------------------- */
12 /* Pass world space deltas to the fragment shader.
13  * This is to make sure that the resulting motion vectors are valid even with displacement. */
14 GPU_SHADER_INTERFACE_INFO(eevee_velocity_surface_iface, "motion")
15  .smooth(Type::VEC3, "prev")
16  .smooth(Type::VEC3, "next");
17 
18 GPU_SHADER_CREATE_INFO(eevee_velocity_camera)
19  .define("VELOCITY_CAMERA")
20  .uniform_buf(1, "CameraData", "camera_prev")
21  .uniform_buf(2, "CameraData", "camera_curr")
22  .uniform_buf(3, "CameraData", "camera_next");
23 
24 GPU_SHADER_CREATE_INFO(eevee_velocity_geom)
25  .define("MAT_VELOCITY")
26  .auto_resource_location(true)
27  .storage_buf(4, Qualifier::READ, "mat4", "velocity_obj_prev_buf[]", Frequency::PASS)
28  .storage_buf(5, Qualifier::READ, "mat4", "velocity_obj_next_buf[]", Frequency::PASS)
29  .storage_buf(6, Qualifier::READ, "vec4", "velocity_geo_prev_buf[]", Frequency::PASS)
30  .storage_buf(7, Qualifier::READ, "vec4", "velocity_geo_next_buf[]", Frequency::PASS)
31  .storage_buf(
32  7, Qualifier::READ, "VelocityIndex", "velocity_indirection_buf[]", Frequency::PASS)
33  .vertex_out(eevee_velocity_surface_iface)
34  .fragment_out(0, Type::VEC4, "out_velocity")
35  .additional_info("eevee_velocity_camera");
36 
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)