11 #include <cglm/cglm.h>
13 #ifdef USE_SSBO_RENDERING
34 #ifdef USE_SSBO_RENDERING
38 #ifdef USE_TRANSPARENT_BILLBOARDS
93 vec3 camera_pos, mat4 previous_view_proj,
int width,
Global application constants, configuration macros, and default values.
View-aligned quad rendering (billboarding) for optimized sphere drawing.
Back-to-front sorting for transparent geometry.
Procedural icosphere geometry generation.
Mesh-based instanced rendering for spheres.
void scene_render(Scene *scene, GPUProfiler *profiler, mat4 view, mat4 proj, vec3 camera_pos, mat4 previous_view_proj, int width, int height)
Renders the scene.
Definition: scene_render.c:292
void scene_cleanup(Scene *scene)
Cleans up scene resources.
Definition: scene_cleanup.c:80
void scene_update_gpu_buffers(Scene *scene)
Updates GPU buffers for dynamic geometry (e.g. LOD changes).
Definition: scene_render.c:36
void scene_toggle_nbody(Scene *scene)
Toggles N-body simulation mode on/off.
Definition: scene_nbody.c:16
void scene_nbody_update(Scene *scene, float delta_time)
Advances the N-body simulation by one frame.
Definition: scene_nbody.c:79
int scene_init(Scene *scene)
Initializes the scene resources.
Definition: scene_init.c:416
const char * aa_mode_to_string(AAMode mode)
Returns a string representation of the AA mode.
Definition: scene_render.c:24
Render configuration flags extracted from Scene.
AAMode
Specular Anti-Aliasing modes.
Definition: scene_config.h:35
IBL, probes, and materials sub-struct extracted from Scene.
Buffer-backed instancing for ultra-large-scale rendering.
Manages a set of billboarded instances on the GPU.
Definition: billboard_rendering.h:21
Reusable memory context for sorting operations.
Definition: billboard_sorting.h:28
Manages GPU timing using double-buffered queries to avoid stalls.
Definition: gpu_profiler.h:86
Container for procedural mesh data.
Definition: icosphere.h:40
Manages mesh-based instanced spheres on the GPU.
Definition: instanced_rendering.h:20
Main pipeline state for post-processing.
Definition: postprocess_internal.h:46
GPU resources for an SSBO-based render group.
Definition: ssbo_rendering.h:35
Render configuration flags and toggles.
Definition: scene_config.h:45
All GPU resource handles owned by the scene.
Definition: scene_gpu_resources.h:23
IBL, probes, and materials grouped to reduce Scene fan-out.
Definition: scene_lighting.h:17
All shader pointers and uniform caches owned by the scene.
Definition: scene_shaders.h:16
N-body simulation state grouped to reduce Scene fan-out.
Definition: scene_simulation.h:15
Visual effects grouped into a sub-struct to reduce Scene fan-out.
Definition: scene_visuals.h:17
Encapsulates all 3D scene data, geometry, and rendering state.
Definition: scene.h:28
BillboardGroup billboard_group
Definition: scene.h:33
SceneShaders * shaders
Definition: scene.h:48
int current_hdr_index
Definition: scene.h:58
SphereInstance * billboard_instances
Definition: scene.h:41
SceneConfig config
Definition: scene.h:53
int hdr_count
Definition: scene.h:57
SceneLighting lighting
Definition: scene.h:52
BillboardSorter billboard_sorter
Definition: scene.h:39
SceneGPUResources * gpu
Definition: scene.h:47
IcosphereGeometry geometry
Definition: scene.h:30
SceneVisuals * visuals
Definition: scene.h:49
char ** hdr_files
Definition: scene.h:56
SceneSimulation * simulation
Definition: scene.h:46
InstancedGroup instanced_group
Definition: scene.h:32
int billboard_instance_count
Definition: scene.h:42
Per-instance data sent to the shader via an instanced VBO.
Definition: sphere_types.h:25