#version 450 core //! type fragment //! include dof-common.l.glsl void main() { vec2 uv = gl_FragCoord.xy / uResolution; float z = texture( u_Depth , uv ).x; vec2 blurdir = vec2( 1.0 , 0.577350269189626 ); vec2 blurvec = normalize( blurdir ) / uResolution; vec3 color0 = depthDirectionalBlur( z , CoC( z ) , uv , blurvec ); blurdir.x = -1; blurvec = normalize( blurdir ) / uResolution; vec3 color1 = depthDirectionalBlur( z , CoC( z ) , uv , blurvec ); o_Color = min( color0 , color1 ); }