Skip to content

Commit a68b6d4

Browse files
committed
test shader files and keywords update
test shader files and keywords update
1 parent 6d5c7b4 commit a68b6d4

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

Src/Shaderlab.lex

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ float1 ("+"|"-")?{digit}*"."{digit}+{floatsuffix}?
2525
float2 ("+"|"-")?{digit}+"."{digit}+{floatsuffix}?
2626
numbers (("+"|"-")?{digit}+|{float1}|{float2})
2727

28-
symbol ("+"|"-"|"*"|"/"|"%"|"||"|"<"|">"|"="|"!"|";"|","|"="|"."|"&"|";"|"{"|"}"|","|"("|")"|"["|"]")
28+
symbol ("+"|"-"|"*"|"/"|"%"|"||"|"<"|">"|"="|"!"|";"|","|"="|"&"|";"|"{"|"}"|","|"("|")"|"["|"]")
2929

3030

3131
CmntStart \/\*
@@ -40,7 +40,7 @@ keywordsSpeical ALPHATOCOVERAGEENABLE|BLENDENABLE|SRCBLEND|DESTBLEND|BLENDOP
4040
datatype AppendStructuredBuffer|bool|bool2|bool3|bool4|Buffer|ByteAddressBuffer|ConsumeStructuredBuffer|double|double2|double3|double4|fixed|fixed2|fixed3|fixed4|float|float1x1|float1x2|float1x3|float1x4|float2|float2x1|float2x2|float2x3|float2x4|float3|float3x1|float3x2|float3x3|float3x4|float4|float4x1|float4x2|float4x3|float4x4|half|half2|half3|half4|InputPatch|int|int2|int3|int4|line|lineadj|LineStream|matrix|OutputPatch|point|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture1D|RWTexture1DArray|RWTexture2D|RWTexture2DArray|RWTexture3D|string|StructuredBuffer|Texture1D|Texture1DArray|Texture2D|Texture2DArray|Texture2DMS|Texture2DMSArray|Texture3D|triangle|triangleadj|TriangleStream|uint|uint2|uint3|uint4|vector|sampler|sampler2D|sampler3D|samplerCUBE
4141
function abs|acos|all|AllMemoryBarrier|AllMemoryBarrierWithGroupSync|any|asdouble|asfloat|asin|asint|asuint|atan|atan2|ceil|clamp|clip|cos|cosh|countbits|cross|D3DCOLORtoUBYTE4|ddx|ddx_coarse|ddx_fine|ddy|ddy_coarse|ddy_fine|degrees|determinant|DeviceMemoryBarrier|DeviceMemoryBarrierWithGroupSync|distance|dot|dst|EvaluateAttributeAtCentroid|EvaluateAttributeAtSample|EvaluateAttributeSnapped|exp|exp2|f16tof32|f32tof16|faceforward|firstbithigh|firstbitlow|floor|fmod|frac|frexp|fwidth|GetRenderTargetSampleCount|GetRenderTargetSamplePosition|GroupMemoryBarrier|GroupMemoryBarrierWithGroupSync|InterlockedAdd|InterlockedAnd|InterlockedCompareExchange|InterlockedCompareStore|InterlockedExchange|InterlockedMax|InterlockedMin|InterlockedOr|InterlockedXor|isfinite|isinf|isnan|ldexp|length|lerp|lit|log|log10|log2|mad|max|min|modf|mul|noise|normalize|pow|Process2DQuadTessFactorsAvg|Process2DQuadTessFactorsMax|Process2DQuadTessFactorsMin|ProcessIsolineTessFactors|ProcessQuadTessFactorsAvg|ProcessQuadTessFactorsMax|ProcessQuadTessFactorsMin|ProcessTriTessFactorsAvg|ProcessTriTessFactorsMax|ProcessTriTessFactorsMin|radians|rcp|reflect|refract|reversebits|round|rsqrt|saturate|sign|sin|sincos|sinh|smoothstep|sqrt|step|tan|tanh|tex1D|tex1Dbias|tex1Dgrad|tex1Dlod|tex1Dproj|tex2D|tex2Dbias|tex2Dgrad|tex2Dlod|tex2Dproj|tex3D|tex3Dbias|tex3Dgrad|tex3Dlod|tex3Dproj|texCUBE|texCUBEbias|texCUBEgrad|texCUBElod|texCUBEproj|transpose|trunc
4242

43-
unityDataType Color|2D|Rect|Cube|Float|[Rr]ange{blank}*\({blank}*{numbers}{blank}*,{blank}*{numbers}{blank}*\)|Vector|appdata_base|appdata_tan|appdata_full|appdata_img
43+
unityDataType Color|2D|Rect|Cube|Float|[Rr]ange{blank}*\({blank}*{numbers}{blank}*,{blank}*{numbers}{blank}*\)|Vector|appdata_base|appdata_tan|appdata_full|appdata_img|SurfaceOutput
4444
unityBuiltinVars UNITY_MATRIX_MVP|UNITY_MATRIX_MV|UNITY_MATRIX_V|UNITY_MATRIX_P|UNITY_MATRIX_VP|UNITY_MATRIX_T_MV|UNITY_MATRIX_IT_MV|UNITY_MATRIX_TEXTURE0|UNITY_MATRIX_TEXTURE1|UNITY_MATRIX_TEXTURE2|UNITY_MATRIX_TEXTURE3|UNITY_LIGHTMODEL_AMBIENT
4545
unityKeywordsWithPara #pragma|#include
4646
unityBlockKeywords CGPROGRAM|ENDCG|Shader|SubShader|FallBack|Properties|Pass|UsePass|Tags|BindChannels|Stencil|Material|GrabPass

Src/ShaderlabVS.csproj

+2-4
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,15 @@
7676
<Compile Include="Properties\AssemblyInfo.cs" />
7777
</ItemGroup>
7878
<ItemGroup>
79-
<None Include="TestFiles\TestShader.shader" />
8079
<None Include="Shaderlab.lex" />
8180
<None Include="source.extension.vsixmanifest">
8281
<SubType>Designer</SubType>
8382
</None>
83+
<None Include="TestFiles\101.shader" />
84+
<None Include="TestFiles\102.shader" />
8485
</ItemGroup>
8586
<ItemGroup>
8687
<Content Include="gplex.exe" />
87-
<Content Include="TestFiles\DefaultShaderLibrary.hlsl" />
88-
<Content Include="TestFiles\Tutorial04.fx" />
89-
<Content Include="TestFiles\Tutorial07.fx" />
9088
</ItemGroup>
9189
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
9290
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />

Src/TestFiles/101.shader

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Shader "Custom/NewShader" {
2+
Properties {
3+
_MainTex ("Base (RGB)", 2D) = "white" {}
4+
}
5+
SubShader {
6+
Tags { "RenderType" = "Opaque" }
7+
LOD 200
8+
9+
CGPROGRAM
10+
#pragma surface surf Lambert
11+
12+
sampler2D _MainTex;
13+
14+
struct Input {
15+
float2 uv_MainTex;
16+
};
17+
18+
void surf (Input IN, inout SurfaceOutput o) {
19+
half4 c = tex2D (_MainTex, IN.uv_MainTex);
20+
o.Albedo = c.rgb;
21+
o.Alpha = c.a;
22+
}
23+
ENDCG
24+
}
25+
FallBack "Diffuse"
26+
}
File renamed without changes.

0 commit comments

Comments
 (0)