Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

ShaderLab

< >

ShaderLab is a programming language created in 2000.

#1114on PLDB 24Years Old 59kRepos


Example 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 }

Language features

Feature Supported Example Token
Comments ✓ // A comment
Line Comments ✓ // A comment //
Semantic Indentation X

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v154.2.0