Add AOV rendering support and related enhancements
Added support for rendering Arbitrary Output Variables (AOVs) for detailed outputs like beauty, albedo, normal, depth, and position. Added new functions `render_aov` and `accumulate_aov` for AOV data management during rendering. Added AOV rendering capabilities to the `SimpleLit` material with specific functions. Changed the material system to include new function pointers for AOV rendering. Changed the renderer to initialize and update AOV targets during the rendering process. Changed the main rendering loop to handle AOVs and update render targets accordingly. Fixed various minor issues, including function signature updates, variable name changes, and improved error handling for memory allocations.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
path_output evaluate_bsdf_directional(directional_light_t light, const light_shading_context_t* context, vec3s throughput, uint32_t sample_index)
|
||||
{
|
||||
path_output output = {0.0f};
|
||||
output.state = TERMINATE;
|
||||
output.state = PS_TERMINATE;
|
||||
output.pdf = 1.0f;
|
||||
|
||||
if (light.intensity <= 0.0f)
|
||||
@@ -26,7 +26,7 @@ path_output evaluate_bsdf_directional(directional_light_t light, const light_sha
|
||||
return output;
|
||||
}
|
||||
|
||||
ray_t shadow_ray = ray_create(BIAS_RAY_ORIGION(context->hit_point, context->normal), wi);
|
||||
ray_t shadow_ray = ray_create(BIAS_RAY_ORIGION(context->position, context->normal), wi);
|
||||
|
||||
float closest = FLT_MAX;
|
||||
hit_result_t shadow_hit = {1};
|
||||
@@ -42,6 +42,6 @@ path_output evaluate_bsdf_directional(directional_light_t light, const light_sha
|
||||
|
||||
output.direct_lighting = glms_vec3_mul(light_radiance, light_contribute);
|
||||
output.wi = wi;
|
||||
output.state = NORMAL;
|
||||
output.state = PS_NORMAL;
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user