codeonwort / Cyseal

Cross-API engine which will support DX12 and Vulkan renderer
1 stars 0 forks source link

Use DXC to compile shaders #5

Closed codeonwort closed 1 year ago

codeonwort commented 1 year ago

I wrote shader loading code 4 years ago and forgot about it. It was using FXC and SM5, so let's replace it with DXC amd SM6. Also this PR is a stepping stone for DXR which requires SM6.3.

References

Note

When I invoke IDxcCompiler3::Compile() I get following exceptions:

Exception thrown at 0x00007FF9CBAC039C in TestApplication.exe: Microsoft C++ exception: hlsl::Exception at memory location 0x00000058243DADB0.
Exception thrown at 0x00007FF9CBAC039C in TestApplication.exe: Microsoft C++ exception: hlsl::Exception at memory location 0x00000058243DAB60.
Exception thrown at 0x00007FF9CBAC039C in TestApplication.exe: Microsoft C++ exception: hlsl::Exception at memory location 0x00000058243DAB60.

But the applicatoin runs fine. Don't know the reason yet.