1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Shader improvements for bcres

This commit is contained in:
KillzXGaming 2019-05-11 16:23:29 -04:00
parent 59adf0f60e
commit 4e230a914e
2 changed files with 11 additions and 1 deletions

Binary file not shown.

View File

@ -33,7 +33,17 @@ void main()
return;
}
FragColor = vec4(1);
// Diffuse lighting.
float halfLambert = dot(difLightDirection, normal) * 0.5 + 0.5;
vec4 diffuseMapColor = vec4(0.6);
diffuseMapColor *= halfLambert;
FragColor = vec4(0);
FragColor.rgb += diffuseMapColor.rgb;
if (renderVertColor == 1)
FragColor *= min(color, vec4(1));
vec3 displayNormal = (normal.xyz * 0.5) + 0.5;
if (renderType == 1) // normals color