Files
SimpleRayTracing/header/Algorithm/BSDF.h
Misaki 6800810369 Update project structure and improve performance
Added new files for BVH, AABB, and Debug functionalities.
Added new utility functions in Common.h.
Added gamma correction function in PostProcessing.h.
Changed the return type of path_trace to vec4s for alpha blending.
Changed BSDF function signatures to include sample index and bounce.
Changed the BSDF.h to replace inline functions with declarations.
Changed the Light and SkyLight evaluation functions to include throughput and sample index.
Changed the sphere creation function in GeometryUtilities.h for better quality.
Changed the scene structure to include a BVH tree for improved ray intersection.
Changed the scene initialization parameters for better performance.
Created new Debug functions for ray intersection counting.
Created new functions for triangle collection management in Triangle.c.
Improved pixel updating logic in Window.c.
Improved ray intersection performance with new BVH implementation.
Removed unused includes from Common.h.
Removed old library linking methods in CMakeLists.txt.
2025-04-21 15:56:19 +09:00

25 lines
1.1 KiB
C

#ifndef BSDF_H
#define BSDF_H
#include "Algorithm/Sobol.h"
#include "cglm/struct/vec3.h"
float power_heuristic(float pdf_a, float pdf_b);
float roughness_to_blinn_phong_specular_exponent(float roughness);
vec3s fresnel_schlick_vec3(vec3s f0, float cos_theta);
// BSDF sampling functions
float pdf_cosine_weighted_hemisphere(vec3s normal, vec3s wi);
float pdf_blinn_phong_lobe(vec3s normal, vec3s wi, vec3s wo, float roughness);
vec3s sample_cosine_weighted_hemisphere_z_angular(float angular, uint32_t index, uint32_t d1, uint32_t d2);
vec3s sample_cosine_weighted_hemisphere_z(uint32_t index, uint32_t d1, uint32_t d2);
void create_orthonormal_basis(vec3s direction, vec3s* u, vec3s* v);
vec3s random_cosine_direction_angular(vec3s direction, float angular, uint32_t index, uint32_t d1, uint32_t d2);
vec3s random_cosine_direction(vec3s direction, uint32_t index, uint32_t d1, uint32_t d2);
vec3s random_uniform_cdf_direction(vec3s direction, uint32_t index, uint32_t d1, uint32_t d2);
vec3s random_uniform_cdf_direction_angular(vec3s direction, uint32_t index, float angular, uint32_t d1, uint32_t d2);
#endif // BSDF_H