           }
         }
       }  
-      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);

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

    #ifdef VolumeShadowOn
      vec3 secondary_contrib = applyShadowRay(tColor.rgb, posIS, rayDirVC);
      float vol_coef;
      if (volumetricScatteringBlending == 1.0 || volumetricScatteringBlending == 0.0){
        vol_coef = volumetricScatteringBlending;
      } else {
        vol_coef = 1.0 - (pow(volumetricScatteringBlending,0.3) - 1.0)*(pow(volumetricScatteringBlending,0.3) - 1.0);
      }
      tColor.rgb = (1.0 - vol_coef) * tColor.rgb + vol_coef * secondary_contrib;
    #endif

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

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