Advertisement
Guest User

latest fragment

a guest
Nov 26th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #version 330 core
  2.  
  3. uniform sampler2DArray texArray;
  4. uniform sampler2D texAtlas;
  5.  
  6. in vec3 texCoords;
  7. out vec4 outColor;
  8.  
  9. vec4 texture1;
  10. vec4 texture2;
  11.  
  12. void main()
  13. {
  14. texture1 = texture(texArray, texCoords);
  15. texture2 = texelFetch(texAtlas, ivec2( int(texCoords.x), int(texCoords.y)), 0);
  16. outColor = texture1;
  17. if(texCoords.z < 1)
  18. outColor = texture2;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement