Update project roadmap and improve rendering logic

Changed the pixel rendering function to include anti-aliasing using Sobol sampling in Renderer.c.
Changed the path tracing function to adjust light shading context and Russian roulette logic in PathTracing.c.
Changed the normal calculation logic to use a ternary operator in RayIntersection.c.
Changed the Sobol sample calculation for consistency in Debug.c.
Removed some items from the project roadmap in README.md.
Modified the sample count from 64 to 16 in main.c, affecting rendering quality and performance.
This commit is contained in:
2025-04-29 20:43:04 +09:00
parent fb1ff5cac6
commit 2c0d5a2364
8 changed files with 34 additions and 27 deletions

View File

@@ -213,17 +213,12 @@ hit_result_t ray_intersect_triangle(const ray_t* ray, const triangle_t* triangle
vec3s normal = glms_vec3_scale(triangle->vertices[0].normal, w);
normal = glms_vec3_add(normal, glms_vec3_scale(triangle->vertices[1].normal, u));
normal = glms_vec3_add(normal, glms_vec3_scale(triangle->vertices[2].normal, v));
if (glms_vec3_dot(normal, direction) > 0.0f)
{
normal = glms_vec3_negate(normal);
}
normal = glms_vec3_dot(normal, direction) < 0.0f ? normal : glms_vec3_negate(normal);
result.normal = glms_vec3_normalize(normal);
vec3s tangent = glms_vec3_scale(triangle->vertices[0].tangent, w);
tangent = glms_vec3_add(tangent, glms_vec3_scale(triangle->vertices[1].tangent, u));
tangent = glms_vec3_add(tangent, glms_vec3_scale(triangle->vertices[2].tangent, v));
result.tangent = glms_vec3_normalize(tangent);
result.uv.x = w * triangle->vertices[0].uv.x