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

Go to the source code of this file.

Data Structures

struct  Material
 The Materials parsed in from scene files that determine rendering pipeline setup, uploads, and ordering. More...

Functions

 layout (location=0) out vec2 gVel
 layout (std140, binding=0) uniform CameraData
 layout (std430, binding=2) buffer MaterialData
vec2 ParallaxMapping (sampler2D normal_map, vec2 texCoords, vec3 viewDir, out float final_depth)
void main ()

Variables

in vec3 Normal
in mat3 TBN
flat in uint Mat
in vec2 UV
in vec3 ViewPos
in vec4 ClipPos
in vec4 PrevClipPos
in vec3 ViewDirTanSpace
const float height_scale = 0.02f
uniform sampler2D uAlbedo
uniform sampler2D uARM
uniform sampler2D uNormal

Function Documentation

◆ layout() [1/3]

layout ( location = 0)

References gAlbedo, gExtra, gNormal, gUV, gVel, and layout().

◆ layout() [2/3]

layout ( std140 ,
binding = 0 )

Definition at line 10 of file depth_pre_pass.frag.

References layout(), projection, and view.

◆ layout() [3/3]

layout ( std430 ,
binding = 2 )

Definition at line 59 of file depth_pre_pass.frag.

References layout().

◆ ParallaxMapping()

vec2 ParallaxMapping ( sampler2D normal_map,
vec2 texCoords,
vec3 viewDir,
out float final_depth )

Definition at line 82 of file depth_pre_pass.frag.

References clamp(), height_scale, ParallaxMapping(), vec2::x, and vec2::y.

Referenced by ParallaxMapping().

◆ main()

Variable Documentation

◆ Normal

in vec3 Normal

Definition at line 67 of file depth_pre_pass.frag.

Referenced by main().

◆ TBN

in mat3 TBN

Definition at line 68 of file depth_pre_pass.frag.

Referenced by get_bounce_direction(), and main().

◆ Mat

flat in uint Mat

Definition at line 69 of file depth_pre_pass.frag.

Referenced by main().

◆ UV

in vec2 UV

Definition at line 70 of file depth_pre_pass.frag.

Referenced by load_gltf(), and main().

◆ ViewPos

in vec3 ViewPos

Definition at line 72 of file depth_pre_pass.frag.

Referenced by get_cluster_index(), and main().

◆ ClipPos

in vec4 ClipPos

Definition at line 73 of file depth_pre_pass.frag.

Referenced by main().

◆ PrevClipPos

in vec4 PrevClipPos

Definition at line 74 of file depth_pre_pass.frag.

Referenced by main().

◆ ViewDirTanSpace

in vec3 ViewDirTanSpace

Definition at line 75 of file depth_pre_pass.frag.

Referenced by main().

◆ height_scale

const float height_scale = 0.02f

Definition at line 76 of file depth_pre_pass.frag.

Referenced by main(), parallax_mapping(), and ParallaxMapping().

◆ uAlbedo

uniform sampler2D uAlbedo

Definition at line 77 of file depth_pre_pass.frag.

◆ uARM

uniform sampler2D uARM

Definition at line 78 of file depth_pre_pass.frag.

◆ uNormal

uniform sampler2D uNormal

Definition at line 79 of file depth_pre_pass.frag.