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

GLTFLoader: add KHR_materials_emissive_strength #23867

Merged
merged 2 commits into from
Apr 8, 2022

Conversation

hybridherbst
Copy link
Contributor

@hybridherbst hybridherbst commented Apr 7, 2022

Description

Took a first stab at implementing KHR_materials_emissive_strength.
cc @donmccurdy
Got a question as well: for this and other new material features, is there a best practice for testing it in three.js? I'm just testing in my viewer PR, but not sure how that is in general handled.

This contribution is funded by 🌵 Needle.

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

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

Excellent, thanks!

Most loaders don't have unit tests, other than the tests against the base class, THREE.Loader. For a sufficiently complex feature I think we'd try to work it into an example where appropriate, though we don't really do examples just as tests.

If we wanted a test on this extension I'd suggest modifying the GLB from our bloom example to use KHR_materials_emissive_strength, but that's certainly not required for this PR to be merged.

examples/jsm/loaders/GLTFLoader.js Outdated Show resolved Hide resolved
examples/jsm/loaders/GLTFLoader.js Show resolved Hide resolved
@Mugen87 Mugen87 added this to the r140 milestone Apr 8, 2022
@mrdoob mrdoob merged commit b356e02 into mrdoob:dev Apr 8, 2022
@mrdoob
Copy link
Owner

mrdoob commented Apr 8, 2022

Thanks!

@hybridherbst hybridherbst deleted the khr_materials_emissive_strength branch April 30, 2022 16:27
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* GLTFLoader: add KHR_materials_emissive_strength

* only set emissiveIntensity if emissiveStrength is defined

Co-authored-by: Don McCurdy <[email protected]>

Co-authored-by: Don McCurdy <[email protected]>
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.

4 participants