Update AOV support, ray intersection logic, and README
Added: - AOV support for normals, albedo, and depth marked as completed. - New function `normal_unpack` in `BSDF.h`. - New field `esp` in `ray_t` structure in `RayIntersection.h`. Changed: - Updated `normal_ts_to_ws` to accept an additional parameter. - Refactored `weight_nee_light` for clarity. - Modified `RAY_EPSILON` for improved precision. - Updated `path_output` structure to include a `normal` field. - Normalized unpacked normal vector in `normal_unpack` function. - Updated `path_trace` to use closest hit ray intersection. - Updated `render_aov` to utilize closest hit logic. - Modified `ray_create` to initialize `esp` based on ray origin. - Improved accuracy in `offset_ray_origin` calculations. - Updated ray intersection logic in `ray_intersect_triangle` and `ray_intersect_aabb` to include epsilon checks. - Updated `evaluate_bsdf_directional` and `evaluate_bsdf_const_sky` for shadow rays. - Adjusted `sample_bsdf_simple_lit` for incoming light direction calculations. - Enhanced `render_pixel` to manage AOV flags effectively. - Changed camera rotation and light intensity in `scene_setup`. - Simplified texture loading by removing unnecessary sRGB conversion. Modified: - Several binary image files have been updated.
This commit is contained in:
@@ -25,14 +25,14 @@ static bool scene_setup(scene_t* scene)
|
||||
}
|
||||
|
||||
scene->camera.position = (vec3s){7.5f, 2.0f, 0.0f};
|
||||
scene->camera.rotation = euler_to_quat(-10.0f, 90.0f, 0.0f);
|
||||
scene->camera.rotation = euler_to_quat(10.0f, 90.0f, 0.0f);
|
||||
|
||||
// TODO: Standardize light unit
|
||||
light_entity_t sun = light_create_directional_light(&scene->lights);
|
||||
directional_light_t* sun_light = &scene->lights.directional_lights[sun.id];
|
||||
sun_light->direction = glms_vec3_normalize((vec3s){0.6f, 1.0f, 0.25f});
|
||||
sun_light->color = (vec3s){1.0f, 0.93f, 0.87f};
|
||||
sun_light->intensity = 0.0f;
|
||||
sun_light->intensity = 1.0f;
|
||||
sun_light->angular_diameter = 0.53f;
|
||||
|
||||
//scene->lights.sky_light = sky_create_constant_sky(&(constant_sky_data_t)
|
||||
|
||||
Reference in New Issue
Block a user