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

Go to the source code of this file.

Functions

 layout (std140, binding=0) uniform CameraData
vec3 get_view_pos (vec2 uv)
vec3 reconstruct_normal (vec2 uv, vec3 view_pos)
void main ()

Variables

in vec2 vUV
uniform sampler2D uDepth
uniform sampler2D uNoise
uniform ivec2 uSSAOResolution
out float fragColor

Function Documentation

◆ layout()

layout ( std140 ,
binding = 0 )

Definition at line 6 of file ssao.frag.

References layout(), projection, and view.

◆ get_view_pos()

vec3 get_view_pos ( vec2 uv)

Definition at line 50 of file ssao.frag.

References get_view_pos(), uDepth, uv, and vec4::w.

Referenced by get_view_pos(), main(), and reconstruct_normal().

◆ reconstruct_normal()

vec3 reconstruct_normal ( vec2 uv,
vec3 view_pos )

Definition at line 59 of file ssao.frag.

References get_view_pos(), reconstruct_normal(), uSSAOResolution, uTexelSize, uv, vec2::x, and vec2::y.

Referenced by main(), and reconstruct_normal().

◆ main()

void main ( )

Variable Documentation

◆ vUV

in vec2 vUV

Definition at line 4 of file ssao.frag.

◆ uDepth

uniform sampler2D uDepth

Definition at line 44 of file ssao.frag.

◆ uNoise

uniform sampler2D uNoise

Definition at line 45 of file ssao.frag.

Referenced by main().

◆ uSSAOResolution

uniform ivec2 uSSAOResolution

Definition at line 46 of file ssao.frag.

Referenced by main(), and reconstruct_normal().

◆ fragColor

out float fragColor

Definition at line 48 of file ssao.frag.