From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Math/ColorSpaceConversion.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Runtime/Math/ColorSpaceConversion.cpp (limited to 'Runtime/Math/ColorSpaceConversion.cpp') diff --git a/Runtime/Math/ColorSpaceConversion.cpp b/Runtime/Math/ColorSpaceConversion.cpp new file mode 100644 index 0000000..08d58f5 --- /dev/null +++ b/Runtime/Math/ColorSpaceConversion.cpp @@ -0,0 +1,17 @@ +#include "UnityPrefix.h" +#include "ColorSpaceConversion.h" +#include "Runtime/Misc/PlayerSettings.h" + + +ColorSpace GetActiveColorSpace () +{ + if (GetPlayerSettingsPtr()) + return GetPlayerSettings().GetValidatedColorSpace(); + else + return kUninitializedColorSpace; +} + +/* + TODO: + * Fog colors in fixed function pipeline are not adjusted. Ask aras how the fog color gets put into the shader. ApplyFog does something with builtin shader params but it's never passed to shaderstate??? WTF. +*/ \ No newline at end of file -- cgit v1.1-26-g67d0