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
macOS Monterey, 12.6 (also looks the same when I build project for iPhone)
Issue description
In example project I have one Light2D and two round Sprites2D. Each sprite has sphere normal map and LightOccluder2D as a child. Each occluder polygon is round drawn counter clockwise and its cull_mode is set to clockwise. In some cases (I can't figure in which exactly) when sprites (and hence occluders polygons) intersect area of intersection appears to be lightened - you can see it in the picture, look at the intersection of yellow and green sprites.
And this is what I expect:
I'm not sure if it's a bug. Once it's not, I would like to know how to fix this please. Probably it can be solved if every light is in own layer and every sprite has many occluders - one for each layer. But this approach may result in bad performance because of big amount of nodes so I hope there is another solution. In my work project there could be much more than one light source and more sprites.
It's interesting, that changing order of sprites in a scene tree fixes this problem but in my work project I generate nodes programmatically and
I don't now in which order I should rearrange sprites
Some couples of sprite look like expected while other are not what confuses me even more.
Steps to reproduce
Create scene like this
don't forget to
add normal map for each sprite
add occluder and set corresponding to polygon's direction cull_mode different from "Disabled"
Godot version
v3.5.1.stable.official [6fed1ff]
System information
macOS Monterey, 12.6 (also looks the same when I build project for iPhone)
Issue description
In example project I have one Light2D and two round Sprites2D. Each sprite has sphere normal map and LightOccluder2D as a child. Each occluder polygon is round drawn counter clockwise and its cull_mode is set to clockwise. In some cases (I can't figure in which exactly) when sprites (and hence occluders polygons) intersect area of intersection appears to be lightened - you can see it in the picture, look at the intersection of yellow and green sprites.
And this is what I expect:
I'm not sure if it's a bug. Once it's not, I would like to know how to fix this please. Probably it can be solved if every light is in own layer and every sprite has many occluders - one for each layer. But this approach may result in bad performance because of big amount of nodes so I hope there is another solution. In my work project there could be much more than one light source and more sprites.
It's interesting, that changing order of sprites in a scene tree fixes this problem but in my work project I generate nodes programmatically and
Steps to reproduce
Create scene like this
don't forget to
or just load my example project
https://github.com/LittleToky/overlapping_occluders_example
Minimal reproduction project
overlapping_occluders_example.zip
The text was updated successfully, but these errors were encountered: