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:
2025-05-04 17:32:48 +09:00
parent 4c62b3ecde
commit 4b29de15cd
16 changed files with 357 additions and 135 deletions

View File

@@ -1,13 +1,14 @@
#ifndef RENDERER_H
#define RENDERER_H
#include "Rendering/AOV.h"
#include "Rendering/Debug.h"
#include "Rendering/Scene.h"
typedef enum
{
PROGRESSIVE = 0,
TILE_BASED = 1,
RENDER_PROGRESSIVE = 0,
RENDER_TILE_BASED = 1,
} rendering_mode_t;
typedef struct
@@ -23,14 +24,16 @@ typedef struct
typedef struct
{
scene_t* scene;
render_target_t* render_target;
render_target_t** aov_target;
const rendering_config_t* config;
rendering_mode_t rendering_type;
debug_flag_t debug_flag;
rendering_mode_t rendering_mode;
aov_flags_t aov_flags;
bool is_done;
} render_job_t;
bool renderer_aov_target_init(render_job_t* job, aov_flags_t aov_flags);
void renderer_start(render_job_t* job);
void render_job_free(render_job_t* job);
#endif // RENDERER_H