Closed JayEff87 closed 4 years ago
Thanks for your feedback! To explain what I think is happening: .glsl is the extension that uses auto detecting the shader type based on keywords inside the shader source code. .rchit.glsl is recognized as a .glsl file extension so autodetection is used. For the "new" shader types I did not yet implement this because I'm unsure which keywords to use for those. When you set .rchit.glsl in the options you tell the program, which shader type this is, so no auto detection is attempted.
I see, so it was a misunderstanding on my part how the autodetection feature works, not a bug. Thankfully, as I've mentioned, my problem is easily fixed by adding the extensions in the options. manually.
Thanks for bringing this lack of documentation to my attention! I will update the readme to explain the autodetection feature.
Installed product versions
Description
File extensions .vert.glsl (as well as frag, tese, tesc) are recognized as the correct shader type, but the raytracing extensions (tested with rgen, rchit, rmiss) aren't, by default. This can be fixed manually by adding them in the options, e.g. setting the ray tracing closest hit shader file extension to
.rchit;.rchit.glsl
.Steps to recreate
Current behavior
When error checking the file rt.rgen.glsl, I get the output:
Using external compiler [...] on temporal shader file 'C:\Users\Jay\AppData\Local\Temp\shader.frag
followed by errors because the rgen shader uses language not available in the fragment shader stage.Expected behavior
Since other shader types are automatically recognized correctly if they're called [name].[type].glsl (by default), I would expect the extension to also detect raytracing shader types correctly if they're behind a .glsl extension (by default). Likewise, glslangValidator.exe recognizes these file extensions without problems.