So I was looking on how to create a minecraft - like lighting engine and I found the following post:
The answer to it was incredible and perfectly detailed I would love if you the person who wrote it @Byte56 or anyone who knows how @Byte56 achieved the shadow effect that he called "a little more advanced"? If you do know how to achieve it can you please detail the way to create it like he did in his post?
This was the part I found really useful:
Here are a few things to keep in mind.
We're going to keep a list of cubes that need their lighting values checked Only transparent cubes and light emitting cubes have lighting values The first cube we add is the light source. A source is a special case. It's light value is set accordingly to the light source type (for example torches get a brighter value than lava). If a cube has its light value set above 0, we add all the transparent cubes adjacent to that cube to the list. For each cube on the list, we set its light value to its brightest neighbor minus one. This means that all the transparent cubes (this includes "air") next to the light source get a light value of 15. We continue walking the cubes around the light source, adding cubes that need to be checked and taking lit cubes off the list, util we no longer have any to add. That means that all the latest values set have been set to 0, which means we've reached the end of our light. - Byte56
This is the effect desired: [I have already implemented the normal lights]
I basically want guidelines to implementing the "shadow effect" of the light. As you can see the light being on the bridge casts light onto the ground in-front of the bridge as well even though its "out of the range" of the light. This creates an illusion that there is a shadow underneath the bridge. That is what I am looking to implement. I already have implemented the basic lighting that every block away from the light is the max neighbour minus one. This works great however I would love to implement this "shadow illusion"