You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When utilizing a TileMap or the newly introduced TileMapLayer along with an Occlusion layer, it appears that the texture_sdf method in the fragment shader lacks information regarding occlusion from the tile map. Notably, while a LightOccluder2D functions as expected.
Interestingly, lighting effects generated by DirectionalLight2D and a CanvasModulate Node still properly interact with these tiles.
Attached are screenshots illustrating the discrepancy between versions:
v4.3-dev6: The black rectangle represents the LightOccluder2D, with tiles below it missing.
v4.3-dev5: The black rectangle represents the LightOccluder2D, with tiles properly displayed below it.
This issue persists across both the deprecated TileMap and the new TileMapLayer, contrary to expectations based on behavior in older versions.
Steps to reproduce
Create a TileMap / TileMapLayer, add a TileSet and configure it to have an Occlusion Layer.
Add some Tiles to the TileSet and configure them to have a shape on the Occlusion Layer.
Place some tiles in the Viewport.
Add a CanvasLayer Node to the Root Node and add a ColorRect as a Child to it.
Set the ColorRect to cover the Viewport.
Add a new ShaderMaterial to the ColorRect and add a new Shader to it.
Edit the Shader to color the texture_sdf in the fragment.
Tested versions
System information
Windows 11 - Godot v4.3-dev6 - Vulkan (Forward+)
Issue description
When utilizing a TileMap or the newly introduced TileMapLayer along with an Occlusion layer, it appears that the texture_sdf method in the fragment shader lacks information regarding occlusion from the tile map. Notably, while a LightOccluder2D functions as expected.
Interestingly, lighting effects generated by DirectionalLight2D and a CanvasModulate Node still properly interact with these tiles.
Attached are screenshots illustrating the discrepancy between versions:
v4.3-dev6: The black rectangle represents the LightOccluder2D, with tiles below it missing.
v4.3-dev5: The black rectangle represents the LightOccluder2D, with tiles properly displayed below it.
This issue persists across both the deprecated TileMap and the new TileMapLayer, contrary to expectations based on behavior in older versions.
Steps to reproduce
Create a TileMap / TileMapLayer, add a TileSet and configure it to have an Occlusion Layer.
Add some Tiles to the TileSet and configure them to have a shape on the Occlusion Layer.
Place some tiles in the Viewport.
Add a CanvasLayer Node to the Root Node and add a ColorRect as a Child to it.
Set the ColorRect to cover the Viewport.
Add a new ShaderMaterial to the ColorRect and add a new Shader to it.
Edit the Shader to color the texture_sdf in the fragment.
Minimal reproduction project (MRP)
v6.zip
This sample project has 2 Scenes.
V5Scene.tscn
is for the dev5 version, it uses a TileMap instead of TileMapLayer else it would be impossible to be opened by dev 5
V6Scene.tscn
is almost the same as V5Scene.tscn but uses a TileMapLayer
The text was updated successfully, but these errors were encountered: