35 void SetMaterialPath(
const std::filesystem::path& materialPath);
38 enum class ShaderLoadStatus {
45 void ReloadAvailableShaders();
46 bool TryLoadShaderReflection(
Uuid& shaderUuid);
47 void LoadShaderTextures(rapidjson::Value& texturesArray);
48 void LoadShaderUniformBuffers(rapidjson::Value& uniformBuffers);
49 void LoadMaterialSamplers(rapidjson::Value& samplers);
50 void RenderTextures();
51 void RenderParameters();
52 void OnSelectedTexture(
Uuid uuid, std::string name);
53 void RenderTexture(
Sampler& sampler);
56 std::filesystem::path materialPath;
58 std::string materialName;
60 std::string shaderName;
61 std::vector<Sampler> samplers;
62 std::vector<MaterialParameter> parameters;
63 std::vector<AssetRegistry::Entry> availableShaders;
66 Sampler* selectedSampler =
nullptr;
67 ShaderLoadStatus shaderLoadStatus = ShaderLoadStatus::Unassigned;
68 bool hasBeenChanged =
false;
70 struct MaterialUniformBuffer {
74 size_t memberSize = 0;
80 ) : name(name), offset(offset), memberSize(memberSize) {}
84 size_t bufferSize = 0;
85 std::vector<Member> members;
86 MaterialUniformBuffer() =
default;
87 MaterialUniformBuffer(
91 ) : name(name), bindingId(bindingId), bufferSize(bufferSize) {}
94 std::vector<MaterialUniformBuffer> materialUniformBuffers;