#ifndef SKY_LIGHT_H #define SKY_LIGHT_H #include "Algorithm/BSDF.h" #include "Algorithm/RayIntersection.h" #include "Light.h" #include typedef struct { vec3s color; float intensity; } constant_sky_data_t; typedef struct { uint32_t width; uint32_t height; texture_entity_t texture; float intensity; float total_weight; vec3s* cdf_cache; // Precomputed cache for sampling, xy for texture coordinates, z for PDF } hdr_sky_data_t; sky_light_t sky_create_constant_sky(const constant_sky_data_t* data); path_output evaluate_bsdf_const_sky(const void* data, const light_shading_context_t* context, vec3s throughput, uint32_t sample_index); sky_light_t sky_create_hdr_sky(const texture_collection_t* textures, texture_entity_t hdri_entity, float intensity); path_output evaluate_bsdf_hdr_sky(const void* data, const light_shading_context_t* context, vec3s throughput, uint32_t sample_index); void hdr_sky_free(hdr_sky_data_t* data); #endif // SKY_LIGHT_H