Commit 49585945 authored by Anakin's avatar Anakin

fixed too high specular,

updated preview.jpg
parent 67657061
......@@ -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 KB | W: | H:

preview.jpg

45.9 KB | W: | H:

preview.jpg
preview.jpg
preview.jpg
preview.jpg
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment