27 const float tframe =
floorf(frame);
28 const float range = frame - tframe;
29 r_index_range[0] =
int(tframe);
32 r_index_range[1] = r_index_range[0];
37 r_index_range[1] = r_index_range[0] + 1;
42 if ((r_index_range[0] >= frame_tot) || (r_index_range[1] >= frame_tot)) {
43 r_index_range[0] = r_index_range[1] = frame_tot - 1;
46 else if ((r_index_range[0] < 0) || (r_index_range[1] < 0)) {
47 r_index_range[0] = r_index_range[1] = 0;
MINLINE int round_fl_to_int(float a)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
@ MOD_MESHCACHE_INTERP_NONE
void MOD_meshcache_calc_range(const float frame, const char interp, const int frame_tot, int r_index_range[2], float *r_factor)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
ccl_device_inline float2 interp(const float2 a, const float2 b, float t)