alipbcs / ZetaRay

Real-time Direct3D 12 path tracer
MIT License
251 stars 5 forks source link

GetFileSizeEx() for path ../Assets/CSO/Release/... failed with following error code: 6 #10

Open TomClabault opened 3 months ago

TomClabault commented 3 months ago

I cloned the repo, made a build folder, cmake .., open the Visual Studio Solution, set Samples/ZetaLab as starting project, added a cornell box GLTF to the command line argument and built + ran the project but ended with this error (it shows up with AutoExposure... but there are a bunch of other error Windows with more files complaining):

image

The working directory of the project is set to be ZetaRay/bin but the folder ../Assets does not contain a Release/ folder as seems to be expected by reading the error.

My ZetaRay/Assets folder only contains:

Any ideas?

alipbcs commented 3 months ago

There is a cmake target called "CompileShaders" that compiles the shaders and writes the ouputs to "./Assets/CSO/Release". It should be visible in the Solution Explorer window in VS. Could you make sure it hasn't been disabled? When enabled, the build output should've contained messages such as "Compiling AutoExposure_Histogram.hlsl...".

TomClabault commented 3 months ago

Okay, seems to work fine now but I have to build that target manually. Maybe something is missing in the CMake?

alipbcs commented 3 months ago

You shouldn't need to build it manually. For me a rebuild is triggered automatically whenever there's a change in one of the shaders. Are you sure that target hasn't been unloaded? Solution Explorer should look like this:

1

TomClabault commented 3 months ago

This is what my Visual Studio looks like:

image

It doesn't seem like it was unloaded. I do have the option to unload it when right clicking on it.

alipbcs commented 3 months ago

Instead of using VS, could you run the following on the command line in a different folder?

git clone https://github.com/alipbcs/ZetaRay
cd ZetaRay
mkdir build
cd build
cmake ..
cmake --build .
TomClabault commented 3 months ago

I did get this kind of output this time:

 2>Compiling HLSL source file BuildLightVoxelGrid.hlsl...
  5>Compiling HLSL source file GBufferRT_Inline.hlsl...
  3>Compiling HLSL source file Display.hlsl...
  15>Compiling HLSL source file ReSTIR_PT_PathTrace_WoPS.hlsl...
  4>Compiling HLSL source file EstimateTriLumen.hlsl...
  18>Compiling HLSL source file ReSTIR_PT_Reconnect_StC_E.hlsl...
  11>Compiling HLSL source file ReSTIR_DI_DNSR_Temporal.hlsl...
  20>Compiling HLSL source file ReSTIR_PT_Replay_CtS_E.hlsl...
  14>Compiling HLSL source file ReSTIR_GI.hlsl...
  8>Compiling HLSL source file Inscattering.hlsl...
alipbcs commented 3 months ago

The issue is specific to VS then. For some reason, VS is skipping that target even when it's loaded.

I tested with VS 2019 and VS 2022 on two different systems and it built successfully. I'm not sure what's causing it.