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.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "Geometry/Triangle.h"
|
||||
#include "Rendering/Scene.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -19,8 +20,11 @@ typedef struct
|
||||
bool hit;
|
||||
} hit_result_t;
|
||||
|
||||
hit_result_t ray_intersect( triangle_t triangle, ray_t ray);
|
||||
hit_result_t ray_intersect_closest(const triangle_collection_t* triangles, ray_t ray);
|
||||
hit_result_t ray_intersect_any(const triangle_collection_t* triangles, ray_t ray);
|
||||
hit_result_t ray_intersect_triangle(ray_t ray, triangle_t triangle);
|
||||
bool ray_intersect_aabb(ray_t ray, aabb_t aabb, float* enter_out, float* exit_out);
|
||||
void ray_intersect_bvh(const ray_t ray, const bvh_node_t* bvh_nodes,
|
||||
const uint64_t* primitive_indices, const triangle_collection_t* all_triangles, uint64_t node_index,
|
||||
float* closest_out, hit_result_t* best_hit_out);
|
||||
hit_result_t ray_intersect_scene(ray_t ray, const scene_t* scene);
|
||||
|
||||
#endif // RAY_INTERSECTION_H
|
||||
|
||||
Reference in New Issue
Block a user