91 segment.is_end_of_segment = is_cylinder &&
93 if (is_cylinder && !segment.is_end_of_segment && (segment.id & 1u) == 0u) {
110 constexpr int cyclic_endpoint_pivot =
INT_MAX / 2;
111 constexpr int end_of_curve =
INT_MAX;
114 if (indirection_value == end_of_curve) {
118 else if (indirection_value >= 0) {
123 else if (indirection_value <= -cyclic_endpoint_pivot) {
126 ind.
curve_segment = -indirection_value - cyclic_endpoint_pivot;
141 bool is_end_of_segment = (segment.v_idx & 1u) != 0u;
144 if (!is_end_of_segment) {
155 return int(segment.id) + indirection.
curve_id + int(segment.v_idx & 1u);
157 return int(segment.id) - indirection.
curve_id;
168 else if (is_cylinder) {
172 offset =
float(segment.v_idx);
174 return offset * 2.0f - 1.0f;
200 bool restart_strip = indirection.
is_end_of_curve || segment.is_end_of_segment;
245 shape.
P = pt.
P + shape.
N * (is_strand ? 0.0f : pt.
radius);
251 int curve_start = point_id - curve_segment;
#define DRW_OBJ_DATA_INFO_UBO_SLOT
VecBase< float, D > normalize(VecOp< float, D >) RET
VecBase< float, 3 > cross(VecOp< float, 3 >, VecOp< float, 3 >) RET
float length(VecOp< float, D >) RET
TEX_TEMPLATE DataVec texelFetch(T, IntCoord, int) RET
SamplerBase< float, 1 > samplerBuffer
SamplerBase< int, 1 > isamplerBuffer
float sin_from_cos(float c)
float3 to_scale(float3x3 mat)
MatBase< float, 4, 4 > float4x4
float3 get_customdata_vec3(const int curve_id, const samplerBuffer cd_buf)
float2 get_customdata_vec2(const int curve_id, const samplerBuffer cd_buf)
float4 get_customdata_vec4(const int curve_id, const samplerBuffer cd_buf)
float get_customdata_float(const int curve_id, const samplerBuffer cd_buf)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
uint half_cylinder_face_count
float3 get_curve_root_pos(const int point_id, const int curve_segment) const
curves::Segment segment_get(uint vertex_id) const
curves::Point point_get(uint vertex_id) const
curves::Point object_to_world(curves::Point pt, float4x4 object_to_world) const
int point_id_get(curves::Segment segment, curves::Indirection indirection) const
float3 point_position_get(uint point_id) const
curves::ShapePoint shape_point_get(const curves::Point pt, const float3 V) const
curves::Indirection indirection_get(curves::Segment segment) const
samplerBuffer curves_pos_rad_buf
float azimuthal_offset_get(curves::Segment segment) const
float4 point_position_and_radius_get(uint point_id) const
isamplerBuffer curves_indirection_buf
CCL_NAMESPACE_BEGIN struct Window V