Replies: 1 comment 1 reply
-
As mentioned in the documentation, this is not technically feasible with built-in shadows due to how they are drawn. Instead, you need to use a custom shader that reads from the signed distance field generated by LightOccluder2D nodes and creates shadows based on this SDF. This is how techniques such as 2D global illumination can be implemented. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the project you are working on
When you enable the shadow option for
DirectionalLight2D
it draws a shadow but the length of the shadow is infinite and cannot be changed. It would be great if we could change the length of the shadowsDescribe the problem or limitation you are having in your project
There is no way to change the
DirectionalLight2D
shadow length. The only way to do this is to write a shader script.Describe the feature / enhancement and how it helps to overcome the problem or limitation
You can't change the length and there are no other option
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add an option to the shadow section for
DirectionalLight2D
namedLength
If this enhancement will not be used often, can it be worked around with a few lines of script?
It will be used a lot and I think it can be done with a few lines of script
Is there a reason why this should be core and not an add-on in the asset library?
This is a must have feature. There aren't many options for the shadow property so this would be great
Beta Was this translation helpful? Give feedback.
All reactions