43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
|
|
#ifndef STANDARd_LIT_H
|
|
#define STANDARd_LIT_H
|
|
|
|
#include "Material.h"
|
|
#include "Rendering/Texture.h"
|
|
#include "cglm/common.h"
|
|
#include "cglm/struct/vec3.h"
|
|
|
|
typedef struct
|
|
{
|
|
vec3s albedo;
|
|
vec3s normal;
|
|
float diffuse_roughness;
|
|
float roughness;
|
|
float metallic;
|
|
} standard_lit_surface_data_t;
|
|
|
|
typedef struct
|
|
{
|
|
vec3s albedo;
|
|
float diffuse_roughness;
|
|
float roughness;
|
|
float metallic;
|
|
|
|
texture_handle_t albedo_texture;
|
|
texture_handle_t normal_texture;
|
|
texture_handle_t roughness_texture;
|
|
texture_handle_t metallic_texture;
|
|
} standard_lit_properties_t;
|
|
|
|
|
|
path_output standard_lit_render_loop(const standard_lit_properties_t* properties, const shading_context_t* context);
|
|
void standard_lit_render_aov(const standard_lit_properties_t* properties, const shading_context_t* context, aov_output_t* aov_output);
|
|
|
|
|
|
inline material_handle_t material_create_standard_lit_default(const standard_lit_properties_t* properties, material_collection_t* collection)
|
|
{
|
|
return material_create(properties, sizeof(standard_lit_properties_t), (material_render_loop_f)standard_lit_render_loop, (material_render_aov_f)standard_lit_render_aov, collection);
|
|
}
|
|
|
|
#endif // STANDARd_LIT_H
|