godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.28k stars 20.23k forks source link

blend mode mask is missing in Light2D node #70358

Closed arabgamedev closed 1 year ago

arabgamedev commented 1 year ago

Godot version

4.0 beta 9

System information

windows 8.1 GLES3

Issue description

why mask mode is removed or missing in Light2D nodes image

Steps to reproduce

add Light2D node select blend mode

Minimal reproduction project

_

Calinou commented 1 year ago

This is expected. The Mask Light2D mode is replaced by the CanvasItem Clip Children property, which makes clipping more convenient to perform. (The CanvasGroup node may also be relevant to your needs, depending on what you need to achieve.)

arabgamedev commented 1 year ago

This is expected. The Mask Light2D mode is replaced by the CanvasItem Clip Children property, which makes clipping more convenient to perform. (The CanvasGroup node may also be relevant to your needs, depending on what you need to achieve.)

but if i want mask like 2d shadows i can't do it using just clip children what i need is the shadows as mask like in 3.x

arabgamedev commented 1 year ago

This is expected. The Mask Light2D mode is replaced by the CanvasItem Clip Children property, which makes clipping more convenient to perform. (The CanvasGroup node may also be relevant to your needs, depending on what you need to achieve.)

did you see the effect in among us when you can't see player behind the wall you can do this effect in godot 3 using mask light2D

Calinou commented 1 year ago

did you see the effect in among us when you can't see player behind the wall

This kind of culling should be done server-side to prevent cheats from revealing player positions.

arabgamedev commented 1 year ago

did you see the effect in among us when you can't see player behind the wall

This kind of culling should be done server-side to prevent cheats from revealing player positions.

what is the harm of bring back this blend mode?

PhilWun commented 1 year ago

@arabgamedev I also miss this feature, because I wanted to the same thing. To get the same effect you can write a shader to calculate the shadows with the new SDF functions and make the texture transparent in the shadow. These are the resources I used:

Wllwl2 commented 1 year ago

@arabgamedev Я тоже скучаю по этой функции, потому что я хотел того же самого. Чтобы получить тот же эффект, вы можете написать шейдер для вычисления теней с помощью новых функций SDF и сделать текстуру прозрачной в тени. Это те ресурсы, которые я использовал:

Hi. I am another person with this problem. Can you please post how you worked it out here?