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

Traverses the LBVH top-down and assigns stackless pointers on its way down. More...

Go to the source code of this file.

Data Structures

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=4) buffer NodeData
void main ()

Variables

uniform int depth
uniform int max_depth
uniform bool first_iter
uniform uint current_depth_offset
uniform uint current_amt

Detailed Description

Traverses the LBVH top-down and assigns stackless pointers on its way down.

Definition in file next.comp.


Data Structure Documentation

◆ 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 next.comp.

◆ RADIX_SORT_BINS

#define RADIX_SORT_BINS   128

Definition at line 9 of file next.comp.

◆ SUBGROUP_SIZE

#define SUBGROUP_SIZE   32

Definition at line 10 of file next.comp.

◆ BODY_COUNT

#define BODY_COUNT   15000

Definition at line 12 of file next.comp.

◆ MAX_NODES

#define MAX_NODES   45000

Definition at line 13 of file next.comp.

◆ MAX_DEPTH

#define MAX_DEPTH   64

Definition at line 25 of file next.comp.

Function Documentation

◆ layout() [1/2]

◆ layout() [2/2]

layout ( std430 ,
binding = 4 )

Definition at line 26 of file next.comp.

References layout(), MAX_DEPTH, and MAX_NODES.

◆ main()

void main ( )

Definition at line 48 of file next.comp.

References depth, main(), MAX_NODES, vec4::w, vec4::x, and vec4::y.

Variable Documentation

◆ depth

uniform int depth

Definition at line 42 of file next.comp.

◆ max_depth

uniform int max_depth

Definition at line 43 of file next.comp.

◆ first_iter

uniform bool first_iter

Definition at line 44 of file next.comp.

◆ current_depth_offset

uniform uint current_depth_offset

Definition at line 45 of file next.comp.

◆ current_amt

uniform uint current_amt

Definition at line 46 of file next.comp.