Advertisement
Guest User

Wes Pearce

a guest
Sep 27th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NSString *const kSPHTradeVertexShader = SHADER_STRING(
  2.     attribute vec3 aPosition;
  3.     attribute vec2 aTextureCoord;
  4.     attribute vec3 aNormal;
  5.     attribute vec4 aColor;
  6.                                                      
  7.     attribute float aTimeOffset;
  8.     attribute float aIntensity;
  9.     attribute float aSpeed;
  10.     attribute float aPeriodicity;
  11.  
  12.     uniform mat4 uMVMatrix;
  13.     uniform mat4 uPMatrix;
  14.     uniform mat3 uNMatrix;
  15.  
  16.     varying vec2 vTextureCoord;
  17.     varying vec4 vColor;
  18.                                                      
  19.     varying float vTimeOffset;
  20.     varying float vIntensity;
  21.     varying float vSpeed;
  22.     varying float vPeriodicity;
  23.  
  24.     void main(void) {
  25.         vTextureCoord = aTextureCoord;
  26.         vColor = aColor;
  27.         vTimeOffset = aTimeOffset;
  28.         vIntensity = aIntensity;
  29.         vSpeed = aSpeed;
  30.         vPeriodicity = aPeriodicity;
  31.        
  32.         gl_Position = uPMatrix * uMVMatrix * vec4(aPosition, 1.0);
  33.     }
  34. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement