GLSL optimizer based on Mesa's GLSL compiler. Used to be used in Unity for mobile shader optimization.

GLSL optimizer

⚠️ As of mid-2016, the project is unlikely to have any significant developments. At Unity we are moving to a different shader compilation pipeline, with glsl-optimizer is not used. So from my side there won't be significant work done on it. ⚠️

A C++ library that takes GLSL shaders, does some GPU-independent optimizations on them and outputs GLSL or Metal source back. Optimizations are function inlining, dead code removal, copy propagation, constant folding, constant propagation, arithmetic optimizations and so on.

Apparently quite a few mobile platforms are pretty bad at optimizing shaders; and unfortunately they also lack offline shader compilers. So using a GLSL optimizer offline before can make the shader run much faster on a platform like that. See performance numbers in this blog post.

Even for drivers that have decent shader optimization, GLSL optimizer could be useful to just strip away dead code, make shaders smaller and do uniform/input reflection offline.

Almost all actual code is Mesa 3D's GLSL compiler; all this library does is spits out optimized GLSL or Metal back, and adds GLES type precision handling to the optimizer.

This GLSL optimizer is made for Unity's purposes and is built-in starting with Unity 3.0.

GLSL Optimizer is licensed according to the terms of the MIT license.

See change log here.

Usage

Visual Studio 2010 (Windows, x86/x64) and Xcode 5+ (Mac, i386) project files for a static library are provided in projects/vs2010/glsl_optimizer.sln and projects/xcode5/glsl_optimizer_lib respectively.

Note: only the VS and Xcode project files are maintained and should work at any time. There's also a cmake and gyp build system for Linux et al., and some stuff in contrib folder - all that may or might not work.

For Linux you can use cmake. Just type "cmake . && make" in the root directory. This will build the optimizer library and some executable binaries.

Interface for the library is src/glsl/glsl_optimizer.h. General usage is:

ctx = glslopt_initialize(targetVersion);
for (lots of shaders) {
	shader = glslopt_optimize (ctx, shaderType, shaderSource, options);
	if (glslopt_get_status (shader)) {
		newSource = glslopt_get_output (shader);
	} else {
		errorLog = glslopt_get_log (shader);
	}
	glslopt_shader_delete (shader);
}
glslopt_cleanup (ctx);

Tests

There's a testing suite for catching regressions, see tests folder. In VS, build and run glsl_optimizer_tests project; in Xcode use projects/xcode5/glsl_optimizer_tests project. The test executable requires path to the tests folder as an argument.

Each test comes as three text files; input, expected IR dump and expected optimized GLSL dump. GLES3 tests are also converted into Metal.

If you're making changes to the project and want pull requests accepted easier, I'd appreciate if there would be no test suite regressions. If you are implementing a feature, it would be cool to add tests to cover it as well!

Notes

  • GLSL versions 1.10 and 1.20 are supported. 1.10 is the default, use #version 120 to specify 1.20. Higher GLSL versions might work, but aren't tested now.
  • GLSL ES versions 1.00 and 3.00 are supported.

Dev Notes

Pulling Mesa upstream:

git fetch upstream
git merge upstream/master
sh removeDeletedByUs.sh
# inspect files, git rm unneeded ones, fix conflicts etc.
# git commit

Rebuilding flex/bison parsers:

  • When .y/.l files are changed, the parsers are not rebuilt automatically,
  • Run ./generateParsers.sh to do that. You'll need bison & flex (on Mac, do "Install Command Line Tools" from Xcode)
  • I use bison 2.3 and flex 2.5.35 (in OS X 10.8/10.9)
