#version 450 core //! type fragment //! include dof.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 = DOF_Blur( z , DOF_CoC( z ) , uv , blurvec ); blurdir.x = -1; blurvec = normalize( blurdir ) / uResolution; vec3 color1 = DOF_Blur( z , DOF_CoC( z ) , uv , blurvec ); o_Color = min( color0 , color1 ); }