Project

General

Profile

« Previous | Next » 

Revision 35a0f4ed

Added by Leszek Koltunski over 3 years ago

Calibration of the previous workaround.

View differences:

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
29
// why -0.0003 ? On some drivers (for example Qualcomm's V@331, V@415 on Adreno 308 - also on
30 30
// some Mali devices ) without it the depth test - when postprocessing a flat 2D object - does
31 31
// not pass (for unknown reasons) and we don't see the Glow halo.  See for example the 'Glowing
32 32
// Leaf' test app.
33
// 0.000001 shouldn't hurt anyway.
33
// Why exactly 0.0003? Testing of the Cube app on the SM-A315F. ( Mali G52, drivr r20p0 )
34
// 0.0003 shouldn't hurt anyway.
34 35

  
35 36
void main()                    		
36 37
  {
37
  gl_FragDepth = texture(u_DepthTexture,v_TexCoordinate).r -0.000001;
38
  gl_FragDepth = texture(u_DepthTexture,v_TexCoordinate).r -0.0003;
38 39
  fragColor    = texture(u_Texture     ,v_TexCoordinate);
39 40
  }

Also available in: Unified diff