|
Space Sim
|
Shades particles based on lighting and particle material makeup. More...
Go to the source code of this file.
Data Structures | |
| struct | Particle |
| struct | Node |
Macros | |
| #define | BODY_COUNT 15000 |
| #define | MAX_NODES 45000 |
| #define | MAX_DEPTH 64 |
| #define | NUM_OCTAVES 5 |
Functions | |
| layout (location=0) out vec4 fragColor | |
| layout (std140, binding=1) uniform CameraData | |
| layout (std430, binding=1) buffer ParticleData | |
| float | mod289 (float x) |
| vec4 | mod289 (vec4 x) |
| vec4 | perm (vec4 x) |
| float | noise (vec3 p) |
| float | fbm (vec3 x) |
| float | linearize (float z) |
| void | main () |
Variables | |
| in vec3 | vWorldPos |
| in vec3 | vVelocity |
| in vec3 | vNormal |
| in vec3 | vViewVelocity |
| in vec4 | vColor |
| in vec2 | vTexCoord |
| in float | vSize |
| in float | vDist |
| in vec3 | vCenter |
| flat in uint | vPID |
| uniform sampler2D | uSphere |
| uniform samplerCube | uSky |
| uniform vec3 | cam_right |
| uniform vec3 | cam_forward |
| uniform vec3 | cam_up |
| vec3 | blue = vec3(0.4, 0.6, 0.7) |
| vec4 | white = vec4(1.0, 1.0, 1.0, 1.0) |
| uniform sampler3D | perlin_tex |
| uniform sampler3D | fbm_tex |
Shades particles based on lighting and particle material makeup.
Definition in file main.frag.
| struct Particle |
| struct Node |
| layout | ( | std140 | , |
| binding | = 1 ) |
Definition at line 31 of file main.frag.
References layout(), projection, and view.
| layout | ( | std430 | , |
| binding | = 1 ) |
Definition at line 49 of file main.frag.
References BODY_COUNT, and layout().
| float noise | ( | vec3 | p | ) |
| float fbm | ( | vec3 | x | ) |
Definition at line 124 of file main.frag.
References fbm(), noise(), and NUM_OCTAVES.
| float linearize | ( | float | z | ) |
Definition at line 138 of file main.frag.
References linearize().
Referenced by linearize(), and main().
| void main | ( | ) |