VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
Shader Compilation

The shaders in this project are compiled using the DirectX Shader Compiler. Below are the steps to compile them.

Guideline

Follow this guideline for shader compilation: SPIR-V CodeGen.

Command Line Options

Refer to the supported command line options here: SPIR-V Command Line Options.

Automated Compilation

To compile all shaders, use:

make compile_shaders

For shaders with debugging info:

make compile_shaders_debug

For GLSL:

make compile_shaders_glsl

Manual Compilation

You can also compile shaders manually:

mkdir ./resources/shaders/compiled
./cmake_build/Release/bin/dxc -T vs_6_0 -spirv ./resources/shaders/hlsl/vertex_shader.hlsl -Fo ./resources/shaders/compiled/vertex_shader.spv
./cmake_build/Release/bin/dxc -T ps_6_0 -spirv ./resources/shaders/hlsl/pixel_shader.hlsl -Fo ./resources/shaders/compiled/fragment_shader.spv

Refer to Shader Profiles for more information.