fixed too high specular,

updated preview.jpg
This commit is contained in:
Anakin 2017-02-06 16:53:27 +01:00
parent 67657061b6
commit 49585945c3
2 changed files with 3 additions and 3 deletions

View File

@ -70,8 +70,8 @@ void main()
mat3 tbn = transpose(mat3(surfaceTangent, surfaceBitangent, surfaceNormal));
normal = texture2D(tx1, v_surfaceUV).rgb;
normal = normalize(normal * 2.0 -1.0);
surfaceToLight = tbn * surfaceToLight;
surfaceToCamera = tbn * surfaceToCamera;
surfaceToLight = normalize(tbn * surfaceToLight);
surfaceToCamera = normalize(tbn * surfaceToCamera);
}
@ -98,7 +98,7 @@ void main()
float specularWeight = 1;
if(material.hasSpecularmap)
specularWeight = surfaceColor.a;
vec3 specColor = specularWeight * material.specularColor;
vec3 specColor = specularWeight * 1/255 * material.specularColor;
vec3 specular = specularCoefficient * specColor * light.intensities;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 46 KiB