Untitled
Loading...
Searching...
No Matches
postprocess.frag File Reference

Go to the source code of this file.

Data Structures

struct  MeshNode
 MeshNodes that describe the position of Meshes, GLTF nodes for GLTFAnimations, or hold references to other MeshNodes. More...

Macros

#define MAX_MESH_NODES   1024

Functions

 layout (std140, binding=0) uniform CameraData
vec3 applyLUT (vec3 color)
float calculateExposure (vec3 avgColor)
vec3 ACESFilm (vec3 x)
vec3 vignette (vec3 color, float u, float v)
vec3 linear_to_acescct (vec3 linearRGB)
vec3 acescct_to_linear (vec3 graded)
float linear_to_acescct_channel (float x)
float acescct_to_linear_channel (float x)
vec3 processLUT (vec3 color)
 layout (std430, binding=15) buffer MeshNodeData
vec3 get_view_pos_from_depth (vec2 uv, float depth, mat4 invProjMatrix)
void main ()

Variables

in vec2 vUV
uniform sampler2D uScene
uniform sampler2D uHistory
uniform sampler2D uFBM
uniform sampler2D uDPP
uniform sampler2D uText
uniform sampler2D uSSR
uniform sampler2D uCurrentSSR
uniform sampler2D gVel
uniform sampler2D uBokeh
uniform sampler2D uCOC
uniform sampler2D uBloom
uniform sampler2D uLM
uniform sampler3D uLUT
uniform uint uMBLUR
uniform uint uDOF
uniform float uPhysicsFramerate
uniform float uRenderFramerate
uniform uint uWireframeToggled
uniform sampler3D uColorLUT
const mat3 srgb_to_ap1
const mat3 ap1_to_srgb
uniform float uTime
out vec4 fragColor
const int samples = 16
uniform float uFocalLength
uniform float uFStop
uniform float uSensorHeight
uniform float uDOFMaxBlurRadius

Macro Definition Documentation

◆ MAX_MESH_NODES

#define MAX_MESH_NODES   1024

Definition at line 200 of file postprocess.frag.

Function Documentation

◆ layout() [1/2]

layout ( std140 ,
binding = 0 )

Definition at line 2 of file postprocess.frag.

References layout(), projection, and view.

◆ applyLUT()

vec3 applyLUT ( vec3 color)

Definition at line 41 of file postprocess.frag.

References applyLUT(), color, and uLUT.

Referenced by applyLUT(), and processLUT().

◆ calculateExposure()

float calculateExposure ( vec3 avgColor)

Definition at line 52 of file postprocess.frag.

References calculateExposure(), and clamp().

Referenced by calculateExposure(), and main().

◆ ACESFilm()

vec3 ACESFilm ( vec3 x)

Definition at line 68 of file postprocess.frag.

References ACESFilm(), and clamp().

Referenced by ACESFilm(), and main().

◆ vignette()

vec3 vignette ( vec3 color,
float u,
float v )

Definition at line 77 of file postprocess.frag.

References color, smoothstep(), vignette(), and vUV.

Referenced by vignette().

◆ linear_to_acescct()

vec3 linear_to_acescct ( vec3 linearRGB)

Definition at line 100 of file postprocess.frag.

References linear_to_acescct(), and srgb_to_ap1.

Referenced by linear_to_acescct(), and processLUT().

◆ acescct_to_linear()

vec3 acescct_to_linear ( vec3 graded)

Definition at line 113 of file postprocess.frag.

References acescct_to_linear(), and ap1_to_srgb.

Referenced by acescct_to_linear(), and processLUT().

◆ linear_to_acescct_channel()

float linear_to_acescct_channel ( float x)

Definition at line 131 of file postprocess.frag.

References linear_to_acescct_channel().

Referenced by linear_to_acescct_channel().

◆ acescct_to_linear_channel()

float acescct_to_linear_channel ( float x)

Definition at line 142 of file postprocess.frag.

References acescct_to_linear_channel().

Referenced by acescct_to_linear_channel().

◆ processLUT()

vec3 processLUT ( vec3 color)

Definition at line 154 of file postprocess.frag.

References acescct_to_linear(), applyLUT(), color, linear_to_acescct(), and processLUT().

Referenced by main(), and processLUT().

◆ layout() [2/2]

layout ( std430 ,
binding = 15 )

Definition at line 201 of file postprocess.frag.

References layout(), and MAX_MESH_NODES.

◆ get_view_pos_from_depth()

vec3 get_view_pos_from_depth ( vec2 uv,
float depth,
mat4 invProjMatrix )

Definition at line 211 of file postprocess.frag.

References get_view_pos_from_depth(), uv, and vec4::w.

◆ main()

Variable Documentation

◆ vUV

in vec2 vUV

Definition at line 13 of file postprocess.frag.

◆ uScene

uniform sampler2D uScene

Definition at line 14 of file postprocess.frag.

◆ uHistory

uniform sampler2D uHistory

Definition at line 15 of file postprocess.frag.

◆ uFBM

uniform sampler2D uFBM

Definition at line 16 of file postprocess.frag.

◆ uDPP

uniform sampler2D uDPP

Definition at line 18 of file postprocess.frag.

Referenced by main().

◆ uText

uniform sampler2D uText

Definition at line 19 of file postprocess.frag.

Referenced by main().

◆ uSSR

uniform sampler2D uSSR

Definition at line 20 of file postprocess.frag.

◆ uCurrentSSR

uniform sampler2D uCurrentSSR

Definition at line 21 of file postprocess.frag.

◆ gVel

uniform sampler2D gVel

Definition at line 22 of file postprocess.frag.

Referenced by layout(), and main().

◆ uBokeh

uniform sampler2D uBokeh

Definition at line 23 of file postprocess.frag.

Referenced by main().

◆ uCOC

uniform sampler2D uCOC

Definition at line 24 of file postprocess.frag.

◆ uBloom

uniform sampler2D uBloom

Definition at line 25 of file postprocess.frag.

◆ uLM

uniform sampler2D uLM

Definition at line 26 of file postprocess.frag.

Referenced by main().

◆ uLUT

uniform sampler3D uLUT

Definition at line 27 of file postprocess.frag.

Referenced by applyLUT().

◆ uMBLUR

uniform uint uMBLUR

Definition at line 28 of file postprocess.frag.

◆ uDOF

uniform uint uDOF

Definition at line 29 of file postprocess.frag.

◆ uPhysicsFramerate

uniform float uPhysicsFramerate

Definition at line 30 of file postprocess.frag.

Referenced by main().

◆ uRenderFramerate

uniform float uRenderFramerate

Definition at line 31 of file postprocess.frag.

Referenced by main().

◆ uWireframeToggled

uniform uint uWireframeToggled

Definition at line 32 of file postprocess.frag.

◆ uColorLUT

uniform sampler3D uColorLUT

Definition at line 39 of file postprocess.frag.

◆ srgb_to_ap1

const mat3 srgb_to_ap1
Initial value:
= mat3
(
0.613097, 0.070194, 0.020585,
0.339523, 0.916394, 0.109572,
0.047379, 0.013412, 0.869843
)
Definition types.h:20

Definition at line 87 of file postprocess.frag.

Referenced by linear_to_acescct().

◆ ap1_to_srgb

const mat3 ap1_to_srgb
Initial value:
= mat3
(
1.704859, -0.130258, -0.024003,
-0.621714, 1.140733, -0.128963,
-0.083145, -0.010475, 1.152966
)

Definition at line 94 of file postprocess.frag.

Referenced by acescct_to_linear().

◆ uTime

uniform float uTime

Definition at line 174 of file postprocess.frag.

Referenced by main().

◆ fragColor

out vec4 fragColor

Definition at line 175 of file postprocess.frag.

◆ samples

const int samples = 16

Definition at line 177 of file postprocess.frag.

Referenced by init_gl_renderbuffer(), main(), and process_probe_chunk().

◆ uFocalLength

uniform float uFocalLength

Definition at line 180 of file postprocess.frag.

◆ uFStop

uniform float uFStop

Definition at line 181 of file postprocess.frag.

◆ uSensorHeight

uniform float uSensorHeight

Definition at line 182 of file postprocess.frag.

◆ uDOFMaxBlurRadius

uniform float uDOFMaxBlurRadius

Definition at line 183 of file postprocess.frag.

Referenced by main().