78 lines
1.9 KiB
C++
78 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include <tuple>
|
|
|
|
#include "config/primitives.hpp"
|
|
#include "assets/identifiers.hpp"
|
|
#include "assets/data_stores/texture_store.hpp"
|
|
#include "assets/data/uniform_surface_properties.hpp"
|
|
#include "util/enum_bitfield_operators.hpp"
|
|
|
|
namespace assets::material_components
|
|
{
|
|
|
|
using ambient_filter = z3d::vec3;
|
|
using diffuse_filter = z3d::vec3;
|
|
using specular_filter = z3d::vec3;
|
|
using shininess = z3d::f32;
|
|
using alpha = z3d::f32;
|
|
using ambient_filter_texture = texture_id;
|
|
using diffuse_filter_texture = texture_id;
|
|
using specular_filter_texture = texture_id;
|
|
using shininess_texture = texture_id;
|
|
using alpha_texture = texture_id;
|
|
using bump_texture = texture_id;
|
|
|
|
namespace indices
|
|
{
|
|
enum : z3d::size
|
|
{
|
|
ambient_filter,
|
|
diffuse_filter,
|
|
specular_filter,
|
|
shininess,
|
|
alpha,
|
|
ambient_filter_texture,
|
|
diffuse_filter_texture,
|
|
specular_filter_texture,
|
|
shininess_texture,
|
|
alpha_texture,
|
|
bump_texture
|
|
};
|
|
}
|
|
|
|
enum class flags : z3d::u8
|
|
{
|
|
none = 0,
|
|
ambient_filter = 1 << indices::ambient_filter,
|
|
diffuse_filter = 1 << indices::diffuse_filter,
|
|
specular_filter = 1 << indices::specular_filter,
|
|
shininess = 1 << indices::shininess,
|
|
alpha = 1 << indices::alpha,
|
|
ambient_filter_texture = 1 << indices::ambient_filter_texture,
|
|
diffuse_filter_texture = 1 << indices::diffuse_filter_texture,
|
|
specular_filter_texture = 1 << indices::specular_filter_texture,
|
|
shininess_texture = 1 << indices::shininess_texture,
|
|
alpha_texture = 1 << indices::alpha_texture,
|
|
bump_texture = 1 << indices::bump_texture
|
|
};
|
|
|
|
using all = z3d::structure<
|
|
ambient_filter,
|
|
diffuse_filter,
|
|
specular_filter,
|
|
shininess,
|
|
alpha,
|
|
ambient_filter_texture,
|
|
diffuse_filter_texture,
|
|
specular_filter_texture,
|
|
shininess_texture,
|
|
alpha_texture,
|
|
bump_texture
|
|
>;
|
|
constexpr inline auto count = std::tuple_size_v<all>;
|
|
|
|
} // namespace material_component
|
|
|
|
DEFINE_ENUM_BITFIELD_OPERATORS(assets::material_components::flags)
|