Skip to content

Add a shadow opacity property to Light3D#61893

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
Calinou:light3d-add-shadow-opacity
Aug 7, 2022
Merged

Add a shadow opacity property to Light3D#61893
akien-mga merged 1 commit into
godotengine:masterfrom
Calinou:light3d-add-shadow-opacity

Conversation

@Calinou

@Calinou Calinou commented Jun 10, 2022

Copy link
Copy Markdown
Member

This can be used to make shadows translucent for a specific light. Performance seems to be identical from before, both with shadows enabled and disabled. This is a partial reimplementation of the shadow_color property, which had to be removed for optimization reasons.

The light distance fade system also uses this to smoothly fade the shadow when the light fade transition distance is greater than 0.

@Calinou Calinou added this to the 4.0 milestone Jun 10, 2022
@Calinou Calinou force-pushed the light3d-add-shadow-opacity branch 2 times, most recently from 3b67f19 to 63f1805 Compare June 14, 2022 15:45
@Calinou Calinou marked this pull request as ready for review June 14, 2022 15:45
@Calinou Calinou requested review from a team as code owners June 14, 2022 15:45
@Calinou

Calinou commented Jun 14, 2022

Copy link
Copy Markdown
Member Author

I fixed shadow fade, it now works (tested with both OmniLight3D and SpotLight3D).

reduz
reduz previously requested changes Aug 6, 2022
Comment thread servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl Outdated
@reduz

reduz commented Aug 6, 2022

Copy link
Copy Markdown
Member

Seems ok save for the comment I made. Needs rebase.

This can be used to make shadows translucent for a specific light.

The light distance fade system also uses this to smoothly fade the shadow
when the light fade transition distance is greater than 0.
@Calinou Calinou force-pushed the light3d-add-shadow-opacity branch from 63f1805 to baaa750 Compare August 7, 2022 09:06
@Calinou

Calinou commented Aug 7, 2022

Copy link
Copy Markdown
Member Author

Rebased (with suggestion applied) and tested again, it works as expected on all light types.

@akien-mga akien-mga dismissed reduz’s stale review August 7, 2022 09:57

Changes done.

@akien-mga akien-mga merged commit 428aed8 into godotengine:master Aug 7, 2022
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants