ShaderMan - Convert ShaderToy to Unity HLSL/CG

  •        45

It’s an amazing resource, not only for inspiration but for learning how to create shaders, since every example comes with full source code which you can edit and immediately test online in your browser, alter parameters, supply different inputs etc. The shaders exhibited on ShaderToy are exclusively written in GLSL, and run in your browser using WebGL.I write an automatic conversion tool to turn a GLSL shader into an HLSL shader that help you fast convert ShaderToy to ShaderLab unity.

https://github.com/smkplus/ShaderMan

Tags
Implementation
License
Platform

   




Related Projects

hlsl2glslfork - HLSL to GLSL language translator based on ATI's HLSL2GLSL. Used in Unity.

  •    C++

DX9 style HLSL in, GLSL / GLSL ES out. For an opposite tool (GLSL ES to HLSL translator), look at Google's ANGLE.

glsl-optimizer - GLSL optimizer based on Mesa's GLSL compiler

  •    C++

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.

glslCanvas - Simple tool to load GLSL shaders on HTML Canvas using WebGL

  •    Javascript

GlslCanvas is JavaScript Library that helps you easily load GLSL Fragment and Vertex Shaders into an HTML canvas. I have used this in my Book of Shaders and glslEditor. That's all! glslCanvas will automatically load a WebGL context in that <canvas> element, compile the shader and animate it for you.

glslViewer - Live GLSL coding render for MacOS and Linux

  •    C++

Live-coding console tool that renders GLSL Shaders. Every file you use (frag/vert shader, images and geometries) are watched for modification, so they can be updated on the fly. This was tested with Ubuntu 16.04.

OpenSceneGraph glsl samples

  •    

A series of applications that show how to implement glsl shaders in OpenSceneGraph. The shaders include: Bump Map, Parallax Map, Ambient Occlusion, HDR, Depth of Field, etc.


gamma - glsl shaders made simple

  •    Clojure

Gamma is a substrate for graphics software, such as games and data visualization tools. It presents a simple, composable language for representing GLSL shaders. Technically, Gamma is an EDSL that hosts GLSL within Clojurescript. It is inspired by Carlos Scheidegger's Lux and Conal Elliot's Vertigo and Pan. Gamma targets the WebGL subset of the OpenGL ES 1.0 Shading Language. Gamma can be used a la carte to compile shader source, without adopting Clojure/Clojurescript for your runtime application.

ShaderGraph - Unity ShaderGraph project

  •    CSharp

A Shader Graph enables you to build shaders visually. Instead of hand writing code you create and connect nodes in a graph network. The graph framework gives instant feedback on the changes, and it’s simple enough that new users can become involved in shader creation. This repository is under active development. Everything is subject to change. The master branch is our current development branch and may not work on the latest publicly available version of Unity. Unless you intend to modify Shader Graph or want to try out the very latest and unsupported features, we recommend that you acquire Shader Graph through the Unity Package Manager.

common-shaders - Collection of commonly used Cg shaders

  •    C

Collection of commonly used Cg shaders. These shaders are usable by either HLSL and/or Cg runtime compilers. The cg2glsl script will translate most of these into GLSL shaders.

glslEditor - Simple WebGL Fragment Shader Editor

  •    Javascript

Friendly GLSL Shader editor based on Codemirror compatible with glslViewer (C++/OpenGL ES) and glslCanvas (JS/WebGL). Was originaly develop to work as a embebed editor for The Book of Shaders. But now have grown as a stand alone Web app. Thanks to their compatibility with other apps of this ecosystems like glslViewer that runs in the RaspberryPi directly from console, GlslEditor interact with other projects like OpenFrame.io allowing the user to export the shaders to frames with only one button.

ofxFX - Unlocking the GPU Power on openFrameworks with this add-on for that make easy to use GLSL Shaders

  •    C++

I start this addon while I was working on Efecto Mariposa. Is the result of adapting different well know algorithms to GLSL Shaders for openFrameworks. An important feature of ofxFX is it ability for fast-prototyping mixing different classes using the << operator.

