INNER CODE UNIT · C++

indirect_vertex_index_offset

oxylusengine/Oxylus · ResourceCompiler/private/ModelCompiler.cpp:415

        auto indirect_vertex_index_offset = raw_meshlet.vertex_offset + local_triangle_index;
        auto indirect_vertex_index = indirect_vertex_indices[indirect_vertex_index_offset];

        const auto& tri_pos = positions[indirect_vertex_index];
        meshlet_bb_min = glm::min(meshlet_bb_min, tri_pos);
        meshlet_bb_max = glm::max(meshlet_bb_max, tri_pos);
      }

      auto meshlet_bounds = meshopt_computeMeshletBounds(
        &indirect_vertex_indices[raw_meshlet.vertex_offset],
        &local_triangle_indices[raw_meshlet.triangle_offset],
        raw_meshlet.triangle_count,
        reinterpret_cast<const f32*>(positions.data()),
        vertex_count,
        sizeof(glm::vec3)
      );

      auto meshlet_aabb_center = (meshlet_bb_max + meshlet_bb_min) * 0.5f;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…