demotool/test/shaders/chunks/dof.glsl

24 lines
587 B
Text
Raw Normal View History

2017-10-04 18:40:15 +02:00
//! type chunk
//#define DOF_USE_RANDOM
layout( location = 0 ) uniform sampler2D u_Input;
layout( location = 1 ) uniform sampler2D u_Depth;
layout( location = 2 ) uniform vec4 u_Parameters;
layout( location = 3 ) uniform float u_Samples;
layout( location = 4 ) uniform vec3 u_ResolutionTime;
#define uSharpDist (u_Parameters.x)
#define uSharpRange (u_Parameters.y)
#define uBlurFalloff (u_Parameters.z)
#define uMaxBlur (u_Parameters.w)
#define uResolution (u_ResolutionTime.xy)
#define uTime (u_ResolutionTime.z)
layout( location = 0 ) out vec3 o_Color;
//!include lib/dof.glsl