Fixed underground sky blend test

This commit is contained in:
Joshua Barretto 2022-12-30 17:24:36 +00:00
parent 4bd7ec26d3
commit 799bb17d75

View File

@ -206,8 +206,8 @@ void main() {
float not_underground = 1.0;
// Make underground water look more correct
#if (REFLECTION_MODE >= REFLECTION_MODE_HIGH)
float f_alt = alt_at(wpos.xy - focus_off.xy);
not_underground = clamp((wpos.z - focus_off.z - f_alt) / 32.0 + 1.0, 0.0, 1.0);
float f_alt = alt_at(wpos.xy);
not_underground = clamp((wpos.z - f_alt) / 32.0 + 1.0, 0.0, 1.0);
#endif
// Did we hit a surface during reflection?
if (merge > 0.0) {