Concurrent Chunk Management Engine (Fabric)

Concurrent Chunk Management Engine (Fabric)

231k Downloads

Chunk Lighting Issues With C2ME and Phosphor 0.7.1

DragonEggBedrockBreaking opened this issue ยท 17 comments

commented

Chunks are completely dark, on all y levels, when paired with Phosphor 0.7.1 (cannot reproduce with 0.7.0 and below). Happens in patches, which can be different sizes (e.g. some are 3-4 chunks, some are 7-8 chunks), and patches are not very common, (these are approximations, and you should 100% reproduce more scientifically and look into the code rather than going off my measurements). Bug is similar to a Phosphor + Tic Tacs issue, but is less severe, both skylight and blocklight are affected and occurs in chunks. You may need to fly around for a few minutes to reproduce, or sometimes you can reproduce quite quickly.

Hardware:

  • i3 6100U (also reproduced with i7 7500U)
  • 8GB 2133MHz RAM
  • Intel HD Graphics 520 (also reproduced with Intel HD Graphics 620)

Software:

  • LMDE (Linux Mint Debian Edition) 4 (also reproduced with Windows 10 2004)
  • MultiMC 5; 0.6.11
  • Minecraft 1.16.5
  • Fabric 0.11.1
  • OpenJDK 11
  • C2ME 0.1.0-rc4
  • Phosphor 0.7.1

Screenshot:
2021-02-18_13 16 09

2021-02-20_10 43 35

commented

Note that this is easier to reproduce with phosphor than without, although it is reproducible in both scenarios.

commented

Can you reproduce with Starlight ?

commented

Can you reproduce with Starlight ?

I cannot reproduce with Starlight.

commented

After further testing, this seems to be a compatibility issue between Phosphor 0.7.1 and C2ME. When I saw the unlighted chunks without phosphor, those were probably chunks broken with phosphor, which i hadn't fixed yet (by 'optimising world'). I will edit the title and my original message.

commented

Pretty sure this issue is caused purely by C2ME and phosphor simply makes it visible. Vanilla's lightmap initialization can repair lighting glitches in some cases, but also causes a bunch of lagspikes and is hence replaced by Phosphor 0.7.0.
In particular, this line looks pretty suspicious to me, since it seems to read the light data (and other data) at some random time in the future, at which point the data might already be unloaded or otherwise modified/invalidated.

commented

Ok, thank you for your comment :D

commented

Still reproducible after 810ff60

commented

I cannot reproduce this bug anymore (after 8d864ea), if someone else can confirm that the bug is no longer reproducible, I can close this (either post here, or ping me on the Yatopia discord, I am DragonEggBedrockBreaking#0034)

commented

It is still reproducible after loading all ready generated chunks

commented

It is still reproducible after loading all ready generated chunks

WDYM by already generated chunks? Chunks will stay broken. In order to test fairly, you need to 'optimise world' to fix the already glitched chunks, then try to reproduce.

commented

if you generate a new world then load and unload a chunk it sometimes has the broken lighting even though it generated with good lighting

commented

if you generate a new world then load and unload a chunk it sometimes has the broken lighting even though it generated with good lighting

Ah, OK, I misunderstood what you said; I thought you meant that chunks that were already broken would stay broken. Sorry.

Also, I'm assuming this only occurs with chunks that were already generated with C2ME, and would not occur with chunks generated with vanilla. Have you observed this?

commented

Though its possible that the only reason it doesn't happen with vanilla is because the vanilla light engine does stuff to hide light errors (partially why it causes so many lag spikes).

That's what PhiPro thought this was, which is why he closed the issue report on PhosPhor's GitHub (said it was a C2ME issue).

commented

if you generate a new world then load and unload a chunk it sometimes has the broken lighting even though it generated with good lighting

Ah, OK, I misunderstood what you said; I thought you meant that chunks that were already broken would stay broken. Sorry.

Also, I'm assuming this only occurs with chunks that were already generated with C2ME, and would not occur with chunks generated with vanilla. Have you observed this?

Currently the most likely way to trigger it seems to be load already generated chunks when C2ME is installed along phosphor 0.7.1. It doesn't seem to happen without phosphor or with starlight. Though its possible that the only reason it doesn't happen with vanilla is because the vanilla light engine does stuff to hide light errors (partially why it causes so many lag spikes). Removing phosphor or switching to starlight seems to fix so the lighting issues aren't permanent at least which is good.

commented

@ishland Cannot reproduce after 7bd15a6. I will test in 15 mins, and if I cannot either, I will close this report.

commented

I cannot reproduce either anymore. If you can still reproduce, comment here and provide screenshots so I can re-open. Make sure you are using the latest C2ME commit (commit, not release, fetch a build from Actions or build yourself)