axmol/tests/cpp-tests/Resources/Shaders/example_MultiTexture.fsh

20 lines
389 B
Plaintext
Raw Normal View History

2014-05-14 03:55:34 +08:00
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
2019-03-26 13:45:03 +08:00
uniform sampler2D u_texture;
2014-05-14 03:55:34 +08:00
uniform sampler2D u_texture1;
2019-03-26 13:45:03 +08:00
uniform float u_interpolate;
2014-05-14 03:55:34 +08:00
void main() {
2019-03-26 13:45:03 +08:00
vec4 color1 = texture2D(u_texture, v_texCoord);
vec4 color2 = texture2D(u_texture1, v_texCoord);
gl_FragColor = v_fragmentColor * mix( color1, color2, u_interpolate);
2014-05-14 03:55:34 +08:00
}