#version 300 es precision highp float; uniform mediump sampler2D u_tex; in vec2 vTexCoord; in vec4 vColor; out vec4 fragColor; void main() { // textured additive: the sprite's RGB and coverage both scale the added light. // shared by billboard.vert (particles) and ribbon_trail.vert (trails) vec4 tex = texture(u_tex, vTexCoord); fragColor = vec4(tex.rgb * tex.a * vColor.rgb, vColor.a); }