added explosion fx (sound and particles)

This commit is contained in:
2017-07-22 09:44:36 -05:00
parent de3a64551d
commit a54a06c799
5 changed files with 71 additions and 6 deletions

View File

@@ -21,11 +21,11 @@ void main() {
sum += texture2D(u_texture, texcoord + vec2(j, i)*0.004) * 0.25;
}
}
if (texture2D(u_texture, texcoord).r < 0.3) {
if (texture2D(u_texture, texcoord).r * vColor.r < 0.3) {
gl_FragColor = vec4(sum * sum * 0.012 + texture2D(u_texture, texcoord))
* vColor;
} else {
if (texture2D(u_texture, texcoord).r < 0.5) {
if (texture2D(u_texture, texcoord).r * vColor.r < 0.5) {
gl_FragColor = vec4(
sum * sum * 0.009 + texture2D(u_texture, texcoord))
* vColor;