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

KHR_materials_anisotropy extension branch. #1798

Merged
merged 44 commits into from
May 15, 2023

Conversation

UX3D-nopper
Copy link
Contributor

No description provided.

@UX3D-nopper UX3D-nopper added extension needs discussion Issue or PR requires working group discussion to resolve. labels Apr 28, 2020
@donmccurdy donmccurdy added this to the PBR Next milestone Apr 28, 2020
@ghost ghost force-pushed the extensions/KHR_materials_anisotropy branch from d51ac29 to adfc457 Compare April 30, 2020 07:59
@flashk
Copy link

flashk commented Apr 30, 2020

The schema does not mention which channel anisotropyTexture is sampled from, but the example implementation shows it being sampled from the red channel. Should it be sampled from the alpha channel instead? This would allow combining it with anisotropyDirectionTexture.

@UX3D-nopper
Copy link
Contributor Author

UX3D-nopper commented May 1, 2020

@UX3D-eckerlein Can you please cross check, if this packing is possible?
If yes, please adapt to code and schema.

@emackey
Copy link
Member

emackey commented Mar 6, 2023

@elalish Can you double-check my GLSL math in e0333e7? I added the mat2 thing where anisotropyDirection is now allowed to rotate the vector from the texture, but I don't have an easy way to test it.

@elalish
Copy link
Contributor

elalish commented Mar 8, 2023

@emackey Your math looks pretty good to me - sorry, I put a couple of comments in your commit, which makes them hard to find. But we definitely need to update the spec a bit more.

@emackey
Copy link
Member

emackey commented Apr 3, 2023

Per today's meeting, the anisotropy strength formula has been set.

alphaTangent = mix(alphaRoughness, 1.0, anisotropy * anisotropy);
alphaBitangent = alphaRoughness;

("alpha" is roughness squared here.)

Using the material's roughness along the bitangent (or along the direction perpendicular to the chosen anisotropy direction) allows rasterizers to continue using material roughness as a base lookup into the IBL, unmodified. The tangent direction then needs an approximation such as stretching or multisampling, but only along one axis.

Copy link
Member

@emackey emackey left a comment

Choose a reason for hiding this comment

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

This was approved today for "Release Candidate" status by the PBR TSG.

@emackey emackey added PBR Physically Based Rendering and removed needs discussion Issue or PR requires working group discussion to resolve. labels May 15, 2023
@emackey emackey merged commit bcd622b into KhronosGroup:main May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension PBR Physically Based Rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.