|
Space Sim
|
Creates a density field from a chunk. More...
Go to the source code of this file.
Data Structures | |
| struct | Vertex |
| struct | VertexInfo |
| struct | WarpLayer |
| struct | PerlinLayer |
| struct | FBMLayer |
Macros | |
| #define | LODMAX 4 |
| #define | MAX_CHUNKS 400 |
| #define | MAX_LAYERS 24 |
| #define | NUM_OCTAVES 5 |
Functions | |
| layout (local_size_x=1, local_size_y=1, local_size_z=1) in | |
| layout (std140) uniform CameraData | |
| layout (std430, binding=8) buffer MarchingCubesData | |
| float | mod289 (float x) |
| vec4 | mod289 (vec4 x) |
| vec4 | perm (vec4 x) |
| float | noise (vec3 p) |
| float | fbm (vec3 x) |
| void | main () |
Variables | |
| const float | radius = 1000.0 |
| uniform int | uSize |
| uniform int | lod |
| uniform vec3 | chunk_offset |
| uniform sampler3D | perlin_tex |
| uniform sampler3D | fbm_tex |
| uniform int | chunk_id |
Creates a density field from a chunk.
Definition in file density.comp.
| struct Vertex |
| struct VertexInfo |
| struct WarpLayer |
| struct PerlinLayer |
| struct FBMLayer |
| #define LODMAX 4 |
Definition at line 39 of file density.comp.
| #define MAX_CHUNKS 400 |
Definition at line 40 of file density.comp.
| #define MAX_LAYERS 24 |
Definition at line 54 of file density.comp.
| #define NUM_OCTAVES 5 |
Definition at line 111 of file density.comp.
Referenced by fbm().
| layout | ( | local_size_x | = 1, |
| local_size_y | = 1, | ||
| local_size_z | = 1 ) |
References layout().
| layout | ( | std140 | ) |
Definition at line 12 of file density.comp.
References layout(), projection, and view.
| layout | ( | std430 | , |
| binding | = 8 ) |
Definition at line 20 of file density.comp.
References EDGE_TABLE, EDGE_TO_VERTICES, layout(), and TRIANGLE_TABLE.
| float mod289 | ( | float | x | ) |
Definition at line 113 of file density.comp.
References mod289().
Definition at line 114 of file density.comp.
References mod289(), and perm().
Referenced by fbm_noise(), noise(), and perm().
| float noise | ( | vec3 | p | ) |
Definition at line 116 of file density.comp.
| float fbm | ( | vec3 | x | ) |
Definition at line 139 of file density.comp.
References fbm(), noise(), and NUM_OCTAVES.
Referenced by density_fn(), fbm(), fbm(), and precompute_fbm_texture().
| void main | ( | ) |
Definition at line 161 of file density.comp.
References FBMLayer::amp, PerlinLayer::amp, WarpLayer::amp, chunk_id, chunk_offset, fbm_tex, FBMLayer::freq, PerlinLayer::freq, WarpLayer::freq0, WarpLayer::freq1, WarpLayer::freq2, main(), WarpLayer::offset0, WarpLayer::offset1, WarpLayer::offset2, perlin_tex, uSize, and vec3::z.
| const float radius = 1000.0 |
Definition at line 151 of file density.comp.
| uniform int uSize |
Definition at line 153 of file density.comp.
Referenced by main(), and sample_density().
| uniform int lod |
Definition at line 154 of file density.comp.
Referenced by add_chunk_hash(), create_new_planet_mesh(), delete_chunk_hash(), find_chunk_hash(), free_child(), free_current_parent(), free_parent(), load_chunks(), main(), replace_chunk_hash(), and set_current_lod().
| uniform vec3 chunk_offset |
Definition at line 155 of file density.comp.
Referenced by main(), and sample_density().
| uniform sampler3D perlin_tex |
Definition at line 156 of file density.comp.
| uniform sampler3D fbm_tex |
Definition at line 157 of file density.comp.
| uniform int chunk_id |
Definition at line 159 of file density.comp.
Referenced by create_new_planet_mesh(), density_index(), and main().