Player HUD should now be ok, color of health still shit tho

This commit is contained in:
Tleety
2016-03-12 14:37:26 +01:00
parent 060585a388
commit 8e266984f4
7 changed files with 1448 additions and 923 deletions
+2 -2
View File
@@ -29,9 +29,9 @@ void main()
vec4 color_result = Color * diffuseTexel;
float pos = ((P * vec4(Input.Position, 1)).y + 1.0)/2.0;
float fillResult = floor(pos*FillPercentage);
float fillResult = clamp(floor(pos/FillPercentage), 0, 1);
color_result = FillColor*diffuseTexel.a*fillResult + color_result*(1-fillResult);
color_result = FillColor*diffuseTexel.a*(1 - fillResult) + color_result*fillResult;
sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1));