mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix(render): premultiply glow sprite color by alpha
This commit is contained in:
parent
93cc092ee1
commit
0b1ea464bb
1 changed files with 5 additions and 2 deletions
|
|
@ -25,6 +25,9 @@ void main() {
|
||||||
if (lum < 0.05) discard;
|
if (lum < 0.05) discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
float edge = smoothstep(0.5, 0.4, length(p - 0.5));
|
// Soft circular falloff for point-sprite edges.
|
||||||
outColor = texColor * vColor * vec4(vec3(1.0), edge);
|
float edge = 1.0 - smoothstep(0.4, 0.5, length(p - 0.5));
|
||||||
|
float alpha = texColor.a * vColor.a * edge;
|
||||||
|
vec3 rgb = texColor.rgb * vColor.rgb * alpha;
|
||||||
|
outColor = vec4(rgb, alpha);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue