This commit is contained in:
2025-05-13 03:08:33 +03:00
parent f06ea6c9f0
commit 6e30658119
101 changed files with 12402 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
namespace SourceFormatParser.Common
{
public static class LightUtils
{
public static byte linearToTexLight(byte c, float exponent) => (byte)MathUtils.Clamp(c * exponent * 0.5f, 0, 255);
public static float linearToTexLightF(byte c, float exponent) => MathUtils.Clamp(c * exponent * 0.5f, 0, 255) / 255.0f;
}
}