Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MrScautHD authored Aug 12, 2024
1 parent c33561d commit d5de663
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,66 @@ Coming SoOn!
# ⚠️ Importand for the Installation
1. For this project, you need the [`Vulkan SDK`](https://vulkan.lunarg.com/sdk/home#windows) with the version `[1.3.283.0]`. Please add the following code to your `.csproj` file:
```xml
<!-- _____________________________________Vulkan_____________________________________ -->

<!-- Vulkan SDK -->
<PropertyGroup>
<VulkanBinPath>C:\VulkanSDK\1.3.283.0\Bin</VulkanBinPath>
<VulkanBinPath>C:/VulkanSDK/1.3.283.0/Bin</VulkanBinPath>
</PropertyGroup>
```

2. To **compile shaders**, include the following code in your `.csproj` file:
```xml
<!-- Shader Stages (Vertex, Fragment...) -->
<ItemGroup>
<VertexShader Include="**/*.vert" />
<FragmentShader Include="**/*.frag" />
</ItemGroup>

<!-- _____________________________________Content_____________________________________ -->

<!-- Content Folder -->
<PropertyGroup>
<contentFolder>content</contentFolder>
</PropertyGroup>

<!-- Content -->
<ItemGroup>
<Content Include="content/**/*" Pack="true" Exclude="@(VertexShader);@(FragmentShader);">
<Content Include="$(contentFolder)/**/*" Pack="true" Exclude="@(VertexShader);@(FragmentShader);">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>

<!-- _____________________________________Shader_____________________________________ -->

<!-- Shader Stages (Vertex, Fragment...) -->
<ItemGroup>
<VertexShader Include="$(contentFolder)/**/*.vert" Pack="true">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</VertexShader>

<FragmentShader Include="$(contentFolder)/**/*.frag" Pack="true">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</FragmentShader>
</ItemGroup>

<!-- Shader Cleaner -->
<Target Name="CleanVulkanShader" BeforeTargets="Clean">
<Message Text="......................................SHADERS.Clean..........................................................." Importance="high" />
<Message Text="......................................Shaders Cleaning......................................" Importance="high" />
<ItemGroup>
<FilesToDelete Include="**\*.spv" />
<FilesToDelete Include="$(contentFolder)/**/*.spv" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<Message Text="......................................SHADERS.Cleaned........................................................." Importance="high" />
<Message Text=".......................................Shaders Cleaned......................................" Importance="high" />
</Target>

<!-- Shader Compiler -->
<Target Name="BuildVulkanShader" BeforeTargets="BeforeBuild">
<Message Text="......................................SHADERS.Compile........................................................." Importance="high" />
<Message Text="......................................Shaders Compiling....................................." Importance="high" />
<Message Text=" Starting Vulkan Shader Compilation..." Importance="high" />
<Message Text=" VulkanBinPath: $(VulkanBinPath)" Importance="high" />
<Message Text=" VertexShader: @(VertexShader)" Importance="high" />
<Message Text=" FragmentShader: @(FragmentShader)" Importance="high" />
<Exec Command="$(VulkanBinPath)\glslc.exe &quot;%(VertexShader.FullPath)&quot; -o &quot;%(VertexShader.FullPath).spv&quot;" Condition="'@(VertexShader)'!=''" />
<Exec Command="$(VulkanBinPath)\glslc.exe &quot;%(FragmentShader.FullPath)&quot; -o &quot;%(FragmentShader.FullPath).spv&quot;" Condition="'@(FragmentShader)'!=''" />
<Message Text="......................................SHADERS.Compiled........................................................" Importance="high" />
<Message Text=" > VulkanBinPath: $(VulkanBinPath)" Importance="high" />
<Message Text=" > VertexShader: @(VertexShader)" Importance="high" />
<Message Text=" > FragmentShader: @(FragmentShader)" Importance="high" />
<Exec Command="$(VulkanBinPath)/glslc.exe &quot;%(VertexShader.FullPath)&quot; -o &quot;%(VertexShader.FullPath).spv&quot;" Condition="'@(VertexShader)'!=''" />
<Exec Command="$(VulkanBinPath)/glslc.exe &quot;%(FragmentShader.FullPath)&quot; -o &quot;%(FragmentShader.FullPath).spv&quot;" Condition="'@(FragmentShader)'!=''" />
<Message Text="......................................Shaders Compiled......................................" Importance="high" />
</Target>
```

Expand Down

0 comments on commit d5de663

Please sign in to comment.