axmol/cocos/renderer/shaders/3D_particle.frag

35 lines
560 B
GLSL
Raw Normal View History

2015-02-11 18:14:22 +08:00
const char* CC3D_particleTexture_frag = R"(
2015-02-11 18:14:22 +08:00
#ifdef GL_ES
2015-02-11 18:14:22 +08:00
varying mediump vec2 TextureCoordOut;
varying mediump vec4 ColorOut;
#else
2015-02-11 18:14:22 +08:00
varying vec4 ColorOut;
varying vec2 TextureCoordOut;
#endif
2015-02-11 18:14:22 +08:00
uniform vec4 u_color;
uniform sampler2D u_texture;
2015-02-11 18:14:22 +08:00
void main(void)
{
gl_FragColor = texture2D(u_texture, TextureCoordOut) * ColorOut * u_color;
2015-02-11 18:14:22 +08:00
}
)";
const char* CC3D_particleColor_frag = R"(
2015-02-11 18:14:22 +08:00
#ifdef GL_ES
2015-02-11 18:14:22 +08:00
varying mediump vec4 ColorOut;
#else
2015-02-11 18:14:22 +08:00
varying vec4 ColorOut;
#endif
2015-02-11 18:14:22 +08:00
uniform vec4 u_color;
void main(void)
{
gl_FragColor = ColorOut * u_color;
}
)";