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

checkTransparency issue #112

Closed
PrincessGod opened this issue Nov 6, 2017 · 3 comments
Closed

checkTransparency issue #112

PrincessGod opened this issue Nov 6, 2017 · 3 comments

Comments

@PrincessGod
Copy link

Should checkTransparency parameter be in ambientTextureOptions?
Cause I have obj with transparency ambient texture.

@lilleyse
Copy link
Contributor

lilleyse commented Nov 6, 2017

I'm pretty sure most glTF 2 renderers will ignore the alpha channel for anything but base color. For example: https://github.com/KhronosGroup/glTF-WebGL-PBR/blob/master/shaders/pbr-frag.glsl#L293.

It would be better to transfer the alpha channel to the base color (diffuse) texture instead.

@PrincessGod
Copy link
Author

@lilleyse Thanks, That's let me learn a lot.
But in this code, if a .png file load for ambientTexture first, and when deffuseTexture use it, it will lose alpha data. Because you just load image once.

@lilleyse
Copy link
Contributor

lilleyse commented Nov 7, 2017

Ah that is true. I'll open a PR to change the load order.

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

No branches or pull requests

2 participants