Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Motion Blur
- Authors: hunterk, cgwg
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
- -->
- <shader language="GLSL" style="GLES2">
- <vertex><![CDATA[
- #version 120
- uniform mat4 rubyMVPMatrix;
- attribute vec2 rubyVertexCoord;
- attribute vec2 rubyTexCoord;
- varying vec2 tex_coord;
- void main()
- {
- gl_Position = rubyMVPMatrix * vec4(rubyVertexCoord, 0.0, 1.0);
- tex_coord = rubyTexCoord;
- }
- ]]></vertex>
- <fragment><![CDATA[
- uniform sampler2D rubyTexture;
- uniform sampler2D rubyPrev6Texture;
- uniform sampler2D rubyPrev5Texture;
- uniform sampler2D rubyPrev4Texture;
- uniform sampler2D rubyPrev3Texture;
- uniform sampler2D rubyPrev2Texture;
- uniform sampler2D rubyPrev1Texture;
- uniform sampler2D rubyPrevTexture;
- varying vec2 tex_coord;
- void main()
- {
- vec4 color = texture2D(rubyPrev6Texture, tex_coord);
- color = (color + texture2D(rubyPrev5Texture, tex_coord)) / 2.0;
- color = (color + texture2D(rubyPrev4Texture, tex_coord)) / 2.0;
- color = (color + texture2D(rubyPrev3Texture, tex_coord)) / 2.0;
- color = (color + texture2D(rubyPrev2Texture, tex_coord)) / 2.0;
- color = (color + texture2D(rubyPrev1Texture, tex_coord)) / 2.0;
- color = (color + texture2D(rubyPrevTexture, tex_coord)) / 2.0;
- color = (color + texture2D(rubyTexture, tex_coord)) / 2.0;
- gl_FragColor = color;
- }
- ]]></fragment>
- </shader>
Advertisement
Add Comment
Please, Sign In to add comment