Files
SimpleRayTracing/header/Lighting/SkyLight.h
Misaki 3de6b83d32 Set C standard to C11 and add new assets
Changed CMakeLists.txt to set the C standard to C11.
Added multiple binary image files for new visual assets.
Added several new image files to enhance rendering capabilities.
Changed stb_image.h to improve support for various image formats.
Changed ray tracing engine to enhance ray creation and intersection.
Changed triangle structure to use a vertex array for better attribute handling.
Changed scene initialization to accommodate new texture management.
2025-04-29 01:43:52 +09:00

28 lines
644 B
C

#ifndef SKY_LIGHT_H
#define SKY_LIGHT_H
#include "Light.h"
#include <string.h>
typedef struct
{
vec3s color;
float intensity;
} constant_sky_data_t;
vec3s evaluate_bsdf_const_sky(const void* data, const light_shading_context_t* context, vec3s throughput, uint32_t sample_index);
inline sky_light_t sky_create_constant_sky(const constant_sky_data_t* data)
{
sky_light_t light = {
.evaluate_bsdf_sky = evaluate_bsdf_const_sky,
.type = SKY_TYPE_CONSTANT,
.data_size = sizeof(constant_sky_data_t),
};
memcpy(light.data, data, sizeof(constant_sky_data_t));
return light;
}
#endif // SKY_LIGHT_H