Fixed cdf and added Standard Lit

This commit is contained in:
2025-12-29 22:01:44 +09:00
parent e1693764f7
commit adee5acd10
24 changed files with 830 additions and 570 deletions

View File

@@ -53,7 +53,7 @@ typedef struct
typedef struct
{
uint8_t id;
} material_entity_t;
} material_handle_t;
// TODO: Handle material remove, we can use a lookup array.
// NOTE: 255 is invalid
@@ -69,16 +69,16 @@ bool material_collection_init(uint8_t size, material_collection_t* materials);
void material_collection_resize(material_collection_t* materials, size_t size);
void material_collection_free(material_collection_t* materials);
material_entity_t material_create(const void* properties, size_t properties_size, material_render_loop_f render_loop, material_render_aov_f render_aov, material_collection_t* collection);
material_handle_t material_create(const void* properties, size_t properties_size, material_render_loop_f render_loop, material_render_aov_f render_aov, material_collection_t* collection);
// void material_free(material_entity_t entity, material_collection_t* collection);
inline material_entity_t invalid_material_entity()
inline material_handle_t invalid_material_entity()
{
return (material_entity_t){.id = INVALID_MATERIAL_ID};
return (material_handle_t){.id = INVALID_MATERIAL_ID};
}
inline bool is_material_entity_valid(material_entity_t entity)
inline bool is_material_entity_valid(material_handle_t entity)
{
return entity.id != INVALID_MATERIAL_ID;
}