GlslOptimizerV2 is an optimizer for the glsl language with support of last opengl api and Stages Vertex \ Tesselation Control \ Tesselation Evaluation \ Geometry \ Fragment
Based on Mesa3D and glsl-optimizer
Pay Attention, for the moment this app is full of bugs and can crash in any reason.
Some time ago i found the original glsl-optimizer, but this project is stopped since a while and without support of Tesselation and Geometry shader stage nor last Opengl Api.
After analysed it a bit, i discovered than most of the Optimization code is coming from Mesa3D Implementation. So after a bit of search, i decided to create an updated version of Gsl-Optimizer who can support last stages and last Opengl api too.
All this work is mostly based on Mesa3D and original Glsl-Optimizer, but all not work porperly for the moment. I not guaranty than generated optimized shader can compile
I have exposed the most of params i have found in Mesa3D for better optimization possibilities, and proposed a GlslOptimizer module and an standalone App for optimize in an easy way your shaders.
I am very interested in graphic programming but as a self-learning guy, im in no way an expert.
So if you feel like it, help me improve this Software that I make available in open source for that.
- Open the App :)
- Open a shader file( you have many samples in dir shader_samples) or create new (in the main menu bar)
- Set the type of shader, The version of glsl you want, and Tune the parameters.
- Optimize
All the settings are saved in a conf file in the same directory of your shader file the conf file name the name and ext of your shader file with an extention conf : If you have a shader like : shader.frag => the conf file will be shader_frag.conf
So for the next time, you just need to open your sahder file again, (dont opn conf file) and your settings will comming back :)
The module GlslOptimizerV2 is inside the directory GlslOptimizerV2
There is a CMakeLists.txt file for link into your porject easily
Some screenshots of the current app :
Write/open your code and optimzie it : (see in the pane, all the params i exepose)
Customize the style ( the default theme is light but you can also customize app theme and editor palette)
- Glfw - ZLIB
- Dear ImGui - Docking/tables branch - MIT
- Glad - MIT
- tinyxml2 - ZLIB
- ImGuiColorTextEdit - MIT
- dirent - MIT
- cTools - MIT
- ImGuiFileDialog - MIT
- Mesa3D - MIT (all the optimisation code come form it, but just the compilation code is extracted)
- glsl-optimizer - MIT (glsl generation is based on it)
As said im not an expert, so if you want help me, your are welcome.
Contributiond : you can send a pull request or speak about in issue tab
Issues : use issue tab
Feature request : use issue tab