Files
SimpleRayTracing/header/Rendering/Renderer.h
Misaki 4b29de15cd 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.
2025-05-04 17:32:48 +09:00

40 lines
759 B
C

#ifndef RENDERER_H
#define RENDERER_H
#include "Rendering/AOV.h"
#include "Rendering/Debug.h"
#include "Rendering/Scene.h"
typedef enum
{
RENDER_PROGRESSIVE = 0,
RENDER_TILE_BASED = 1,
} rendering_mode_t;
typedef struct
{
uint32_t width;
uint32_t height;
uint32_t sample_count;
uint8_t max_depth;
uint32_t bucket_size;
} rendering_config_t;
typedef struct
{
scene_t* scene;
render_target_t** aov_target;
const rendering_config_t* config;
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