title: Error when using '/' operator with sphere material attribute and a float (glsl)
body: <p>I'm implementing simple ray tracing for spheres in a fragment shader. At this point, I'm currently working on the function that computes color for a diffusely shaded sphere. The issue I'm having is that I'm trying to calculate the Normal vector from a surface point using the equation: N = (S - sph.xyz) / sph.r
  However, when I try to translate this to glsl,I'm getting the error that those operands can't be used with the '/' operator (i.e.</p>
  
  <pre><code>ERROR: 0:37: '/' :  wrong operand types  no operation '/' exists that takes a left-hand operand of type 'in mediump 3-component vector of float' and a right operand of type 'const int' (or there is no acceptable conversion) )
  </code></pre>
  
  <p>In addition to fixing this apparent error, I'm not really sure even how to go about structuring this function to diffusely shade the sphere being rendered so any guidance on that would be greatly appreciated. The code for the function is below (and probably ridden with errors):</p>
  
  <pre><code>vec3 shadeSphere(vec3 point, vec4 sphere, vec3 material) {
        vec3 color = vec3(1.,2.,3.);
        vec3 N = (point - sphere.xyz) / sphere.w;
        float diffuse = max(dot(Ldir, N), 0.0);
        float ambient = material/5;
        color = ambient   + Lrgb * diffuse *  max(0, N * Ldir);
        return color;
     }
  </code></pre>