private void DrawColorGradingInput() { GUILayout.Label("Input Lookup Texture", EditorStyles.boldLabel); Texture2D newInput = EditorGUILayout.ObjectField(inputLUT, typeof(Texture2D), false) as Texture2D; if (newInput != inputLUT) { inputLUT = newInput; if (newInput != null) { inputPath = AssetDatabase.GetAssetPath(inputLUT); inputPath = inputPath.Substring(0, inputPath.LastIndexOf(".")); //Remove file extension } else { inputPath = ""; } ResetHelpBox(); } GUILayout.Label("Compatibility", EditorStyles.boldLabel); compatibilityMode = (ColorGradingCompatibility)EditorGUILayout.EnumPopup(compatibilityMode); }
public static Texture2D Convert(Texture2D lut2D, ColorGradingCompatibility compatibilityMode, bool linearInput) { FilterMode prevFilterMode = lut2D.filterMode; Texture2D convertedTexture = null; TextureImporterFormat prevFormat = SetCompressionMode(lut2D); TextureWrapMode prevWrapMode = SetWrapMode(lut2D); if (linearInput == true) ColorGradingMat.SetInt("_LinearInput", 1); else ColorGradingMat.SetInt("_LinearInput", 0); switch (compatibilityMode) { case (ColorGradingCompatibility.Amplify): convertedTexture = ConvertAmplify(lut2D); break; case (ColorGradingCompatibility.Chromatica): convertedTexture = ConvertChromatica(lut2D); break; case (ColorGradingCompatibility.Unity): convertedTexture = ConvertUnity(lut2D); break; } ApplyCompressionMode(lut2D, prevFormat); ApplyWrapMode(lut2D, prevWrapMode); lut2D.filterMode = prevFilterMode; return convertedTexture; }
public static Texture2D Convert(Texture2D lut2D, ColorGradingCompatibility compatibilityMode, bool linearInput) { FilterMode prevFilterMode = lut2D.filterMode; Texture2D convertedTexture = null; TextureImporterFormat prevFormat = SetCompressionMode(lut2D); TextureWrapMode prevWrapMode = SetWrapMode(lut2D); if (linearInput == true) { ColorGradingMat.SetInt("_LinearInput", 1); } else { ColorGradingMat.SetInt("_LinearInput", 0); } switch (compatibilityMode) { case (ColorGradingCompatibility.Amplify): convertedTexture = ConvertAmplify(lut2D); break; case (ColorGradingCompatibility.Chromatica): convertedTexture = ConvertChromatica(lut2D); break; case (ColorGradingCompatibility.Unity): convertedTexture = ConvertUnity(lut2D); break; } ApplyCompressionMode(lut2D, prevFormat); ApplyWrapMode(lut2D, prevWrapMode); lut2D.filterMode = prevFilterMode; return(convertedTexture); }
public static Texture2D Convert(Texture2D lut2D, ColorGradingCompatibility compatibilityMode) { FilterMode prevFilterMode = lut2D.filterMode; Texture2D convertedTexture = null; switch (compatibilityMode) { case (ColorGradingCompatibility.Amplify): convertedTexture = ConvertAmplify(lut2D); break; case (ColorGradingCompatibility.Chromatica): convertedTexture = ConvertChromatica(lut2D); break; case (ColorGradingCompatibility.Unity): convertedTexture = ConvertUnity(lut2D); break; } lut2D.filterMode = prevFilterMode; return(convertedTexture); }
private void DrawColorGradingInput() { GUILayout.Label("Input Lookup Texture", EditorStyles.boldLabel); Texture2D newInput = EditorGUILayout.ObjectField(inputLUT, typeof(Texture2D), false) as Texture2D; if (newInput != inputLUT) { inputLUT = newInput; if (newInput != null) inputPath = AssetDatabase.GetAssetPath(inputLUT); else inputPath = ""; ResetHelpBox(); } GUILayout.Label("Compatibility", EditorStyles.boldLabel); compatibilityMode = (ColorGradingCompatibility)EditorGUILayout.EnumPopup(compatibilityMode); }
public Texture2D Convert(Texture2D lut2D, ColorGradingCompatibility compatibilityMode) { return(null); }
public Texture2D Convert(Texture2D lut2D, ColorGradingCompatibility compatibilityMode) { return null; }