Advertisement
Boost

Untitled

Feb 3rd, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 330
  2.  
  3. uniform sampler2D tex0;
  4. uniform sampler2D tex1;
  5. uniform sampler2D tex2;
  6. uniform sampler2D tex3;
  7.  
  8. in vec2 UV0;
  9. in vec2 UV1;
  10. in vec2 UV2;
  11. in vec2 UV3;
  12.  
  13. out vec4 color;
  14.  
  15. void main()
  16. {
  17.     vec4 layer0 = texture2D(tex0, UV0);
  18.     vec4 layer1 = texture2D(tex1, UV1);
  19.     vec4 layer2 = texture2D(tex2, UV2);
  20.     vec4 layer3 = texture2D(tex3, UV3);
  21.    
  22.     color = (vec4(layer0.rgb * layer0.a, layer0.a) * 1.0f) + (vec4(layer1.rgb * layer1.a, layer1.a) * 0.7f)
  23.         + (vec4(layer2.rgb * layer2.a, layer2.a) * 0.7f)
  24.         + (vec4(layer3.rgb * layer3.a, layer3.a) * 0.7f);
  25.     // color = texture2D(tex0, UV0) * 0.8f;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement