Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef GL_FRAGMENT_PRECISION_HIGH
- precision highp float;
- #else
- precision mediump float;
- #endif
- uniform vec2 resolution;
- uniform vec2 cameraAddent;
- uniform mat2 cameraOrientation;
- uniform samplerExternalOES cameraBack;
- uniform sampler2D backbuffer;
- uniform int pointerCount;
- uniform vec2 touch;
- vec3 at_cam(vec2 offset)
- {
- vec2 uv = (gl_FragCoord.xy + offset) / resolution.xy;
- vec2 st = cameraAddent + uv * cameraOrientation;
- return texture2D(cameraBack, st).rgb;
- }
- vec3 at_back(vec2 offset)
- {
- vec2 uv = (gl_FragCoord.xy + offset) / resolution.xy;
- return texture2D(backbuffer, uv).rgb;
- }
- int r_int(float f) {
- return int(f+0.5);
- }
- void main(void) {
- const int layers = 4;
- const int range = 2;
- const int lyp1 = layers+1;
- const float ly1 = float(lyp1);
- const float ly2 = ly1*ly1;
- const float ly3 = ly2*ly1;
- const int hlist_size = int(pow(3.0, ly1+1.0)/2.0);
- vec2 tuv = touch.xy / resolution.xy;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement