Commit 77d96023 authored by Christopher Lees's avatar Christopher Lees

Fix: Alpha incorrect in Wavefront parser

https://github.com/leezer3/OpenBVE/pull/297
parent eeba3a16
......@@ -425,8 +425,7 @@ namespace OpenBve
{
Interface.AddMessage(MessageType.Warning, false, "Invalid Alpha in Material Definition for " + mm.Key);
}
a *= 255;
mm.Color.A = (byte)a;
mm.Color.A = (byte)((1 - a) * 255);
break;
case "map_kd":
case "map_ka":
......
......@@ -425,8 +425,7 @@ namespace OpenBve
{
Interface.AddMessage(MessageType.Warning, false, "Invalid Alpha in Material Definition for " + mm.Key);
}
a *= 255;
mm.Color.A = (byte)a;
mm.Color.A = (byte)((1 - a) * 255);
break;
case "map_kd":
case "map_ka":
......
......@@ -425,8 +425,7 @@ namespace OpenBve
{
Interface.AddMessage(MessageType.Warning, false, "Invalid Alpha in Material Definition for " + mm.Key);
}
a *= 255;
mm.Color.A = (byte)a;
mm.Color.A = (byte)((1 - a) * 255);
break;
case "map_kd":
case "map_ka":
......
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