Shader generation for C++

Shaderpp is a GLSL(shader) code generator library for C++.

It enables integrated development experiment for C++ and GLSL.

Table of Contents

  1. Requirements
  2. Example

Requirements

  • C++ 17 or newer

Coverage

GLSL Feature Progress
Preprocessor 50% (using preprocessor in C++)
Operator priority 100% (as same as C++)
Comments Unavailable
Tokens 15%
Keywords 10%
Types 3% (float, vec2, int)
Booleans 0% (Well I don't know how to control if statement)
Literals 0%
Structures 60%
Functions 50%
Arrays 0%
Implicit Conversions 0%
Storage Qualifiers 0%
Built-In functions 0%
Input/Output Variables 0%
Uniform Variables 0%
Buffer Variables 0%

Example

C++ Code:

std::function<Float(Float&, Float&)> func = [](Float& a0, Float& a1) {
    return a0 * a1;
}

auto func_parsed = Parse(func, "func");

Auto Generated GLSL Code:

func(float a0, float a1);

func(float a0, float a1) {
    return a0 * a1;
}
Similar Resources

A C header file & shader for simulating colourblindness and checking contrast.

A C header file & shader for simulating colourblindness and checking contrast.

Colourblind A C header file & shader for simulating colourblindness and checking contrast. Make sure that your graphic design is suitable for the ~8%

May 1, 2022

White paper describing the Autodesk Standard Surface shader.

White paper describing the Autodesk Standard Surface shader.

Autodesk Standard Surface A white paper specifying an uber surface shader that aims to provide a material representation capable of accurately modelin

Jun 4, 2022

SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.

SPIRV-Cross SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages. Features Convert SPIR-V to readable, usable an

Jun 22, 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,

Jun 8, 2022

GraphicsFuzz provides tools for automatically finding and simplifying bugs in graphics drivers, specifically graphics shader compilers.

GraphicsFuzz GraphicsFuzz is a set of tools for testing shader compilers GraphicsFuzz provides tools for automatically finding and simplifying bugs in

Jun 15, 2022

Cg shader version of the HQx pixel art upscaling filter

HQx-shader Cg shader version of the HQx pixel art upscaling filter. How to use Load the preset files for the desired upscale factor in an emulator tha

Jun 10, 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.

Jun 14, 2022

Pyramid is a free, open GUI tool for offline shader validation and analysis

Pyramid is a free, open GUI tool for offline shader validation and analysis

Pyramid is a free, open GUI tool for offline shader validation and analysis. The UI takes HLSL or GLSL as input, and runs them through various shader compilers and static analyzers.

Jun 17, 2022

Lightweight, cross-platform & full-featured shader IDE

Lightweight, cross-platform & full-featured shader IDE

SHADERed is a lightweight tool for writing and debugging shaders. It is easy to use, open source, cross-platform (runs on Windows, Linux & Web).

Jun 24, 2022
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

Jun 20, 2022
Shader generation for C++

Shaderpp is a GLSL(shader) code generator library for C++. It enables integrated development experiment for C++ and GLSL. Table of Contents Requiremen

Apr 8, 2022
GPU 3D signed distance field generator, written with DirectX 11 compute shader
GPU 3D signed distance field generator, written with DirectX 11 compute shader

GPU SDF Generator GPU 3D signed distance field generator, written with DirectX 11 compute shader Building git clone --recursive https://github.com/Air

May 20, 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

Jun 11, 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
The mainly point on this project is show how level of my comprehend for fragment SHADER.
The mainly point on this project is show how level of my comprehend for fragment SHADER.

PS The mainly point on this project is show how level of my comprehend for fragment SHADER. This project has some issue I can't solve else. cause I st

Nov 26, 2021
PlenOctree Volume Rendering (supports CUDA & fragment shader backends)
PlenOctree Volume Rendering (supports CUDA & fragment shader backends)

PlenOctree Volume Rendering This is a real-time PlenOctree volume renderer written in C++ using OpenGL, constituting part of the code release for: Ple

Jun 8, 2022
Shader languages support for VS Code
Shader languages support for VS Code

vscode-shader Description Shader languages support for VS Code HLSL - High-Level Shading Language GLSL - OpenGL Shading Language Cg - C for Graphics M

Jun 1, 2022
Command line tool for offline shader ISA inspection.

Intel Shader Analyzer Intel Shader Analyzer is a tool for offline static analysis of shaders for Intel GPU Architectures. It allows a user to compile

Apr 21, 2022
A collection of tools, libraries, and tests for Vulkan shader compilation.

Shaderc A collection of tools, libraries and tests for shader compilation. At the moment it includes: glslc, a command line compiler for GLSL/HLSL to

Jun 22, 2022