axmol/cocos/renderer/ccShader_3D_Particle.frag

33 lines
530 B
GLSL
Raw Normal View History

2015-02-11 18:14:22 +08:00
const char* cc3D_Particle_tex_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;
void main(void)
{
gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * ColorOut * u_color;
}
)";
const char* cc3D_Particle_color_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;
}
)";