Page 1 of 1

(Non-)Lighting Issue in C

PostPosted: Sun Dec 13, 2015 00:29
by duane
This is probably an issue with my C++ code, rather than the game, but can anyone speculate on why I'm getting these lighting problems in rough terrain? I'm not sure where to begin on this.

Image

The screenshot is from a new world, without any mods, using my mapgen.

If anyone wants to look at the code, it's here. Most of the form was taken from the version 7 mapgen (which doesn't have this problem).

Re: (Non-)Lighting Issue in C

PostPosted: Sun Dec 13, 2015 11:05
by Gael de Sailly
Maybe you should copy this code ?

Re: (Non-)Lighting Issue in C

PostPosted: Sun Dec 13, 2015 13:56
by duane
Gael de Sailly wrote:Maybe you should copy this code ?


No, that actually makes it worse. I wonder why v6 passes so much larger a vector.

Image

It might be a border issue. All the dark spots I've checked are at altitude 62.5.

Re: (Non-)Lighting Issue in C

PostPosted: Sun Dec 13, 2015 18:45
by paramat
Yes we have a shadow problem at y = 63 in all mapgens other than mgv6, details here https://github.com/minetest/minetest/issues/2759 it's still a mystery.
All mapgens other than mgv6 have 1 up 1 down overgeneration, which is why the lighting calls have different volumes (and why using the mgv6 lighting volumes in mgv7etc causes a black world). Also, mgv6 overgenerates sideways due to mudflow which is why the lighting volume is wider.