Revision 040cd18c
Added by Leszek Koltunski almost 6 years ago
src/main/res/raw/blit_depth_fragment_shader.glsl | ||
---|---|---|
17 | 17 |
// along with Distorted. If not, see <http://www.gnu.org/licenses/>. // |
18 | 18 |
////////////////////////////////////////////////////////////////////////////////////////////// |
19 | 19 |
|
20 |
precision lowp float;
|
|
20 |
precision highp float;
|
|
21 | 21 |
|
22 |
#if __VERSION__ != 100 |
|
23 | 22 |
out vec4 fragColor; // The output color |
24 | 23 |
in vec2 v_TexCoordinate; // Interpolated texture coordinate per fragment. |
25 |
#define TEXTURE texture |
|
26 |
#define FRAG_COLOR fragColor |
|
27 |
#else |
|
28 |
varying vec2 v_TexCoordinate; // Interpolated texture coordinate per fragment. |
|
29 |
#define TEXTURE texture2D |
|
30 |
#define FRAG_COLOR gl_FragColor |
|
31 |
#endif |
|
32 | 24 |
|
33 | 25 |
uniform sampler2D u_Texture; |
34 | 26 |
uniform sampler2D u_DepthTexture; |
... | ... | |
37 | 29 |
|
38 | 30 |
void main() |
39 | 31 |
{ |
40 |
gl_FragDepth = TEXTURE(u_DepthTexture,v_TexCoordinate).r;
|
|
41 |
FRAG_COLOR = TEXTURE(u_Texture ,v_TexCoordinate);
|
|
32 |
gl_FragDepth = texture(u_DepthTexture,v_TexCoordinate).r;
|
|
33 |
fragColor = texture(u_Texture ,v_TexCoordinate);
|
|
42 | 34 |
} |
Also available in: Unified diff
Port all the 'non-controversial' changes from order-independent-transparency branch.