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

Don't use reflective specular for dynamic lights #1423

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

slipher
Copy link
Member

@slipher slipher commented Nov 7, 2024

It's wrong because in the reflection cubemaps,
the world geometry is already pre-multiplied with the world lighting. For example if the location were completely dark but you added a static light, the specular reflection of the light should appear (but wouldn't previously).

Fixes #1358.

@slipher
Copy link
Member Author

slipher commented Nov 7, 2024

I was motivated to do this as a start to untangling the Gordian knot of computeDeluxeLight (which combines the loosely related functions of deluxe mapping, half-Lambert lighting, physical mapping, and specular mapping). I need to do that to fix #1424.

Copy link

@SomaZ SomaZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Makes more sense now.

It's wrong because in the reflection cubemaps,
the world geometry is already pre-multiplied with the
world lighting. For example if the location were completely dark
but you added a static light, the specular reflection of the light
should appear (but wouldn't previously).

Fixes DaemonEngine#1358.
@slipher slipher force-pushed the no-reflective-dlight branch from c3b3f24 to 96e59a9 Compare November 9, 2024 09:49
@slipher slipher merged commit de6c5d7 into DaemonEngine:master Nov 9, 2024
2 of 8 checks passed
@slipher slipher deleted the no-reflective-dlight branch November 9, 2024 09:50
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.

Reflections are added for each dynamic light
2 participants