3layout(location = 0) in vec2 fragOffset;
4layout(location = 0) out vec4 outColor;
7 vec4 position; // ignore w
8 vec4 color; // w is intensity
12layout(set = 0, binding = 0) uniform GlobalUbo {
16 vec4 ambientLightColor; // w is intensity
17 PointLight pointLights[10];
21layout(push_constant) uniform Push {
27const float M_PI = 3.1415926538;
30 float dis = length(fragOffset);
35 float cosDis = 0.5 * (cos(dis * M_PI) + 1.0);
36 outColor = vec4(push.color.rgb + 0.5 * cosDis, cosDis);