skinning.fs 446 B

1234567891011121314151617181920
  1. #version 100
  2. precision mediump float;
  3. // Input vertex attributes (from vertex shader)
  4. varying vec2 fragTexCoord;
  5. varying vec4 fragColor;
  6. // Input uniform values
  7. uniform sampler2D texture0;
  8. uniform vec4 colDiffuse;
  9. void main()
  10. {
  11. // Fetch color from texture sampler
  12. vec4 texelColor = texture2D(texture0, fragTexCoord);
  13. // Calculate final fragment color
  14. gl_FragColor = texelColor*colDiffuse*fragColor;
  15. }