Skip to content

Instantly share code, notes, and snippets.

@IronWarrior
Created February 14, 2024 20:52
Show Gist options
  • Save IronWarrior/a2dfb9334b1df0f8ec76f31502d3db7c to your computer and use it in GitHub Desktop.
Save IronWarrior/a2dfb9334b1df0f8ec76f31502d3db7c to your computer and use it in GitHub Desktop.
Unity ShaderLab + Better Shaders Notepad++ UDL, styled like VS2022 dark theme
<!--
Dark theme Visual Studio 2022 style syntax highlighter for Unity Shaderlab + jbooth's Better Shaders.
Derived from ShaderLab highlighter by redcool007:
https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/UDLs/ShadeLab_by-redcool007.xml
This is my first time making a N++ UDL; feel free to make suggestions for improvements. Will add attributes
and other keywords as I go.
-->
<NotepadPlus>
<UserLang name="ShaderLab" ext="shader surfshader" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="yes" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03/* 03 04*/ 04 00// 00 01 02</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">! # % &amp; * , . / : ; ? ^ | ~ + &lt; = &gt; ( )</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open">{</Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close">}</Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">Shader Properties CGINCLUDE ENDCG CGPROGRAM SubShader Tags Pass UNITY_MATRIX_MVP Category Blend appdata_base appdata_full appdata_tan appdata_img WorldSpaceViewDir ObjSpaceViewDir ParallaxOffset Luminance DecodeLightmap EncodeFloatRGBA DecodeFloatRGBA EncodeFloatGG EncodeViewNormalStereo EncodeViewNormalStereo WorldSpaceLightDir ObjeSpaceLightDir Shade4PointLights ShadeVertexLights UsePass Fallback Lod ZWrite ON ColorMask GrabPass _GrabTexture Material Diffuse Ambient Lighting On Fog SetTexture Combine Primary previous constant texture double quad Color ztest Cull void SeparateSpecular Float 2D</Keywords>
<!--Primitive types-->
<Keywords name="Keywords2">bool bool2 bool3 bool4 int int2 int3 int4 long float float2 float3 float4 fixed fixed2 fixed3 fixed4 half half2 half3 half4 double float2x2 float3x3 float4x4 sampler sampler2D sampler3D samplerCube return in inout out </Keywords>
<Keywords name="Keywords3">surface alpha alphatest vertex finalcolor exclude_path:prepass exclude_path:forward addshadow dualforward fullforwardshadows decal:add decal:blend softvegetation noambient novertexlights nolightmap nodirlightmap noforwardadd approxview halfasview</Keywords>
<!--User-defined types-->
<Keywords name="Keywords4">struct appdata_base appdata_full appdata_tan appdata_img ShaderData Surface</Keywords>
<!--Functions and macros-->
<Keywords name="Keywords5">abs acos all any asin atan2 atan bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp clip cosh cos cross ddx ddy degrees determinant distance dot exp2 exp faceforward findLSB findMSB floatToIntBits floatToRawIntBits floor fmod frac frexp fwidth intBitsToFloat inverse isfinite isinf isnan ldexp length lerp lit log10 log2 log max min modf mul normalize pack pow radians reflect refract round rsqrt saturate sign sincos sinh sin smoothstep sqrt step tanh tan tex1DARRAYbias tex1DARRAYcmpbias tex1DARRAYcmplod tex1DARRAYfetch tex1DARRAYlod tex1DARRAY tex1DARRAYproj tex1DARRAYsize tex1Dbias tex1Dcmpbias tex1Dcmplod tex1Dfetch tex1Dlod tex1D tex1Dproj tex1Dsize tex2DARRAYbias tex2DARRAYfetch tex2DARRAYlod tex2DARRAY tex2DARRAYproj tex2DARRAYsize tex2Dbias tex2Dcmpbias tex2Dcmplod tex2Dfetch tex2Dlod tex2DMSARRAYfetch tex2DMSARRAYsize tex2DMSfetch tex2DMSsize tex2D tex2Dproj tex2Dsize tex3Dbias tex3Dfetch tex3Dlod tex3D tex3Dproj tex3Dsize texBUF texBUFsize texCUBEARRAYbias texCUBEARRAYlod texCUBEARRAY texCUBEARRAYsize texCUBEbias texCUBElod texCUBE texCUBEproj texCUBEsize texRBUF texRBUFsize texRECTbias texRECTfetch texRECTlod texRECT texRECTproj texRECTsize transpose trunc unpack TEXTURE2D SAMPLER SAMPLE_TEXTURE2D</Keywords>
<!--Attributes-->
<Keywords name="Keywords6">[NoScaleOffset]</Keywords>
<Keywords name="Keywords7"></Keywords>
<!--Better Shaders instructions-->
<Keywords name="Keywords8">BEGIN_OPTIONS END_OPTIONS BEGIN_PROPERTIES END_PROPERTIES BEGIN_CBUFFER END_CBUFFER BEGIN_CODE END_CODE</Keywords>
<Keywords name="Delimiters">00&quot; 01 02&quot; 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="57A64A" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="57A64A" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="569CD6" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="569CD6" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="569CD6" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="86c691" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="DCDCAA" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="4EC9B0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="9CDCFE" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="9B9B9B" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="D69D85" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="E4E2E0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment