parent
67657061b6
commit
49585945c3
|
@ -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;
|
||||
|
||||
|
|
BIN
preview.jpg
BIN
preview.jpg
Binary file not shown.
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 46 KiB |
Loading…
Reference in New Issue