Skip to content
Permalink
Browse files

Using blend functionality rather than multiplying myself

  • Loading branch information...
jappeace committed May 20, 2018
1 parent dbe4c30 commit bc9f5d3eecbdc47c0ef0685a005c2af03e1ccd5c
Showing with 4 additions and 5 deletions.
  1. +4 −5 port.elm
@@ -234,12 +234,11 @@ fragmentShader =
void main() {
vec4 texColor = texture2D(texture, v_texture_coord.xy * vec2(1,-1));
float alpha = texColor.a * v_color.a;
vec4 finalColor;
finalColor.r = texColor.r * v_color.r * alpha;
finalColor.g = texColor.g * v_color.g * alpha;
finalColor.b = texColor.b * v_color.b * alpha;
finalColor.a = alpha;
finalColor.r = texColor.r * v_color.r;
finalColor.g = texColor.g * v_color.g;
finalColor.b = texColor.b * v_color.b;
finalColor.a = texColor.a * v_color.a;
gl_FragColor = finalColor;
}

0 comments on commit bc9f5d3

Please sign in to comment.
You can’t perform that action at this time.