Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- uniform sampler2D extra_texture;
- in vec2 texture_coords;
- out vec3 final_color;
- ...
- void main() {
- ...
- // Assume color1 to be the base color for the sphere, no matter how you get it (attribute/texture), it has at least 3 components.
- vec4 color2 = texture(extra_texture, texture_coords);
- final_color = mix(vec3(color2), vec3(color1), color2.a);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement