KhronosGroup / KhronosGroup/glslang
Define input-file format for holding multiple shaders in a single file.
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
It's not clear how one should name files.
For example, you outline that files would normally be named e.g. `.frag` for fragment shader. But the syntax of the file is glsl, so does `.glsl` also suit? You mention that the glslValidator uses the file extension to choose the appropriate internal logic, but it's not clear whether this can be overridden or this is establishing a standard.
In addition, it's not clear how the output files should be named. For example, we've been using `$shader.frag.spv` but this isn't ideal in cases where you are trying to determine the file type based purely on the file extension. It would be good to have a discussion here and then put forward a standard naming convention for shader files, in particular both glsl related files, and the spv counterparts.
The reason for this request is two fold:
1/ Set a baseline for engine and 3D software developers so that people can work consistently (e.g. resource loading systems).
2/ Make it clear what extensions should be recognised by IDEs, tools, e.g. for syntax highlighting, file icons, etc. e.g. https://github.com/hughsk/language-glsl/blob/5edd8bd17af5913f977bd7efe8c815786e6a4adf/grammars/glsl.cson#L1-L18
Thanks for your time.
Contributor guide
Assessment
This issue has not been assessed yet.