godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.07k stars 69 forks source link

Add support for translucent LightOccluder2Ds #9297

Open verrofy opened 3 months ago

verrofy commented 3 months ago

Describe the project you are working on

A 2D platformer-style world with lots of exploration, etc.

Describe the problem or limitation you are having in your project

Any light occluder blocks all light, making everything pitch black behind it. Mainly I'm having this problem with tilesets, for example I'd like to add the ability to have translucent glass tiles.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Adding this feature would:

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Not exactly sure how this would be implemented, as I do not know how the backend shadow calculation works. I assume this would be possible though, as shadow functionality already exists. Maybe the negative area of shadows can be replaced with a softer/dimmer/gradient of the light before it passes through.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No this can not be worked around, as I did research I am pretty sure this is not possible in current Godot.

Is there a reason why this should be core and not an add-on in the asset library?

This will improve the usability and customization of lighting, as occluders seem to have a pretty basic and non-customizable function.

AThousandShips commented 3 months ago

Related: