mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Implement HLSL syntax highlighting
And use HLSL grammar to highlight CG blocks in ShaderLab shaders.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"contributes": {
|
||||
"languages": [{
|
||||
"id": "shaderlab",
|
||||
"extensions": [".shader", ".cginc"],
|
||||
"extensions": [".shader"],
|
||||
"aliases": ["ShaderLab", "shaderlab"],
|
||||
"configuration": "./language-configuration.json"
|
||||
}],
|
||||
|
||||
@@ -1,133 +1,174 @@
|
||||
{
|
||||
"scopeName": "source.shaderlab",
|
||||
"name": "ShaderLab",
|
||||
"fileTypes": [
|
||||
"shader"
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b([0-9]+\\.?[0-9]*)\\b",
|
||||
"name": "constant.numeric.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(Shader|Properties|Category|SubShader|Tags|Pass)\\b",
|
||||
"name": "support.class.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(CGPROGRAM|ENDCG)\\b",
|
||||
"name": "support.class.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(Dependency|Fallback)\\b",
|
||||
"name": "support.variable.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "^\\s*\\[(HideInInspector)\\]",
|
||||
"name": "keyword.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(_\\w+)\\b",
|
||||
"name": "support.variable.input.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(uv(2)*_\\w+|viewDir|COLOR|screenPos|worldPos|worldRefl|worldNormal|worldRefl|worldNormal)\\b",
|
||||
"name": "support.variable.input.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(Albedo|Normal|Emission|Specular|Gloss|Alpha)\\b",
|
||||
"name": "support.variable.output.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(appdata_(base|tan|full|img)|SurfaceOutput)\\b",
|
||||
"name": "support.variable.structure.shaderlab"
|
||||
},
|
||||
{
|
||||
"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.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(_ModelLightColor[0-9]|_SpecularLightColor[0-9]|_ObjectSpaceLightPos|_Light2World|_World2Light|_Object2Light)\\b",
|
||||
"name": "support.variable.lighting.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(_Time|_SinTime|_CosTime|unity_DeltaTime|_ProjectionParams|_ScreenParams)\\b",
|
||||
"name": "support.variable.other.shaderlab"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
},
|
||||
{
|
||||
"include": "#functions"
|
||||
},
|
||||
{
|
||||
"include": "#cg"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"comments": {
|
||||
"patterns": [
|
||||
"scopeName": "source.shaderlab",
|
||||
"name": "ShaderLab",
|
||||
"fileTypes": [
|
||||
"shader"
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"name": "comment.line.double-slash.shaderlab",
|
||||
"begin": "//",
|
||||
"end": "$"
|
||||
},
|
||||
{
|
||||
"name": "support.type.basic.shaderlab",
|
||||
"match": "\\b(?i:Range|Float|Int|Color|Vector|2D|3D|Cube|Any)\\b"
|
||||
},
|
||||
{
|
||||
"include": "#numbers"
|
||||
},
|
||||
{
|
||||
"name": "storage.type.structure.shaderlab",
|
||||
"match": "\\b(?i:Shader|Properties|SubShader|Pass|Category)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.type.propertyname.shaderlab",
|
||||
"match": "\\b(?i:Name|Tags|Fallback|CustomEditor|Cull|ZWrite|ZTest|Offset|Blend|BlendOp|ColorMask|AlphaToMask|LOD|Lighting|Stencil|Ref|ReadMask|WriteMask|Comp|CompBack|CompFront|Fail|ZFail|UsePass|GrabPass|Dependency|Material|Diffuse|Ambient|Shininess|Specular|Emission|Fog|Mode|Density|SeparateSpecular|SetTexture|Combine|ConstantColor|Matrix|AlphaTest|ColorMaterial|BindChannels|Bind)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.shaderlab",
|
||||
"match": "\\b(?i:Back|Front|On|Off|[RGBA]{1,3}|AmbientAndDiffuse|Emission)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.comparisonfunction.shaderlab",
|
||||
"match": "\\b(?i:Less|Greater|LEqual|GEqual|Equal|NotEqual|Always|Never)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.stenciloperation.shaderlab",
|
||||
"match": "\\b(?i:Keep|Zero|Replace|IncrSat|DecrSat|Invert|IncrWrap|DecrWrap)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.texturecombiners.shaderlab",
|
||||
"match": "\\b(?i:Previous|Primary|Texture|Constant|Lerp|Double|Quad|Alpha)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.fog.shaderlab",
|
||||
"match": "\\b(?i:Global|Linear|Exp2|Exp)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.bindchannels.shaderlab",
|
||||
"match": "\\b(?i:Vertex|Normal|Tangent|TexCoord0|TexCoord1)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.blendoperations.shaderlab",
|
||||
"match": "\\b(?i:Add|Sub|RevSub|Min|Max|LogicalClear|LogicalSet|LogicalCopyInverted|LogicalCopy|LogicalNoop|LogicalInvert|LogicalAnd|LogicalNand|LogicalOr|LogicalNor|LogicalXor|LogicalEquiv|LogicalAndReverse|LogicalAndInverted|LogicalOrReverse|LogicalOrInverted)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.constant.property-value.blendfactors.shaderlab",
|
||||
"match": "\\b(?i:One|Zero|SrcColor|SrcAlpha|DstColor|DstAlpha|OneMinusSrcColor|OneMinusSrcAlpha|OneMinusDstColor|OneMinusDstAlpha)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.reference.shaderlab",
|
||||
"match": "\\[([a-zA-Z_][a-zA-Z0-9_]*)\\](?!\\s*[a-zA-Z_][a-zA-Z0-9_]*\\s*\\(\")"
|
||||
},
|
||||
{
|
||||
"name": "meta.attribute.shaderlab",
|
||||
"begin": "(\\[)",
|
||||
"end": "(\\])",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "support.type.attributename.shaderlab",
|
||||
"match": "\\G([a-zA-Z]+)\\b"
|
||||
},
|
||||
{
|
||||
"include": "#numbers"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "support.variable.declaration.shaderlab",
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\("
|
||||
},
|
||||
{
|
||||
"name": "meta.cgblock",
|
||||
"begin": "\\b(CGPROGRAM|CGINCLUDE)\\b",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other"
|
||||
}
|
||||
},
|
||||
"end": "\\b(ENDCG)\\b",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.hlsl"
|
||||
},
|
||||
{
|
||||
"begin": "//",
|
||||
"end": "$",
|
||||
"name": "comment.line.double-slash.shaderlab"
|
||||
},
|
||||
{
|
||||
"begin": "/\\*",
|
||||
"end": "\\*/",
|
||||
"name": "comment.line.block.shaderlab"
|
||||
}
|
||||
]
|
||||
},
|
||||
"strings": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"name": "string.quoted.double.shaderlab"
|
||||
}
|
||||
]
|
||||
},
|
||||
"functions": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b \n\t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++\t\t\t\t # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.whitespace.function-call.leading.shaderlab"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.function.any-method.shaderlab"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.parameters.shaderlab"
|
||||
}
|
||||
},
|
||||
"name": "meta.function-call.shaderlab"
|
||||
}
|
||||
]
|
||||
},
|
||||
"cg": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\\b",
|
||||
"name": "keyword.control.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\.([rgba]{1,4}|[xyzw]{1,4})\\b",
|
||||
"name": "keyword.operator.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(const|extern|in|inline|inout|static|out|uniform|varying|profile name)\\b",
|
||||
"name": "storage.modifier.shaderlab"
|
||||
},
|
||||
{
|
||||
"match": "\\b(void|struct|typedef|signed|unsigned|double([1-4])*(x[1-4])*|float([1-4])*(x[1-4])*|half([1-4])*(x[1-4])*|fixed([1-4])*(x[1-4])*|long([1-4])*(x[1-4])*|int([1-4])*(x[1-4])*|short([1-4])*(x[1-4])*|char([1-4])*(x[1-4])*|bool([1-4])*(x[1-4])*|sampler([1-3]D|RECT|CUBE)*)\\b",
|
||||
"name": "storage.type.shaderlab"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"name": "storage.type.basic.shaderlab",
|
||||
"match": "\\b(fixed([1-4](x[1-4])?)?)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.transformations.shaderlab",
|
||||
"match": "\\b(UNITY_MATRIX_MVP|UNITY_MATRIX_MV|UNITY_MATRIX_V|UNITY_MATRIX_P|UNITY_MATRIX_VP|UNITY_MATRIX_T_MV|UNITY_MATRIX_IT_MV|_Object2World|_World2Object)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.camera.shaderlab",
|
||||
"match": "\\b(_WorldSpaceCameraPos|_ProjectionParams|_ScreenParams|_ZBufferParams|unity_OrthoParams|unity_CameraProjection|unity_CameraInvProjection|unity_CameraWorldClipPlanes)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.time.shaderlab",
|
||||
"match": "\\b(_Time|_SinTime|_CosTime|unity_DeltaTime)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.lighting.shaderlab",
|
||||
"match": "\\b(_LightColor0|_WorldSpaceLightPos0|_LightMatrix0|unity_4LightPosX0|unity_4LightPosY0|unity_4LightPosZ0|unity_4LightAtten0|unity_LightColor|_LightColor|unity_LightPosition|unity_LightAtten|unity_SpotDirection)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.fog.shaderlab",
|
||||
"match": "\\b(unity_AmbientSky|unity_AmbientEquator|unity_AmbientGround|UNITY_LIGHTMODEL_AMBIENT|unity_FogColor|unity_FogParams)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.various.shaderlab",
|
||||
"match": "\\b(unity_LODFade)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.preprocessor.targetplatform.shaderlab",
|
||||
"match": "\\b(SHADER_API_D3D9|SHADER_API_D3D11|SHADER_API_GLCORE|SHADER_API_OPENGL|SHADER_API_GLES|SHADER_API_GLES3|SHADER_API_METAL|SHADER_API_D3D11_9X|SHADER_API_PSSL|SHADER_API_XBOXONE|SHADER_API_PSP2|SHADER_API_WIIU|SHADER_API_MOBILE|SHADER_API_GLSL)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.preprocessor.targetmodel.shaderlab",
|
||||
"match": "\\b(SHADER_TARGET)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.preprocessor.unityversion.shaderlab",
|
||||
"match": "\\b(UNITY_VERSION)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.preprocessor.platformdifference.shaderlab",
|
||||
"match": "\\b(UNITY_BRANCH|UNITY_FLATTEN|UNITY_NO_SCREENSPACE_SHADOWS|UNITY_NO_LINEAR_COLORSPACE|UNITY_NO_RGBM|UNITY_NO_DXT5nm|UNITY_FRAMEBUFFER_FETCH_AVAILABLE|UNITY_USE_RGBA_FOR_POINT_SHADOWS|UNITY_ATTEN_CHANNEL|UNITY_HALF_TEXEL_OFFSET|UNITY_UV_STARTS_AT_TOP|UNITY_MIGHT_NOT_HAVE_DEPTH_Texture|UNITY_NEAR_CLIP_VALUE|UNITY_VPOS_TYPE|UNITY_CAN_COMPILE_TESSELLATION|UNITY_COMPILER_HLSL|UNITY_COMPILER_HLSL2GLSL|UNITY_COMPILER_CG|UNITY_REVERSED_Z)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.variable.preprocessor.texture2D.shaderlab",
|
||||
"match": "\\b(UNITY_PASS_FORWARDBASE|UNITY_PASS_FORWARDADD|UNITY_PASS_DEFERRED|UNITY_PASS_SHADOWCASTER|UNITY_PASS_PREPASSBASE|UNITY_PASS_PREPASSFINAL)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.class.structures.shaderlab",
|
||||
"match": "\\b(appdata_base|appdata_tan|appdata_full|appdata_img)\\b"
|
||||
},
|
||||
{
|
||||
"name": "support.class.surface.shaderlab",
|
||||
"match": "\\b(SurfaceOutputStandardSpecular|SurfaceOutputStandard|SurfaceOutput|Input)\\b"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "string.quoted.double.shaderlab",
|
||||
"begin": "\"",
|
||||
"end": "\""
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"numbers": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.numeric.shaderlab",
|
||||
"match": "\\b([0-9]+\\.?[0-9]*)\\b"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
[
|
||||
{
|
||||
"c": "Shader",
|
||||
"t": "source.shaderlab support.class.shaderlab",
|
||||
"t": "source.shaderlab storage.type.structure.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -56,13 +56,13 @@
|
||||
},
|
||||
{
|
||||
"c": "SubShader",
|
||||
"t": "source.shaderlab support.class.shaderlab",
|
||||
"t": "source.shaderlab storage.type.structure.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -89,10 +89,10 @@
|
||||
},
|
||||
{
|
||||
"c": "Tags",
|
||||
"t": "source.shaderlab support.class.shaderlab",
|
||||
"t": "source.shaderlab support.type.propertyname.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_plus": "support.type: #4EC9B0",
|
||||
"light_plus": "support.type: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
@@ -166,29 +166,29 @@
|
||||
},
|
||||
{
|
||||
"c": "CGPROGRAM",
|
||||
"t": "source.shaderlab support.class.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock keyword.other",
|
||||
"r": {
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "keyword: #569CD6",
|
||||
"light_plus": "keyword: #0000FF",
|
||||
"dark_vs": "keyword: #569CD6",
|
||||
"light_vs": "keyword: #0000FF",
|
||||
"hc_black": "keyword: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " #pragma",
|
||||
"t": "source.shaderlab keyword.control.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock keyword.preprocessor.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "keyword.control: #C586C0",
|
||||
"light_plus": "keyword.control: #AF00DB",
|
||||
"dark_vs": "keyword.control: #569CD6",
|
||||
"light_vs": "keyword.control: #0000FF",
|
||||
"hc_black": "keyword.control: #569CD6"
|
||||
"dark_plus": "keyword: #569CD6",
|
||||
"light_plus": "keyword: #0000FF",
|
||||
"dark_vs": "keyword: #569CD6",
|
||||
"light_vs": "keyword: #0000FF",
|
||||
"hc_black": "keyword: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " surface surf Lambert",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -199,7 +199,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -210,7 +210,7 @@
|
||||
},
|
||||
{
|
||||
"c": "struct",
|
||||
"t": "source.shaderlab storage.type.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock storage.type.structured.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
@@ -220,8 +220,30 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " Input {",
|
||||
"t": "source.shaderlab",
|
||||
"c": " ",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Input",
|
||||
"t": "source.shaderlab meta.cgblock support.class.surface.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " {",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -232,7 +254,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -243,7 +265,7 @@
|
||||
},
|
||||
{
|
||||
"c": "float4",
|
||||
"t": "source.shaderlab storage.type.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock storage.type.basic.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
@@ -254,7 +276,7 @@
|
||||
},
|
||||
{
|
||||
"c": " color : ",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -265,7 +287,7 @@
|
||||
},
|
||||
{
|
||||
"c": "COLOR",
|
||||
"t": "source.shaderlab support.variable.input.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock support.variable.semantic.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "support.variable: #9CDCFE",
|
||||
"light_plus": "support.variable: #001080",
|
||||
@@ -276,7 +298,7 @@
|
||||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -287,7 +309,7 @@
|
||||
},
|
||||
{
|
||||
"c": " };",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -298,7 +320,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -309,7 +331,7 @@
|
||||
},
|
||||
{
|
||||
"c": "void",
|
||||
"t": "source.shaderlab storage.type.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock storage.type.basic.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
@@ -320,7 +342,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -331,7 +353,7 @@
|
||||
},
|
||||
{
|
||||
"c": "surf",
|
||||
"t": "source.shaderlab meta.function-call.shaderlab support.function.any-method.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock support.function.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "support.function: #DCDCAA",
|
||||
"light_plus": "support.function: #795E26",
|
||||
@@ -342,7 +364,7 @@
|
||||
},
|
||||
{
|
||||
"c": " (",
|
||||
"t": "source.shaderlab meta.function-call.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -352,8 +374,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Input IN, ",
|
||||
"t": "source.shaderlab",
|
||||
"c": "Input",
|
||||
"t": "source.shaderlab meta.cgblock support.class.surface.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " IN, ",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -364,7 +397,7 @@
|
||||
},
|
||||
{
|
||||
"c": "inout",
|
||||
"t": "source.shaderlab storage.modifier.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock storage.modifier.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "storage.modifier: #569CD6",
|
||||
"light_plus": "storage.modifier: #0000FF",
|
||||
@@ -375,7 +408,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -386,10 +419,10 @@
|
||||
},
|
||||
{
|
||||
"c": "SurfaceOutput",
|
||||
"t": "source.shaderlab support.variable.structure.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock support.class.surface.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.variable: #9CDCFE",
|
||||
"light_plus": "support.variable: #001080",
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
@@ -397,7 +430,7 @@
|
||||
},
|
||||
{
|
||||
"c": " o) {",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -407,30 +440,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " o.",
|
||||
"t": "source.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Albedo",
|
||||
"t": "source.shaderlab support.variable.output.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.variable: #9CDCFE",
|
||||
"light_plus": "support.variable: #001080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " = ",
|
||||
"t": "source.shaderlab",
|
||||
"c": " o.Albedo = ",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -441,7 +452,7 @@
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.shaderlab constant.numeric.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock constant.numeric.hlsl",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
@@ -452,7 +463,7 @@
|
||||
},
|
||||
{
|
||||
"c": ";",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -463,7 +474,7 @@
|
||||
},
|
||||
{
|
||||
"c": " }",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -474,7 +485,7 @@
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
@@ -485,13 +496,13 @@
|
||||
},
|
||||
{
|
||||
"c": "ENDCG",
|
||||
"t": "source.shaderlab support.class.shaderlab",
|
||||
"t": "source.shaderlab meta.cgblock keyword.other",
|
||||
"r": {
|
||||
"dark_plus": "support.class: #4EC9B0",
|
||||
"light_plus": "support.class: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "keyword: #569CD6",
|
||||
"light_plus": "keyword: #0000FF",
|
||||
"dark_vs": "keyword: #569CD6",
|
||||
"light_vs": "keyword: #0000FF",
|
||||
"hc_black": "keyword: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -518,10 +529,10 @@
|
||||
},
|
||||
{
|
||||
"c": "Fallback",
|
||||
"t": "source.shaderlab support.variable.shaderlab",
|
||||
"t": "source.shaderlab support.type.propertyname.shaderlab",
|
||||
"r": {
|
||||
"dark_plus": "support.variable: #9CDCFE",
|
||||
"light_plus": "support.variable: #001080",
|
||||
"dark_plus": "support.type: #4EC9B0",
|
||||
"light_plus": "support.type: #267F99",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
|
||||
Reference in New Issue
Block a user