           }
         }
       }  
-      tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;    
+      return tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;
     }
   #else
-    void applyLightingPositional(inout vec3 tColor, vec4 normal, vec3 posVC)
+    vec3 applyLightingPositional(inout vec3 tColor, vec4 normal, vec3 posVC)
     {
       // everything in VC
       vec3 diffuse = vec3(0.0);

          }
        }
      }
      tColor.rgb = tColor.rgb * (diffuse * vDiffuse + vAmbient) + specular*vSpecular;
    }
  #endif 
#endif

  #if vtkLightComplexity > 0
    #if !defined(vtkComponent0Proportional) && defined(SurfaceShadowOn)
        #if vtkLightComplexity < 3
            vec3 tColorS = applyLightingDirectional(tColor.rgb, normalLight);
        #else
            vec3 tColorS = applyLightingPositional(tColor.rgb, normalLight, IStoVC(posIS));
        #endif
    #endif

    #ifdef VolumeShadowOn
      vec3 tColorVS = applyShadowRay(tColor.rgb, posIS, rayDirVC);
      #ifdef SurfaceShadowOn
        float vol_coef = volumetricScatteringBlending * (1.0 - tColor.a * exp(normalLight.w));
        tColor.rgb = (1.0-vol_coef) * tColorS + vol_coef * tColorVS;
      #else
        tColor.rgb = tColorVS;
      #endif
    #else
        tColor.rgb = tColorS;
    #endif

  #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2
