MIME type for shader code
Is there any kind of established MIME type for OpenGL shader program source code? I know that the official IANA table doesn't seem to mention one such, so it would have to be some experimental (x-…
) or some vendor-specific (vnd.…
) subtype, probably of the text/…
main type. According to What is the correct file extension for GLSL shaders? there doesn't even seem to be an established file name extension for these, but that's a quite separate problem to me.
Background:
I sometimes want to include shader code in a <script>
tag for some WebGL application, and I want to write the type=
attribute of that tag in a way which is semantically as reasonable as possible, even though at the moment I can't think of any actuall difference such a choice would make (unless I call it text/javascript
or something similarly stupid). But nevertheless, it would be nice to be already conforming to any tools which might develop over time, building on currently established standards that I don't know about yet.
The draft glTF standard written by Khronos states to use text/plain
for GLSL files.