Languages Features Creators CSV Resources Challenges Add Language
GitHub icon

ShaderLab

ShaderLab - Programming language

< >

ShaderLab is a programming language created in 2000.

#702on PLDB 23Years Old 200Users
0Books 0Papers 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 Token Example
Comments
// A comment
Line Comments //
// A comment
Semantic Indentation X
vyper.html · shaderlab.html · treenotation.html

View source

- Build the next great programming language · Search · Day 213 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub · feedback@pldb.com