     float fEDotN = dot(normalize(vEye), vNormal);
     int nNumSamples = int(mix(fMaxSamples, fMinSamples, fEDotN));
     float fStepSize = 1.0 / float(nNumSamples);
+    vec2 vMaxTimesStep = vMaxOffset * fStepSize;
 
     vec2 vCurrOffset = vec2(0.0);
     vec2 vLastOffset = vec2(0.0);

    vec2 vTexCoord = parallax_occlusion_mapping_2(u_sNormalHeight, 1,
                                                  u_sNormalHeight2, 2,
                                                  v_vTexCoord, v_vTEye, v_vTNormal,
                                                  0.1, 128, 16);
    //vec2 vTexCoord = v_vTexCoord;

    // normal mapping

        }
        else
        {
            fCurrRayHeight -= fStepSize;
            vLastOffset = vCurrOffset;
            vCurrOffset += vMaxTimesStep;
            fLastSampledHeight = fCurrSampledHeight;
        }
    }
