18 return kernel_data_fetch(objects,
object).gsplat.radiance_base_offset_and_flag >> 1;
25 return kernel_data_fetch(objects,
object).gsplat.radiance_base_offset_and_flag & 1;
65#if defined(__GSPLATS__)
72 return motion_point(kg,
object, prim, time);
84 const int max_step = *num_steps - 1;
85 *
step =
min((
int)(time * max_step), max_step - 1);
96 offset += motion_point_offset_for_step(num_verts, num_steps,
step);
128 motion_gsplat_compute_info(kg,
object, time, &num_steps, &
step, &t);
132 kg, offset, num_verts, num_steps,
step, prim);
133 const Quaternion next_rotation = motion_gsplat_rotation_for_step(
134 kg, offset, num_verts, num_steps,
step + 1, prim);
137 return motion_gsplat_rotation_interpolate(rotation, next_rotation, t);
147 offset += motion_point_offset_for_step(num_verts, num_steps,
step);
165 motion_gsplat_compute_info(kg,
object, time, &num_steps, &
step, &t);
168 const float4 radiance_base = motion_gsplat_radiance_base_for_step(
169 kg, offset, num_verts, num_steps,
step, prim);
170 const float4 next_radiance_base = motion_gsplat_radiance_base_for_step(
171 kg, offset, num_verts, num_steps,
step + 1, prim);
174 return mix(radiance_base, next_radiance_base, t);
184 offset += motion_point_offset_for_step(num_verts, num_steps,
step);
202 motion_gsplat_compute_info(kg,
object, time, &num_steps, &
step, &t);
205 const float3 scale = motion_gsplat_scale_for_step(kg, offset, num_verts, num_steps,
step, prim);
206 const float3 next_scale = motion_gsplat_scale_for_step(
207 kg, offset, num_verts, num_steps,
step + 1, prim);
226struct GSplatMotionInfo {
228 int offset_for_next_step;
236 GSplatMotionInfo prim_motion_info;
240 motion_gsplat_compute_info(kg,
object, time, &num_steps, &
step, &prim_motion_info.t);
242 prim_motion_info.offset_for_step = motion_point_offset_for_step(num_verts, num_steps,
step);
243 prim_motion_info.offset_for_next_step = motion_point_offset_for_step(
244 num_verts, num_steps,
step + 1);
246 return prim_motion_info;
257 motion_info.offset_for_step + offset);
259 motion_info.offset_for_next_step + offset);
260 return mix(
scale, next_scale, motion_info.t);
274 motion_info.offset_for_step + offset);
276 motion_info.offset_for_next_step + offset);
277 return motion_gsplat_rotation_interpolate(rotation, next_rotation, motion_info.t);
289 const float opacity =
291 const float next_opacity =
292 kernel_data_fetch(attributes_float4, motion_info.offset_for_next_step + offset).w;
293 return mix(opacity, next_opacity, motion_info.t);
#define kernel_assert(cond)
#define ccl_device_forceinline
#define kernel_data_fetch(name, index)
#define ccl_device_inline
#define CCL_NAMESPACE_END
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
float3x3 scale(float3x3 mat, float2 scale)
ccl_device_inline Quaternion normalized(const Quaternion q)
CCL_NAMESPACE_BEGIN ccl_device_forceinline int gsplat_attr_radiance_base_offset(KernelGlobals kg, const int object)
ccl_device_forceinline int gsplat_attr_scale_offset(KernelGlobals kg, const int object)
ccl_device_forceinline int gsplat_attr_rotation_has_motion(KernelGlobals kg, const int object)
ccl_device_forceinline int gsplat_attr_scale_has_motion(KernelGlobals kg, const int object)
ccl_device_forceinline int gsplat_attr_rotation_offset(KernelGlobals kg, const int object)
ccl_device_forceinline int gsplat_attr_radiance_base_has_motion(KernelGlobals kg, const int object)
std::string time(const std::tm &date_time, TimeFormat format=TimeFormat::H24)
constexpr StringRefNull rotation