Advertisement
Guest User

Wes Pearce

a guest
Sep 27th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NSString *const kSPHTradeFragmentShader = SHADER_STRING(
  2.     precision highp float;
  3.  
  4.     varying vec2 vTextureCoord;
  5.     varying vec4 vColor;
  6.    
  7.     varying float vTimeOffset;
  8.     varying float vIntensity;
  9.     varying float vSpeed;
  10.     varying float vPeriodicity;
  11.    
  12.     uniform sampler2D uSampler;
  13.     uniform float uTime;
  14.  
  15.     void main(void) {
  16.         highp float time = uTime + vTimeOffset;
  17.         vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.x, (vTextureCoord.y * vPeriodicity) + (time * vSpeed)));
  18.         gl_FragColor = vec4(vColor.rgb, textureColor.a * vIntensity);
  19.     }
  20. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement