Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::MaterialAsset Struct Reference

Serializable description of a material. More...

#include <MaterialRegistry.h>

Public Attributes

std::string Path
std::string Shader
std::unordered_map< std::string, TextureSlotTextureSlots
std::unordered_map< std::string, float > Floats
std::unordered_map< std::string, std::array< float, 3 > > Float3s
std::unordered_map< std::string, std::array< float, 4 > > Float4s
u32 GPUIndex = 0xFFFFFFFF

Detailed Description

Serializable description of a material.

Material assets contain paths and parameter values needed to recreate a material instance. They are persisted as JSON files, enabling offline editing and hot reloading.

Contents:

  • Path: absolute or asset-relative JSON path of this material.
  • Shader: name of the shader to bind against.
  • TextureSlots: map of texture uniforms to texture slots.
  • Floats/Float3s/Float4s: scalar/vector uniform parameter values.
  • GPUIndex: assigned GPU resource index, persistent across reloads.

Member Data Documentation

◆ Float3s

std::unordered_map<std::string, std::array<float, 3> > Raven::MaterialAsset::Float3s

◆ Float4s

std::unordered_map<std::string, std::array<float, 4> > Raven::MaterialAsset::Float4s

◆ Floats

std::unordered_map<std::string, float> Raven::MaterialAsset::Floats

◆ GPUIndex

u32 Raven::MaterialAsset::GPUIndex = 0xFFFFFFFF

◆ Path

std::string Raven::MaterialAsset::Path

◆ Shader

std::string Raven::MaterialAsset::Shader

◆ TextureSlots

std::unordered_map<std::string, TextureSlot> Raven::MaterialAsset::TextureSlots

The documentation for this struct was generated from the following file: