Canvas Renderer

Canvas Renderer

202k Downloads

Lighting Issue

hoshiyomi opened this issue · 18 comments

commented

I have switched over to Canvas from Sodium and there are some lighting errors seen here:
lighting
Is there a way to fix this?

Here is my mod list:
mods

Thanks

commented

Nice build. Are any settings different from defaults in Canvas or Vanilla video settings?

commented

Also, if you place and remove a torch in one of the dark areas, does that change anything?

commented

No for the first, yes for the second. Somehow though, in a couple of days after I made this post. instead of there just being simple lighting errors, every single block except ones that emit light was completely pitch black. I uninstalled and reinstalled all my mods and even changed a couple, nothing seemed to work so I have since to move back to Sodium. I'll reinstall Canvas again with only a couple of changes in mods soon to see if that has changed. I'll update you in a few hours, thanks

commented

This is fascinating and baffling. Could I bother you for a world upload?

Do you use phosphor or lithium with sodium?

commented

I have just reinstalled Canvas and as you can see, basically everything is pitch black
lighting

Here is my updated modlist
mods

commented

The world I took the screenshots on is on an SMP server so I might not be able to get it for you

I do not use phosphor or lithium with sodium

commented

Is there anything I can do to help you fix this? I really want to use Canvas

commented

Same issue with 1.0.871 on 1.16.1. but 1.0.878 on 1.16.2 works just fine.

commented

Is there anything I can do to help you fix this? I really want to use Canvas

The interesting thing here is that lighting is computed on the server. Canvas is a client-only mod so it's not obvious how this could be happening. I mean, it clearly is but baffling. Also strange that Sodium isn't affected.

Is the server running the same version of Minecraft? Someone noted that the 1.16.2 build (878) seems to help. Does it?

commented

The server and I were both running 1.16.1. I installed Fabric for 1.16.2 and the new build with only Fabric-API and mod menu. It was still all black when I made a new singleplayer world. I have also joined a couple servers that were running 1.16.2 but everything was still black. I have no clue why but, the new build doesn't work for me.

commented

I think it may be not the lighting issue, but the rendering issue, some blocks will be partly rendered.
It seems that the animation part of the campfire will be rendered correctly.
2020-08-23_10 16 27
Fence gates with in_wall: true will be rendered correctly.
2020-08-23_10 20 57
Glass panes will be rendered correctly while glass will be rendered with no color (black).
Hope it will help you.

commented

This would not be a permanent fix, but please try turning off these features in Tweaks to see if any help:

  • Parallel Terrain Setup
  • Greedy Render Thread
  • Force JMX Model Loading

I suspect this may be a thread timing issue - Canvas uses a separate threadpool for rendering so that on a LAN server the render threads aren't always clobbering the server, but the shared pool may have had a synchronizing effect that isn't happening when running as client only.

In other words, Canvas might be rendering the chunks before light data can be read from the server. That wouldn't fully explain why F3 + A doesn't help, though.

commented

I have disabled all 3 of those options with the 1.16.1 build (871) and it hasn't changed anything. I did download Lithium and Phosphor with the minimum mods required and it seems to have semi-fixed it.

phosphor_lithium
The features in tweaks didn't seem to have an effect here either. Leaves are still black while torches and lanterns were partially rendered. The screenshot was taken on a singleplayer world but the same thing was happening on multiple servers I joined. I don't think having to use Phosphor and Lithium is the answer you're looking for though.

commented

Can reproduce.

Environment

==================  CANVAS RENDERER DEBUG INFORMATION ==================
 Java: 14.0.1 64bit
 CPU: 4x Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
 GPU: Using framebuffer using ARB_framebuffer_object extension  3.2.1 build 12
 OpenGL: Intel HD Graphics 5000 OpenGL Engine GL version 2.1 INTEL-14.7.8, Intel Inc.
 GpuShader4: Y  VboArb: N  VaoEnabled: N  VaoArb: N
 (This message can be disabled by configuring logMachineInfo = false.)
========================================================================

How to reproduce

  1. Turn smooth lighting off.

  2. Enter any world.

  3. Turn smooth lighting on.

  4. Turn smooth lighting off.

commented

With build 913 it works fine.

commented

An issue with flat lighting was recently fixed and may be related.

Please try with build 913 or later and report if the issue improves.

commented

@sjx233 you can close this issue or maybe grondag will do it

commented

Seems to be fixed. Thanks for the confirmations!