title: SpriteKit Shader not running with Uniforms
body: <p><em>// Posting this up in case anyone comes across the same problem.</em></p>
  
  <h1>Original Problem:</h1>
  
  <p>Porting a shader over to OSX, and attempting to feed it a uniform. The shader doesn't actually run.</p>
  
  <p>This is on: XCode 7.3 , Swift 2 .</p>
  
  <p>GameScene.swift :</p>
  
  <pre><code>var myShader = SKShader();
  
  override func didMoveToView(view: SKView) {
  
      //////////////////////////////////
      // Create SKShader
      let shaderContainer = SKSpriteNode(color: NSColor.grayColor(), size: CGSizeMake(300, 300));
      shaderContainer.position = CGPointMake(self.frame.width/2, self.frame.height/2);
  
      self.addChild(shaderContainer);
  
      myShader = SKShader(fileNamed: "color-wheel.fsh");
      let utest = SKUniform(name: "utest", float: 0.3);
      myShader.addUniform(utest);
  
      shaderContainer.shader = myShader;
  }
  </code></pre>
  
  <p>color-wheel.fsh (Shader):</p>
  
  <pre><code>#define PI 3.14159265359
  #define TWO_PI 6.28318530718
  
  //  Function from Iñigo Quiles
  //  https://www.shadertoy.com/view/MsS3Wc
  vec3 hsb2rgb( in vec3 c ){
      vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0), 6.0)-3.0)-1.0, 0.0, 1.0 );
      rgb = rgb*rgb*(3.0-2.0*rgb);
      return c.z * mix(vec3(1.0), rgb, c.y);
  }
  
  void main (void) {
      vec2 st = v_tex_coord; // SPRITEKIT SPECIFIC
  
      vec3 color = vec3(0.0);
  
      // Using Polar Coordinates instead of Cartesian
      vec2 vectorToCentre = vec2(0.5) - st;
      float angle = atan(vectorToCentre.y, vectorToCentre.x); // function is atan(y,x) , not x,y
      float distanceToCentre = length(vectorToCentre);
      float radius = distanceToCentre * 2.0;
      angle = angle + u_time*0.6 - radius*2.5;
  
      vec3 hue = vec3(angle/TWO_PI+0.5, radius, 1.0) * vec3(1.0, 0.4, 1.0);
      color = hsb2rgb(hue);
  
      gl_FragColor = vec4(color, 1.0);
  }
  </code></pre>