Owner
Aras Pranckevičius
Code plumber at Unity
Aras Pranckevičius
Comments
  • ir_set_program_inouts.cpp failing to compile

    ir_set_program_inouts.cpp failing to compile

    I'm getting this compiler error:

    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp: In function ‘void mark(gl_program*, ir_variable*, int, int, bool)’:
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:87:7: error: ‘GLbitfield64’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:87:20: error: expected ‘;’ before ‘bitfield’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:89:9: error: ‘struct gl_program’ has no member named ‘InputsRead’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:89:23: error: ‘bitfield’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:91:13: error: ‘gl_fragment_program’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:91:34: error: ‘fprog’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:91:64: error: expected primary-expression before ‘)’ token
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:91:66: error: expected ‘;’ before ‘prog’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:98:16: error: ‘struct gl_program’ has no member named ‘SystemValuesRead’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:98:36: error: ‘bitfield’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:100:9: error: ‘struct gl_program’ has no member named ‘OutputsWritten’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:100:27: error: ‘bitfield’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp: In member function ‘virtual ir_visitor_status ir_set_program_inouts_visitor::visit_enter(ir_expression*)’:
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:178:7: error: ‘gl_fragment_program’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:178:28: error: ‘fprog’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:178:58: error: expected primary-expression before ‘)’ token
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:178:60: error: expected ‘;’ before ‘prog’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp: In member function ‘virtual ir_visitor_status ir_set_program_inouts_visitor::visit_enter(ir_discard*)’:
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:190:4: error: ‘gl_fragment_program’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:190:25: error: ‘fprog’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:190:55: error: expected primary-expression before ‘)’ token
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:190:57: error: expected ‘;’ before ‘prog’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp: In function ‘void do_set_program_inouts(exec_list*, gl_program*, bool)’:
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:202:10: error: ‘struct gl_program’ has no member named ‘InputsRead’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:203:10: error: ‘struct gl_program’ has no member named ‘OutputsWritten’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:204:10: error: ‘struct gl_program’ has no member named ‘SystemValuesRead’
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:206:7: error: ‘gl_fragment_program’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:206:28: error: ‘fprog’ was not declared in this scope
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:206:58: error: expected primary-expression before ‘)’ token
    /home/glsl-optimizer/src/glsl/ir_set_program_inouts.cpp:206:60: error: expected ‘;’ before ‘prog’
    make[2]: *** [CMakeFiles/glsl_optimizer.dir/src/glsl/ir_set_program_inouts.cpp.o] Error 1
    make[1]: *** [CMakeFiles/glsl_optimizer.dir/all] Error 2
    make: *** [all] Error 2
    

    I'm running on Ubuntu 12.04 LTS, 64-bit.

  • Various fixes

    Various fixes

    Hi,

    Here are some fixes for the glsl code generator bug I encountered while optimizing our engine glsl code (translated from hlsl with hlsl2glslfork :) ), I did not run the test suite as the test app is not Linux compatible yet, but the results should be changed mainly due to more paranoid parenthesis.

    Cheers,

    Maxime Coste.

    P.S. there looks to be a bug in copy_propagation elements code, I saw a.xy = a.yx; a.x = -a.x; becoming a.xy = a.yx; a.x = -a.y; I'm investigating

  • required preprocessor conditionals are optimized out.

    required preprocessor conditionals are optimized out.

    I have the following at the top of my GLSL ES shader for GLES 2.0 platform:

        #if defined(GL_OES_standard_derivatives)
            #extension GL_OES_standard_derivatives : enable
        #endif
        precision highp float;
        ...
    

    And uses this extension as such:

    ...
    float calculateSmoothing(in float distance)
    {
    #if defined(GL_OES_standard_derivatives)
        return (0.707106781 * length(vec2(dFdx(distance), dFdy(distance))));
    #else
        return u_smoothing / gl_FragCoord.w;
    #endif
    }
    ...
    

    And after it was optimised, it turned to this:

    #extension GL_OES_standard_derivatives : enable
    precision highp float;
    

    while calculateSmoothing turned into the following in my main (got inlined, which is awesome):

    ...
    lowp float tmpvar_4;
    lowp vec2 tmpvar_5;
    tmpvar_5.x = dFdx(tmpvar_3);
    tmpvar_5.y = dFdy(tmpvar_3);
    tmpvar_4 = (0.7071068 * sqrt(dot (tmpvar_5, tmpvar_5)));
    ...
    

    and the u_smoothing was optimised out.

    The GLSL optimizer works great. My mind is blown away. However, there's one major problem: my shader doesn't work anymore on hardware that doesn't support the GL_OES_standard_derivatives extension (e.g. RaspberryPi, Amazon FireTV Stick gen 1, etc)

    Is there a way to keep the preprocessor conditionals as-is? or perhaps there's a way to generate 2 optimised versions of my shader (one version with the extension, the other without the extension)?

    Any help would be greatly appreciated! Thanks!

  • Support for high precision Metal texture samplers.

    Support for high precision Metal texture samplers.

    The ES/Metal/MesaGL ecosystem is new to me right now so please correct any errors I've made.

    Texture samplers are defined by default to have low precision. In Mesa's GLSL compiler, this is specified in the class ir_texture which initialises its ir_rvalue member with glsl_precision_low. The type is defined in ir.h. This decision is also reinforced in apply_precision_to_variable where it says: samplers default to low precision (outside of function arguments).

    For comparison, in glslang texture samplers are similarly set to EpqLow but only if the ES profile is active. Otherwise they're set to EpqHigh. This can be found in TParseContext::setPrecisionDefaults in ParseHelper.cpp.

    So it appears that an ES-only requirement is that texture samplers default to low-precision, which is typically enough to sample 8-bit textures. For cases where higher precision is required, samplers can be annotated to provide mediump or highp precision on ES. Implied in the behaviour specified above, Mesa's GLSL compiler only cares about ES.

    For what it's worth, I've checked the OpenGL Core and ES specifications and can't find mention of this behaviour anywhere so a pointer to some legalese would be great.

    For Metal this can break down when required to sample high-precision textures as precision qualifiers are not a valid part of the language. All you get are low-precision values from high-precision textures that can propagate up through assignment and destroy the precision of your calculations.

    This fix follows a different path for texture precision management when the Metal profile is active.

  • Fix texelFetch & sampler2DMS support

    Fix texelFetch & sampler2DMS support

    This requires bumping the GLSLVersion constant up but AFAICS it's not used for the output - #version directive is preserved, and it's just used to populate the available definitions/features. Let me know if you want me to fix this by making another kGlslTarget enum value.

    More importantly, texelFetch was converted to textureProj during ir->glsl pass :) so this fixes that.

    I'm not sure how to run tests so I haven't ran tests :(

  • Fixes for project generation via GYP (and for GYP).

    Fixes for project generation via GYP (and for GYP).

    Hi Aras,

    I hope this meets with your approval. I tested it on Visual Studio 2008, 2010, 2012 and Xcode 5. I will do a follow-up commit with the new projects in a few minutes.

    Fixed up lots of Windows-specific issues in the GYP files. This required a modification to GYP: gyp-patches/0001-Add-config_conditions-as-PHASE_..patch which adds 'config_conditions' to allow modification of build settings in configuration blocks so that debugging flags and the target platform are set there (so Debug32 is a debuggable 32bit configuration).

    Added generateMyProjects.sh script which creates project files for vs2008, vs2010, vs2012 and xcode; again, this required a modification to GYP: gyp-patches/0002-Add-generator-output-flat-option.patch which adds an option (--generator-output-flat) that forces all project and solution files to be made in the directory specified by --generator-output=

    Renamed binding.gyp to glsl_optimizer.gyp as rewrote it to add building the test program and removed empty file tests/tests.gyp

    These GYP patches have been submitted upstream:

    [0001] https://codereview.chromium.org/94853002 [0002] https://codereview.chromium.org/94883002

  • For-loop counter not being assigned initial value correctly.

    For-loop counter not being assigned initial value correctly.

    Noticing something odd with for-loops when passing through output from hlsl2glsl. The optimised output doesn't seem to be assigning the initial value of the index at all. Noticed this as I was having glDrawArrays lock up on shaders using for loops.

    For state in question (in source HLSL):

        for ( int index = 0 ; index < sampleNum ; index += 4 ) 
    

    In GLSL after running through HLSL2GLSL

        int index = 0;
        for ( ; (index < sampleNum); index += 4) {
        ...
        }
    

    Raw glsloptimiser output:

      tmpvar_254 = 0;
      index_230 = tmpvar_254;
      while (true) {
        ...
        if (!((index_230 < sampleNum_226))) {
          break;
        };
       ...
        int tmpvar_322;
        tmpvar_322 = (index_230 + 4);
        index_230 = tmpvar_322;
        }
    

    Optimised glsloptimiser output:

      for (int index_5; index_5 < sampleNum_2; index_5 += 4) {
      ...
      }
    

    The initial value is completely lost. Changing this to a non-zero value yields the same results, initially I thought it may just be an assumption on the optimisers part, but it seems to be more than that.

  • OpenGL ES 3.0 not support

    OpenGL ES 3.0 not support

    i take version from master: https://github.com/aras-p/glsl-optimizer

    set version300 es he show message - not support 3.0, support only 1.0 bun on master page - GLSL ES versions 1.00 and 3.00 are supported.

    need make brach with this ? https://github.com/aras-p/glsl-optimizer/tree/bbatkin

    Or ?

  • Crash in ``void ir_print_glsl_visitor::visit(ir_texture *ir)``

    Crash in ``void ir_print_glsl_visitor::visit(ir_texture *ir)``

    glsloptimizercrash

    ir->coordinate is 0.

    Target: kGlslTargetOpenGLES30 Shader code:

    #version 300 es
    precision highp float;
    #define USE_OPENGL_ES_2
    #define USE_OPENGL_ES_3
    #define SUPPORTED_VERTEX_TEXTURE_FETCH
    #line 2
    
    #line 1
    
    uniform mat4 in_ProjectionMatrix;
    uniform mat4 in_ViewMatrix;
    uniform mat4 in_ViewMatrixInverse;
    uniform mat4 in_ModelMatrix;
    uniform mat4 in_ModelMatrixInverse;
    uniform mat4 in_ModelViewMatrix;
    uniform mat4 in_ModelViewMatrixInverse;
    uniform mat4 in_ModelViewProjectionMatrix;   
    uniform mat4 in_NormalMatrix; // mat4 is used due to std140 padding
    #line 4
    
    in vec4 in_Vertex;
    in vec4 in_TexCoord;
    in vec3 in_Normal;
    in vec2 in_Bones;
    
    out vec3 v_WorldPosition;
    
    uniform sampler2D Texture0; // packed skeleton
    uniform vec4 u_KeyFrame;    // Frame1, Frame2, Lerp, Skinned
    
    #line 1
    
    vec4 QuatMul( in vec4 q1, in vec4 q2 )
    {
    vec3  im = q1.w * q2.xyz + q1.xyz * q2.w + cross ( q1.xyz, q2.xyz );
    vec4  dt = q1 * q2;
    float re = dot ( dt, vec4 ( -1.0, -1.0, -1.0, 1.0 ) );
    
    return vec4( im, re );
    }
    
    vec3 RotateVector( in vec3 p, in vec4 q )
    {
    return p + 2.0 * cross( q.xyz, cross( q.xyz, p ) + q.w * p );
    }
    
    vec4 Slerp( vec4 Q1, vec4 Q2, float Coef )
    {
    float cosHalfTheta = dot( Q1.xyz, Q2.xyz ) + Q1.w * Q2.w;
    
    if ( abs(cosHalfTheta) >= 1.0 ) return Q1;
    
    if ( cosHalfTheta < 0.0 )
    {
    Q2 = -Q2;
    cosHalfTheta = -cosHalfTheta; 
    }
    
    float halfTheta = acos(cosHalfTheta);
    float sinHalfTheta = sqrt(1.0 - cosHalfTheta*cosHalfTheta);
    
    if ( abs(sinHalfTheta) < 0.001) return 0.5 * ( Q1+Q2 );
    
    float ratioA = sin((1.0 - Coef) * halfTheta) / sinHalfTheta;
    float ratioB = sin(Coef * halfTheta) / sinHalfTheta; 
    
    return ratioA * Q1 + ratioB * Q2;
    }
    #line 16
    #line 1
    
    vec4 GetPoint( int X, int Y )
    {
    ivec2 Size = textureSize( Texture0, 0 );
    
    return textureLod( Texture0, vec2( ( float(X) + 0.5 ) / float(Size.x), ( float(Y) + 0.5 ) / float(Size.y) ), 0.0 );
    }
    
    vec4 SkinVertex()
    {
    vec3 Pos = vec3( 0.0, 0.0, 0.0 );
    
    int WeightIndex = int(in_Bones.x);
    int WeightCount = int(in_Bones.y);
    
    int VStart1 = int(u_KeyFrame.x) * 4;
    int VStart2 = int(u_KeyFrame.y) * 4;
    
    float LerpCoef = u_KeyFrame.z;
    
    for ( int k = 0; k < WeightCount; k++ )
    {
    vec4  PosWeight  =     GetPoint( WeightIndex + k, VStart1 + 0 );
    int   JointIndex = int(GetPoint( WeightIndex + k, VStart1 + 1 ).x);
    
    vec4 J1Orientation = GetPoint( JointIndex, VStart1 + 2 );
    vec3 J1Position    = GetPoint( JointIndex, VStart1 + 3 ).xyz;
    
    vec4 J2Orientation = GetPoint( JointIndex, VStart2 + 2 );
    vec3 J2Position    = GetPoint( JointIndex, VStart2 + 3 ).xyz;
    
    vec4 JOrientation = Slerp( J1Orientation, J2Orientation, LerpCoef );
    vec3 JPosition    = mix(   J1Position,    J2Position,    LerpCoef );
    
    Pos += ( RotateVector( PosWeight.xyz, JOrientation ) + JPosition ) * PosWeight.w;
    }
    
    return vec4( Pos, 1.0 );
    }
    #line 17
    
    void main()
    {
    vec4 Position = ( u_KeyFrame.w == 1.0 ) ? SkinVertex() : in_Vertex;
    
    gl_Position = in_ModelViewProjectionMatrix * Position;
    
    v_WorldPosition = ( in_ModelMatrix * Position ).xyz;
    }
    
  • Build on Linux+CMake is broken

    Build on Linux+CMake is broken

    Hi,

    Here is the error I receive at the very beginning:

    In file included from src/glsl/glcpp/glcpp-parse.y:31:0:
    /home/noob/CoolCode/glsl-optimizer/src/glsl/glcpp/glcpp.h:32:25: fatal error: util/ralloc.h: No such file or directory
     #include "util/ralloc.h"
                             ^
    compilation terminated.
    CMakeFiles/glcpp-library.dir/build.make:54: recipe for target 'CMakeFiles/glcpp-library.dir/src/glsl/glcpp/glcpp-parse.c.o' failed
    make[2]: *** [CMakeFiles/glcpp-library.dir/src/glsl/glcpp/glcpp-parse.c.o] Error 1
    CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/glcpp-library.dir/all' failed
    make[1]: *** [CMakeFiles/glcpp-library.dir/all] Error 2
    Makefile:76: recipe for target 'all' failed
    make: *** [all] Error 2
    

    Tried with CMake in both a separate build directory, and an in-source build; neither worked. Running Gentoo.

  • Multiple expressions in for loop, GL ES

    Multiple expressions in for loop, GL ES

    After optimizing, sometimes multiple expressions are placed into a for loop. This causes the shader to crash on WebGL.

    for (int i=0; i<10; i++, otherVar++) { .. }

    Tested on Chrome and FireFox, OSX 10.8.5. See here:

    http://glsl.heroku.com/e#17544.1

  • Broken version check for support of sampler arrays in GLSL ES leads to incorrect error

    Broken version check for support of sampler arrays in GLSL ES leads to incorrect error

    bug.glsl

    #version 100
    #define SAMPLER_COUNT 2
    uniform sampler2D samplers[SAMPLER_COUNT];
    void main() {
      vec4 sum = vec4(0.0);
      for(int i = 0; i < SAMPLER_COUNT; i++) {
        sum += samplers[i];
      }
      gl_FragColor = sum;
    }
    

    $ glslopt -2 -f bug.glsl
    Failed to compile bug.glsl:
    
    (7,9): error: sampler arrays indexed with non-constant expressions is forbidden in GLSL 1.30 and later
    (7,2): error: operands to arithmetic operators must be numeric
    

    However, according to the GLSL ES 2.0 spec Page 109 (115 in PDF): https://www.khronos.org/registry/OpenGL/specs/es/2.0/GLSL_ES_Specification_1.00.pdf:

    5 Indexing of Arrays, Vectors and Matrices

    [...] The following are constant-index-expressions:

    • Constant expressions
    • Loop indices as defined in section 4
    • [...]

    Samplers

    GLSL ES 1.00 supports both arrays of samplers and arrays of structures which contain samplers. In both these cases, for ES 2.0, support for indexing with a constant-index-expression is mandated but support for indexing with other values is not mandated.

    So this is a bug, because I'm using a constant-index-expressions, for which support is mandated by the GLSL spec.

    I did look into it, and the broken check is here:

    https://github.com/aras-p/glsl-optimizer/blob/d78c3d2f249aa870368ad320905bc954c47704f6/src/glsl/ast_array_index.cpp#L230-L250

    This bug does not exist in a rebased fork with a more recent mesa: https://github.com/jamienicol/glsl-optimizer/ The fixed check is here.

  • Crash on const variable initialization.

    Crash on const variable initialization.

    If const variable initialized with builtin function such as bellowing present in the shader, program will crash: const vec3 var_test = log(vec3(0.0,0.0,0.0));

    Crash stack:

    image

  • Support for storage buffers

    Support for storage buffers

    We are exploring the use of storage buffers in WebRender, and glsl optimizing stage unfortunately doesn't recognize them. Example syntax we use:

    layout(std140, binding = 0) buffer bInstances {
        ivec4 bInstanceData[];
    };
    

    This is code in GLES 3.1, and under "GL_ARB_shader_storage_buffer_object" extension in GL.

  • [Android] artifacts with large shaders

    [Android] artifacts with large shaders

    I was working with a (too) large fragment shader, and due to method inlining this resulted in a very long main() function. On multiple (older, Andoid 5/6, gles2) android devices, this resulted in strange artifacts such as incorrect colors. Extracting part of the instructions to a separate function resolved the issue.

    no problems on iOS or desktop.

Shader cross compiler to translate HLSL (Shader Model 4 and 5) to GLSL
Shader cross compiler to translate HLSL (Shader Model 4 and 5) to GLSL

XShaderCompiler ("Cross Shader Compiler") Features Cross compiles HLSL shader code (Shader Model 4 and 5) into GLSL Simple to integrate into other pro

Nov 23, 2022
glslcc: Cross-compiler for GLSL shader language (GLSL->HLSL,METAL,GLES,GLSLv3)

glslcc: Cross-compiler for GLSL shader language (GLSL->HLSL,METAL,GLES,GLSLv3) @septag glslcc is a command line tool that converts GLSL code to HLSL,

Nov 24, 2022
HLSL to GLSL language translator based on ATI's HLSL2GLSL. Used in Unity.

HLSL to GLSL shader language translator ⚠️ As of mid-2016, the project is unlikely to have any significant developments. At Unity we are moving to a d

Nov 24, 2022
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.

A cross compiler for shader languages. Convert between SPIR-V, GLSL / GLSL ES, HLSL, Metal Shader Language, or older versions of a given language. Cross Shader wraps glslang and SPIRV-Cross, exposing a simpler interface to transpile shaders.

Nov 18, 2022
Source code for the data dependency part of Jan Kossmann's PhD thesis "Unsupervised Database Optimization: Efficient Index Selection & Data Dependency-driven Query Optimization"

Unsupervised Database Optimization: Data Dependency-Driven Query Optimization Source code for the experiments presented in Chapter 8 of Jan Kossmann's

Apr 24, 2022
Linux System Optimizer and Monitoring - https://oguzhaninan.github.io/Stacer-Web
Linux System Optimizer and Monitoring - https://oguzhaninan.github.io/Stacer-Web

Linux System Optimizer and Monitoring Reviews Required Packages curl, systemd PPA Repository (for ubuntu) sudo add-apt-repository ppa:oguzhaninan/stac

Nov 30, 2022
Shader Playground is a website for exploring shader compilers.
Shader Playground is a website for exploring shader compilers.

Shader Playground is a website for exploring shader compilers. Visit website Supported backends Compilers ANGLE Clspv DXC FXC Glslan

Dec 2, 2022
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Nov 16, 2022
Useful cmake macros that help with: compiler/linker flags, collecting sources, PCHs, Unity builds and other stuff.
Useful cmake macros that help with: compiler/linker flags, collecting sources, PCHs, Unity builds and other stuff.

ucm - useful cmake macros ucm is a collection of cmake macros that help with: managing compiler/linker flags collecting source files with grouping in

Nov 10, 2022
Skyline's fork of yuzu's shader compiler

Skyline Shader Compiler (SSC) A fork of yuzu's shader compiler modified for Skyline's needs with all other changes being upstreamed and changes from y

Nov 3, 2022
A small DLL that fixes tool's usage of the Halo 3 shader compiler.

h3-shader-compiler-fix A small DLL that fixes tool's usage of the Halo 3 shader compiler. Tool forgot to initialise the compiler before using it, so t

Jun 20, 2022
Optimization-Based GNSS/INS Integrated Navigation System
Optimization-Based GNSS/INS Integrated Navigation System

OB_GINS Optimization-Based GNSS/INS Integrated Navigation System We open-source OB_GINS, an optimization-based GNSS/INS integrated navigation system.

Nov 24, 2022
Simple WPA-PSK default password candidates generator for mobile broadband WIFI routers, based on IMEI

IMEIgen Simple WPA-PSK default password candidates generator for mobile broadband WIFI routers, based on IMEI. Background In their conquest for more u

Nov 29, 2022
Powerful automated tool for reverse engineering Unity IL2CPP binaries
Powerful automated tool for reverse engineering Unity IL2CPP binaries

Powerful automated tool for reverse engineering Unity IL2CPP binaries

Nov 26, 2022
A universal way to create a noclip mod in Unity games (Mono/IIL2CPP)

Universal-Unity-NoClip This projects aim to show how a noclip mod can be created in any unity game, regardless if its using an il2cpp or mono backend.

Nov 23, 2022
Adds proper Apple Pencil support to Unity's InputSystem.

This project aims to create an Apple Pencil device for Unity's InputSystem package. The problem: Unity does not fully integrate with Apple Pencil. App

Nov 19, 2022
A native plugin for Unity that provides simple packet division and restoration.

uPacketDivision This is a native plug-in that divides a given data (System.IntPtr or array) into specified sizes and restores them regardless of the i

Feb 20, 2022
Unity Scripting in C++

Unity Native Scripting A library to allow writing Unity scripts in native code: C, C++, assembly. Purpose This project aims to give you a viable alter

Dec 2, 2022