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

Change default shader #642

Closed
Creepymulder opened this issue Sep 5, 2023 · 2 comments
Closed

Change default shader #642

Creepymulder opened this issue Sep 5, 2023 · 2 comments
Labels
question Further information is requested

Comments

@Creepymulder
Copy link

Hi,

When using LoadGltfBinary, it is possible to change the default shader applied ? Right now it's using "glTFPbrMetallicRoughness"

Thanks !

@Creepymulder Creepymulder added the bug Something isn't working label Sep 5, 2023
@AhmadMansy
Copy link

In my case I had to reassign shader after getting the material, but it slows down the loading time, so the better solution for me was creating a CustomShaderGraphMaterialGenerator and add my shader name in it.
I think functions that loads shader should all be virtual, we only have GetUnlitShaderName and GetSpecularShaderName virtual but we need at least this one LoadShaderByName being virtual

@atteneder
Copy link
Owner

Hi,

The cleanest way to do custom shader selection and material creation is to implement IMaterialGenerator and pass it as parameter to the GltfImport constructor.

hth

@atteneder atteneder added question Further information is requested and removed bug Something isn't working labels Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants