This commit is contained in:
ZY4N
2025-03-28 13:09:34 +01:00
parent 6f60cc11c8
commit d18b40a7fc
34 changed files with 393 additions and 272 deletions

View File

@@ -2,6 +2,8 @@
#include <tuple>
#include "config/primitives.hpp"
#include "assets/identifiers.hpp"
#include "assets/data_stores/texture_store.hpp"
#include "assets/data/surface_properties.hpp"
#include "util/enum_bitfield_operators.hpp"
@@ -9,28 +11,27 @@
namespace assets::material_components
{
using surface_properties = surface_properties;
using transparency = float;
using ambient_color_texture = texture_store::id_type;
using diffuse_color_texture = texture_store::id_type;
using specular_color_texture = texture_store::id_type;
using shininess_texture = texture_store::id_type;
using alpha_texture = texture_store::id_type;
using bump_texture = texture_store::id_type;
using transparency = z3d::f32;
using ambient_color_texture = texture_id;
using diffuse_color_texture = texture_id;
using specular_color_texture = texture_id;
using shininess_texture = texture_id;
using alpha_texture = texture_id;
using bump_texture = texture_id;
namespace indices
{
using type = std::size_t;
inline constexpr type surface_properties = 0;
inline constexpr type transparency = 1;
inline constexpr type ambient_color_texture = 2;
inline constexpr type diffuse_color_texture = 3;
inline constexpr type specular_color_texture = 4;
inline constexpr type shininess_texture = 5;
inline constexpr type alpha_texture = 6;
inline constexpr type bump_texture = 7;
inline constexpr z3d::size surface_properties = 0;
inline constexpr z3d::size transparency = 1;
inline constexpr z3d::size ambient_color_texture = 2;
inline constexpr z3d::size diffuse_color_texture = 3;
inline constexpr z3d::size specular_color_texture = 4;
inline constexpr z3d::size shininess_texture = 5;
inline constexpr z3d::size alpha_texture = 6;
inline constexpr z3d::size bump_texture = 7;
}
enum class flags : std::uint8_t
enum class flags : z3d::u8
{
none = 0,
surface_properties = 1 << indices::surface_properties,
@@ -43,7 +44,7 @@ enum class flags : std::uint8_t
bump_texture = 1 << indices::bump_texture
};
using all = std::tuple<
using all = z3d::structure<
surface_properties,
transparency,
ambient_color_texture,