#pragma once #include "shader_program/attributes/point_cloud_attributes.hpp" #include "shader_program/uniforms/point_cloud_uniforms.hpp" #include "assets/components/mesh_vertex_components.hpp" #include "assets/components/point_cloud_vertex_components.hpp" #include namespace shader_program::capabilities::point_cloud { struct type { attributes::point_cloud::flags attributes{ attributes::point_cloud::flags::none }; uniforms::point_cloud::flags uniforms{ uniforms::point_cloud::flags::none }; }; namespace indices { using type = ztu::u8; constexpr inline type position = 0; constexpr inline type vertex_color = 1; constexpr inline type uniform_color = 2; constexpr inline type normal = 3; constexpr inline type reflectance = 4; constexpr inline type rainbow = 5; } enum class flags : int { none = 0, position = 1 << indices::position, vertex_color = 1 << indices::vertex_color, uniform_color = 1 << indices::uniform_color, normal = 1 << indices::normal, reflectance = 1 << indices::reflectance, rainbow = 1 << indices::rainbow }; constexpr inline auto position = type{ .attributes = attributes::point_cloud::flags::position, .uniforms = uniforms::point_cloud::flags::mvp }; constexpr inline auto rainbow = type{}; constexpr inline auto vertex_color = type{ .attributes = attributes::point_cloud::flags::color }; constexpr inline auto uniform_color = type{ .uniforms = uniforms::point_cloud::flags::color }; constexpr inline auto normal = type{ .attributes = attributes::point_cloud::flags::normal, .uniforms = ( uniforms::point_cloud::flags::model | uniforms::point_cloud::flags::camera_position ) }; constexpr inline auto reflectance = type{ .attributes = attributes::point_cloud::flags::reflectance }; constexpr inline auto all = std::array{ position, vertex_color, uniform_color, normal, reflectance, rainbow }; }