{ "scopeName": "source.shader.unity", "name": "UnityShader", "patterns": [ { "match": "\\b([0-9]+\\.?[0-9]*)\\b", "name": "constant.numeric.unity" }, { "match": "\\b(VSTUMARKER|LOD|Shader|Properties|SubShader|Pass|UsePass|Texture|Fog|Tags|BindChannels|GrabPass|Category|Color|Range|Float|Vector|2D|Rect|Cube|Constant|Previous|TexGen|LightmapMode|SetTexture|Lighting|Material|Cull|ZTest|ZWrite|Fog|AlphaTest|Blend|ColorMask|Offset|SeparateSpecular|ColorMaterial|Diffuse|Ambient|Specular|Shininess|Emission|Combine|ConstantColor|Matrix|Lerp|Mode|Density|LightMode|RequireOptions|LightTexCount|Name|Bind|UsePass|TextureScale|TextureSize|BorderScale|Fall[Bb]ack)\\b", "name": "support.class.unity" }, { "match": "\\b(On|Off|ObjectLinear|EyeLinear|SphereMap|CubeReflect|CubeNormal|A|RGB|Less|Greater|LEqual|GEqual|NotEqual|Always|AmbientAndDiffuse|Emission|Back|Front|Linear|Exp|Exp2|One|Zero|SrcColor|SrcAlpha|DstColor|DstAlpha|OneMinusSrcColor|OneMinusSrcAlpha|OneMinusDstColor|OneMinusDstAlpha|AppSrcAdd|AppDstAdd|Vertex|VertexOrNone|VertexOnly|Pixel|PixelOnly|VertexOrPixel|VertexAndPixel|PixelOrNone|None|Always|SoftVegetation|Normal|Tangent|Mesh|Normals|Tangents|World|Texcoord|Texcoord0|Texcoord1)\\b", "name": "support.class.unity" }, { "match": "\\b(CGPROGRAM|GLSLPROGRAM|ENDCG|ENDGLSL|C\\+\\+RAW|BEGIN DOC|END DOC|BEGIN EX|END EX|CSRAW|CSNONE|CLASS|CUSTOM|CUSTOM_PROP|THREAD_SAFE|BEGIN|END|TYPEMAP|ENUM|DOCUMENT|AUTO|AUTO_PROP|AUTO_PTR_PROP|OBSOLETE|THREAD_UNSAFE|CONVERTEXAMPLE|NONSEALED_CLASS|CONDITIONAL|STRUCT)\\b", "name": "support.class.unity" }, { "match": "\\b(Dependency|Fallback)\\b", "name": "support.variable.unity" }, { "match": "^\\s*\\[(HideInInspector)\\]", "name": "keyword.unity" }, { "match": "\\b(_\\w+)\\b", "name": "support.variable.input.unity" }, { "match": "\\b(uv(2)*_\\w+|viewDir|COLOR|screenPos|worldPos|worldRefl|worldNormal|worldRefl|worldNormal)\\b", "name": "support.variable.input.unity" }, { "match": "\\b(Albedo|Normal|Emission|Specular|Gloss|Alpha)\\b", "name": "support.variable.output.unity" }, { "match": "\\b(appdata_(base|tan|full|img)|SurfaceOutput)\\b", "name": "support.variable.structure.unity" }, { "match": "\\b(UNITY_MATRIX_(MVP|MV|V|P|VP|T_MV|IT_MV|TEXTURE0|TEXTURE1|TEXTURE2|TEXTURE3)|_Object2World|_World2Object|_WorldSpaceCameraPos|unity_Scale)\\b", "name": "support.variable.transformation.unity" }, { "match": "\\b(_ModelLightColor[0-9]|_SpecularLightColor[0-9]|_ObjectSpaceLightPos|_Light2World|_World2Light|_Object2Light)\\b", "name": "support.variable.lighting.unity" }, { "match": "\\b(_Time|_SinTime|_CosTime|unity_DeltaTime|_ProjectionParams|_ScreenParams)\\b", "name": "support.variable.other.unity" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#functions" }, { "include": "#cg" } ], "repository": { "comments": { "patterns": [ { "begin": "//", "end": "$", "name": "comment.line.double-slash.unity" }, { "begin": "/\\*", "end": "\\*/", "name": "comment.line.block.unity" } ] }, "strings": { "patterns": [ { "begin": "\"", "end": "\"", "name": "string.quoted.double.unity" } ] }, "functions": { "patterns": [ { "match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?