Space Sim
Loading...
Searching...
No Matches
com22.comp File Reference

Propagates mass back up to the root while computing the center of mass and bounds for each node along the way. More...

Go to the source code of this file.

Data Structures

struct  Particle
struct  MortonEntry
struct  Node

Macros

#define WORKGROUP_SIZE   128
#define RADIX_SORT_BINS   128
#define SUBGROUP_SIZE   32
#define BODY_COUNT   15000
#define MAX_NODES   45000
#define MAX_DEPTH   64

Functions

 layout (local_size_x=WORKGROUP_SIZE) in
 layout (std430, binding=1) buffer ParticleData
void main ()

Variables

uniform int depth

Detailed Description

Propagates mass back up to the root while computing the center of mass and bounds for each node along the way.

Definition in file com22.comp.


Data Structure Documentation

◆ Particle

struct Particle

Definition at line 7 of file main.h.

Data Fields
vec3 pos
vec3 vel
vec4 p_m
vec4 mat
vec4 vel
vec4 acc

◆ MortonEntry

struct MortonEntry

Definition at line 29 of file bounds.comp.

Data Fields
uint pid
uint morton

◆ Node

struct Node

Definition at line 108 of file types.h.

Data Fields
vec3 center_of_mass
vec3 center
float mass
int first_child
bool subdivided
float half_size
int body_index
vec4 com_m
vec4 min
vec3 max
int next
ivec4 lrpd

Macro Definition Documentation

◆ WORKGROUP_SIZE

#define WORKGROUP_SIZE   128

Definition at line 8 of file com22.comp.

◆ RADIX_SORT_BINS

#define RADIX_SORT_BINS   128

Definition at line 9 of file com22.comp.

Referenced by main().

◆ SUBGROUP_SIZE

#define SUBGROUP_SIZE   32

Definition at line 10 of file com22.comp.

◆ BODY_COUNT

#define BODY_COUNT   15000

Definition at line 11 of file com22.comp.

◆ MAX_NODES

#define MAX_NODES   45000

Definition at line 12 of file com22.comp.

◆ MAX_DEPTH

#define MAX_DEPTH   64

Definition at line 55 of file com22.comp.

Function Documentation

◆ layout() [1/2]

layout ( local_size_x = WORKGROUP_SIZE)

◆ layout() [2/2]

layout ( std430 ,
binding = 1 )

Definition at line 21 of file com22.comp.

References BODY_COUNT, and layout().

◆ main()

void main ( )

Definition at line 78 of file com22.comp.

References BODY_COUNT, depth, main(), vec4::w, vec3::x, vec4::x, vec3::y, vec4::y, and vec3::z.

Variable Documentation

◆ depth

uniform int depth

Definition at line 76 of file com22.comp.

Referenced by main().