Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. ...
  2. uniform sampler2D extra_texture;
  3. in vec2 texture_coords;
  4. out vec3 final_color;
  5. ...
  6. void main() {
  7. ...
  8. // Assume color1 to be the base color for the sphere, no matter how you get it (attribute/texture), it has at least 3 components.
  9. vec4 color2 = texture(extra_texture, texture_coords);
  10. final_color = mix(vec3(color2), vec3(color1), color2.a);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement