Project

General

Profile

« Previous | Next » 

Revision 8777ce17

Added by Leszek Koltunski about 6 years ago

Order Independent Transparency. Does not work yet.

View differences:

src/main/res/raw/blit_depth_vertex_shader.glsl
18 18
//////////////////////////////////////////////////////////////////////////////////////////////
19 19

  
20 20
precision lowp float;
21
precision highp uint;
21 22

  
22 23
#if __VERSION__ != 100
23 24
in vec2 a_Position;           // Per-vertex position.
24 25
out vec2 v_TexCoordinate;     //
26
out vec2 v_Pixel;             //
25 27
#else
26 28
attribute vec2 a_Position;    // Per-vertex position.
27 29
varying vec2 v_TexCoordinate; //
30
varying vec2 v_Pixel;         //
28 31
#endif
29 32

  
30 33
uniform float u_Depth;        // distance from the near plane to render plane, in clip coords
......
33 36
                              // reused!) so we need to compensate here by adjusting the texture
34 37
                              // coords.
35 38

  
39
uniform ivec2 u_Size;         // size of the output surface, in pixels.
40

  
36 41
//////////////////////////////////////////////////////////////////////////////////////////////
37 42

  
38 43
void main()
39 44
  {
40 45
  v_TexCoordinate = (a_Position + 0.5) * u_TexCorr;
46
  v_Pixel         = v_TexCoordinate * vec2(u_Size);
41 47
  gl_Position     = vec4(2.0*a_Position,u_Depth,1.0);
42 48
  }

Also available in: Unified diff