-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMaterialPropertyValue.h
More file actions
30 lines (28 loc) · 1003 Bytes
/
Copy pathMaterialPropertyValue.h
File metadata and controls
30 lines (28 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "Reflection.hpp"
#include "TypeTrait.h"
#include <cstdint>
#include <string>
#include <vector>
// Material의 디스크 정본은 ShaderMeta GUID와 이름 기반 논리 값이다. GPU byte
// offset은 Slang reflection 결과이므로 저장하지 않고 ConfigureShaderProperties에서
// 매 세대 다시 만든다. 한 타입만 유효하지만 variant를 YAML 정본에 끌어들이지
// 않도록 고정된 필드로 둔다.
struct MaterialPropertyValue
{
static consteval auto reflect()
{
using Self = MaterialPropertyValue;
return meta::schema<Self>(
meta::field<&Self::m_name>,
meta::field<&Self::m_numericValue>,
meta::field<&Self::m_integerValue>,
meta::field<&Self::m_boolValue>,
meta::field<&Self::m_textureGuid>);
}
std::string m_name{};
std::vector<float> m_numericValue{};
std::int32_t m_integerValue{};
bool m_boolValue{};
FileGuid m_textureGuid{};
};