Space Sim
Loading...
Searching...
No Matches
postprocess.frag File Reference

Go to the source code of this file.

Data Structures

struct  Particle

Macros

#define BODY_COUNT   15000
#define MAX_NODES   45000

Functions

 layout (std140) uniform CameraData
 layout (std430, binding=1) buffer ParticleData
float linearize (float z)
void main ()

Variables

in vec2 vUV
uniform sampler2D uScene
uniform sampler2D uDepth
uniform isampler2D uID
uniform sampler2D bloom
uniform sampler2D bloom2
uniform sampler2D history
uniform sampler2D shadow_map
uniform sampler2D uWater
uniform vec3 cam_right
uniform int uHovered
uniform int uSelected
uniform vec2 uTexel
uniform int outside_atmosphere
out vec4 fragColor
const vec2 res = vec2(1920, 1080)

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

Macro Definition Documentation

◆ BODY_COUNT

#define BODY_COUNT   15000

Definition at line 22 of file postprocess.frag.

◆ MAX_NODES

#define MAX_NODES   45000

Definition at line 23 of file postprocess.frag.

Function Documentation

◆ layout() [1/2]

layout ( std140 )

Definition at line 24 of file postprocess.frag.

References layout(), projection, and view.

◆ layout() [2/2]

layout ( std430 ,
binding = 1 )

Definition at line 39 of file postprocess.frag.

References BODY_COUNT, and layout().

◆ linearize()

float linearize ( float z)

Definition at line 61 of file postprocess.frag.

References linearize().

◆ main()

void main ( )

Definition at line 67 of file postprocess.frag.

References clamp(), fragColor, main(), outside_atmosphere, uHovered, uID, uScene, uSelected, uWater, and vUV.

Variable Documentation

◆ vUV

in vec2 vUV

Definition at line 3 of file postprocess.frag.

Referenced by main().

◆ uScene

uniform sampler2D uScene

Definition at line 6 of file postprocess.frag.

Referenced by main().

◆ uDepth

uniform sampler2D uDepth

Definition at line 7 of file postprocess.frag.

◆ uID

uniform isampler2D uID

Definition at line 8 of file postprocess.frag.

Referenced by load_chunks(), and main().

◆ bloom

uniform sampler2D bloom

Definition at line 12 of file postprocess.frag.

◆ bloom2

uniform sampler2D bloom2

Definition at line 13 of file postprocess.frag.

◆ history

uniform sampler2D history

Definition at line 14 of file postprocess.frag.

◆ shadow_map

uniform sampler2D shadow_map

Definition at line 15 of file postprocess.frag.

◆ uWater

uniform sampler2D uWater

Definition at line 16 of file postprocess.frag.

Referenced by main().

◆ cam_right

uniform vec3 cam_right

Definition at line 17 of file postprocess.frag.

◆ uHovered

uniform int uHovered

Definition at line 18 of file postprocess.frag.

Referenced by main().

◆ uSelected

uniform int uSelected

Definition at line 19 of file postprocess.frag.

◆ uTexel

uniform vec2 uTexel

Definition at line 20 of file postprocess.frag.

◆ outside_atmosphere

uniform int outside_atmosphere

Definition at line 58 of file postprocess.frag.

Referenced by main().

◆ fragColor

out vec4 fragColor

Definition at line 59 of file postprocess.frag.

◆ res

const vec2 res = vec2(1920, 1080)

Definition at line 60 of file postprocess.frag.

Referenced by init(), and load_chunks().