然后删除这段

改成这段

vec3 GetCrepuscularRays (inout SurfaceStruct surface) {
if (isEyeInWater > 0.9) {
return vec3(0.0);
} else if (rainStrength > 0.9) {
return vec3(0.0);
} else {
#ifdef SEUS_VL
float vlSample = texture2DLod(gcolor, texcoord.st, 3.2).a; //this will filter the volumetric light
float sunglow = CalculateSunglow(surface);
float antiSunglow = CalculateAntiSunglow(surface);
vec3 rayColor = vec3(vlSample);
float anisoHighlight = pow(1.0f / (pow((1.0f - sunglow) * 3.0f, 2.0f) + 1.1f) * 1.5f, 1.5f) + 0.5f;
anisoHighlight *= sunglow + 0.0f;
anisoHighlight += antiSunglow * 0.05f;
rayColor *= colorSunlight * 0.5f + colorSunlight * 2.0 + colorSunlight * (anisoHighlight * 120.0f);
//rayColor *= colorSunlight * 0.5f + colorSkylight * 4.0f + colorSunlight * (anisoHighlight * 120.0f);
rayColor *= 1.0 - timeNoon * 0.9;
rayColor *= 1.0 - timeSunriseSunset * 1.23;
DoNightEye(rayColor);
return rayColor * SEUS_VL_Strength * pow(1-rainStrength, 2.0f);
#else
float vlSample = texture2DLod(gcolor, texcoord.st, 3.2).a;
float sunglow = 1.0 - CalculateSunglow(surface);
sunglow = 1.0 / (pow(sunglow, 1.0) * 9.0 + 0.001);
//sunglow = max(0.0, (1.0 / (pow(sunglow, 1.0) * 9.0 + 0.001) - (0.055 + 0.045 * timeNoon)));//code to make rays fade over distance
sunglow += CalculateAntiSunglow(surface) * 0.2;
vec3 raysSun = vec3(vlSample);
vec3 raysSuns = vec3(vlSample);
vec3 raysNight = vec3(vlSample);
vec3 raysSunIn = vec3(vlSample);
vec3 raysAtmosphere = vec3(vlSample);
raysSunIn.rgb *= sunglow;
raysSunIn.rgb *= colorSunlight;
raysSun.rgb *= sunglow * timeNoon;
raysSun.rgb *= colorSunlight * timeNoon;
raysSuns.rgb *= sunglow * timeSunriseSunset;
raysSuns.rgb *= colorSunlight * timeSunriseSunset;
raysNight.rgb *= colorSunlight * timeMidnight;
raysAtmosphere *= pow(colorSkylight, vec3(1.3));
vec3 rays = raysSuns.rgb * SUNRISEnSET + raysAtmosphere.rgb * 0.5 * 0.0;
rays += raysSun.rgb * NOON + raysAtmosphere.rgb * 0.5 * 0.0;
rays += raysNight.rgb * NIGHT + raysAtmosphere.rgb * 0.5 * 0.0;
vec3 Inrays = raysSunIn.rgb * IN_SIDE_RAYS + raysAtmosphere.rgb * 0.5 * 0.0;
Inrays += raysNight.rgb * InSide_Rays_RisenSet + raysAtmosphere.rgb * 0.5 * 0.0;
Inrays += raysNight.rgb * IN_SIDE_RAYS_NIGHT + raysAtmosphere.rgb * 0.5 * 0.0;
Inrays *= mix(1.0f, 0.0f, pow(eyeBrightnessSmooth.y / 240.0f, 3.0f));
DoNightEye(rays);
return ((rays * 0.0058)*0.0049 + Inrays * 0.00001)*pow(1-rainStrength, 2.0f);
#endif
}
}