16 lines
435 B
Text
16 lines
435 B
Text
|
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 );
|
||
|
}
|