Revision 5ec42229
Added by Leszek Koltunski about 3 years ago
src/main/res/raw/blit_depth_fragment_shader.glsl | ||
---|---|---|
26 | 26 |
uniform sampler2D u_DepthTexture; |
27 | 27 |
|
28 | 28 |
////////////////////////////////////////////////////////////////////////////////////////////// |
29 |
// why -0.000001 ? On some drivers (for example Qualcomm's V@331, V@415 on Adreno 308 - also on |
|
30 |
// some Mali devices ) without it the depth test - when postprocessing a flat 2D object - does |
|
31 |
// not pass (for unknown reasons) and we don't see the Glow halo. See for example the 'Glowing |
|
32 |
// Leaf' test app. |
|
33 |
// 0.000001 shouldn't hurt anyway. |
|
29 | 34 |
|
30 | 35 |
void main() |
31 | 36 |
{ |
32 |
gl_FragDepth = texture(u_DepthTexture,v_TexCoordinate).r; |
|
37 |
gl_FragDepth = texture(u_DepthTexture,v_TexCoordinate).r -0.000001;
|
|
33 | 38 |
fragColor = texture(u_Texture ,v_TexCoordinate); |
34 | 39 |
} |
Also available in: Unified diff
Workaround for the fact that one some devices (for example the LG K30's V@415 driver on the Adreno 308) the Glow halo wasn't visible.