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

20 lines
375 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;
2022-07-04 21:26:48 +08:00
uniform sampler2D u_tex0;
uniform sampler2D u_tex1;
2019-03-26 13:45:03 +08:00
uniform float u_interpolate;
2014-05-14 03:55:34 +08:00
void main() {
2022-07-04 21:26:48 +08:00
vec4 color1 = texture2D(u_tex0, v_texCoord);
vec4 color2 = texture2D(u_tex1, v_texCoord);
gl_FragColor = v_fragmentColor * mix( color1, color2, u_interpolate);
2014-05-14 03:55:34 +08:00
}