Project

General

Profile

« Previous | Next » 

Revision a1b36fc8

Added by Leszek Koltunski about 7 years ago

Simplify BLUR shader.

View differences:

src/main/res/raw/blur_vertex_shader.glsl
19 19

  
20 20
precision lowp float;
21 21

  
22
uniform vec2 u_objD;             // object width X object height.
23
uniform mat4 u_MVPMatrix;        // the combined model/view/projection matrix.
24

  
25
attribute vec2 a_Position;       // Per-vertex position information we will pass in.
22
uniform float u_Depth;           // distance from the near plane to render plane, in clip coords
23
attribute vec2 a_Position;       // Per-vertex position.
26 24
attribute vec2 a_TexCoordinate;  // Per-vertex texture coordinate information we will pass in.
27
varying   vec2 v_TexCoordinate;  //
25
varying vec2 v_TexCoordinate;    //
28 26

  
29 27
//////////////////////////////////////////////////////////////////////////////////////////////
30
// empty 2D vertex shader for postprocessing
31 28

  
32 29
void main()
33 30
  {
34 31
  v_TexCoordinate = a_TexCoordinate;
35
  gl_Position     = u_MVPMatrix*vec4( u_objD*a_Position, 0.0, 1.0);
32
  gl_Position     = vec4(2.0*a_Position,u_Depth,1.0);
36 33
  }

Also available in: Unified diff