shadergraph - Functional GLSL Linker

  •    Javascript

ShaderGraph is a library for linking together GLSL snippets into stand-alone shaders. It is mainly meant to build complicated shaders 100% programmatically. But it can also act as the back-end to a live graph-based shader editor, as its graph model is persistent. Snippets can be simple one-liners, or multi-function source files. Snippets can also declare callbacks, as functions without bodies, linked in from elsewhere. This allows complicated execution flows to be built very easily.

tinyrenderers

  •    C++

[2017/11/12] - Added simple tessellation shader sample. Fixed misc issues with pipeline setup for tessellation. [2017/11/10] - Added ChessSet demo. Added geometry shader sample. Fixes to depth stencil handling. [2017/11/10] - Added TexturedCube sample. Updated depth attachment handling on swapchain render pass. Switched out lc_image for stb_image. Added DXC shader build script. [2017/05/27] - Fixed some annoying buffer state transitions. Added build script for shaders. Updated shader naming convention to be more exact. Added OpaqueArgs and PassingArrays for investigation. [2017/05/20] - Updated Append/Consume sample for Vulkan. Requires latest glslang. ConstantBuffer also works for both platforms. [2017/05/13] - Added Linux support. Moved to project files to cmake. Moved glsl shaders to glsl sub directory - forcing HLSL for now. [2017/04/30] - Clarified shader usage in some sample programs to point out which source they're coming from. [2017/04/27] - Added ConstantBuffer sample (D3D12 only for now). Updated Vulkan samples to use negative viewport height. [2017/04/25] - Updated SimpleCompute and StructuredBuffer to work on Vulkan. [2017/04/24] - Added compute samples (D3D12 only for now). One for simple compute and another for structured buffers.

shader-school - :mortar_board: A workshopper for GLSL shaders and graphics programming

  •    Javascript

An introduction to GLSL shaders and graphics programming that runs in your web browser. The script will ask you if you want to create an answer directory, press y to accept. This will populate your current directory with shader files for you to edit for each lesson – hopefully, it should also automatically open your web browser but if it doesn't you can find the workshop menu on http://localhost:12492/.

ShaderGraph_ExampleLibrary - A library of Shaders created using Unity 2018.1's Shader Graph.

  •    ShaderLab

This project is a library of different custom shaders created using Unity 2018.1's Shader Graph feature. All of the shaders are compatible for the Lightweight Scriptable Render Pipeline. These Shader Graphs are provided as-is; so your mileage may vary! You are more than welcome to modify/change/extract/use any of the examples.

ExoPlayerFilter - This library uses OpenGL Shaders to apply effects on ExoPlayer video at Runtime

  •    Java

This library uses OpenGL Shaders to apply effects on ExoPlayer video at Runtime and depends EXOPlayer core 2.7.0. Create SimpleExoPlayer instance. In this case, play MP4 file. Read this if you want to play other video formats.

glslify - :sparkles: A node.js-style module system for GLSL!

  •    Javascript

It forms one of the core components of the stack.gl ecosystem, allowing you to install GLSL modules from npm and use them in your shaders. This makes it trivial to piece together different effects and techniques from the community, including but certainly not limited to fog, noise, film grain, raymarching helpers, easing functions and lighting models. A full list can be found on the stack.gl packages list under the "Shader Components" category.

glsl-sandbox - Online live editor for fragment shaders.

  •    Javascript

Online live editor for fragment shaders.

Crystal Space 3D SDK

  •    Java

Crystal Space is an Open Source 3D SDK for Unix, Windows, and MacOS/X. It renders with OpenGL and features GLSL shaders, CG shaders, deferred rendering, dynamic shadows, bullet based physics library, terrain engine, skeleton based animation meshes, exporter for Blender, portals, etc...

thebookofshaders - Step-by-step guide through the abstract and complex universe of Fragment Shaders.

  •    GLSL

This is a gentle step-by-step guide through the abstract and complex universe of Fragment Shaders.