Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fog occlusion hides chunks incorrectly with blindness effect #35

Closed
LucilleTea opened this issue Jun 26, 2020 · 7 comments · Fixed by #710
Closed

Fog occlusion hides chunks incorrectly with blindness effect #35

LucilleTea opened this issue Jun 26, 2020 · 7 comments · Fixed by #710
Labels
S-confirmed Status: Confirmed T-bug Type: Bug

Comments

@LucilleTea
Copy link
Member

LucilleTea commented Jun 26, 2020

Expected Behavior

Chunks within vision should not be culled

Actual Behavior

Having fog occlusion enabled will cause chunks to disappear when the player is very close, but not inside them, while the blindness effect is on the player.

Reproduction Steps

Apply blindness effect, be near a chunk border, have fog occlusion enabled.

Attachments

https://cdn.discordapp.com/attachments/651120262129123330/726131134970462228/2020-06-27_03-05-46-1.mp4

System Information

  • Java Version: AdoptOpenJDK 14
  • CPU: i7 3770
  • GPU: GTX 970
@LucilleTea LucilleTea added the T-bug Type: Bug label Jun 26, 2020
@jellysquid3 jellysquid3 added the S-confirmed Status: Confirmed label Jun 28, 2020
@jellysquid3
Copy link
Member

Fixed with jellysquid3@5568b4c.

@TwistedZero
Copy link
Contributor

I am still encountering this issue:
https://streamable.com/95ly1k
Using the latest commit as of writing this: d35cb02

System Information

  • Java Version: 1.8.0_222 64-bit (OpenJDK Hotspot)
  • CPU: Ryzen 5 2500u
  • GPU: Vega 8 Integrated Graphics

@altrisi
Copy link
Contributor

altrisi commented Jul 14, 2020

Still happening in 0.1.0, this should be reopened. It works a little bit better than in the original report, but it's definitely still a bug.

Video

System info:

  • Java 1.8.0_51 x64
  • CPU: Intel Core i7-7700
  • GPU: nVidia GTX 1050

@jellysquid3 jellysquid3 reopened this Jul 14, 2020
@LOuroboros
Copy link

LOuroboros commented Jul 14, 2020

I'm also encountering this bug. I was about to open an issue for it, but thankfully, I was smart enough to check for a change, hahaha.

https://streamable.com/kfjram

System Info:

  • Java 1.8.0_51 x64
  • CPU: Intel Core i3 2120
  • GPU: Gigabyte's NVIDIA GeForce GT 1030, Driver Version 446.14

@Oberfail
Copy link

I'm also encountering this bug.

System Info:

Java 1.8.0_51 x64
CPU: R5 3600
GPU: gtx1070, Driver Version 440.97

@CalXee
Copy link

CalXee commented Dec 28, 2020

The world becomes transparent when you fly high up. Here is a comparison between it on and off.
2020-12-27_19 20 18
2020-12-27_19 20 26

@HedHogie
Copy link

I'm also experiencing this issue btw, it reduces lag so much but it's issue just won't let me.

bytzo added a commit to bytzo/sodium-fabric that referenced this issue May 31, 2021
When using fog occlusion, it is possible for the sky to be visible through culled chunks, ruining the illusion that there is fog. This is because vanilla relies on chunk fog to hide the sky when fog distance is reduced, however Sodium's chunk occlusion will cull these chunks as they are completely obscured by fog.
To solve this issue without completely disabling chunk occlusion, the sky no longer renders when the fog distance is reduced from the default, since more dense fog means you cannot see the sky past it. Without the sky being rendered, the background of the world becomes the exact same as the fog color, so chunks culled by fog occlusion will now be indistinguishable from the fog. This behavior deviates from vanilla and can cause visual differences, however it solves some visual inconsistencies and matches Minecraft Bedrock Edition (it also seems to hide the sky when the fog distance is reduced). The most notible visual differences from vanilla incude the sky not being visible from underwater and the End dimension's noise sky not being visible during the boss fight, both due to the fog being reduced.
This fixes CaffeineMC#35, CaffeineMC#438, and CaffeineMC#612. It also fixes MC-152504.
jellysquid3 added a commit that referenced this issue Jul 14, 2021
* fix: Prevent rendering sky when fog distance is reduced
When using fog occlusion, it is possible for the sky to be visible through culled chunks, ruining the illusion that there is fog. This is because vanilla relies on chunk fog to hide the sky when fog distance is reduced, however Sodium's chunk occlusion will cull these chunks as they are completely obscured by fog.
To solve this issue without completely disabling chunk occlusion, the sky no longer renders when the fog distance is reduced from the default, since more dense fog means you cannot see the sky past it. Without the sky being rendered, the background of the world becomes the exact same as the fog color, so chunks culled by fog occlusion will now be indistinguishable from the fog. This behavior deviates from vanilla and can cause visual differences, however it solves some visual inconsistencies and matches Minecraft Bedrock Edition (it also seems to hide the sky when the fog distance is reduced). The most notible visual differences from vanilla incude the sky not being visible from underwater and the End dimension's noise sky not being visible during the boss fight, both due to the fog being reduced.
This fixes #35, #438, and #612. It also fixes MC-152504.

* fix: Use LegacyFogHelper instead of GlFogHelper

* change: Update to 1.17

* change: Bump Fabric Loader to 0.11.6

* change: Set source and target compatibility to Java 16

* fix: Use camera status instead of fog distance to detect reduced fog
Before, the fog distance was used to detect if the fog was reduced. While this seems like a good solution, the fog distance is calculated after the sky is rendered, meaning the visibility of the sky was always 1 frame behind. Instead, we can use the camera to calculate if the fog distance is reduced, so the visibility of the sky is up-to-date.

* Rewrite portion of comment describing the patch

I accidentally wrote the exact opposite of the intended message. This commit fixes that, and makes the comment easier to understand by removing unneeded information.

Co-authored-by: JellySquid <jellysquid3@users.noreply.github.com>
ElectronicManuel pushed a commit to ElectronicManuel/sodium-fabric that referenced this issue Dec 2, 2021
* fix: Prevent rendering sky when fog distance is reduced
When using fog occlusion, it is possible for the sky to be visible through culled chunks, ruining the illusion that there is fog. This is because vanilla relies on chunk fog to hide the sky when fog distance is reduced, however Sodium's chunk occlusion will cull these chunks as they are completely obscured by fog.
To solve this issue without completely disabling chunk occlusion, the sky no longer renders when the fog distance is reduced from the default, since more dense fog means you cannot see the sky past it. Without the sky being rendered, the background of the world becomes the exact same as the fog color, so chunks culled by fog occlusion will now be indistinguishable from the fog. This behavior deviates from vanilla and can cause visual differences, however it solves some visual inconsistencies and matches Minecraft Bedrock Edition (it also seems to hide the sky when the fog distance is reduced). The most notible visual differences from vanilla incude the sky not being visible from underwater and the End dimension's noise sky not being visible during the boss fight, both due to the fog being reduced.
This fixes CaffeineMC#35, CaffeineMC#438, and CaffeineMC#612. It also fixes MC-152504.

* fix: Use LegacyFogHelper instead of GlFogHelper

* change: Update to 1.17

* change: Bump Fabric Loader to 0.11.6

* change: Set source and target compatibility to Java 16

* fix: Use camera status instead of fog distance to detect reduced fog
Before, the fog distance was used to detect if the fog was reduced. While this seems like a good solution, the fog distance is calculated after the sky is rendered, meaning the visibility of the sky was always 1 frame behind. Instead, we can use the camera to calculate if the fog distance is reduced, so the visibility of the sky is up-to-date.

* Rewrite portion of comment describing the patch

I accidentally wrote the exact opposite of the intended message. This commit fixes that, and makes the comment easier to understand by removing unneeded information.

Co-authored-by: JellySquid <jellysquid3@users.noreply.github.com>
IMS212 pushed a commit to IMS212/sodium-fabric that referenced this issue Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-confirmed Status: Confirmed T-bug Type: Bug
Development

Successfully merging a pull request may close this issue.

8 participants