Light and Shadows example

v0.8.2

Depth bias is no longer hardcoded in the shader and can now be customized by setting light_and_shadows.depth_bias or in the sun object. What’s this? To reduce the Peter Panning effect (shadows detaching from objects) in shadow mapping, you need to adjust the shadow bias, a value that offsets the shadow depth. Too high a bias causes Peter Panning, while too low a bias leads to shadow acne.

A new Tinyworld example has been added. It uses tilemap, pixelart textures, billboard sprites and different material variants.

15 Likes

Another demo “map editor”: tiny_world 0.1 (HTML5)

Added instanced model billboad shader for the forest props. What is the FPS on your device?

18 Likes

240 FPS RTX 3080 ti

5 Likes

What is the FPS on your device?

60 FPS with Intel Iris Xe integrated graphics. I assume it could go higher if vsync were disabled.

4 Likes

160+ FPS with 1000 objects - RTX 4060 on laptop


6 Likes

A steady 60 FPS with 4GB RAM and integrated Intel HD Graphics 4600 on a corei5 running Linux. Very nice work! Once I got to around 700 objects, it stuttered briefly to 59 FPS, but then reverted back to 60.

How do you create a bounce effect when buildings appear?

it’s just go.animate with EASING_INBOUNCE i think

0.83

  • Added billboard models material. And an example of it.
  • Added flexible adjustment of the number of light sources on the Scene. See the settings of the Sun object.
  • Added pinch zoom and rotate gestures. See the tinyworld example.
  • An example with the Spine models has been moved to its own repository. (Html5 Demo)

Demo: Light and Shadows 0.83

How looks billboard model in the editor viewport:

14 Likes

Another demo based on a tinyworld example : Fog of War

  • Fog of War (fragment shader + lua module)
  • Path finding module (pure lua)
  • Mini map

The sources are in a separate branch.

17 Likes