CS:GO model with $phong illuminate in blue - why?

I have a 3 light entities at map: 1 white, 1 red and 1 blue

“VertexLitGeneric”

{

“$model” “1”

“$basetexture” “myproject/sciana”
“$bumpmap” “myproject/sciana_n”

“$phong” “1”
“$phongexponent” “150”
“$phongboost” “20”
“$phongfresnelranges” “[0.03 0.03 0.03]”

“$halflambert” “1”

“$phongtint” “[0 0 0]”

Line by line, your phong settings are fundamentally wrong. Let’s go through them.

First, whatever shader problems you have aren’t phong related at all as you have completely disabled phong by tinting it to pure black, [ 0 0 0 ]. Delete that line completely. Make the frenselangle numbers a ramp, something like [0.2 1.5 7] should produce some decent results. Phong exponent is too high, 1 would be a rough, diffuse surface; 60 would be a polished metal, 100 would be a perfectly smooth object. 150 is out of bounds. Your phong boost is insane, 20 times normal… Set it to 1 to start and work up/down from there.

Assuming you were this wrong with the vmt settings, I’m guessing your normalmap might not have an alpha that masks the intensity of the phong, make sure that you have an alpha.

I would recommend doing a little research on the valve developer community article about phong, you need to understand the fundamental principles of the shader before you can hope to implement it in a meaningful way.

Ok, now I have an alpha channel with black-white mask for phong and that’s results of this:


"VertexLitGeneric"

{
	
"$model" "1"

"$basetexture" "myproject/sciana"
"$bumpmap" "myproject/sciana_n"
	
"$phong" "1"
"$phongexponent" "50"
"$phongboost" "1"
"$phongfresnelranges" "[0.2 1.5 7]"

"$halflambert" "1"

}