- uniform sampler2D prevFrame;
- uniform sampler2D currentFrame;
- const float weight = 0.05;
- varying vec2 v_texCoords0;
- void main()
- {
- gl_FragColor = weight *
- (
- texture2D(currentFrame, v_texCoords0) +
- texture2D(currentFrame, v_texCoords0 + vec2(0, 0.004)) +
- texture2D(currentFrame, v_texCoords0 - vec2(0, 0.004)) +
- texture2D(currentFrame, v_texCoords0 + vec2(0.004, 0)) +
- texture2D(currentFrame, v_texCoords0 - vec2(0.004, 0)))
- / 5 +
- ( 1 - weight) *
- (
- texture2D(prevFrame, v_texCoords0) +
- texture2D(prevFrame, v_texCoords0 + vec2(0, 0.008)) +
- texture2D(prevFrame, v_texCoords0 - vec2(0, 0.008)) +
- texture2D(prevFrame, v_texCoords0 + vec2(0.008, 0)) +
- texture2D(prevFrame, v_texCoords0 - vec2(0.008, 0)))
- / 5;
- gl_FragColor *= step(0.005, gl_FragColor);
- }
SHARE
TWEET
Untitled
a guest
Sep 4th, 2014
6
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
