Revision 1d6d261e
Added by Leszek Koltunski almost 7 years ago
src/main/res/raw/blur2_fragment_shader.glsl | ||
---|---|---|
40 | 40 |
|
41 | 41 |
void main() |
42 | 42 |
{ |
43 |
float depth = TEXTURE(u_DepthTexture,v_TexCoordinate).r; |
|
44 |
|
|
45 |
if( u_Radius>1 ) |
|
46 |
{ |
|
47 |
float offset = u_Offsets[u_Radius]; |
|
48 |
|
|
49 |
depth = min(depth, TEXTURE(u_DepthTexture,vec2(v_TexCoordinate.x,v_TexCoordinate.y+offset)).r); |
|
50 |
depth = min(depth, TEXTURE(u_DepthTexture,vec2(v_TexCoordinate.x,v_TexCoordinate.y-offset)).r); |
|
51 |
depth = min(depth, TEXTURE(u_DepthTexture,vec2(v_TexCoordinate.x+offset,v_TexCoordinate.y)).r); |
|
52 |
depth = min(depth, TEXTURE(u_DepthTexture,vec2(v_TexCoordinate.x-offset,v_TexCoordinate.y)).r); |
|
53 |
} |
|
54 |
|
|
55 |
gl_FragDepth = depth; |
|
43 |
gl_FragDepth = TEXTURE(u_DepthTexture,v_TexCoordinate).r; |
|
56 | 44 |
|
57 | 45 |
vec4 pixel= TEXTURE(u_ColorTexture,v_TexCoordinate) * u_Weights[0]; |
58 | 46 |
|
Also available in: Unified diff
Move to a new way to detecting depth of postprocessing halos.
This switches off stenciling (hopefully temporarily!)