-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSandbox03MeshShaders.csproj
More file actions
116 lines (99 loc) · 6.44 KB
/
Copy pathSandbox03MeshShaders.csproj
File metadata and controls
116 lines (99 loc) · 6.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);IDE1006</NoWarn>
<!--<PublishAot>true</PublishAot>-->
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ImGui.NET" Version="1.89.4" />
<PackageReference Include="JeremyAnsel.Media.WavefrontObj" Version="3.0.27" />
<PackageReference Include="Silk.NET" Version="2.17.0" />
<PackageReference Include="Silk.NET.Input.Extensions" Version="2.17.0" />
<PackageReference Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.17.0" />
<PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.17.0" />
</ItemGroup>
<PropertyGroup>
<SpirVTarget>spv1.4</SpirVTarget>
<DestinationFolder>./Systems/SPIRV</DestinationFolder>
</PropertyGroup>
<!--<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<Optimize>false</Optimize>
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>false</Optimize>
<DebugType>pdbonly</DebugType>
<OptimizationLevel>0</OptimizationLevel>
</PropertyGroup>-->
<ItemGroup>
<EmbeddedResource Include="**/*.spv" />
</ItemGroup>
<ItemGroup>
<VertexShader Include="**/*.vert" />
<FragmentShader Include="**/*.frag" />
<ComputeShader Include="**/*.comp" />
<TaskShader Include="**/*.task" />
<MeshShader Include="**/*.mesh" />
</ItemGroup>
<!--<ItemGroup>
<EmbeddedResource Include="**/*.obj" />
<EmbeddedResource Include="**/*.png" />
</ItemGroup>-->
<ItemGroup>
<Content Include="..\..\Assets\cube.obj" Link="Assets\cube.obj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\Assets\quad.obj" Link="Assets\quad.obj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\Assets\flat_vase.obj" Link="Assets\flat_vase.obj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\Assets\smooth_vase.obj" Link="Assets\smooth_vase.obj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<!--<Content Include="..\..\Assets\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>-->
</ItemGroup>
<!--<Target Name="PrintBuildConfiguration" BeforeTargets="Build">
<Message Text="......................................BUILD Options..........................................................." Importance="high" />
<Message Text="Building in Debug configuration (Optimize: $(Optimize), DebugType: $(DebugType), OptimizationLevel: $(OptimizationLevel))" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" Importance="high" />
<Message Text="Building in Release configuration (Optimize: $(Optimize), DebugType: $(DebugType), OptimizationLevel: $(OptimizationLevel))" Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" Importance="high" />
<Message Text="......................................BUILD Options done......................................................" Importance="high" />
</Target>-->
<Target Name="CleanVulkanShader" BeforeTargets="Clean">
<Message Text="......................................SHADERS.clean..........................................................." Importance="high" />
<ItemGroup>
<FilesToDelete Include="**\*.spv" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<Message Text="......................................SHADERS.clean done......................................................" Importance="high" />
</Target>
<PropertyGroup>
<BuildDependsOn>
CompileShaders;
$(BuildDependsOn);
</BuildDependsOn>
</PropertyGroup>
<Target Name="CompileShaders" BeforeTargets="BeforeBuild" Inputs="@(ComputeShader);
 @(VertexShader);
 @(FragmentShader);
 @(TaskShader);
 @(MeshShader);
 " Outputs="
 @(ComputeShader->'$(DestinationFolder)\%(Filename)%(Extension).spv');
 @(VertexShader->'$(DestinationFolder)\%(Filename)%(Extension).spv');
 @(FragmentShader->'$(DestinationFolder)\%(Filename)%(Extension).spv');
 @(TaskShader->'$(DestinationFolder)\%(Filename)%(Extension).spv');
 @(MeshShader->'$(DestinationFolder)\%(Filename)%(Extension).spv');
 ">
<Message Text="......................................SHADERS.compile........................................................." Importance="high" />
<Message Text=" Starting Vulkan Shader Compilation..." Importance="high" />
<MakeDir Directories="$(DestinationFolder)" Condition="!Exists('$(DestinationFolder)')" />
<Message Text=" VertexShader: @(VertexShader)" Importance="high" />
<Message Text=" FragmentShader: @(FragmentShader)" Importance="high" />
<Message Text=" ComputeShader: @(ComputeShader)" Importance="high" />
<Message Text=" TaskShader: @(TaskShader)" Importance="high" />
<Message Text=" MeshShader: @(MeshShader)" Importance="high" />
<Exec Command="$(VulkanBinPath)\glslc.exe "%(ComputeShader.FullPath)" -o "$(DestinationFolder)\%(ComputeShader.Filename)%(ComputeShader.Extension).spv" --target-spv=$(SpirVTarget)" Condition="'@(ComputeShader)'!=''" />
<Exec Command="$(VulkanBinPath)\glslc.exe "%(VertexShader.FullPath)" -o "$(DestinationFolder)\%(VertexShader.Filename)%(VertexShader.Extension).spv" --target-spv=$(SpirVTarget)" Condition="'@(VertexShader)'!=''" />
<Exec Command="$(VulkanBinPath)\glslc.exe "%(FragmentShader.FullPath)" -o "$(DestinationFolder)\%(FragmentShader.Filename)%(FragmentShader.Extension).spv" --target-spv=$(SpirVTarget)" Condition="'@(FragmentShader)'!=''" />
<Exec Command="$(VulkanBinPath)\glslc.exe "%(TaskShader.FullPath)" -o "$(DestinationFolder)\%(TaskShader.Filename)%(TaskShader.Extension).spv" --target-spv=$(SpirVTarget)" Condition="'@(TaskShader)'!=''" />
<Exec Command="$(VulkanBinPath)\glslc.exe "%(MeshShader.FullPath)" -o "$(DestinationFolder)\%(MeshShader.Filename)%(MeshShader.Extension).spv" --target-spv=$(SpirVTarget)" Condition="'@(MeshShader)'!=''" />
<Message Text="......................................SHADERS.compile done...................................................." Importance="high" />
</Target>
</Project>