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

Allow optional material configuration for the plugin #59

Open
heretique opened this issue Jan 28, 2022 · 1 comment
Open

Allow optional material configuration for the plugin #59

heretique opened this issue Jan 28, 2022 · 1 comment
Assignees
Labels

Comments

@heretique
Copy link

Hey team,

while using the Spine plugin on one of our projects we've noticed that the Spine animations were white. We discovered that that was due to the ambient light that was set to white. We fixed that issue by patching the plugin and inside createMaterial method we disabled the diffuse color

material.diffuse = new pc.Color(0, 0, 0, 0); // include diffuse component, this allows lights contribution

I think this is kind of "hacky" on our part and was wondering if there could be a way of setting this as an option on the SpineComponent?

Thanks!

@mvaligursky
Copy link
Contributor

Another issues I've noticed is that the internally created material by default enables lighting - so that the meshes can be lit if required. This causes the fragment shader to be more expensive than needed, if the user does not need lighting. This is especially true for when the clustered lights are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants