Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
GLTF KHR_materials_anisotropy support #25580
GLTF KHR_materials_anisotropy support #25580
Changes from 7 commits
e84ea22
aae2b68
0bc855c
0aea9f3
fba9c0d
81d2fab
3fdb06e
fd66490
c96774b
d13d0fa
e06229b
afd255e
878f528
a8f1818
0ef60d7
2c2b219
02822a7
aa81f02
a8fe730
35ba4c2
bba8dcc
d82bd66
c6dd624
24e4966
b3d8b7a
785975f
2019065
287d97b
6228a02
aedce0a
288b008
33830fb
cebace1
55601d9
ea0c4b1
2a48a13
f3ef3cd
498265f
46a7040
e18fdf5
0ba4bdf
a3c7d9e
eed26c2
acb1c2e
8ac65fc
b47ec43
b58f396
26fbe83
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another refactor here is to make the Clearcoat BRDF the special function instead of the iridescence BRDF. This is nice because clearcoat always uses the simple version, whereas the base BRDF get adjusted by several things, so far iridescence and anisotropy. This feels cleaner to me, hopefully others agree, especially since I removed a lot of the function inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, this did also necessitate moving the
PhysicalMaterial
definition into its own chunk so it could be included earlier.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see the problem - okay, coming back tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I did a different refactor instead due to troubles with include order. Basically
bsdfs.glsl.js
had mostly Physical BRDFs that are only used bylights_physical_pars_fragment.glsl.js
, so I just moved those functions into that file (a little big now, but self-contained). The only other function used broadly wasBRDF_Lambert
, so I moved that tocommon.glsl.js
. Nowbsdfs.glsl.js
is just BlinnPhong functions, and no longer imported bymeshphysical
.Sorry this makes the PR a bit hard to read - probably best to look at commits individually.