Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
material_types.hpp
Go to the documentation of this file.
1// This file is part of the Rendering Engine project.
2// Author: Alexander Obzherin <alexanderobzherin@gmail.com>
3// Copyright (c) 2025 Alexander Obzherin
4// Distributed under the terms of the zlib License. See LICENSE.md for details.
5
6#pragma once
7
8#include <vector>
9#include <cstdint>
10
11namespace rendering_engine
12{
13
14/**
15 * @brief Specifies the rendering domain where the material is used.
16 */
22
23/**
24 * @brief Specifies how the material handles transparency.
25 */
26enum class BlendMode
27{
30};
31
32/**
33 * @brief Specifies the shading model used by the material.
34 */
35enum class ShadingModel
36{
39};
40
41/**
42 * @brief Settings required to define a material instance.
43 */
51
52/**
53 * @brief Describes the layout of a single packed parameter inside a uniform buffer.
54 */
56{
57 std::string name;
58 size_t offset;
59 size_t size;
60 enum class Type { Float, Vec3, Vec4 };
62};
63
64/**
65 * @brief Contains the raw buffer data and layout metadata of packed material parameters.
66 */
68{
69 std::vector<uint8_t> buffer;
70 std::vector<MaterialParameterLayoutEntry> layout;
71};
72
73} // namespace rendering_engine
MaterialDomain
Specifies the rendering domain where the material is used.
BlendMode
Specifies how the material handles transparency.
ShadingModel
Specifies the shading model used by the material.
Describes the layout of a single packed parameter inside a uniform buffer.
size_t offset
size_t size
std::string name
Type type
Type
@ Vec3
@ Float
@ Vec4
Settings required to define a material instance.
Contains the raw buffer data and layout metadata of packed material parameters.
std::vector< MaterialParameterLayoutEntry > layout