struct GridGeneric_std430_0
{
@align(4) num_active_blocks_0 : u32,
@align(4) cell_width_0 : f32,
@align(4) hmap_capacity_0 : u32,
@align(4) capacity_0 : u32,
};
@binding(0) @group(0) var<storage, read> entryPointParams_grid_0 : array<GridGeneric_std430_0>;
struct BlockVirtualId_std430_0
{
@align(16) id_0 : vec3<i32>,
};
struct ActiveBlockHeaderGeneric_std430_0
{
@align(16) virtual_id_0 : BlockVirtualId_std430_0,
@align(16) first_particle_0 : u32,
@align(4) num_particles_0 : u32,
};
@binding(1) @group(0) var<storage, read> entryPointParams_active_blocks_0 : array<ActiveBlockHeaderGeneric_std430_0>;
struct Shape_std430_0
{
@align(16) a_0 : vec4<f32>,
@align(16) b_0 : vec4<f32>,
};
@binding(2) @group(0) var<storage, read> entryPointParams_collision_shapes_0 : array<Shape_std430_0>;
struct Quat_std430_0
{
@align(16) coords_0 : vec4<f32>,
};
struct Sim3_std430_0
{
@align(16) rotation_0 : Quat_std430_0,
@align(16) translation_scale_0 : vec4<f32>,
};
@binding(3) @group(0) var<storage, read> entryPointParams_collision_shape_poses_0 : array<Sim3_std430_0>;
struct NodeCdf_std430_0
{
@align(4) distance_0 : f32,
@align(4) affinities_0 : u32,
@align(4) closest_id_0 : u32,
};
struct Node_std430_0
{
@align(16) momentum_velocity_mass_0 : vec4<f32>,
@align(16) cdf_0 : NodeCdf_std430_0,
};
@binding(4) @group(0) var<storage, read_write> entryPointParams_nodes_0 : array<Node_std430_0>;
struct BlockHeaderId_0
{
id_1 : u32,
};
fn BlockHeaderId_x24init_0( i_0 : u32) -> BlockHeaderId_0
{
var _S1 : BlockHeaderId_0;
_S1.id_1 = i_0;
return _S1;
}
struct BlockPhysicalId_0
{
id_2 : u32,
};
fn BlockPhysicalId_x24init_0( i_1 : u32) -> BlockPhysicalId_0
{
var _S2 : BlockPhysicalId_0;
_S2.id_2 = i_1;
return _S2;
}
fn block_header_id_to_physical_id_0( hid_0 : BlockHeaderId_0) -> BlockPhysicalId_0
{
return BlockPhysicalId_x24init_0(hid_0.id_1 * u32(64));
}
struct NodePhysicalId_0
{
id_3 : u32,
};
fn NodePhysicalId_x24init_0( i_2 : u32) -> NodePhysicalId_0
{
var _S3 : NodePhysicalId_0;
_S3.id_3 = i_2;
return _S3;
}
fn node_id_0( pid_0 : BlockPhysicalId_0, shift_in_block_0 : vec3<u32>) -> NodePhysicalId_0
{
return NodePhysicalId_x24init_0(pid_0.id_2 + shift_in_block_0.x + shift_in_block_0.y * u32(4) + shift_in_block_0.z * u32(4) * u32(4));
}
struct NodeCdf_0
{
distance_0 : f32,
affinities_0 : u32,
closest_id_0 : u32,
};
fn NodeCdf_x24init_0( distance_1 : f32, affinities_1 : u32, closest_id_1 : u32) -> NodeCdf_0
{
var _S4 : NodeCdf_0;
_S4.distance_0 = distance_1;
_S4.affinities_0 = affinities_1;
_S4.closest_id_0 = closest_id_1;
return _S4;
}
fn Shape_shape_type_0( this_0 : ptr<function, Shape_std430_0>) -> u32
{
return bitcast<u32>((*this_0).a_0.w);
}
fn Shape_shape_type_1( this_1 : ptr<function, Shape_std430_0>) -> u32
{
return bitcast<u32>((*this_1).a_0.w);
}
struct Ball_0
{
radius_0 : f32,
};
fn Ball_x24init_0( radius_1 : f32) -> Ball_0
{
var _S5 : Ball_0;
_S5.radius_0 = radius_1;
return _S5;
}
fn Shape_to_ball_0( this_2 : ptr<function, Shape_std430_0>) -> Ball_0
{
return Ball_x24init_0((*this_2).a_0.x);
}
fn Quat_inv_mul_vec_0( this_3 : ptr<function, Quat_std430_0>, v_0 : vec3<f32>) -> vec3<f32>
{
var _S6 : vec3<f32> = (*this_3).coords_0.xyz;
var _S7 : vec3<f32> = cross(_S6, v_0) * vec3<f32>(2.0f);
return _S7 * vec3<f32>(- (*this_3).coords_0.w) + cross(_S6, _S7) + v_0;
}
fn Sim3_inv_mul_pt_0( this_4 : ptr<function, Sim3_std430_0>, pt_0 : vec3<f32>) -> vec3<f32>
{
var _S8 : Quat_std430_0 = (*this_4).rotation_0;
var _S9 : vec3<f32> = Quat_inv_mul_vec_0(&(_S8), pt_0 - (*this_4).translation_scale_0.xyz);
return _S9 / vec3<f32>((*this_4).translation_scale_0.w);
}
struct ProjectionResult_0
{
point_0 : vec3<f32>,
is_inside_0 : bool,
};
fn ProjectionResult_x24init_0( point_1 : vec3<f32>, is_inside_1 : bool) -> ProjectionResult_0
{
var _S10 : ProjectionResult_0;
_S10.point_0 = point_1;
_S10.is_inside_0 = is_inside_1;
return _S10;
}
fn Ball_project_local_point_on_boundary_0( this_5 : Ball_0, pt_1 : vec3<f32>) -> ProjectionResult_0
{
var _S11 : f32 = length(pt_1);
return ProjectionResult_x24init_0(select(vec3<f32>(0.0f, this_5.radius_0, 0.0f), pt_1 * vec3<f32>((this_5.radius_0 / _S11)), _S11 != 0.0f), _S11 <= (this_5.radius_0));
}
fn x2A_0( q_0 : ptr<function, Quat_std430_0>, v_1 : vec3<f32>) -> vec3<f32>
{
var _S12 : vec3<f32> = (*q_0).coords_0.xyz;
var _S13 : vec3<f32> = cross(_S12, v_1) * vec3<f32>(2.0f);
return _S13 * vec3<f32>((*q_0).coords_0.w) + cross(_S12, _S13) + v_1;
}
fn Sim3_mul_pt_0( this_6 : ptr<function, Sim3_std430_0>, pt_2 : vec3<f32>) -> vec3<f32>
{
var _S14 : Quat_std430_0 = (*this_6).rotation_0;
var _S15 : vec3<f32> = x2A_0(&(_S14), pt_2 * vec3<f32>((*this_6).translation_scale_0.w));
return _S15 + (*this_6).translation_scale_0.xyz;
}
fn Ball_project_point_on_boundary_0( this_7 : Ball_0, pose_0 : ptr<function, Sim3_std430_0>, pt_3 : vec3<f32>) -> ProjectionResult_0
{
var _S16 : vec3<f32> = Sim3_inv_mul_pt_0(&((*pose_0)), pt_3);
var result_0 : ProjectionResult_0 = Ball_project_local_point_on_boundary_0(this_7, _S16);
var _S17 : vec3<f32> = Sim3_mul_pt_0(&((*pose_0)), result_0.point_0);
result_0.point_0 = _S17;
return result_0;
}
struct Cuboid_0
{
halfExtents_0 : vec3<f32>,
};
fn Cuboid_x24init_0( halfExtents_1 : vec3<f32>) -> Cuboid_0
{
var _S18 : Cuboid_0;
_S18.halfExtents_0 = halfExtents_1;
return _S18;
}
fn Shape_to_cuboid_0( this_8 : ptr<function, Shape_std430_0>) -> Cuboid_0
{
return Cuboid_x24init_0((*this_8).a_0.xyz);
}
fn Cuboid_project_local_point_0( this_9 : Cuboid_0, pt_4 : vec3<f32>) -> vec3<f32>
{
var _S19 : vec3<f32> = vec3<f32>(0.0f);
return pt_4 + (max((vec3<f32>(0) - this_9.halfExtents_0) - pt_4, _S19) - max(pt_4 - this_9.halfExtents_0, _S19));
}
fn Cuboid_project_local_point_on_boundary_0( this_10 : Cuboid_0, pt_5 : vec3<f32>) -> ProjectionResult_0
{
var _S20 : vec3<f32> = Cuboid_project_local_point_0(this_10, pt_5);
var _S21 : vec3<f32> = vec3<f32>((vec3<i32>(sign((pt_5)))));
var _S22 : vec3<f32> = _S21 + (abs(_S21) - vec3<f32>(1.0f));
var _S23 : vec3<f32> = this_10.halfExtents_0 - _S22 * pt_5;
var _S24 : f32 = _S23.x;
var _S25 : f32 = _S23.y;
var _S26 : bool;
if(_S24 <= _S25)
{
_S26 = _S24 <= (_S23.z);
}
else
{
_S26 = false;
}
var _S27 : bool;
if(_S25 <= _S24)
{
_S27 = _S25 <= (_S23.z);
}
else
{
_S27 = false;
}
var _S28 : bool = (all((pt_5 == _S20)));
return ProjectionResult_x24init_0(select(_S20, pt_5 + select(select(vec3<f32>(0.0f, 0.0f, _S23.z * _S22.z), vec3<f32>(0.0f, _S25 * _S22.y, 0.0f), _S27), vec3<f32>(_S24 * _S22.x, 0.0f, 0.0f), _S26), _S28), _S28);
}
fn Cuboid_project_point_on_boundary_0( this_11 : Cuboid_0, pose_1 : ptr<function, Sim3_std430_0>, pt_6 : vec3<f32>) -> ProjectionResult_0
{
var _S29 : vec3<f32> = Sim3_inv_mul_pt_0(&((*pose_1)), pt_6);
var result_1 : ProjectionResult_0 = Cuboid_project_local_point_on_boundary_0(this_11, _S29);
var _S30 : vec3<f32> = Sim3_mul_pt_0(&((*pose_1)), result_1.point_0);
result_1.point_0 = _S30;
return result_1;
}
struct Segment_0
{
a_1 : vec3<f32>,
b_1 : vec3<f32>,
};
fn Segment_x24init_0( a_2 : vec3<f32>, b_2 : vec3<f32>) -> Segment_0
{
var _S31 : Segment_0;
_S31.a_1 = a_2;
_S31.b_1 = b_2;
return _S31;
}
struct Capsule_0
{
segment_0 : Segment_0,
radius_2 : f32,
};
fn Capsule_x24init_0( segment_1 : Segment_0, radius_3 : f32) -> Capsule_0
{
var _S32 : Capsule_0;
_S32.segment_0 = segment_1;
_S32.radius_2 = radius_3;
return _S32;
}
fn Shape_to_capsule_0( this_12 : ptr<function, Shape_std430_0>) -> Capsule_0
{
return Capsule_x24init_0(Segment_x24init_0((*this_12).a_0.xyz, (*this_12).b_0.xyz), (*this_12).b_0.w);
}
fn Segment_project_local_point_0( this_13 : Segment_0, pt_7 : vec3<f32>) -> vec3<f32>
{
var _S33 : vec3<f32> = this_13.b_1 - this_13.a_1;
var _S34 : f32 = dot(_S33, pt_7 - this_13.a_1);
var _S35 : f32 = dot(_S33, _S33);
if(_S34 <= 0.0f)
{
return this_13.a_1;
}
else
{
if(_S34 >= _S35)
{
return this_13.b_1;
}
else
{
return this_13.a_1 + _S33 * vec3<f32>((_S34 / _S35));
}
}
}
fn orthonormal_basis3_0( v_2 : vec3<f32>, _S36 : ptr<function, array<vec3<f32>, i32(2)>>)
{
var _S37 : f32 = v_2.z;
var _S38 : f32 = select(-1.0f, 1.0f, _S37 >= 0.0f);
var _S39 : f32 = -1.0f / (_S38 + _S37);
var _S40 : f32 = v_2.x;
var _S41 : f32 = v_2.y;
var _S42 : f32 = _S40 * _S41 * _S39;
var _S43 : vec3<f32> = vec3<f32>(_S42, _S38 + _S41 * _S41 * _S39, - _S41);
(*_S36)[i32(0)] = vec3<f32>(1.0f + _S38 * _S40 * _S40 * _S39, _S38 * _S42, - _S38 * _S40);
(*_S36)[i32(1)] = _S43;
return;
}
fn any_orthogonal_vector_0( v_3 : vec3<f32>) -> vec3<f32>
{
var _S44 : array<vec3<f32>, i32(2)>;
orthonormal_basis3_0(v_3, &(_S44));
return _S44[i32(0)];
}
fn Capsule_project_local_point_on_boundary_0( this_14 : Capsule_0, pt_8 : vec3<f32>) -> ProjectionResult_0
{
var _S45 : vec3<f32> = Segment_project_local_point_0(this_14.segment_0, pt_8);
var _S46 : vec3<f32> = pt_8 - _S45;
var _S47 : f32 = length(_S46);
if(_S47 > 0.0f)
{
return ProjectionResult_x24init_0(_S45 + _S46 * vec3<f32>((this_14.radius_2 / _S47)), _S47 <= (this_14.radius_2));
}
else
{
var _S48 : vec3<f32> = this_14.segment_0.b_1 - this_14.segment_0.a_1;
return ProjectionResult_x24init_0(_S45 + any_orthogonal_vector_0(_S48 / vec3<f32>(length(_S48))) * vec3<f32>(this_14.radius_2), true);
}
}
fn Capsule_project_point_on_boundary_0( this_15 : Capsule_0, pose_2 : ptr<function, Sim3_std430_0>, pt_9 : vec3<f32>) -> ProjectionResult_0
{
var _S49 : vec3<f32> = Sim3_inv_mul_pt_0(&((*pose_2)), pt_9);
var result_2 : ProjectionResult_0 = Capsule_project_local_point_on_boundary_0(this_15, _S49);
var _S50 : vec3<f32> = Sim3_mul_pt_0(&((*pose_2)), result_2.point_0);
result_2.point_0 = _S50;
return result_2;
}
struct Cone_0
{
half_height_0 : f32,
radius_4 : f32,
};
fn Cone_x24init_0( half_height_1 : f32, radius_5 : f32) -> Cone_0
{
var _S51 : Cone_0;
_S51.half_height_0 = half_height_1;
_S51.radius_4 = radius_5;
return _S51;
}
fn Shape_to_cone_0( this_16 : ptr<function, Shape_std430_0>) -> Cone_0
{
return Cone_x24init_0((*this_16).a_0.x, (*this_16).a_0.y);
}
fn Cone_project_local_point_on_boundary_0( this_17 : Cone_0, pt_10 : vec3<f32>) -> ProjectionResult_0
{
var _S52 : vec2<f32> = pt_10.xz;
var _S53 : f32 = length(_S52);
var _S54 : vec2<f32> = select(vec2<f32>(1.0f, 0.0f), _S52 / vec2<f32>(_S53), _S53 > 0.0f);
var _S55 : f32 = - this_17.half_height_0;
var _S56 : vec3<f32> = vec3<f32>(pt_10.x, _S55, pt_10.z);
var _S57 : f32 = pt_10.y;
var _S58 : bool;
if(_S57 < _S55)
{
_S58 = _S53 <= (this_17.radius_4);
}
else
{
_S58 = false;
}
if(_S58)
{
return ProjectionResult_x24init_0(_S56, false);
}
var _S59 : vec2<f32> = _S54 * vec2<f32>(this_17.radius_4);
var _S60 : vec3<f32> = vec3<f32>(0.0f, this_17.half_height_0, 0.0f);
var _S61 : Segment_0 = Segment_x24init_0(_S60, vec3<f32>(_S59[i32(0)], _S55, _S59[i32(1)]));
var _S62 : vec3<f32> = _S61.b_1 - _S61.a_1;
var _S63 : vec3<f32> = Segment_project_local_point_0(_S61, pt_10);
var _S64 : vec3<f32> = vec3<f32>(0.0f, -2.0f * this_17.half_height_0, 0.0f);
if(_S57 >= _S55)
{
_S58 = _S57 <= (this_17.half_height_0);
}
else
{
_S58 = false;
}
if(_S58)
{
_S58 = (dot(cross(_S62, pt_10 - _S60), cross(_S62, _S64))) >= 0.0f;
}
else
{
_S58 = false;
}
if(_S58)
{
var _S65 : vec3<f32> = _S63 - pt_10;
var _S66 : vec3<f32> = _S56 - pt_10;
if((dot(_S65, _S65)) > (dot(_S66, _S66)))
{
return ProjectionResult_x24init_0(_S56, true);
}
else
{
return ProjectionResult_x24init_0(_S63, true);
}
}
else
{
return ProjectionResult_x24init_0(_S63, false);
}
}
fn Cone_project_point_on_boundary_0( this_18 : Cone_0, pose_3 : ptr<function, Sim3_std430_0>, pt_11 : vec3<f32>) -> ProjectionResult_0
{
var _S67 : vec3<f32> = Sim3_inv_mul_pt_0(&((*pose_3)), pt_11);
var result_3 : ProjectionResult_0 = Cone_project_local_point_on_boundary_0(this_18, _S67);
var _S68 : vec3<f32> = Sim3_mul_pt_0(&((*pose_3)), result_3.point_0);
result_3.point_0 = _S68;
return result_3;
}
struct Cylinder_0
{
half_height_2 : f32,
radius_6 : f32,
};
fn Cylinder_x24init_0( half_height_3 : f32, radius_7 : f32) -> Cylinder_0
{
var _S69 : Cylinder_0;
_S69.half_height_2 = half_height_3;
_S69.radius_6 = radius_7;
return _S69;
}
fn Shape_to_cylinder_0( this_19 : ptr<function, Shape_std430_0>) -> Cylinder_0
{
return Cylinder_x24init_0((*this_19).a_0.x, (*this_19).a_0.y);
}
fn Cylinder_project_local_point_on_boundary_0( this_20 : Cylinder_0, pt_12 : vec3<f32>) -> ProjectionResult_0
{
var _S70 : vec2<f32> = pt_12.xz;
var _S71 : f32 = length(_S70);
var _S72 : vec2<f32> = select(vec2<f32>(1.0f, 0.0f), _S70 / vec2<f32>(_S71), _S71 > 0.0f) * vec2<f32>(this_20.radius_6);
var _S73 : f32 = pt_12.y;
var _S74 : f32 = - this_20.half_height_2;
var _S75 : bool;
if(_S73 >= _S74)
{
_S75 = _S73 <= (this_20.half_height_2);
}
else
{
_S75 = false;
}
if(_S75)
{
_S75 = _S71 <= (this_20.radius_6);
}
else
{
_S75 = false;
}
if(_S75)
{
var _S76 : f32 = this_20.half_height_2 - _S73;
var _S77 : f32 = _S73 - _S74;
var _S78 : f32 = this_20.radius_6 - _S71;
if(_S76 < _S77)
{
_S75 = _S76 < _S78;
}
else
{
_S75 = false;
}
if(_S75)
{
return ProjectionResult_x24init_0(vec3<f32>(pt_12.x, this_20.half_height_2, pt_12.z), true);
}
else
{
if(_S77 < _S76)
{
_S75 = _S77 < _S78;
}
else
{
_S75 = false;
}
if(_S75)
{
return ProjectionResult_x24init_0(vec3<f32>(pt_12.x, _S74, pt_12.z), true);
}
else
{
return ProjectionResult_x24init_0(vec3<f32>(_S72[i32(0)], _S73, _S72[i32(1)]), true);
}
}
}
else
{
if(_S73 > (this_20.half_height_2))
{
if(_S71 <= (this_20.radius_6))
{
return ProjectionResult_x24init_0(vec3<f32>(pt_12.x, this_20.half_height_2, pt_12.z), false);
}
else
{
return ProjectionResult_x24init_0(vec3<f32>(_S72[i32(0)], this_20.half_height_2, _S72[i32(1)]), false);
}
}
else
{
if(_S73 < _S74)
{
if(_S71 <= (this_20.radius_6))
{
return ProjectionResult_x24init_0(vec3<f32>(pt_12.x, _S74, pt_12.z), false);
}
else
{
return ProjectionResult_x24init_0(vec3<f32>(_S72[i32(0)], _S74, _S72[i32(1)]), false);
}
}
else
{
return ProjectionResult_x24init_0(vec3<f32>(_S72[i32(0)], _S73, _S72[i32(1)]), false);
}
}
}
}
fn Cylinder_project_point_on_boundary_0( this_21 : Cylinder_0, pose_4 : ptr<function, Sim3_std430_0>, pt_13 : vec3<f32>) -> ProjectionResult_0
{
var _S79 : vec3<f32> = Sim3_inv_mul_pt_0(&((*pose_4)), pt_13);
var result_4 : ProjectionResult_0 = Cylinder_project_local_point_on_boundary_0(this_21, _S79);
var _S80 : vec3<f32> = Sim3_mul_pt_0(&((*pose_4)), result_4.point_0);
result_4.point_0 = _S80;
return result_4;
}
fn Shape_project_point_on_boundary_0( this_22 : ptr<function, Shape_std430_0>, pose_5 : ptr<function, Sim3_std430_0>, pt_14 : vec3<f32>) -> ProjectionResult_0
{
var _S81 : u32 = Shape_shape_type_1(&((*this_22)));
if(_S81 == u32(0))
{
var _S82 : Ball_0 = Shape_to_ball_0(&((*this_22)));
var _S83 : ProjectionResult_0 = Ball_project_point_on_boundary_0(_S82, &((*pose_5)), pt_14);
return _S83;
}
if(_S81 == u32(1))
{
var _S84 : Cuboid_0 = Shape_to_cuboid_0(&((*this_22)));
var _S85 : ProjectionResult_0 = Cuboid_project_point_on_boundary_0(_S84, &((*pose_5)), pt_14);
return _S85;
}
if(_S81 == u32(2))
{
var _S86 : Capsule_0 = Shape_to_capsule_0(&((*this_22)));
var _S87 : ProjectionResult_0 = Capsule_project_point_on_boundary_0(_S86, &((*pose_5)), pt_14);
return _S87;
}
if(_S81 == u32(3))
{
var _S88 : Cone_0 = Shape_to_cone_0(&((*this_22)));
var _S89 : ProjectionResult_0 = Cone_project_point_on_boundary_0(_S88, &((*pose_5)), pt_14);
return _S89;
}
if(_S81 == u32(4))
{
var _S90 : Cylinder_0 = Shape_to_cylinder_0(&((*this_22)));
var _S91 : ProjectionResult_0 = Cylinder_project_point_on_boundary_0(_S90, &((*pose_5)), pt_14);
return _S91;
}
return ProjectionResult_x24init_0(pt_14, false);
}
fn getCount_0() -> i32
{
var _S92 : vec2<u32> = vec2<u32>(arrayLength(&entryPointParams_collision_shapes_0), 32);
return i32(_S92.x);
}
fn collide_0( _S93 : f32, _S94 : vec3<f32>) -> NodeCdf_0
{
var cdf_1 : NodeCdf_0 = NodeCdf_x24init_0(1.0e+10f, u32(0), u32(4294967295));
var _S95 : vec3<f32> = vec3<f32>((_S93 * 1.5f));
var i_3 : u32 = u32(0);
for(;;)
{
var _S96 : i32 = getCount_0();
if(i_3 < u32(_S96))
{
}
else
{
break;
}
var _S97 : Shape_std430_0 = entryPointParams_collision_shapes_0[i_3];
var _S98 : Sim3_std430_0 = entryPointParams_collision_shape_poses_0[i_3];
var _S99 : u32 = Shape_shape_type_0(&(_S97));
var _S100 : bool;
if(_S99 != u32(5))
{
_S100 = _S99 != u32(6);
}
else
{
_S100 = false;
}
if(_S100)
{
var _S101 : ProjectionResult_0 = Shape_project_point_on_boundary_0(&(_S97), &(_S98), _S94);
var _S102 : vec3<f32> = _S101.point_0 - _S94;
var _S103 : bool;
if(_S101.is_inside_0)
{
_S103 = true;
}
else
{
_S103 = (all(((abs(_S102)) <= _S95)));
}
if(_S103)
{
var _S104 : f32 = length(_S102);
cdf_1.closest_id_0 = select(cdf_1.closest_id_0, i_3, _S104 < (cdf_1.distance_0));
cdf_1.distance_0 = min(cdf_1.distance_0, _S104);
cdf_1.affinities_0 = ((cdf_1.affinities_0) | (((select(u32(1), u32(65537), _S101.is_inside_0) << (i_3)))));
}
}
i_3 = i_3 + u32(1);
}
return cdf_1;
}
@compute
@workgroup_size(4, 4, 4)
fn grid_update(@builtin(workgroup_id) block_id_0 : vec3<u32>, @builtin(local_invocation_id) tid_0 : vec3<u32>, @builtin(local_invocation_index) tid_flat_0 : u32)
{
var _S105 : u32 = block_id_0.x;
var _S106 : NodeCdf_0 = collide_0(entryPointParams_grid_0[i32(0)].cell_width_0, vec3<f32>(entryPointParams_active_blocks_0[_S105].virtual_id_0.id_0 * vec3<i32>(i32(4)) + vec3<i32>(tid_0)) * vec3<f32>(entryPointParams_grid_0[i32(0)].cell_width_0));
entryPointParams_nodes_0[node_id_0(block_header_id_to_physical_id_0(BlockHeaderId_x24init_0(_S105)), tid_0).id_3].cdf_0.distance_0 = _S106.distance_0;
entryPointParams_nodes_0[node_id_0(block_header_id_to_physical_id_0(BlockHeaderId_x24init_0(_S105)), tid_0).id_3].cdf_0.affinities_0 = _S106.affinities_0;
entryPointParams_nodes_0[node_id_0(block_header_id_to_physical_id_0(BlockHeaderId_x24init_0(_S105)), tid_0).id_3].cdf_0.closest_id_0 = _S106.closest_id_0;
return;
}