     {
       src = tex1D(tfTexture, sample);
     }
-    else if (mipMode == 1 && (sample > maxIntensity))
+    else if ((mipMode == 1) && (sample > maxIntensity))
     {
       dst = tex1D(tfTexture, sample);
       maxIntensity = sample;
     }
-    else if (mipMode == 2 && (sample  < minIntensity))
+    else if ((mipMode == 2) && (sample  < minIntensity))
     {
       dst = tex1D(tfTexture, sample);
       minIntensity = sample;


template<
         bool frontToBack,
         int mipMode,
         bool lighting,
         bool opacityCorrection,

      const float shininess = 1000.0f;
      if (justClippedPlane)
      {
        src = phong<bpc>(src, texCoord, L, H, Ka, Kd, Ks, shininess, &planeNormal);
        justClippedPlane = false;
      }
      else if (justClippedSphere)
      {
        float3 sphereNormal = normalize(pos - sphereCenter);
        src = phong<bpc>(src, texCoord, L, H, Ka, Kd, Ks, shininess, &sphereNormal);
        justClippedSphere = false;
      }
      else
      {
        src = phong<bpc>(src, texCoord, L, H, Ka, Kd, Ks, shininess);
      }
    }
    justClippedPlane = false;
