Skip to content
Snippets Groups Projects
Commit 49585945 authored by Anakin's avatar Anakin
Browse files

fixed too high specular,

updated preview.jpg
parent 67657061
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
preview.jpg

49.6 KiB | W: | H:

preview.jpg

45.9 KiB | W: | H:

preview.jpg
preview.jpg
preview.jpg
preview.jpg
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment