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

albedo (base color) is not applied to the texture #54

Open
cx20 opened this issue Dec 27, 2017 · 0 comments
Open

albedo (base color) is not applied to the texture #54

cx20 opened this issue Dec 27, 2017 · 0 comments

Comments

@cx20
Copy link

cx20 commented Dec 27, 2017

I tried to color the ball using the forward-shading.js plug-in.
http://jsdo.it/cx20/4wmm

<mesh albedo="#0000ff" position="0,0,0" geometry="football" texture="xxx.png"/>

However albedo did not apply to texture. The ball is still white.
I think the shader has the following mistakes.

#ifdef USE_TEXTURE
  vec4 texColor = texture2D(texture,vTexCoord);
  //dBaseColor = texColor.rgb;
  dBaseColor *= texColor.rgb;
  lastColor.a *= texColor.a;
#endif

Below is the result of modification in the shader editor.
image

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

1 participant