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

feat: PBR asset matching #448

Merged
merged 5 commits into from
Aug 23, 2024
Merged

feat: PBR asset matching #448

merged 5 commits into from
Aug 23, 2024

Conversation

doodlum
Copy link
Owner

@doodlum doodlum commented Aug 23, 2024

These changes to how PBR lighting works have been tested by multiple people and determined to be very close to the expected look, better than alternatives tests.

Changes vs dev, are that all PBR lighting is done in linear. And we assume that the vanilla diffuse texture has been premultiplied by the lambert diffuse function, which is (1.0 / PI). This explains why the lambert function is never applied in vanilla / why specular lighting is not multiplied by PI.

Therefore we remove a lot of multiplications by PI and divide the albedo by PI to match the vanilla diffuse brightness.

@doodlum doodlum merged commit 973ebee into dev Aug 23, 2024
5 checks passed
@alandtse alandtse deleted the pbr-asset-matching branch August 31, 2024 15:36
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.

2 participants