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

Add OpenPBR's base_weight material parameter #16085

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

virtualzavie
Copy link

@virtualzavie virtualzavie commented Jan 17, 2025

This PR implements the base_weight parameter from the OpenPBR specification.
This parameter simply scales linearly the base_color (named albedo in Babylon.js).

Test scene:
https://playground.babylonjs.com/?snapshot=refs/pull/16085/merge#DT1XPP#4

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 17, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@virtualzavie virtualzavie changed the title Add OpenPBR's base_weight material paramener Add OpenPBR's base_weight material parameter Jan 17, 2025
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 17, 2025

Comment on lines +71 to +74
surfaceAlbedo *= vBaseWeight;
#if BASEWEIGHT
surfaceAlbedo *= baseWeightTexture.r;
#endif
Copy link
Author

Choose a reason for hiding this comment

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

Pending discussion with OpenPBR group to confirm the specified behaviour.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 20, 2025

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