Revision 375b3950
Added by Leszek Koltunski about 6 years ago
src/main/res/raw/blit_depth_vertex_shader.glsl | ||
---|---|---|
20 | 20 |
precision highp float; |
21 | 21 |
precision highp int; |
22 | 22 |
|
23 |
in vec2 a_Position; |
|
24 |
out vec2 v_TexCoordinate; |
|
23 |
in vec2 a_Position; // Per-vertex position. |
|
24 |
out vec2 v_TexCoordinate; // |
|
25 |
out vec2 v_Pixel; // |
|
26 |
|
|
27 |
uniform float u_Depth; // distance from the near plane to render plane, in clip coords |
|
28 |
uniform vec2 u_TexCorr; // when we blit from postprocessing buffers, the buffers can be |
|
29 |
// larger than necessary (there is just one static set being |
|
30 |
// reused!) so we need to compensate here by adjusting the texture |
|
31 |
// coords. |
|
32 |
|
|
33 |
uniform vec2 u_Size; // size of the output surface, in pixels. |
|
25 | 34 |
|
26 | 35 |
////////////////////////////////////////////////////////////////////////////////////////////// |
27 | 36 |
|
28 | 37 |
void main() |
29 | 38 |
{ |
30 |
v_TexCoordinate = a_Position + 0.5; |
|
31 |
gl_Position = vec4(2.0*a_Position,1.0,1.0); |
|
39 |
v_TexCoordinate = (a_Position + 0.5) * u_TexCorr; |
|
40 |
v_Pixel = v_TexCoordinate * u_Size; |
|
41 |
gl_Position = vec4(2.0*a_Position,u_Depth,1.0); |
|
32 | 42 |
} |
Also available in: Unified diff
OIT: something starts working ('Blur' and 'Multiblur' work, 'Triblur' and 'Transparency' do not)