├── ActivateGPUS1UI
├── App.config
├── ByteArrayRocks.cs
├── ConsoleOutput.cs
├── Properties
│ └── AssemblyInfo.cs
├── Program.cs
└── ActivateGPUS1UI.csproj
├── README.md
└── ActivateGPUS1UI.sln
/ActivateGPUS1UI/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ActivateGPUS1UI/ByteArrayRocks.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | static class ByteArrayRocks
5 | {
6 | public static byte[] StringToByteArray(this string hex)
7 | {
8 | return Enumerable.Range(0, hex.Length)
9 | .Where(x => x % 2 == 0)
10 | .Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
11 | .ToArray();
12 | }
13 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # S1UI_GPU
2 |
3 | Force GPU use for Tera UI instead of CPU only.
4 |
5 | Sometimes can increase the average FPS by around ~10 (for potatoes pc)
6 |
7 | DOWNLOAD LINK: https://github.com/neowutran/S1UI_GPU/releases/tag/1.0.0.0
8 |
9 | ## Usage:
10 |
11 | Way 1:
12 | 1. Unzip ALL files
13 | 2. Copy all your gpk files into /GpkFiles dir
14 | 3. Run ActivateGPUS1UI.exe
15 | 4. Wait till "Done!" message
16 | 5. Copy your gpk files back
17 |
18 | Way 2:
19 | 1. Unzip ALL files
20 | 2. Open cmd in your unzipped folder
21 | 3. Use your current folder with gpk files as source
22 |
23 | ``` > ActivateGPUS1UI.exe ""```
24 |
25 | Example:
26 | ```D:\!Git\S1UI_GPU\ActivateGPUS1UI\bin\Release>ActivateGPUS1UI.exe "Z:\Tera\Client\S1Game\CookedPC\Art_Data\Packages\S1UI"```
27 |
28 | 4. Wait till "Done!" message
29 |
30 | Way 3:
31 | 1. Unzip ALL files
32 | 2. Drag and drop your gpk folder to ActivateGPUS1UI.exe
33 | 3. Wait till "Done!" message
34 |
--------------------------------------------------------------------------------
/ActivateGPUS1UI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.13
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ActivateGPUS1UI", "ActivateGPUS1UI\ActivateGPUS1UI.csproj", "{850EDB30-AEF2-4D8E-8CEF-78AD57655D61}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {850EDB30-AEF2-4D8E-8CEF-78AD57655D61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {850EDB30-AEF2-4D8E-8CEF-78AD57655D61}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {850EDB30-AEF2-4D8E-8CEF-78AD57655D61}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {850EDB30-AEF2-4D8E-8CEF-78AD57655D61}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/ActivateGPUS1UI/ConsoleOutput.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace ActivateGPUS1UI
8 | {
9 | internal static class ConsoleOutput
10 | {
11 | public static void ErrorMessage(string message)
12 | {
13 | Console.ForegroundColor = ConsoleColor.Red;
14 | JustMessage(message);
15 | Console.ForegroundColor = ConsoleColor.White;
16 | }
17 | public static void InformationMessage(string message)
18 | {
19 | Console.ForegroundColor = ConsoleColor.Green;
20 | JustMessage(message);
21 | Console.ForegroundColor = ConsoleColor.White;
22 | }
23 | public static void StandartMessage(string message)
24 | {
25 | Console.WriteLine(message);
26 | }
27 |
28 | private static void JustMessage(string message)
29 | {
30 | Console.WriteLine(String.Format("[{0}]:{1}", DateTime.Now, message));
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ActivateGPUS1UI/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Les informations générales relatives à un assembly dépendent de
6 | // l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
7 | // associées à un assembly.
8 | [assembly: AssemblyTitle("ActivateGPUS1UI")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ActivateGPUS1UI")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
18 | // aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
19 | // COM, affectez la valeur true à l'attribut ComVisible sur ce type.
20 | [assembly: ComVisible(false)]
21 |
22 | // Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
23 | [assembly: Guid("850edb30-aef2-4d8e-8cef-78ad57655d61")]
24 |
25 | // Les informations de version pour un assembly se composent des quatre valeurs suivantes :
26 | //
27 | // Version principale
28 | // Version secondaire
29 | // Numéro de build
30 | // Révision
31 | //
32 | // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
33 | // en utilisant '*', comme indiqué ci-dessous :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ActivateGPUS1UI/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Text.RegularExpressions;
4 |
5 | namespace ActivateGPUS1UI
6 | {
7 | class Program
8 | {
9 | private static readonly byte FLAG_GPU = 2;
10 | private static readonly byte FLAG_DIRECT_BLIT = 4;
11 |
12 | private static string inputPath;
13 |
14 | static void Main(string[] args)
15 | {
16 | inputPath= Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\GpkFiles\";
17 | if (args.Length == 1)
18 | {
19 | if (Directory.Exists(args[0].ToString()))
20 | {
21 | inputPath = args[0].ToString();
22 | }
23 | }
24 | //Check/Create default folders
25 | Directory.CreateDirectory(inputPath);
26 | ConsoleOutput.InformationMessage(String.Format("Path for GPK files: {0}", inputPath));
27 | //Main loop
28 | try
29 | {
30 | var files = Directory.GetFiles(inputPath, "*.gpk", SearchOption.AllDirectories);
31 | ConsoleOutput.InformationMessage(String.Format("Found {0} gpk files", files.Length));
32 | ConsoleOutput.InformationMessage("Converting...");
33 | foreach (var file in files)
34 | {
35 | var data = BitConverter.ToString(File.ReadAllBytes(file)).Replace("-", "");
36 | foreach (Match match in Regex.Matches(data, "474658.{30,400}4411(?.).{7}"))
37 | {
38 | var gpuParameters = Convert.ToByte(match.Groups[1].Value);
39 | gpuParameters |= FLAG_DIRECT_BLIT;
40 | gpuParameters |= FLAG_GPU;
41 | data = data.Remove(match.Groups[1].Index, 1).Insert(match.Groups[1].Index, gpuParameters.ToString("X1"));
42 | }
43 | File.WriteAllBytes(file, data.StringToByteArray());
44 | }
45 | ConsoleOutput.InformationMessage("Done!");
46 | }
47 | catch (Exception ex)
48 | {
49 | ConsoleOutput.ErrorMessage(ex.Message);
50 |
51 | }
52 | //Stop it! "Can't see console"
53 | Console.ReadLine();
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/ActivateGPUS1UI/ActivateGPUS1UI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {850EDB30-AEF2-4D8E-8CEF-78AD57655D61}
8 | Exe
9 | ActivateGPUS1UI
10 | ActivateGPUS1UI
11 | v4.7
12 | 512
13 | true
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------