Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     {
  2.         name: "shadow",
  3.         new: true,
  4.         vertex: "
  5.             //boiler plate vertex shader. Probably doesn't need modification.
  6.             //The fragment shader is where the fun is.
  7.             uniform mat4 u_anura_mvp_matrix;
  8.             attribute vec2 a_anura_vertex;
  9.             attribute vec2 a_anura_texcoord;
  10.             varying vec2 v_texcoord;
  11.             varying vec2 v_vertex;
  12.             void main()
  13.             {
  14.                 v_vertex = a_anura_vertex;
  15.                 gl_Position = u_anura_mvp_matrix * vec4(a_anura_vertex, 0.0, 1.0);
  16.                 v_texcoord = a_anura_texcoord;
  17.             }
  18.         ",
  19.        
  20.        
  21.         fragment: "
  22.             #version 120
  23.             uniform sampler2D u_anura_tex_map;
  24.             uniform float u_shadow_opacity;
  25.             uniform float u_shadow_red;
  26.             uniform float u_shadow_green;
  27.             uniform float u_shadow_blue;
  28.             varying vec2 v_texcoord;
  29.             varying vec2 v_vertex;
  30.  
  31.             void main() {
  32.                 vec4 fb_color = texture2D(u_anura_tex_map,v_texcoord); //Get a pixel of the active layer.
  33.                 gl_FragColor = fb_color;
  34.             }
  35.         ",
  36.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement