Can someone please help me with light attenuation values?

This is a Christmas tree that I am trying to render. It is 4.9 units high it has 1008 Christmas lights and the star to illuminate it. I am just trying to use these lights to make the tree look like it is lit up by them and not anything else.

This is the fragment shader that i am using to render it.

#version 430 core

layout(std430, binding = 0) buffer Centers {
    vec3 centers[];
};

uniform vec3 viewPos;
uniform vec3 starCent;

flat in uint mNum;
in vec3 Pos;
in vec3 Norm;

out vec4 FragColor;

vec3 CalcPointLight(vec3 lightPos, vec3 normal, vec3 fragPos, vec3 viewDir)
{
    vec3 lightColor = vec3(1, 1, 1);

    float constant = .75;
    float linear = 5.2;
    float quadratic = 10.1;

    vec3 lightDir = normalize(lightPos - fragPos);

    // Diffuse
    float diff = max(dot(normal, lightDir), 0.0);

    // Specular
    vec3 halfwayDir = normalize(lightDir + viewDir);
    float spec = pow(max(dot(normal, halfwayDir), 0.0), 32.0);

    // Distance attenuation
    float distance = length(lightPos - fragPos);
    float attenuation = 1.0 / (
        constant +
        linear * distance +
        quadratic * distance * distance
    );

    vec3 ambient  = 0.05 * lightColor;
    vec3 diffuse  = diff * lightColor * 2;
    vec3 specular = spec * lightColor;

    return (ambient + diffuse) * attenuation * .4;
}

vec3 CalcPointLight1(vec3 lightPos, vec3 normal, vec3 fragPos, vec3 viewDir)
{
    vec3 lightColor = vec3(1, 1, 0);

    float constant = .75;
    float linear = 2;
    float quadratic = 2;

    vec3 lightDir = normalize(lightPos - fragPos);

    // Diffuse
    float diff = max(dot(normal, lightDir), 0.0);

    // Specular
    vec3 halfwayDir = normalize(lightDir + viewDir);
    float spec = pow(max(dot(normal, halfwayDir), 0.0), 32.0);

    // Distance attenuation
    float distance = length(lightPos - fragPos);
    float attenuation = 1.0 / (
        constant +
        linear * distance +
        quadratic * distance * distance
    );

    vec3 ambient  = 0.05 * lightColor;
    vec3 diffuse  = diff * lightColor;
    vec3 specular = spec * lightColor;

    return (ambient + diffuse) * attenuation * 6;
}

void main(){
	vec3 norm = normalize(Norm);
    vec3 viewDir = normalize(viewPos - Pos);
    vec3 result = vec3(0.0);

	for (int i=0;i<1008;i++){
		vec3 center = centers[i];    
        result += CalcPointLight(center, norm, Pos, viewDir);
    }

    result += CalcPointLight1(starCent, norm, Pos, viewDir);

    vec3 albedo; 
	if (mNum == 0){
		albedo = vec3(0.18039215686274509803921568627451, 0.11764705882352941176470588235294, 0.05882352941176470588235294117647);
	}else{
		albedo = vec3(0.09411764705882352941176470588235, 0.21960784313725490196078431372549, 0.12549019607843137254901960784314);
	}
    FragColor = vec4(result * albedo, 1.0);
}

I integrated ImGui into my project, so that I could easily adjust the values of light while I was doing my rendering.

This is my updated fragment shader:

#version 430 core

layout(std430, binding = 0) buffer Centers {
    vec3 centers[];
};

uniform vec3 viewPos;
uniform vec3 starCent;

flat in uint mNum;
in vec3 Pos;
in vec3 Norm;

out vec4 FragColor;

vec3 CalcPointLight(vec3 lightPos, vec3 normal, vec3 fragPos, vec3 viewDir)
{
    vec3 lightColor = vec3(1, 1, 1);

    float constant = 5;
    float linear = 887.853;
    float quadratic = 292;

    vec3 lightDir = normalize(lightPos - fragPos);

    // Diffuse
    float diff = max(dot(normal, lightDir), 0.0);

    // Specular
    vec3 halfwayDir = normalize(lightDir + viewDir);
    float spec = pow(max(dot(normal, halfwayDir), 0.0), 32.0);

    // Distance attenuation
    float distance = length(lightPos - fragPos);
    float attenuation = 1.0 / (
        constant +
        linear * distance +
        quadratic * distance * distance
    );

    vec3 ambient  = 0.05 * lightColor;
    vec3 diffuse  = diff * lightColor;
    vec3 specular = spec * lightColor;

    return (ambient * .482 + diffuse * .518) * attenuation * 20;
}

vec3 CalcPointLight1(vec3 lightPos, vec3 normal, vec3 fragPos, vec3 viewDir)
{
    vec3 lightColor = vec3(1, 1, 0);

    float constant = .389;
    float linear = 12.487;
    float quadratic = 27.303;

    vec3 lightDir = normalize(lightPos - fragPos);

    // Diffuse
    float diff = max(dot(normal, lightDir), 0.0);

    // Specular
    vec3 halfwayDir = normalize(lightDir + viewDir);
    float spec = pow(max(dot(normal, halfwayDir), 0.0), 32.0);

    // Distance attenuation
    float distance = length(lightPos - fragPos);
    float attenuation = 1.0 / (
        constant +
        linear * distance +
        quadratic * distance * distance
    );

    vec3 ambient  = 0.05 * lightColor;
    vec3 diffuse  = diff * lightColor;
    vec3 specular = spec * lightColor;

    return (ambient + diffuse) * attenuation * 17.334;
}

void main(){
	vec3 norm = normalize(Norm);
    vec3 viewDir = normalize(viewPos - Pos);
    vec3 result = vec3(0.0);

	for (int i=0;i<1008;i++){
		vec3 center = centers[i];    
        result += CalcPointLight(center, norm, Pos, viewDir);
    }

    result += CalcPointLight1(starCent, norm, Pos, viewDir);

    vec3 albedo; 
	if (mNum == 0){
		albedo = vec3(0.18039215686274509803921568627451, 0.11764705882352941176470588235294, 0.05882352941176470588235294117647);
	}else{
		albedo = vec3(0.09411764705882352941176470588235, 0.21960784313725490196078431372549, 0.12549019607843137254901960784314);
	}
    FragColor = vec4(result * albedo, 1.0);
}

Just a couple of thoughts here.

Why are you multiplying by these numbers? Obviously you put them there for a reason, but I would just like to know. Also, if you don’t want your specular component to affect the final result, why are you computing it in the first place?

Also, more than half of these digits will be discarded due to 32 bit precision, also, the difference the precision adds is negligible to the human eye.

Regarding attenuation, I would generally keep the constant term at 1. If you want sharp attenuation, make the linear and quadratic values larger. If you want soft attenuation, make them smaller. In your case, I would think you want large attenuation values for sharp attenuation.

By the way, the tree looks nice. Good work! I hope what I said helps.