ShaderLab is an actively used programming language created in 2000.

19Years Old 0Users 0Jobs
  • ShaderLab does not currently rank in our top 50% of languages
  • ShaderLab first appeared in 2000
  • file extensions for ShaderLab include shader
  • I have 26 facts about ShaderLab. what would you like to know? email me and let me know how I can help.

Example code from Linguist:

// From https://github.com/Unity-Technologies/PostProcessing,
// licensed under MIT licence.

Shader "Hidden/Post FX/Depth Of Field"
{
    Properties
    {
        _MainTex ("", 2D) = "black"
    }

    CGINCLUDE
        #pragma exclude_renderers d3d11_9x
        #pragma target 3.0
    ENDCG

    SubShader
    {
        Cull Off ZWrite Off ZTest Always

        // (0) Downsampling, prefiltering & CoC
        Pass
        {
            CGPROGRAM
                #pragma multi_compile __ UNITY_COLORSPACE_GAMMA
                #pragma vertex VertDOF
                #pragma fragment FragPrefilter
                #include "DepthOfField.cginc"
            ENDCG
        }

        // (1) Pass 0 + temporal antialiasing
        Pass
        {
            CGPROGRAM
                #pragma vertex VertDOF
                #pragma fragment FragPrefilter
                #define PREFILTER_TAA
                #include "DepthOfField.cginc"
            ENDCG
        }

        // (2-5) Bokeh filter with disk-shaped kernels
        Pass
        {
            CGPROGRAM
                #pragma vertex VertDOF
                #pragma fragment FragBlur
                #define KERNEL_SMALL
                #include "DepthOfField.cginc"
            ENDCG
        }

        Pass
        {
            CGPROGRAM
                #pragma vertex VertDOF
                #pragma fragment FragBlur
                #define KERNEL_MEDIUM
                #include "DepthOfField.cginc"
            ENDCG
        }

        Pass
        {
            CGPROGRAM
                #pragma vertex VertDOF
                #pragma fragment FragBlur
                #define KERNEL_LARGE
                #include "DepthOfField.cginc"
            ENDCG
        }

        Pass
        {
            CGPROGRAM
                #pragma vertex VertDOF
                #pragma fragment FragBlur
                #define KERNEL_VERYLARGE
                #include "DepthOfField.cginc"
            ENDCG
        }

        // (6) Postfilter blur
        Pass
        {
            CGPROGRAM
                #pragma vertex VertDOF
                #pragma fragment FragPostBlur
                #include "DepthOfField.cginc"
            ENDCG
        }
    }

    FallBack Off
}

Trending Repos

repo stars description
UnityChanToonShaderVer2_Project 561 UnityChanToonShaderVer2 Project / v.2.0.7 Release
Unity_Shaders_Book 1835 📖 书籍《Unity Shader入门精要》源代码

Last updated October 14th, 2019