|
Untitled
|
Go to the source code of this file.
Data Structures | |
| struct | Material |
| The Materials parsed in from scene files that determine rendering pipeline setup, uploads, and ordering. More... | |
| struct | Vertex |
| struct | Face |
| struct | MeshNode |
| MeshNodes that describe the position of Meshes, GLTF nodes for GLTFAnimations, or hold references to other MeshNodes. More... | |
| struct | AABB |
| struct | BVHNode |
| Nodes for the acceleration structures of BVHs. More... | |
| struct | AudioProbe |
| Baked IR samples loaded in from binary into APVs from ProbeVolumes. More... | |
| struct | AudioSample |
| struct | RayHit |
Macros | |
| #define | SAMPLE_RATE 48000 |
| #define | SPEED_OF_SOUND 343.0f |
| #define | MAX_SAMPLES (SAMPLE_RATE * 1) |
| #define | NUM_RAYS 100000 |
Functions | |
| layout (local_size_x=16, local_size_y=16) in | |
| layout (std430, binding=2) buffer MaterialData | |
| uint | pcg_hash () |
| uint | wang_hash (uint seed) |
| float | rand () |
| void | frisvad_basis (in vec3 n, out vec3 b1, out vec3 b2) |
| vec3 | get_bounce_direction (vec3 normal) |
| vec3 | generate_sphere_dir (int i, int N) |
| RayHit | ray_intersects_triangle (vec3 origin, vec3 dir, vec3 a, vec3 b, vec3 c) |
| bool | slab_test (BVHNode n, vec3 pos, vec3 inv_dir) |
| void | traverse_mesh_bvh (uint node_offset, uint mn_id, vec3 pp, vec3 pm, vec3 original_dir, vec3 dir, vec3 md, uint mesh, uint tri) |
| void | traverse_scene_bvh (vec3 pp, vec3 dir, vec3 inv_dir, uint light_type, uint mesh, uint tri) |
| void | main () |
Variables | |
| uint | state = 0 |
| RayHit | hit |
| uniform uint | uProbeSize |
| uniform uint | uRayOffset |
| uniform uint | uIterations |
| uniform uint | uMaxSamplesPerProbe |
| uniform uint | uBounces |
| uniform uint | uBatchSize |
| uniform uint | uProbeOffset |
| const int | AUDIO_NUM_BANDS = 6 |
| struct Vertex |
Definition at line 49 of file audio_probe_bake.comp.
| Data Fields | ||
|---|---|---|
| vec3 | pos | |
| uint | pad0 | |
| vec3 | normal | |
| uint | pad1 | |
| vec2 | uv | |
| uint | pad2 | |
| uint | pad3 | |
| struct Face |
| struct AABB |
| struct BVHNode |
Nodes for the acceleration structures of BVHs.
Definition at line 125 of file audio_probe_bake.comp.
| Data Fields | ||
|---|---|---|
| int | left |
Left child. -1 if empty. |
| int | right |
Right child. -1 if empty. |
| int | parent |
Parent. -1 if empty. |
| int | index | The index of the node inside of the array. |
| int | first_index | |
| int | count | |
| int | next |
The pointer to the next node (either right child or parent's right child) for recursion-less traversal. See: assign_next_nodes(). |
| uint | pad0 | |
| vec3 | min | |
| uint | pad1 | |
| vec3 | max | |
| uint | pad2 | |
| vec3 | center | |
| uint | pad3 | |
| vec3 | extents | |
| uint | pad4 | |
| AABB | aabb | The bounding box of all of this node's children. |
| size_t | first_index | The first index into the bvh_indices array. |
| size_t | count | How many children are inside this node. |
| float | flux |
The total light flux of this node. Used for Light BVH importance sampling. |
| float | emissive_flux |
The only-emissive flux. Used for Light BVH importance sampling. |
| struct AudioSample |
Definition at line 168 of file audio_probe_bake.comp.
| Data Fields | ||
|---|---|---|
| vec3 | arrival_dir | |
| float | time_of_flight | |
| vec3 | pos | |
| uint | valid | |
| float | energy[6] | |
| uint | pad0 | |
| uint | pad1 | |
| float | abs_energy[6] | |
| uint | pad4 | |
| uint | pad5 | |
| struct RayHit |
| #define SAMPLE_RATE 48000 |
Definition at line 7 of file audio_probe_bake.comp.
Referenced by generate_synthetic_IR_tail(), and process_probe_chunk().
| #define SPEED_OF_SOUND 343.0f |
Definition at line 8 of file audio_probe_bake.comp.
Referenced by main().
| #define MAX_SAMPLES (SAMPLE_RATE * 1) |
Definition at line 9 of file audio_probe_bake.comp.
Referenced by allocate_audio_scratch_hrtf(), process_probe_chunk(), and update_player_ir().
| #define NUM_RAYS 100000 |
Definition at line 10 of file audio_probe_bake.comp.
| layout | ( | local_size_x | = 16, |
| local_size_y | = 16 ) |
References layout().
Referenced by add_all_meshes_to_buffer(), add_mesh_to_buffer(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), layout(), and layout().
| layout | ( | std430 | , |
| binding | = 2 ) |
Definition at line 43 of file audio_probe_bake.comp.
References layout().
| uint pcg_hash | ( | ) |
Definition at line 190 of file audio_probe_bake.comp.
References pcg_hash(), and state.
Referenced by pcg_hash(), and rand().
| uint wang_hash | ( | uint | seed | ) |
Definition at line 197 of file audio_probe_bake.comp.
References wang_hash().
Referenced by main(), and wang_hash().
| float rand | ( | ) |
Definition at line 206 of file audio_probe_bake.comp.
References pcg_hash(), and rand().
Referenced by generate_bounce(), generate_synthetic_IR_tail(), get_bounce_direction(), init(), main(), precompute_ssao_kernel(), process_probe_chunk(), rand(), random_pos_on_triangle(), resolve_transparents(), traverse_light_bvh(), traverse_light_bvh_direct_emissives(), and update_physics_components().
Definition at line 209 of file audio_probe_bake.comp.
References frisvad_basis(), and n.
Referenced by frisvad_basis(), frisvad_basis(), and get_bounce_direction().
Definition at line 228 of file audio_probe_bake.comp.
References frisvad_basis(), get_bounce_direction(), rand(), TBN, and vec3::z.
Referenced by get_bounce_direction(), main(), trace_path(), and trace_path().
| vec3 generate_sphere_dir | ( | int | i, |
| int | N ) |
Definition at line 258 of file audio_probe_bake.comp.
References generate_sphere_dir().
Referenced by compute_hull_centroid(), generate_sphere_dir(), main(), and trace_path().
Definition at line 289 of file audio_probe_bake.comp.
References RayHit::barycentrics, RayHit::hit, RayHit::pos, ray_intersects_triangle(), and RayHit::t.
Referenced by compute_hull_centroid(), ray_intersects_triangle(), ray_intersects_triangle(), ray_intersects_triangle(), ray_traverse_mesh_bvh(), and traverse_mesh_bvh().
Definition at line 333 of file audio_probe_bake.comp.
References RayHit::blocked_t, hit, n, slab_test(), RayHit::t, vec3::x, vec3::y, and vec3::z.
Referenced by slab_test(), slab_test(), traverse_mesh_bvh(), and traverse_scene_bvh().
| void traverse_mesh_bvh | ( | uint | node_offset, |
| uint | mn_id, | ||
| vec3 | pp, | ||
| vec3 | pm, | ||
| vec3 | original_dir, | ||
| vec3 | dir, | ||
| vec3 | md, | ||
| uint | mesh, | ||
| uint | tri ) |
Definition at line 346 of file audio_probe_bake.comp.
References RayHit::best_t, RayHit::blocked_t, hit, RayHit::hit, RayHit::mn_idx, n, Face::normal, RayHit::normal, RayHit::occluded, Vertex::pos, ray_intersects_triangle(), slab_test(), RayHit::t, traverse_mesh_bvh(), RayHit::tri_idx, Face::v0, Face::v1, and Face::v2.
Referenced by traverse_mesh_bvh(), and traverse_scene_bvh().
Definition at line 410 of file audio_probe_bake.comp.
References MeshNode::inverse_global_matrix, MeshNode::is_static, MeshNode::mesh_id, MeshNode::mesh_node_id, n, MeshNode::node_offset, slab_test(), traverse_mesh_bvh(), and traverse_scene_bvh().
Referenced by main(), process_area_light(), process_area_light(), resolve_transparents(), solve_light_source(), solve_light_source(), trace_path(), and traverse_scene_bvh().
| void main | ( | ) |
Definition at line 465 of file audio_probe_bake.comp.
References Material::absorption_coefficients, AUDIO_NUM_BANDS, RayHit::best_t, RayHit::blocked_t, generate_sphere_dir(), get_bounce_direction(), MeshNode::global_matrix, hit, RayHit::hit, MeshNode::inverse_global_matrix, main(), Face::material_id, RayHit::mn_idx, Face::normal, RayHit::normal, RayHit::occluded, AudioProbe::pos, RayHit::pos, rand(), samples, Material::scattering_coefficients, SPEED_OF_SOUND, state, RayHit::t, traverse_scene_bvh(), RayHit::tri_idx, uBatchSize, uBounces, uIterations, uMaxSamplesPerProbe, uProbeOffset, uProbeSize, uRayOffset, wang_hash(), and vec3::y.
| uint state = 0 |
Definition at line 188 of file audio_probe_bake.comp.
Referenced by main(), and pcg_hash().
| RayHit hit |
Definition at line 287 of file audio_probe_bake.comp.
Referenced by BVH_slab_test_aabb(), check_lighting_pv(), find_closest_visible_aportal(), get_hit_uvs(), interpolate_nearest_aprobes(), main(), pathfind_audio_occlusion(), process_area_light(), process_area_light(), process_sdl_event(), ray_traverse_mesh_bvh(), ray_traverse_scene_bvh(), raycast_scene(), recalculate_audio_portal_paths(), resolve_collisions(), resolve_transparents(), slab_test(), slab_test(), solve_light_source(), solve_light_source(), trace_path(), trace_path(), traverse_mesh_bvh(), update_audio_occlusion(), update_body_from_legs(), and update_leg().
| uniform uint uProbeSize |
Definition at line 451 of file audio_probe_bake.comp.
Referenced by main().
| uniform uint uRayOffset |
Definition at line 452 of file audio_probe_bake.comp.
Referenced by main().
| uniform uint uIterations |
Definition at line 453 of file audio_probe_bake.comp.
Referenced by main(), and trace_path().
| uniform uint uMaxSamplesPerProbe |
Definition at line 454 of file audio_probe_bake.comp.
Referenced by main().
| uniform uint uBounces |
Definition at line 455 of file audio_probe_bake.comp.
Referenced by main().
| uniform uint uBatchSize |
Definition at line 456 of file audio_probe_bake.comp.
Referenced by main().
| uniform uint uProbeOffset |
Definition at line 457 of file audio_probe_bake.comp.
Referenced by main().
| const int AUDIO_NUM_BANDS = 6 |
Definition at line 462 of file audio_probe_bake.comp.