All Projects → smkplus → Shaderman

smkplus / Shaderman

Licence: mit
Convert ShaderToy to Unity HLSL/CG

Projects that are alternatives of or similar to Shaderman

Polygon Wind
Wind shader for low poly assets in Unity.
Stars: ✭ 119 (-83.79%)
Mutual labels:  unity, glsl, shaders
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+1493.73%)
Mutual labels:  unity, glsl, shaders
Shader Doodle
A friendly web-component for writing and rendering shaders.
Stars: ✭ 356 (-51.5%)
Mutual labels:  shadertoy, glsl, shaders
30-days-of-shade
30 days of shaders in GLSL using GLSLCanvas
Stars: ✭ 134 (-81.74%)
Mutual labels:  shaders, glsl, shadertoy
Noodlesplate
Offline Shader Editor with many cool features
Stars: ✭ 79 (-89.24%)
Mutual labels:  shadertoy, glsl, shaders
Riftray
Step into the worlds of Shadertoy with an Oculus Rift.
Stars: ✭ 68 (-90.74%)
Mutual labels:  shadertoy, glsl, shaders
Holoshield
Highly customizable sci-fi shield / force field shader for Unity3D. Allows you to set edge power & color, inner texture scrolling, waviness, scale pulsation and procedural intensity noise. Implements tessellation for low-poly base meshes.
Stars: ✭ 401 (-45.37%)
Mutual labels:  unity, glsl, shaders
Shadertoy React
6kB "Shadertoy" like react component letting you easily render your fragment shaders in your React web projects, without having to worry about implementing the WebGL part.
Stars: ✭ 74 (-89.92%)
Mutual labels:  shadertoy, glsl, shaders
ofxShadertoy
Addon for openFrameworks that sets up and loads Shadertoy (http://www.shadertoy.com) shaders
Stars: ✭ 77 (-89.51%)
Mutual labels:  shaders, glsl, shadertoy
YALCT
Yet Another Live Coding Tool - Powered by Veldrid and elbow grease
Stars: ✭ 25 (-96.59%)
Mutual labels:  shaders, glsl, shadertoy
Veda
⚡VJ / Live Coding on Atom⚡
Stars: ✭ 373 (-49.18%)
Mutual labels:  glsl, shaders
Unity Shadersketches
Sketches made with ShaderLab in Unity.
Stars: ✭ 362 (-50.68%)
Mutual labels:  unity, shaders
Unity Wireframe
General purpose wireframe shaders for use in Unity.
Stars: ✭ 378 (-48.5%)
Mutual labels:  unity, shaders
Shadergen
Proof-of-concept library for generating HLSL, GLSL, and Metal shader code from C#,
Stars: ✭ 395 (-46.19%)
Mutual labels:  glsl, shaders
Thebookofshaders
Step-by-step guide through the abstract and complex universe of Fragment Shaders.
Stars: ✭ 4,070 (+454.5%)
Mutual labels:  glsl, shaders
Hlsl2glslfork
HLSL to GLSL language translator based on ATI's HLSL2GLSL. Used in Unity.
Stars: ✭ 488 (-33.51%)
Mutual labels:  glsl, shaders
Raymarching Workshop
An Introduction to Raymarching
Stars: ✭ 657 (-10.49%)
Mutual labels:  shadertoy, shaders
Shader Toy
Shadertoy-like live preview for GLSL shaders in Visual Studio Code
Stars: ✭ 349 (-52.45%)
Mutual labels:  shadertoy, shaders
Verticaldissolve
Procedural vertical dissolve shader. Highly customizable. Tweak edge color, noisiness & waviness, rim light, emission scrolling and more.
Stars: ✭ 434 (-40.87%)
Mutual labels:  unity, shaders
Unity Frosted Glass
❄️ Test of a frosted glass material in Unity.
Stars: ✭ 506 (-31.06%)
Mutual labels:  unity, shaders

ShaderMan

ShaderToy to ShaderLab Converter

If you’ve tried dabbling with shaders at all, you’ve probably come across ShaderToy – an online shader showcase with some pretty amazing examples of what’s possible in a few lines of shader code, inspired greatly by classic demoscene coding. Here’s just two examples: https://www.shadertoy.com/view/4dl3zn

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.

Microsoft have published a very useful reference guide here which details many of the general differences between GLSL and HLSL. Unity also have a useful page here.

    Replace iGlobalTime shader input (“shader playback time in seconds”) with _Time.y
    Replace iResolution.xy (“viewport resolution in pixels”) with _ScreenParams.xy
    Replace vec2 types with float2, mat2 with float2x2 etc.
    Replace vec3(1) shortcut constructors in which all elements have same value with explicit float3(1,1,1)
    Replace Texture2D with Tex2D
    Replace atan(x,y) with atan2(y,x) <- Note parameter ordering!
    Replace mix() with lerp()
    Replace *= with mul()
    Remove third (bias) parameter from Texture2D lookups
    mainImage(out vec4 fragColor, in vec2 fragCoord) is the fragment shader function, equivalent to float4 mainImage(float2 fragCoord : SV_POSITION) : SV_Target
    UV coordinates in GLSL have 0 at the top and increase downwards, in HLSL 0 is at the bottom and increases upwards, so you may need to use uv.y = 1 – uv.y at some point.

Note that ShaderToys don’t have a vertex shader function – they are effectively full-screen pixel shaders which calculate the value at each UV coordinate in screenspace. As such, they are most suitable for use in a full-screen image effect (or, you can just apply them to a plane/quad if you want) in which the UVs range from 0-1.

But calculating pixel shaders for each pixel in a 1024×768 resolution (or higher) is expensive. One solution if you want to achieve anything like a game-playable framerate is to render the effect to a fixed-size rendertexture, and then scale that up to fill the screen. Here’s a simple generic script to do that:

Demo

https://www.youtube.com/watch?v=ZncPTfT8wLg


How to use:

1.copy your lovely shader from www.shadertoy.com

ShaderToy

2.Open ShaderMan from Tools\ShaderMan

before opening shaderman be sure that there is codegenerator.cs in scene otherwise ShaderMan throws NullReferenceException.

3.Choose Name for you shader:

Step

4.Import your shader from shaderToy.com

Step

5.Click On Convert And Enjoy :D

Final Step


Video Tutorial is Available

capturedwadad

https://www.youtube.com/watch?v=MCER5P8Xz3w&lc=z22ysdkqln2texqj004t1aokgkzlpvkn3rdybfw1wtugrk0h00410


Musual

Music Visualization Shader

Musual

https://github.com/smkplus/Musual

https://youtu.be/ppSjyvxR8uI

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].