Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run (error loading shader) #1

Open
ghost opened this issue May 19, 2018 · 11 comments
Open

Unable to run (error loading shader) #1

ghost opened this issue May 19, 2018 · 11 comments

Comments

@ghost
Copy link

ghost commented May 19, 2018

I wanted to try this one out, but it crashes at startup with message:
Could not find file '.\veldrid-raytracer\bin\Release\raytracer\netcoreapp2.0\Shaders\FramebufferBlitter-vertex.hlsl.bytes'.

The file indeed doesn't exist. There is normal text version of the file available, but not binary one.
I don't know what went wrong during the build process, but something must have broke without printing any errors.

By forcing application to use OpenGL backend by doing some changes in code, I was able to test it out, but otherwise, with DX11 being chosen as the default backend for my GPU, I'm unable to run it because of this issue.

This happens on Windows 10 64-bit version 1803 with latest dotnet sdk available for my platform.

EDIT: I have DirectX SDK installed on my machine (if it is of any relevance to you).

@mellinoe
Copy link
Owner

Hmm, if the compiled shaders don't exist then it's likely because the build couldn't find fxc.exe (the D3D11 shader compiler). If your system does have it, then it's possible I am looking in the wrong place, and just not finding it.

@ghost
Copy link
Author

ghost commented May 21, 2018 via email

@mellinoe
Copy link
Owner

Yep -- that would definitely be it. I'll see if I can make the searching logic a bit smarter, but I'm not sure if I can find it in random places on disk. Using the D3D API directly would probably make more sense and be less fragile -- I'll look into that.

@ghost
Copy link
Author

ghost commented May 22, 2018

I just stumbled upon this environment variable - DXSDK_DIR. It should be set by installation by default to folder where you are installing the SDK from what I read. Maybe that would solve the issue without need to do many changes in code?

@ghost
Copy link
Author

ghost commented May 22, 2018

Also, I don't know how many people are really like me, that they are installing SDKs on root/etc... But judging by the fact that I'm the only one complaining, I think this is really a minor issue :)

@mellinoe
Copy link
Owner

From what I understand, the DirectX SDK isn't really a thing anymore, so I'm guessing you are running on an older Windows OS? Nowadays, it seems to be shipped with the Windows SDK, so ShaderGen is looking under "Program Files/Windows Kits/...".

@ghost
Copy link
Author

ghost commented May 22, 2018

This happens on Windows 10 64-bit version 1803 with latest dotnet sdk available for my platform.

From first post :/

@ghost
Copy link
Author

ghost commented May 22, 2018

Hadn't you work at Microsoft? /s :P

@mellinoe
Copy link
Owner

Sorry -- you did mention that, my mistake.

@ghost
Copy link
Author

ghost commented May 23, 2018

Oh, I just reread what you wrote about Windows SDK. I don't think I have it installed as I'm not using MSVC toolchain but GNU one (MSYS2's MinGW continuation) for cross-platform convenience. If my assumption is correct, it comes with it and not with Windows 10 directly, right?

I try to install it and look if it helps with anything.

@mellinoe
Copy link
Owner

If my assumption is correct, it comes with it and not with Windows 10 directly, right?

Yes, that's right -- sorry that I wasn't clear. I have always gotten the SDK through one of the components in Visual Studio (probably the "UWP development" option), but there's most likely a more minimal option to install it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant