4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
11.53k stars 880 forks source link

Tilemap rendering when using a light #7091

Open AlexandreSi opened 1 month ago

AlexandreSi commented 1 month ago

Is there an existing issue for this?

Describe the bug

When using a light (light object + lighting layer), the tilemap does not render correctly.

Steps to reproduce

  1. Add a tilemap object and paint on an instance in the scene
  2. Add a light object on the scene (the lighting layer is then created)
  3. Click Preview

In the scene editor:

image

In the preview:

image

GDevelop platform

Desktop

GDevelop version

5.4.216-ea8acf8d5f5b943b295ed6e3691e275a592fc3c1

Platform info

macOS

Additional context

No response

Boy1developer commented 1 month ago

yes with me in widows version Screenshot 2024-10-22 210038 Screenshot 2024-10-22 210115

AlexandreSi commented 3 days ago

I found another thing:

https://github.com/user-attachments/assets/544d29ed-1c20-4f7c-b4a5-7881096f42a6

In this video, I added those events:

image

When I press M or P, you can see that the character switches lane and it affects the tilemap rendering

Also, if you add a 3D object (cube for instance) in the scene's objects, the bug does not appear. This seems to indicate that there is an issue when this else is executed:

https://github.com/4ian/GDevelop/blob/6ed0e8e4cc60c2efa0eddfada8c0ff00893e5a15/GDJS/Runtime/pixi-renderers/runtimescene-pixi-renderer.ts#L254-L255

EDIT: Overall, there seems to be non-consistent issues when rendering a tilemap and there is a lighting layer.