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

Computes the bounds over all particles in the sim. More...

Go to the source code of this file.

Data Structures

struct  Particle
struct  MortonEntry

Macros

#define BODY_COUNT   15000
#define MAX_NODES   45000
#define WORKGROUP_SIZE   128

Functions

 layout (local_size_x=WORKGROUP_SIZE) in
 layout (std430, binding=1) buffer ParticleData
uint floatToOrderedUint (float f)
void main ()

Variables

shared float localMinX [WORKGROUP_SIZE]
shared float localMinY [WORKGROUP_SIZE]
shared float localMinZ [WORKGROUP_SIZE]
shared float localMaxX [WORKGROUP_SIZE]
shared float localMaxY [WORKGROUP_SIZE]
shared float localMaxZ [WORKGROUP_SIZE]

Detailed Description

Computes the bounds over all particles in the sim.

Definition in file bounds.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

Macro Definition Documentation

◆ BODY_COUNT

#define BODY_COUNT   15000

Definition at line 7 of file bounds.comp.

◆ MAX_NODES

#define MAX_NODES   45000

Definition at line 8 of file bounds.comp.

◆ WORKGROUP_SIZE

#define WORKGROUP_SIZE   128

Definition at line 10 of file bounds.comp.

Function Documentation

◆ layout() [1/2]

layout ( local_size_x = WORKGROUP_SIZE)

◆ layout() [2/2]

layout ( std430 ,
binding = 1 )

Definition at line 19 of file bounds.comp.

References BODY_COUNT, and layout().

◆ floatToOrderedUint()

uint floatToOrderedUint ( float f)

Definition at line 51 of file bounds.comp.

References floatToOrderedUint().

Referenced by floatToOrderedUint(), and main().

◆ main()

Variable Documentation

◆ localMinX

shared float localMinX[WORKGROUP_SIZE]

Definition at line 57 of file bounds.comp.

Referenced by main().

◆ localMinY

shared float localMinY[WORKGROUP_SIZE]

Definition at line 58 of file bounds.comp.

Referenced by main().

◆ localMinZ

shared float localMinZ[WORKGROUP_SIZE]

Definition at line 59 of file bounds.comp.

Referenced by main().

◆ localMaxX

shared float localMaxX[WORKGROUP_SIZE]

Definition at line 60 of file bounds.comp.

Referenced by main().

◆ localMaxY

shared float localMaxY[WORKGROUP_SIZE]

Definition at line 61 of file bounds.comp.

Referenced by main().

◆ localMaxZ

shared float localMaxZ[WORKGROUP_SIZE]

Definition at line 62 of file bounds.comp.

Referenced by main().