2015-02-11 18:14:22 +08:00
|
|
|
|
2019-01-30 09:35:17 +08:00
|
|
|
const char* CC3D_particleTexture_frag = R"(
|
2015-02-11 18:14:22 +08:00
|
|
|
|
2016-10-26 16:03:08 +08:00
|
|
|
#ifdef GL_ES
|
2015-02-11 18:14:22 +08:00
|
|
|
varying mediump vec2 TextureCoordOut;
|
|
|
|
varying mediump vec4 ColorOut;
|
2016-10-26 16:03:08 +08:00
|
|
|
#else
|
2015-02-11 18:14:22 +08:00
|
|
|
varying vec4 ColorOut;
|
|
|
|
varying vec2 TextureCoordOut;
|
2016-10-26 16:03:08 +08:00
|
|
|
#endif
|
2015-02-11 18:14:22 +08:00
|
|
|
uniform vec4 u_color;
|
|
|
|
|
2019-01-30 09:35:17 +08:00
|
|
|
uniform sampler2D u_texture;
|
|
|
|
|
2015-02-11 18:14:22 +08:00
|
|
|
void main(void)
|
|
|
|
{
|
2019-01-30 09:35:17 +08:00
|
|
|
gl_FragColor = texture2D(u_texture, TextureCoordOut) * ColorOut * u_color;
|
2015-02-11 18:14:22 +08:00
|
|
|
}
|
2016-11-02 14:13:34 +08:00
|
|
|
)";
|
|
|
|
|
2019-01-30 09:35:17 +08:00
|
|
|
const char* CC3D_particleColor_frag = R"(
|
2015-02-11 18:14:22 +08:00
|
|
|
|
2016-10-26 16:03:08 +08:00
|
|
|
#ifdef GL_ES
|
2015-02-11 18:14:22 +08:00
|
|
|
varying mediump vec4 ColorOut;
|
2016-10-26 16:03:08 +08:00
|
|
|
#else
|
2015-02-11 18:14:22 +08:00
|
|
|
varying vec4 ColorOut;
|
2016-10-26 16:03:08 +08:00
|
|
|
#endif
|
2015-02-11 18:14:22 +08:00
|
|
|
uniform vec4 u_color;
|
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
gl_FragColor = ColorOut * u_color;
|
|
|
|
}
|
2016-11-02 14:13:34 +08:00
|
|
|
)";
|