Files

9 lines
341 B
C#
Raw Permalink Normal View History

2025-05-13 03:08:33 +03:00
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;
}
}