You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Requires the [ASP.NET runtime](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-aspnetcore-6.0.0-windows-hosting-bundle-installer), if not already installed.
6
6
7
7
## What Is It For?
8
-
GLSL Shader Shrinker is a Windows GUI tool that attempts to reduce the size of GLSL fragment shader code, whilst keeping it _readable_ and understandable.
8
+
GLSL Shader Shrinker is a cross-platform GUI tool that attempts to reduce the size of GLSL fragment shader code, whilst keeping it _readable_ and understandable.
9
9
10
-
It is written in C# using WPF and Visual Studio 2019, and has several hundred NUnit-powered unit tests.
10
+
It is written in C# using [Avalonia](https://avaloniaui.net/) and [JetBrains Rider](https://www.jetbrains.com/rider/), and has several hundred NUnit-powered unit tests.
11
11
12
12

13
13
14
-
It is designed to work primarily with code from [Shadertoy](https://www.shadertoy.com/), but has limited support for other styles of GLSL too (E.g. [Bonzomatic](https://github.com/Gargaj/Bonzomatic))
14
+
It is designed to work primarily with code from [Shadertoy](https://www.shadertoy.com/), but has limited support for other styles of GLSL too (E.g. [Bonzomatic](https://github.com/Gargaj/Bonzomatic), [Posh Brolly](https://www.poshbrolly.net/))
15
15
16
-
After writing a Shadertoy shader, usually from my boilerplate starting code, there is a sequence of operations I perform:
16
+
After writing a shader, usually from my boilerplate starting code, there is a sequence of operations I perform:
First, download and run the Windows installer from the 'Releases' section.
68
+
First, download and run the installer from the 'Releases' section.
69
69
70
-
**Note:** The application requires the Microsoft .NET 5 runtimes to be installed. If they are not found the application will automatically prompt for them to be downloaded.
70
+
**Note:** The application requires the Microsoft .NET 7 runtimes to be installed. If they are not found the application will automatically prompt for them to be downloaded.
* Remove Dead Code - Remove unreferences functions and unreachable code.
92
+
* Custom - Toggle exactly which processing features you require (Including GOLFing options)
92
93
93
94
### Step 3 - Exporting GLSL Code
94
-
Export the 'shrunk' GLSL.
95
+
Export the 'processed' GLSL.
95
96
96
97

97
98
98
99
This can be achieved using:
99
100
* Copy'n'paste from the clipboard. (CTRL-C)
100
-
* Export from a text file.
101
+
* Export to a text file.
101
102
102
103
...and then use with Shadertoy, Bonzomatic, etc.
103
104
104
105
---
105
106
## Hints
106
-
After shrinking your GLSL code, you might find some 'hints' are available.
107
+
After processing your GLSL code, you might find some 'hints' are available.
107
108
These range from 'this function isn't used' or 'this function is only used once, so you might like to inline it', all the way to some GOLFing hints.
108
109
109
110

110
111
111
112
---
112
113
## Limitations
113
-
Despite a lot of effort spent trying to ensure the tool produces great output every time, there are always going to be edge cases caused by different coding styles and patterns of content.
114
+
Despite a lot of effort spent trying to ensure the tool produces valid output every time, there are always going to be edge cases caused by different coding styles and patterns of content.
114
115
115
116
Heavy use of ```#define``` macros and ```#if...#else...#endif``` blocks can cause confusion when trying to parse the code. Compilers have the luxury of seeing which specific code path is enabled, but a tool like this needs to understand **all** possible code paths at the same time - Not always easy!
116
117
117
-
I apologize in advance if you find any issues - If I have the time I'll try my best to resolve them!
118
-
119
-
In most cases they can be worked-around using a set of 'custom' settings which disable the problematic feature.
118
+
In most cases issues can be worked-around using a set of 'custom' settings which disable the problematic feature.
0 commit comments