Guest User

Untitled

a guest
Mar 28th, 2013
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.     Motion Blur
  4.     Authors: hunterk, cgwg
  5.  
  6.     This program is free software; you can redistribute it and/or modify it
  7.     under the terms of the GNU General Public License as published by the Free
  8.     Software Foundation; either version 2 of the License, or (at your option)
  9.     any later version.
  10.     -->
  11. <shader language="GLSL" style="GLES2">
  12.    <vertex><![CDATA[
  13.       #version 120
  14.       uniform mat4 rubyMVPMatrix;
  15.       attribute vec2 rubyVertexCoord;
  16.       attribute vec2 rubyTexCoord;
  17.       varying vec2 tex_coord;
  18.  
  19.       void main()
  20.       {
  21.          gl_Position = rubyMVPMatrix * vec4(rubyVertexCoord, 0.0, 1.0);
  22.          tex_coord = rubyTexCoord;
  23.       }
  24.    ]]></vertex>
  25. <fragment><![CDATA[
  26. uniform sampler2D rubyTexture;
  27. uniform sampler2D rubyPrev6Texture;
  28. uniform sampler2D rubyPrev5Texture;
  29. uniform sampler2D rubyPrev4Texture;
  30. uniform sampler2D rubyPrev3Texture;
  31. uniform sampler2D rubyPrev2Texture;
  32. uniform sampler2D rubyPrev1Texture;
  33. uniform sampler2D rubyPrevTexture;
  34. varying vec2 tex_coord;
  35.  
  36. void main()
  37. {
  38. vec4 color = texture2D(rubyPrev6Texture, tex_coord);
  39. color = (color + texture2D(rubyPrev5Texture, tex_coord)) / 2.0;
  40. color = (color + texture2D(rubyPrev4Texture, tex_coord)) / 2.0;
  41. color = (color + texture2D(rubyPrev3Texture, tex_coord)) / 2.0;
  42. color = (color + texture2D(rubyPrev2Texture, tex_coord)) / 2.0;
  43. color = (color + texture2D(rubyPrev1Texture, tex_coord)) / 2.0;
  44. color = (color + texture2D(rubyPrevTexture, tex_coord)) / 2.0;
  45. color = (color + texture2D(rubyTexture, tex_coord)) / 2.0;
  46.  
  47. gl_FragColor = color;
  48. }
  49. ]]></fragment>
  50. </shader>
Advertisement
Add Comment
Please, Sign In to add comment