|
Untitled
|
Audio probe baking, portal creation, probe volumes, and emitter functions. More...
#include <GL/glew.h>#include <SDL2/SDL.h>#include <SDL2/SDL_events.h>#include <SDL2/SDL_mouse.h>#include <SDL2/SDL_render.h>#include <SDL2/SDL_scancode.h>#include <SDL2/SDL_timer.h>#include <SDL2/SDL_video.h>#include "SDL2/SDL_audio.h"#include "SDL2/SDL_opengl.h"#include "fftw3.h"#include "load/init.h"#include "core/input.h"#include "render/render.h"#include "core/camera.h"#include "core/mesh.h"#include "utilities/types.h"#include "utilities/mathf.h"#include "light/lightmap.h"#include "load/load.h"#include "utilities/utilities.h"#include "utilities/engine_utilities.h"#include "core/acceleration.h"#include "ECS/entity.h"#include "editor/editor.h"#include "physics/physics.h"#include "core/animation.h"#include "load/gltf.h"#include "ui/fonts.h"#include "audio/audio.h"#include "ui/ui.h"#include <stdalign.h>#include "audio/audio_ir.h"#include "ui/ui_callbacks.h"#include "stb/stb_image.h"#include "stb/stb_image_write.h"#include "nk_config.h"#include "nuklear/nuklear.h"#include "nuklear/nuklear_sdl_gl3.h"Go to the source code of this file.
Macros | |
| #define | DEFAULT_WIDTH 1280 |
| #define | DEFAULT_HEIGHT 960 |
| #define | MAX_VERTEX_MEMORY 1024 * 1024 |
| #define | MAX_ELEMENT_MEMORY 512 * 1024 |
Functions | |
| GLuint64 | retrieve_gl_query (GLuint query) |
| int | main (int argc, char *argv[]) |
Audio probe baking, portal creation, probe volumes, and emitter functions.
Definition in file main.c.
| GLuint64 retrieve_gl_query | ( | GLuint | query | ) |
Definition at line 459 of file main.c.
References retrieve_gl_query().
Referenced by retrieve_gl_query().
| int main | ( | int | argc, |
| char * | argv[] ) |
<Max amount of events to poll in one render step
<Max amount of events to poll in one render step
Definition at line 520 of file main.c.
References add_all_meshes_to_buffer(), add_all_text_boxes_to_draw_buffer(), AudioScratchBuffers::aprobe_mutex, SceneData::APV_FILE, AUDIO_ENGINE, AUDIO_SCRATCH, audio_update(), bloom_queries, cam, Camera::cam_data, CAM_POS, CamData::cam_pos, CAM_UBO, cam_ubo_padded, cam_ubo_ptr, CAST_VEC, check_audio_pv(), check_lighting_pv(), Vector::count, create_performance_overlay(), cull_queries, current_frame, current_query_frame, DEBUG_APROBE_RAY_COUNT, DEBUG_FACE_COUNT, DEBUG_LINE_COUNT, DEBUG_POINT_COUNT, delete_hrtf_worker_thread(), DIRECTIONAL_LIGHT, DIRECTIONAL_LIGHT_COUNT, dof_queries, draw_dirty, dt, EDITOR_SETTINGS, end_timer(), ENTITIES, frame_time, gbuffer_queries, GLOBALS, GPU_init_cluster_aabbs(), GPU_upload_scene_data(), handle_held_events(), HRTF_TD, init(), init_new_asset_instance(), init_scene_bvh(), Light::layer, LIGHT_CAM, Light::light_type, Globals::lights, load_gltf(), SceneData::LPV_FILE, main(), main_queries, MAX_ELEMENT_MEMORY, MAX_ENTITIES, MAX_NUKLEAR_EVENTS, MAX_SDL_EVENTS, MAX_VERTEX_MEMORY, Entity::mesh_node, MOUSE_X, MOUSE_Y, NK_CTX, Globals::noclip, pl_queries, player, PQUERY_MAX, process_input(), process_sdl_event(), QUERY_FRAMES, render(), render_editor_menu(), EditorSettings::render_framerate_target, render_queries, running, Globals::scene_data, SDL_AUDIO_DEVICE, Player::skeleton, sm_queries, ssao_queries, ssr_queries, start_timer(), taa_queries, time, time_since_last_render, update_animation_components(), update_audio_occlusion(), update_camera(), update_light_camera(), update_performance_overlay(), update_physics_components(), update_player_audio_probe(), update_ui_state(), upload_lights(), upload_material_data(), Globals::vertex_layouts, window, vec4::x, vec4::y, and vec4::z.
| int LMB_HELD = 0 |
If the left mouse button is held.
Definition at line 51 of file main.c.
Referenced by handle_held_events(), and process_sdl_event().
| int DEBUG_APROBE_RAY_COUNT = 0 |
Definition at line 52 of file main.c.
Referenced by main(), and process_probe_chunk().
| int DEBUG_CURRENT_APROBE = 0 |
Definition at line 54 of file main.c.
Referenced by interpolate_nearest_aprobes(), and render_probe_volume().
| ma_engine AUDIO_ENGINE |
Definition at line 66 of file main.c.
Referenced by audio_update(), init(), init_sdl_audio(), load_emitter(), and main().
| AudioEmitter AUDIO_EMITTERS[1024] |
Definition at line 67 of file main.c.
Referenced by audio_update(), destroy_emitter(), execute_aemitter_undo(), init_emitter(), init_globals(), process_sdl_event(), render(), render_audio_menu(), unload_emitter(), and update_audio_occlusion().
| int HRTF_LENGTH = 0 |
Definition at line 71 of file main.c.
Referenced by allocate_audio_scratch_hrtf(), and load_hrtf_from_binary().
| ConvolverNode CONVOLVER_NODE = {0} |
Definition at line 72 of file main.c.
Referenced by convolver_node_process_pcm_frames(), fft_channels(), hrtf_worker(), init(), init_audio_scratch_buffers(), and load_emitter().
| AudioScratchBuffers AUDIO_SCRATCH = {0} |
Definition at line 73 of file main.c.
Referenced by allocate_audio_scratch_hrtf(), bake_audio_probe_volume(), check_audio_pv(), init_audio_scratch_buffers(), init_hrtf_worker_thread(), load_hrtf_from_binary(), main(), and update_player_ir().
| HRTFThreadData HRTF_TD = {0} |
Definition at line 74 of file main.c.
Referenced by convolver_node_process_pcm_frames(), init(), init_audio_scratch_buffers(), main(), update_player_audio_probe(), and update_player_ir().
| AStarWorkspace AW = {0} |
Definition at line 75 of file main.c.
Referenced by init_globals(), and pathfind_audio_occlusion().
| int SCREEN_WIDTH = 1280 |
Definition at line 77 of file main.c.
Referenced by change_fullscreen_option(), execute_editor_settings_undo(), GPU_upload_singular_element(), GPU_upload_singular_text_box(), init(), render(), render_asset_instance_menu(), render_audio_menu(), render_entity_menu(), render_light_menu(), render_lprobe_menu(), render_main_menu(), render_material_menu(), and render_text_menu().
| int SCREEN_HEIGHT = 720 |
Definition at line 78 of file main.c.
Referenced by change_fullscreen_option(), execute_editor_settings_undo(), GPU_upload_singular_element(), GPU_upload_singular_text_box(), init(), render(), render_asset_instance_menu(), render_entity_menu(), render_light_menu(), render_main_menu(), render_material_menu(), render_mn_menu(), render_selection_menu(), and render_ui_menu().
| int RENDER_WIDTH = 1280 |
Definition at line 79 of file main.c.
Referenced by allocate_gbuffer(), allocate_gbuffer_msaa(), allocate_main_fbo(), bind_dynamic_shader(), change_render_resolution(), execute_editor_settings_undo(), GPU_init_cluster_aabbs(), init(), render(), render_main_menu(), render_to_cubemap_face(), update_camera(), and update_light_camera().
| int RENDER_HEIGHT = 720 |
Definition at line 80 of file main.c.
Referenced by allocate_gbuffer(), allocate_gbuffer_msaa(), allocate_main_fbo(), bind_dynamic_shader(), change_render_resolution(), execute_editor_settings_undo(), GPU_init_cluster_aabbs(), init(), render(), render_main_menu(), render_to_cubemap_face(), update_camera(), and update_light_camera().
| int BLOOM_WIDTH = 640 |
Definition at line 81 of file main.c.
Referenced by change_bloom_res(), execute_editor_settings_undo(), init(), and render_main_menu().
| int BLOOM_HEIGHT = 480 |
Definition at line 82 of file main.c.
Referenced by change_bloom_res(), execute_editor_settings_undo(), init(), and render_main_menu().
| int DOF_WIDTH = 640 |
Definition at line 83 of file main.c.
Referenced by change_dof_res(), execute_editor_settings_undo(), init(), render_main_menu(), and render_to_cubemap_face().
| int DOF_HEIGHT = 480 |
Definition at line 84 of file main.c.
Referenced by change_dof_res(), execute_editor_settings_undo(), init(), render_main_menu(), and render_to_cubemap_face().
| int SSR_WIDTH = 640 |
Definition at line 85 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| int SSR_HEIGHT = 480 |
Definition at line 86 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| int SSAO_WIDTH = 640 |
Definition at line 87 of file main.c.
Referenced by change_ssao_res(), execute_editor_settings_undo(), init(), render_main_menu(), and render_to_cubemap_face().
| int SSAO_HEIGHT = 480 |
Definition at line 88 of file main.c.
Referenced by change_ssao_res(), execute_editor_settings_undo(), init(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer MAIN_FBO = {0} |
Definition at line 90 of file main.c.
Referenced by allocate_main_fbo(), change_render_resolution(), init(), render(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer MAIN_RESOLVE_FBO = {0} |
Definition at line 91 of file main.c.
Referenced by allocate_main_fbo(), change_render_resolution(), init(), render(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer SHADOW_MAP_FBO = {0} |
Definition at line 92 of file main.c.
Referenced by bind_dynamic_shader(), init(), render_to_cubemap_face(), and update_light_camera().
| Framebuffer GBUFFER_FBO = {0} |
Definition at line 93 of file main.c.
Referenced by allocate_gbuffer(), allocate_gbuffer_msaa(), change_render_resolution(), init(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer GBUFFER_RESOLVE_FBO = {0} |
Definition at line 94 of file main.c.
Referenced by allocate_gbuffer(), allocate_gbuffer_msaa(), change_render_resolution(), init(), render(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer SSR_FBO = {0} |
Definition at line 95 of file main.c.
Referenced by bind_dynamic_shader(), init(), render(), and render_to_cubemap_face().
| Framebuffer SSR_BLUR_FBO = {0} |
| Framebuffer SSAO_FBO = {0} |
Definition at line 97 of file main.c.
Referenced by change_ssao_res(), init(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer SSAO_BLUR_FBO = {0} |
Definition at line 98 of file main.c.
Referenced by bind_dynamic_shader(), change_ssao_res(), init(), and render_to_cubemap_face().
| Framebuffer TAA_FBO[2] = {0} |
Definition at line 99 of file main.c.
Referenced by init(), render(), and render_to_cubemap_face().
| Framebuffer COC_FBO = {0} |
Definition at line 100 of file main.c.
Referenced by change_dof_res(), init(), render(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer BOKEH_FBO = {0} |
Definition at line 101 of file main.c.
Referenced by change_dof_res(), init(), render(), and render_to_cubemap_face().
| Framebuffer BLOOM_PYRAMID[6] = {0} |
Definition at line 102 of file main.c.
Referenced by change_bloom_res(), init(), render(), render_main_menu(), and render_to_cubemap_face().
| Framebuffer TEXT_FBO = {0} |
| ShaderProgram SSAO_SHADER = {0} |
Definition at line 105 of file main.c.
Referenced by init_globals(), init_ssao_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram SSAO_BLUR_SHADER = {0} |
Definition at line 106 of file main.c.
Referenced by init_globals(), init_ssao_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram SSR_SHADER = {0} |
Definition at line 107 of file main.c.
Referenced by init_globals(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram SSR_BLUR_SHADER = {0} |
Definition at line 108 of file main.c.
Referenced by init_globals(), and SHADERS_INIT().
| ShaderProgram SSR_HISTORY_SHADER = {0} |
Definition at line 109 of file main.c.
Referenced by render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram COC_SHADER = {0} |
Definition at line 110 of file main.c.
Referenced by init_dof_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram BOKEH_SHADER = {0} |
Definition at line 111 of file main.c.
Referenced by init_dof_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram BLOOM_SHADER = {0} |
Definition at line 112 of file main.c.
Referenced by init_bloom_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram BLOOM_BLUR_SHADER = {0} |
Definition at line 113 of file main.c.
Referenced by init_bloom_shader(), and SHADERS_INIT().
| ShaderProgram DYNAMIC_SHADER[32] = {0} |
render/dynamic.vert render/dynamic.frag
Definition at line 114 of file main.c.
Referenced by bind_dynamic_shader(), bind_material(), init_dynamic_shader(), init_globals(), parse_gltf_materials(), render_all_draw_commands(), and SHADERS_INIT().
| ShaderProgram SHADOW_MAP_SHADER = {0} |
render/shadow.vert render/shadow.frag
Definition at line 115 of file main.c.
Referenced by init_globals(), init_shadow_map_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram DEPTH_PRE_PASS_SHADER[1] = {0} |
render/depth_pre_pass.vert render/depth_pre_pass.frag
Definition at line 116 of file main.c.
Referenced by init_depth_pre_pass_shader(), init_globals(), parse_gltf_materials(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram DEPTH_PRE_PASS_SHADER_MSAA[1] = {0} |
render/depth_pre_pass_no_gbuffer.vert render/depth_pre_pass_no_gbuffer.frag
Definition at line 117 of file main.c.
Referenced by init_depth_pre_pass_shader(), and render_to_cubemap_face().
| ShaderProgram WIREFRAME_SHADER = {0} |
render/wireframe.vert render/wireframe.frag
Definition at line 118 of file main.c.
Referenced by init_globals(), init_wireframe_shader(), render(), and SHADERS_INIT().
| ShaderProgram POSTPROCESS_SHADER[128] = {0} |
render/postprocess.vert render/postprocess.frag
Definition at line 119 of file main.c.
Referenced by init_globals(), init_postprocess_shader(), render(), and SHADERS_INIT().
| ShaderProgram CULL_CLUSTERS_SHADER = {0} |
Definition at line 120 of file main.c.
Referenced by init_cull_clusers_compute_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram CULL_DRAW_CALLS_SHADER = {0} |
Definition at line 121 of file main.c.
Referenced by init_cull_draw_calls_compute_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram INDIRECT_PREFIX_SHADER = {0} |
Definition at line 122 of file main.c.
Referenced by init_cull_draw_calls_compute_shader(), render_to_cubemap_face(), SHADERS_INIT(), and write_point_light_shadows().
| ShaderProgram ELEMENTS_PREFIX_SHADER = {0} |
Definition at line 123 of file main.c.
Referenced by init_cull_draw_calls_compute_shader(), render_to_cubemap_face(), SHADERS_INIT(), and write_point_light_shadows().
| ShaderProgram CULL_POINT_LIGHT_SHADOWS_SHADER = {0} |
render/cull_point_light_shadows.comp
Definition at line 124 of file main.c.
Referenced by init_cull_draw_calls_compute_shader(), SHADERS_INIT(), and write_point_light_shadows().
| ShaderProgram BLOOM_DOWNSCALE_SHADER = {0} |
Definition at line 125 of file main.c.
Referenced by init_bloom_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram BLOOM_UPSCALE_SHADER = {0} |
Definition at line 126 of file main.c.
Referenced by init_bloom_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram SKY_SHADER = {0} |
render/sky.vert render/sky.frag
Definition at line 127 of file main.c.
Referenced by init_globals(), init_sky_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| ShaderProgram LIGHTMAP_SHADER = {0} |
light/lightmap.vert light/lightmap.frag
Definition at line 128 of file main.c.
Referenced by bake_lightmap(), init_globals(), init_lightmap_shader(), and SHADERS_INIT().
| ShaderProgram BRDF_SHADER = {0} |
Definition at line 129 of file main.c.
Referenced by init(), init_brdf_shader(), and SHADERS_INIT().
| ShaderProgram POINT_LIGHT_SHADOW_SHADER = {0} |
render/point_light_shadows.vert render/point_light_shadows.geom render/point_light_shadows.frag
Definition at line 130 of file main.c.
Referenced by init_globals(), init_shadow_map_shader(), SHADERS_INIT(), and write_point_light_shadows().
| ShaderProgram TEXT_SHADER = {0} |
Definition at line 131 of file main.c.
Referenced by init_globals(), init_text_shader(), render(), and SHADERS_INIT().
| ShaderProgram UI_SHADER = {0} |
Definition at line 132 of file main.c.
Referenced by init_ui_shader(), render(), and SHADERS_INIT().
| ShaderProgram DEPTH_DOWNSAMPLE_SHADER = {0} |
Definition at line 133 of file main.c.
Referenced by init_depth_pre_pass_shader(), and render_to_cubemap_face().
| GLuint CAM_UBO = 0 |
Definition at line 135 of file main.c.
Referenced by init(), main(), and render_to_cubemap_face().
| GLuint LIGHT_CAM_UBO = 0 |
Definition at line 137 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| GLuint RPROBE_UBO = 0 |
Definition at line 138 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| GLuint PROBE_VOLUME_UBO = 0 |
Definition at line 140 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| GLuint COLOR_GRADE_LUT = 0 |
| AudioEmitter* FOOTSTEP_EMITTER = NULL |
Definition at line 149 of file main.c.
Referenced by init(), and update_leg().
| GLuint LIGHT_SSBO = 0 |
Definition at line 150 of file main.c.
Referenced by init(), upload_bake_lights_gpu(), and upload_lights().
| GLuint MESH_LIGHT_SSBO = 0 |
Definition at line 151 of file main.c.
Referenced by bind_render_ssbos(), determine_light_visibility_per_mesh(), and init().
| GLuint MATERIAL_SSBO = 0 |
Material Data: Roughness, emission multipliers, albedo colors for each instance.
Definition at line 152 of file main.c.
Referenced by bind_render_ssbos(), init(), and upload_material_data().
| GLuint LIGHTMAP_SSBO = 0 |
Definition at line 153 of file main.c.
Referenced by add_all_meshes_to_buffer(), bind_render_ssbos(), and init().
| GLuint VERTEX_SSBO = 0 |
Vertices: vec4 (x, y, z, padding) or just float arrays.
(Don't forget you also need vertex Normals and UVs so your ray hits can sample textures!).
Definition at line 154 of file main.c.
Referenced by bind_baking_ssbos(), GPU_upload_scene_data(), and init().
| GLuint TRI_SSBO = 0 |
Indices (Tris): uvec3 for triangle lookups.
Definition at line 155 of file main.c.
Referenced by bind_baking_ssbos(), GPU_upload_scene_data(), and init().
| GLuint MESH_SSBO = 0 |
Instances (Transforms): Needs the Model Matrix, Inverse Model Matrix (crucial for transforming rays into local mesh space), and the underlying Mesh ID.
Definition at line 156 of file main.c.
Referenced by bind_baking_ssbos(), GPU_upload_scene_data(), and init().
| GLuint MESH_BVH_SSBO = 0 |
Mesh BVH Nodes: Flattened array of nodes.
Must contain AABB min/max, left child index, right child index, and triangle count/offset.
Definition at line 157 of file main.c.
Referenced by bind_baking_ssbos(), GPU_upload_scene_data(), and init().
| GLuint SCENE_BVH_SSBO = 0 |
Scene BVH Nodes (TLAS): Same structure as above, but pointing to instances instead of triangles.
Definition at line 158 of file main.c.
Referenced by bind_baking_ssbos(), GPU_upload_scene_data(), and init().
| GLuint PROBE_SSBO = 0 |
Definition at line 159 of file main.c.
Referenced by bake_lighting_probe_volume(), bind_baking_ssbos(), and init().
| GLuint RPROBE_SSBO = 0 |
Definition at line 160 of file main.c.
Referenced by bake_audio_probe_volume(), bake_reflection_probes(), bind_baking_ssbos(), bind_render_ssbos(), init(), and unbind_baking_ssbos().
| GLuint JOINT_SSBO = 0 |
Definition at line 161 of file main.c.
Referenced by bind_render_ssbos(), init(), unbind_baking_ssbos(), and upload_joint_matrices().
| GLuint CLUSTER_AABB_SSBO = 0 |
Definition at line 162 of file main.c.
Referenced by bind_render_ssbos(), and init().
| GLuint GLOBAL_LIGHT_INDICES_SSBO = 0 |
Definition at line 163 of file main.c.
Referenced by bind_render_ssbos(), and init().
| GLuint CLUSTER_SSBO = 0 |
Definition at line 164 of file main.c.
Referenced by bind_render_ssbos(), and init().
| GLuint MESH_NODE_SSBO = 0 |
Definition at line 165 of file main.c.
Referenced by bind_render_ssbos(), init(), and upload_instance_data().
| GLuint GLOBAL_INSTANCE_SSBO = 0 |
Definition at line 166 of file main.c.
Referenced by bake_audio_probe_volume(), bind_render_ssbos(), init(), render_to_cubemap_face(), and unbind_baking_ssbos().
| GLuint INDIRECT_ARRAYS_COMMAND_BUFFER = 0 |
Definition at line 167 of file main.c.
Referenced by bind_render_ssbos(), init(), render_to_cubemap_face(), unbind_baking_ssbos(), upload_instance_data(), and write_point_light_shadows().
| GLuint INDIRECT_ARRAYS_COMMAND_BUFFER_OUT = 0 |
Definition at line 168 of file main.c.
Referenced by draw_arrays_elements(), init(), render_to_cubemap_face(), and write_point_light_shadows().
| GLuint INDIRECT_ELEMENTS_COMMAND_BUFFER = 0 |
Definition at line 169 of file main.c.
Referenced by bind_render_ssbos(), init(), render_to_cubemap_face(), unbind_baking_ssbos(), upload_instance_data(), and write_point_light_shadows().
| GLuint INDIRECT_ELEMENTS_COMMAND_BUFFER_OUT = 0 |
Definition at line 170 of file main.c.
Referenced by draw_arrays_elements(), init(), render_to_cubemap_face(), and write_point_light_shadows().
| GLuint INSTANCE_SSBO = 0 |
Definition at line 171 of file main.c.
Referenced by bake_audio_probe_volume(), bind_render_ssbos(), init(), unbind_baking_ssbos(), and upload_instances().
| GLuint TEXT_BOX_SSBO = 0 |
Definition at line 172 of file main.c.
Referenced by bake_audio_probe_volume(), bind_render_ssbos(), GPU_upload_ui_elements(), init(), and unbind_baking_ssbos().
| GLuint UI_SSBO = 0 |
Definition at line 173 of file main.c.
Referenced by bind_render_ssbos(), GPU_upload_ui_elements(), and init().
| GLuint SSAO_NOISE_TEXTURE = 0 |
Definition at line 176 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| GLuint FBM_TEXTURE = 0 |
Definition at line 177 of file main.c.
Referenced by bind_dynamic_shader(), init(), precompute_fbm_texture(), and render().
| vec2 JITTER_OFFSET |
Definition at line 181 of file main.c.
Referenced by render_to_cubemap_face(), and update_camera().
| int MOUSE_X = 0 |
Definition at line 183 of file main.c.
Referenced by GPU_upload_singular_element(), GPU_upload_singular_text_box(), handle_ui_selection_event(), main(), process_input(), and process_sdl_event().
| int MOUSE_Y = 0 |
Definition at line 183 of file main.c.
Referenced by GPU_upload_singular_element(), GPU_upload_singular_text_box(), handle_ui_selection_event(), main(), process_input(), and process_sdl_event().
| VertexData VERTEX_DATA |
Definition at line 187 of file main.c.
Referenced by GPU_upload_scene_data(), and init_globals().
| TriData TRI_DATA |
Definition at line 188 of file main.c.
Referenced by GPU_upload_scene_data(), and init_globals().
| MeshData MESH_DATA |
Definition at line 189 of file main.c.
Referenced by GPU_upload_scene_data(), and init_globals().
| BVHGPU MESH_BVH_DATA |
Definition at line 190 of file main.c.
Referenced by GPU_upload_scene_data(), and init_globals().
| BVHGPU SCENE_BVH_DATA |
Definition at line 191 of file main.c.
Referenced by GPU_upload_scene_data(), and init_globals().
| LightmapSSBO LIGHTMAP_DATA |
Definition at line 193 of file main.c.
Referenced by add_all_meshes_to_buffer(), allocate_lightmap_ssbo(), fill_buffer_with_mesh_tri(), fill_vertex_buffer_mesh(), and init_globals().
| MaterialData MATERIAL_DATA |
Definition at line 194 of file main.c.
Referenced by upload_material_data().
| int DEFAULT_DIFFUSE = 0 |
Definition at line 196 of file main.c.
Referenced by bind_material(), init_default_textures(), init_globals(), and upload_material_data().
| int DEFAULT_NORMAL = 0 |
Definition at line 197 of file main.c.
Referenced by bind_material(), init_default_textures(), init_globals(), and upload_material_data().
| int DEFAULT_ARM = 0 |
Definition at line 198 of file main.c.
Referenced by bind_material(), init_default_textures(), init_globals(), load_gltf(), and upload_material_data().
| int DEFAULT_EMISSIVE = 0 |
Definition at line 199 of file main.c.
Referenced by init_default_textures(), init_globals(), and upload_material_data().
| int DUMMY_LIGHTMAP = 0 |
Definition at line 201 of file main.c.
Referenced by bind_dynamic_shader(), and init_default_textures().
| GLuint BRDF_LUT = 0 |
Definition at line 203 of file main.c.
Referenced by bind_dynamic_shader(), and init().
| vec3 CAM_POS |
Shorthand variable for the camera position.
Definition at line 205 of file main.c.
Referenced by determine_closest_rprobes(), main(), and process_sdl_event().
| GLuint HISTORY_TEXTURE[2] = {0} |
| vec4 SSAO_KERNEL[16] |
Definition at line 213 of file main.c.
Referenced by init(), and precompute_ssao_kernel().
| GLuint LIGHTMAP_FBO = 0 |
Definition at line 216 of file main.c.
Referenced by bake_lightmap(), and init().
| GLuint LIGHTMAP_VAO = 0 |
Definition at line 217 of file main.c.
Referenced by bake_lightmap(), and init().
| GLuint LIGHTMAP_VBO = 0 |
Definition at line 218 of file main.c.
Referenced by bake_lightmap(), and init().
| GLuint LIGHTMAP_POS_TEXTURE = 0 |
Definition at line 219 of file main.c.
Referenced by bake_lightmap(), and init().
| GLuint LIGHTMAP_NORM_TEXTURE = 0 |
Definition at line 220 of file main.c.
Referenced by bake_lightmap(), and init().
| GLuint LIGHTMAP_ID_TEXTURE = 0 |
Definition at line 221 of file main.c.
Referenced by bake_lightmap(), and init().
| GLuint DIRECTIONAL_MAP_TEXTURE = 0 |
Definition at line 222 of file main.c.
Referenced by bake_lightmap(), bind_dynamic_shader(), load_lightmap_from_binary(), and save_lightmap_to_binary().
| GLuint LIGHTMAP_BOUNCE_SHADER = 0 |
Definition at line 225 of file main.c.
Referenced by bake_lightmap(), init_globals(), init_lightmap_bounce_compute_shader(), and SHADERS_INIT().
| GLuint LIGHTMAP_DENOISE_SHADER = 0 |
Definition at line 226 of file main.c.
Referenced by bake_lightmap(), init_globals(), init_lightmap_bounce_compute_shader(), and SHADERS_INIT().
| GLuint LIGHTMAP_DILATE_SHADER = 0 |
Definition at line 227 of file main.c.
Referenced by bake_lightmap(), init_globals(), init_lightmap_bounce_compute_shader(), and SHADERS_INIT().
| GLuint PROBE_BAKE_SHADER = 0 |
Definition at line 228 of file main.c.
Referenced by bake_lighting_probe_volume(), init_globals(), init_lightmap_bounce_compute_shader(), and SHADERS_INIT().
| GLuint AUDIO_PROBE_BAKE_SHADER = 0 |
Definition at line 229 of file main.c.
Referenced by init_audio_shader(), process_probe_chunk(), and SHADERS_INIT().
| GLuint PROBE_UNPACK_SHADER = 0 |
Definition at line 230 of file main.c.
Referenced by bake_lighting_probe_volume(), init_globals(), init_lightmap_bounce_compute_shader(), and SHADERS_INIT().
| GLuint DIRECTIONAL_MAP_NORMALIZE_SHADER = 0 |
light/directional_map_normalize.comp
Definition at line 231 of file main.c.
Referenced by bake_lightmap(), init_globals(), init_lightmap_bounce_compute_shader(), and SHADERS_INIT().
| GLuint MAIN_VBO = 0 |
Definition at line 236 of file main.c.
Referenced by init(), init_vertex_layouts(), render_all_draw_commands(), render_to_cubemap_face(), and write_point_light_shadows().
| GLuint MAIN_EBO = 0 |
Definition at line 237 of file main.c.
Referenced by init(), init_vertex_layouts(), render_all_draw_commands(), render_to_cubemap_face(), and write_point_light_shadows().
| GLuint MAIN_VAO = 0 |
Definition at line 238 of file main.c.
Referenced by init(), init_vertex_layouts(), render_all_draw_commands(), render_to_cubemap_face(), and write_point_light_shadows().
| GLuint INSTANCE_VBO = 0 |
Definition at line 239 of file main.c.
Referenced by init(), render_all_draw_commands(), render_to_cubemap_face(), and write_point_light_shadows().
| GLuint WIREFRAME_VBO = 0 |
Definition at line 242 of file main.c.
Referenced by init(), render(), and render_bvh().
| int PERFORMANCE_OVERLAY_TEXT_BOX_START = 0 |
Definition at line 246 of file main.c.
Referenced by create_performance_overlay(), toggle_performance_overlay(), and update_performance_overlay().
| int PERFORMANCE_OVERLAY_MENU = 0 |
Definition at line 247 of file main.c.
Referenced by create_performance_overlay(), GPU_upload_ui_elements(), toggle_performance_overlay(), and update_performance_overlay().
| GLuint TEXT_VBO = 0 |
Definition at line 251 of file main.c.
Referenced by add_all_text_boxes_to_draw_buffer(), init(), and render().
| GLuint TEXT_EBO = 0 |
Definition at line 252 of file main.c.
Referenced by add_all_text_boxes_to_draw_buffer(), init(), and render().
| DrawCommand DRAW_COMMANDS[512] |
Definition at line 259 of file main.c.
Referenced by render_all_draw_commands(), render_to_cubemap_face(), and upload_instances().
| int draw_command_count |
Definition at line 260 of file main.c.
Referenced by render_all_draw_commands(), render_to_cubemap_face(), and upload_instances().
| SDL_AudioDeviceID SDL_AUDIO_DEVICE |
Definition at line 263 of file main.c.
Referenced by init(), init_sdl_audio(), and main().
| DrawCommand SHADOW_DRAW_COMMANDS[512] |
| GLuint LPV_TEXTURE |
Definition at line 268 of file main.c.
Referenced by bind_dynamic_shader(), init(), and load_lighting_pv().
| Manifold MANIFOLDS[MAX_MANIFOLDS] |
Definition at line 270 of file main.c.
Referenced by create_new_manifold(), find_manifold_for_pair(), init_globals(), and update_physics_components().
| uint32_t PP_SHADER_VERSIONS = 0 |
Definition at line 272 of file main.c.
Referenced by init_postprocess_shader(), render(), and SHADERS_INIT().
| GLuint INIT_CLUSTER_AABBS_SHADER = 0 |
render/init_cluster_aabbs.comp
Definition at line 274 of file main.c.
Referenced by GPU_init_cluster_aabbs(), init_cull_clusers_compute_shader(), and SHADERS_INIT().
| Framebuffer DEPTH_DOWNSAMPLE_FBO = {0} |
Definition at line 275 of file main.c.
Referenced by change_render_resolution(), init(), and render_to_cubemap_face().
| DebugVertex DEBUG_FACES[1024][3] |
| DebugVertex DEBUG_POINTS[1024] |
| DebugVertex DEBUG_LINES[DEBUG_LINES_MAX] |
Definition at line 281 of file main.c.
Referenced by clip_manifold(), ray_traverse_scene_bvh(), render(), render_mesh_aabbs_from_root(), render_probe_volume(), and update_physics_components().
| int DEBUG_LINE_COUNT |
Definition at line 282 of file main.c.
Referenced by clip_manifold(), main(), process_probe_chunk(), ray_traverse_scene_bvh(), render(), render_mesh_aabbs_from_root(), render_probe_volume(), and update_physics_components().
| char asset_dir[256] |
Definition at line 284 of file main.c.
Referenced by init_globals(), and render_main_menu().
| char rprobe_dir[256] |
Definition at line 285 of file main.c.
Referenced by init_globals(), and render_main_menu().
| Player player = {0} |
The Player data.
Definition at line 287 of file main.c.
Referenced by apply_planet_velocity(), apply_velocity(), audio_update(), check_audio_pv(), check_lighting_pv(), init_action_callbacks(), init_player(), init_player_PC(), main(), PC_resolve_impulse(), PC_resolve_impulse_static(), player_find_collision(), player_resolve_impulse(), process_input(), render(), resolve_collisions(), update_audio_occlusion(), update_body_from_legs(), update_camera(), update_light_camera(), update_player_audio_probe(), update_player_ir(), and update_skeleton().
| vec3 spawn_point = {0, 0, 0} |
Spawn point.
Definition at line 289 of file main.c.
Referenced by init_player(), and process_input().
| EPAWorkspace* EW[8] |
Definition at line 291 of file main.c.
Referenced by epa(), EPA_add_horizon_face_to_hull_faces(), EPA_check_face_visibility(), EPA_check_horizon_edges(), EPA_expand_hull(), GJK(), init_globals(), PC_process_collision_node(), PC_traverse_scene_bvh(), and player_find_collision().
| float frame_time = 0 |
| GLuint SKYBOX = 0 |
Definition at line 302 of file main.c.
Referenced by bake_lighting_probe_volume(), bake_lightmap(), bind_dynamic_shader(), init(), and render_to_cubemap_face().
| GLuint SKY_VAO = 0 |
Definition at line 303 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| GLuint SKY_VBO = 0 |
Definition at line 304 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| GLuint RPROBE_CUBE_MAP_ARRAY = 0 |
Definition at line 305 of file main.c.
Referenced by bake_reflection_probes(), bind_dynamic_shader(), init(), and reallocate_rprobe_array().
| GLuint RPROBE_FBO = 0 |
Definition at line 306 of file main.c.
Referenced by bake_reflection_probes(), and init().
| Framebuffer POINT_LIGHT_SHADOWS_FBO = {0} |
Definition at line 307 of file main.c.
Referenced by bind_dynamic_shader(), init(), and write_point_light_shadows().
| ShaderProgram FOCAL_DISTANCE_SHADER = {0} |
Definition at line 308 of file main.c.
Referenced by init_dof_shader(), render_to_cubemap_face(), and SHADERS_INIT().
| Globals GLOBALS = {0} |
Engine Globals.
Definition at line 310 of file main.c.
Referenced by a_star_aportal(), add_all_meshes_to_buffer(), add_image_to_registry(), add_mesh_to_buffer(), add_uv_island_to_lightmap(), allocate_gbuffer_msaa(), allocate_lightmap_ssbo(), allocate_main_fbo(), assign_uvs(), bake_audio_probe_volume(), bake_lighting_probe_volume(), bake_lightmap(), bake_reflection_probes(), bind_dynamic_shader(), bind_material(), build_light_bvh(), build_uv_islands(), calc_mesh_index_size(), calc_mesh_size(), check_audio_pv(), check_lighting_pv(), create_entity(), create_physics_component(), destroy_asset_instance(), determine_closest_rprobes(), determine_light_visibility_per_mesh(), determine_mesh_visibility(), ESTATE_chair_interact(), execute_aportal_undo(), execute_aprobe_undo(), execute_globals_undo(), execute_light_undo(), execute_lprobe_undo(), execute_mesh_node_undo(), execute_rprobe_undo(), fill_buffer_with_mesh_tri(), fill_vertex_buffer_mesh(), find_animation(), find_closest_visible_aportal(), find_free_mn(), find_mn_by_name(), GPU_upload_scene_data(), init_default_textures(), init_globals(), init_new_asset_instance(), init_new_audio_portal(), init_new_material(), init_PC(), init_scene_bvh(), init_vertex_layouts(), interpolate_nearest_aprobes(), LM_allocate_empty_mns(), LM_regenerate_texels(), load_aprobes(), load_audio_pv(), load_gltf(), load_gltf_texture(), load_lighting_pv(), load_lightmap_from_binary(), load_lprobes(), main(), MN_INIT(), pathfind_audio_occlusion(), PC_find_collision(), PC_resolve_impulse(), PC_resolve_impulse_static(), PC_traverse_scene_bvh(), play_animation(), player_find_collision(), player_resolve_impulse(), player_resolve_impulse_static(), populate_draw_commands(), process_input(), process_probe_chunk(), process_sdl_event(), query_probe_volume(), ray_traverse_scene_bvh(), raycast_scene(), read_mesh_node(), reallocate_rprobe_array(), recalculate_audio_portal_paths(), remove_audio_portal(), render(), render_all_draw_commands(), render_asset_instance_menu(), render_audio_menu(), render_editor_menu(), render_light_menu(), render_lprobe_menu(), render_main_menu(), render_material_menu(), render_mesh_aabbs_from_root(), render_mn_menu(), render_to_cubemap_face(), reset_audio_pvs(), reset_lighting_pvs(), resolve_collisions(), retrieve_asset_by_name(), retrieve_mesh_by_name(), save_aprobes(), save_lightmap_to_binary(), save_lprobes(), scene_load(), scene_load_volumes(), scene_save(), scene_save_volumes(), search_collisions_from_hull(), search_collisions_from_pc(), SKIN_INIT(), update_body_from_legs(), update_camera(), update_physics_components(), update_player_ir(), update_scene_nodes(), update_skin_matrices(), upload_bake_lights_gpu(), upload_instance_data(), upload_instances(), upload_joint_matrices(), upload_lights(), upload_material_data(), write_mesh_node(), and write_point_light_shadows().
| Entity ENTITIES[MAX_ENTITIES] |
Definition at line 312 of file main.c.
Referenced by create_entity(), execute_light_undo(), init_globals(), main(), read_mesh_node(), render_editor_menu(), render_entity_menu(), render_light_menu(), scene_load(), scene_save(), and update_entities().
| AssetInstance ASSET_INSTANCES[MAX_ASSET_INSTANCES] |
Definition at line 313 of file main.c.
Referenced by destroy_asset_instance(), execute_asset_instance_undo(), find_animation(), init_globals(), init_new_asset_instance(), play_animation(), render_asset_instance_menu(), scene_load(), scene_save(), update_scene_nodes(), update_skin_matrices(), and upload_joint_matrices().
| PhysicsComponent PHYSICS_COMPONENTS[MAX_PHYSICS_COMPONENTS] |
Definition at line 314 of file main.c.
Referenced by create_physics_component(), init_globals(), init_player(), read_mesh_node(), scene_load(), scene_save(), and update_physics_components().
| AnimationComponent ANIMATION_COMPONENTS[MAX_ANIMATION_COMPONENTS] |
Definition at line 315 of file main.c.
Referenced by create_animation_component(), init_globals(), scene_load(), scene_save(), and update_animation_components().
| int running = 0 |
The variable that tracks if we need to exit main().
Definition at line 317 of file main.c.
Referenced by main(), process_input(), and process_sdl_event().
| float dt = 0.0f |
The 1.0f/60 simulation timestep.
Definition at line 319 of file main.c.
Referenced by apply_planet_velocity(), apply_velocity(), calculate_camera_angles(), main(), PC_apply_velocity(), PC_resolve_impulse(), PC_resolve_impulse_static(), player_resolve_impulse(), player_resolve_impulse_static(), process_input(), resolve_collisions(), update_angular_spring(), update_animation_components(), update_body_from_legs(), update_leg(), update_physics_components(), update_skeleton(), and update_spring().
| float time = 0 |
The frame time but wrapping at 1.0.
Definition at line 320 of file main.c.
Referenced by bind_dynamic_shader(), main(), play_animation(), render(), render_entity_menu(), render_to_cubemap_face(), and update_performance_overlay().
| Camera cam = {0} |
This is currently the player cam.
Definition at line 322 of file main.c.
Referenced by apply_planet_velocity(), apply_velocity(), calculate_camera_angles(), compute_camera_basis(), get_view_planes(), init_player(), main(), make_look_at(), PC_resolve_impulse(), PC_resolve_impulse_static(), player_resolve_impulse(), player_resolve_impulse_static(), process_input(), process_sdl_event(), render(), resolve_collisions(), update_body_from_legs(), update_camera(), update_leg(), update_light_camera(), update_player_ir(), and update_skeleton().
| Camera LIGHT_CAM[4] = {0} |
DIRECTIONAL_LIGHT Cameras for shadowmaps
Definition at line 323 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| int DIRECTIONAL_LIGHT_COUNT = 0 |
Definition at line 324 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| struct nk_context* NK_CTX = NULL |
Nuklear context handle used for Editor UI.
Definition at line 327 of file main.c.
Referenced by handle_ui_selection_event(), init(), main(), process_sdl_event(), render_aabb_widget(), render_asset_instance_menu(), render_audio_menu(), render_dropdown(), render_dropdown_labels(), render_editor_menu(), render_entity_menu(), render_file_directory_dropdown(), render_ivec3_widget(), render_light_menu(), render_lprobe_menu(), render_main_menu(), render_mat4_widget(), render_material_menu(), render_mn_menu(), render_obb_widget(), render_pos_widget(), render_selection_menu(), render_text_menu(), and render_ui_menu().
| bool NUKLEAR_HOVERED = false |
Definition at line 328 of file main.c.
Referenced by handle_ui_selection_event(), process_sdl_event(), render_asset_instance_menu(), render_audio_menu(), render_editor_menu(), render_entity_menu(), render_light_menu(), render_lprobe_menu(), render_main_menu(), render_material_menu(), render_mn_menu(), render_selection_menu(), render_text_menu(), and render_ui_menu().
| EditorSettings EDITOR_SETTINGS = {0} |
Definition at line 330 of file main.c.
Referenced by assign_uvs(), bake_audio_probe_volume(), bake_lighting_probe_volume(), bake_lightmap(), bake_reflection_probes(), bind_dynamic_shader(), change_fullscreen_option(), change_render_resolution(), check_stack_size(), convolver_node_process_pcm_frames(), execute_aemitter_undo(), execute_aprobe_undo(), execute_asset_instance_undo(), execute_editor_settings_undo(), execute_light_undo(), execute_lprobe_undo(), execute_mesh_node_undo(), execute_rprobe_undo(), execute_text_box_undo(), GPU_upload_singular_element(), GPU_upload_singular_text_box(), GPU_upload_ui_elements(), handle_ui_selection_event(), init(), init_action_callbacks(), init_globals(), init_hover_callbacks(), load_lightmap_from_binary(), main(), process_input(), process_probe_chunk(), process_sdl_event(), render(), render_all_draw_commands(), render_asset_instance_menu(), render_audio_menu(), render_editor_menu(), render_entity_menu(), render_light_menu(), render_lprobe_menu(), render_main_menu(), render_mat4_widget(), render_material_menu(), render_mn_menu(), render_obb_widget(), render_probe_volume(), render_selection_menu(), render_text_menu(), render_to_cubemap_face(), render_ui_menu(), save_lightmap_to_binary(), and update_camera().
| size_t cam_ubo_padded |
Definition at line 332 of file main.c.
Referenced by init(), main(), and render_to_cubemap_face().
| uint8_t* cam_ubo_ptr |
Definition at line 333 of file main.c.
Referenced by init(), main(), and render_to_cubemap_face().
| size_t light_cam_ubo_padded |
Definition at line 335 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| uint8_t* light_cam_ubo_ptr |
Definition at line 336 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| size_t rprobe_ubo_padded |
Definition at line 338 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| uint8_t* rprobe_ubo_ptr |
Definition at line 339 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| size_t probe_volume_ubo_padded |
Definition at line 341 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| uint8_t* probe_volume_ubo_ptr |
Definition at line 342 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| size_t light_ssbo_size |
Definition at line 344 of file main.c.
Referenced by init(), upload_bake_lights_gpu(), and upload_lights().
| uint8_t* light_ssbo_ptr |
Definition at line 345 of file main.c.
Referenced by init(), upload_bake_lights_gpu(), and upload_lights().
| size_t mesh_light_ssbo_size |
Definition at line 347 of file main.c.
Referenced by determine_light_visibility_per_mesh(), and init().
| uint8_t* mesh_light_ssbo_ptr |
Definition at line 348 of file main.c.
Referenced by determine_light_visibility_per_mesh(), and init().
| size_t joint_ssbo_size |
Definition at line 350 of file main.c.
Referenced by init(), and upload_joint_matrices().
| uint8_t* joint_ssbo_ptr |
Definition at line 351 of file main.c.
Referenced by init(), and upload_joint_matrices().
| uint8_t* instance_vbo_ptr |
Definition at line 354 of file main.c.
Referenced by init(), and render_to_cubemap_face().
| size_t mesh_node_ssbo_size |
Definition at line 358 of file main.c.
Referenced by init(), and upload_instance_data().
| uint8_t* mesh_node_ssbo_ptr |
Definition at line 359 of file main.c.
Referenced by init(), and upload_instance_data().
| uint8_t* indirect_arrays_ptr |
Definition at line 361 of file main.c.
Referenced by init(), and upload_instance_data().
| uint8_t* indirect_elements_ptr |
Definition at line 367 of file main.c.
Referenced by init(), and upload_instance_data().
| size_t text_box_ssbo_size |
Definition at line 371 of file main.c.
Referenced by GPU_upload_ui_elements(), and init().
| uint8_t* text_box_ssbo_ptr |
Definition at line 372 of file main.c.
Referenced by GPU_upload_ui_elements(), and init().
| size_t instance_ssbo_size |
Definition at line 374 of file main.c.
Referenced by init(), and upload_instances().
| uint8_t* instance_ssbo_ptr |
Definition at line 375 of file main.c.
Referenced by init(), and upload_instances().
| size_t ui_ssbo_size |
Definition at line 379 of file main.c.
Referenced by GPU_upload_ui_elements(), and init().
| uint8_t* ui_ssbo_ptr |
Definition at line 380 of file main.c.
Referenced by GPU_upload_ui_elements(), and init().
| size_t ui_instance_vbo_size |
Definition at line 385 of file main.c.
Referenced by GPU_upload_ui_elements(), and init().
| uint8_t* ui_instance_vbo_ptr |
Definition at line 386 of file main.c.
Referenced by GPU_upload_ui_elements(), and init().
| bool draw_dirty |
If we need to reupload and resort transforms in create_and_sort_draw_commands() and upload_instance_data().
Definition at line 388 of file main.c.
Referenced by execute_globals_undo(), execute_mesh_node_undo(), main(), render_main_menu(), render_mn_menu(), render_to_cubemap_face(), and scene_load().
| const vec3 left_leg_offset = {0, -0.1f, 0} |
Definition at line 391 of file main.c.
Referenced by update_skeleton().
| const vec3 right_leg_offset = {0, 0.1f, 0} |
Definition at line 392 of file main.c.
Referenced by update_skeleton().
| double time_since_last_render = 0.0 |
Computes the dot product or discrete sum over an array range.
The time since the last render (while running physics updates).
\[S = \sum_{i=0}^{N-1} x[i] \cdot w[i] \]
Applies an impulse response filter via discrete convolution.
\[(x * h)[n] = \sum_{m=-\infty}^{\infty} x[m] \, h[n - m] \]
Evaluates the rendering equation for global illumination.
\[L_o(x, \omega_o) = L_e(x, \omega_o) + \int_{\Omega} f_r(x, \omega_i, \omega_o) L_i(x, \omega_i) (\omega_i \cdot n) \, d\omega_i \]
Computes Schlick's approximation for Fresnel reflectance.
\begin{eqnarray*}F(\theta) &=& F_0 + (1 - F_0)(1 - \cos\theta)^5 \\ \text{where } \cos\theta &=& \max(0, \omega_h \cdot v) \end{eqnarray*}
Computes the dot product or discrete sum over an array range.
Definition at line 505 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint main_queries[QUERY_FRAMES] |
| GLuint pl_queries[QUERY_FRAMES] |
Definition at line 507 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint sm_queries[QUERY_FRAMES] |
Definition at line 508 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint render_queries[QUERY_FRAMES] |
Definition at line 509 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint cull_queries[QUERY_FRAMES] |
Definition at line 510 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint gbuffer_queries[QUERY_FRAMES] |
Definition at line 511 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint dof_queries[QUERY_FRAMES] |
Definition at line 512 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint ssao_queries[QUERY_FRAMES] |
Definition at line 513 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint taa_queries[QUERY_FRAMES] |
Definition at line 514 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint ssr_queries[QUERY_FRAMES] |
Definition at line 515 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| GLuint bloom_queries[QUERY_FRAMES] |
Definition at line 516 of file main.c.
Referenced by main(), and render_to_cubemap_face().
| int current_query_frame = 1 |
Definition at line 517 of file main.c.
Referenced by main(), render(), and render_to_cubemap_face().
| SDL_Window* window = NULL |
Definition at line 519 of file main.c.
Referenced by calculate_attenuation(), CalculateAttenuation(), change_fullscreen_option(), execute_editor_settings_undo(), init(), main(), process_input(), and render_main_menu().