Revision 7170e4eb
Added by Leszek Koltunski almost 7 years ago
src/main/res/raw/blur2_fragment_shader.glsl | ||
---|---|---|
31 | 31 |
#endif |
32 | 32 |
|
33 | 33 |
uniform sampler2D u_ColorTexture; |
34 |
uniform sampler2D u_DepthTexture; |
|
35 | 34 |
uniform float u_Offsets[MAX_BLUR]; |
36 | 35 |
uniform float u_Weights[MAX_BLUR]; |
37 | 36 |
uniform int u_Radius; |
... | ... | |
40 | 39 |
|
41 | 40 |
void main() |
42 | 41 |
{ |
43 |
gl_FragDepth = TEXTURE(u_DepthTexture,v_TexCoordinate).r; |
|
44 |
|
|
45 | 42 |
vec4 pixel= TEXTURE(u_ColorTexture,v_TexCoordinate) * u_Weights[0]; |
46 | 43 |
|
47 | 44 |
for (int i=1; i<=u_Radius; i+=1) |
Also available in: Unified diff
Move on to Stencil on both stages of the BLUR + separate 'blit with depth'.
This works wonders on Nexus 5X ( r=50 quality=HIGHIEST 1,4,8 cubes: 59.3,43.6,41.0 FPS! ) but it somehow fails to clear the DEPTH and STENCIL buffers on Nexus 4....