Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- name: "shadow",
- new: true,
- vertex: "
- //boiler plate vertex shader. Probably doesn't need modification.
- //The fragment shader is where the fun is.
- uniform mat4 u_anura_mvp_matrix;
- attribute vec2 a_anura_vertex;
- attribute vec2 a_anura_texcoord;
- varying vec2 v_texcoord;
- varying vec2 v_vertex;
- void main()
- {
- v_vertex = a_anura_vertex;
- gl_Position = u_anura_mvp_matrix * vec4(a_anura_vertex, 0.0, 1.0);
- v_texcoord = a_anura_texcoord;
- }
- ",
- fragment: "
- #version 120
- uniform sampler2D u_anura_tex_map;
- uniform float u_shadow_opacity;
- uniform float u_shadow_red;
- uniform float u_shadow_green;
- uniform float u_shadow_blue;
- varying vec2 v_texcoord;
- varying vec2 v_vertex;
- void main() {
- vec4 fb_color = texture2D(u_anura_tex_map,v_texcoord); //Get a pixel of the active layer.
- gl_FragColor = fb_color;
- }
- ",
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement