Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: CSM lights when shadow maps are disabled #27358

Merged
merged 3 commits into from
Dec 11, 2023

Conversation

OndrejSpanel
Copy link
Contributor

@OndrejSpanel OndrejSpanel commented Dec 11, 2023

Fixed #27338

Description

Even when the shadows are not computed, the light contribution needs to be added.

Fixed example: https://raw.githack.com/ondrejspanel/three.js/fix-csm-shadows-disabled/examples/webgl_shadowmap_csm.html

Note: as shown in the linked issue, I have also included an option to toggle shadows on / off. I think it does no harm, it is something users can play with in the sample and it makes verification of the fix much easier.

@OndrejSpanel OndrejSpanel force-pushed the fix-csm-shadows-disabled branch from d5cb6d3 to ebbc449 Compare December 11, 2023 15:06
@OndrejSpanel OndrejSpanel force-pushed the fix-csm-shadows-disabled branch from ebbc449 to 8ff00cd Compare December 11, 2023 15:07
@OndrejSpanel OndrejSpanel force-pushed the fix-csm-shadows-disabled branch from 8ff00cd to cdad72c Compare December 11, 2023 15:11
@Mugen87 Mugen87 added this to the r160 milestone Dec 11, 2023
@Mugen87 Mugen87 merged commit 28f99d7 into mrdoob:dev Dec 11, 2023
11 checks passed
@OndrejSpanel OndrejSpanel deleted the fix-csm-shadows-disabled branch December 12, 2023 07:05
AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
* Fix indentation

* Allow shadows to be disabled from GUI

* Fix: when shadows are disabled, light contribution still needs to be considered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSM directional lights are no longer calculated when shadow maps are disabled
2 participants