mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
20 lines
431 B
Text
20 lines
431 B
Text
|
|
#version 450
|
||
|
|
|
||
|
|
layout(push_constant) uniform Push {
|
||
|
|
float particleSize;
|
||
|
|
float pad0;
|
||
|
|
float pad1;
|
||
|
|
float pad2;
|
||
|
|
vec4 particleColor;
|
||
|
|
} push;
|
||
|
|
|
||
|
|
layout(location = 0) out vec4 outColor;
|
||
|
|
|
||
|
|
void main() {
|
||
|
|
vec2 p = gl_PointCoord - vec2(0.5);
|
||
|
|
float dist = length(p);
|
||
|
|
if (dist > 0.5) discard;
|
||
|
|
float alpha = push.particleColor.a * smoothstep(0.5, 0.2, dist);
|
||
|
|
outColor = vec4(push.particleColor.rgb, alpha);
|
||
|
|
}
|