Add .vs GLSL vertex shader extension #6536
Merged
+271
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added missing
.vs
extension to recognize.vs
files asGLSL
.For GLSL fragment shaders it is common to have either
.fs
or.frag
as your file extension. Both are present in this line oflanguages.yml
. For the vertex shader however, only.vert
is present and the counterpart to.fs
,.vs
has been forgotten. This has been fixed with this PRDescription
This solves GitHub support ticket #2320418, which had the following issue:
Issue caused by .vs not being in linguist
The main GitHub website does Syntax Highlighting based on the language it detects. It also shows a repo's language breakdown:
This feature has a bug when detecting GLSL Shaders. You can observe this bug in my repo: https://github.com/FrostKiwi/Mirrorball
Take a look at the detected GLSL shaders: https://github.com/search?q=repo%3AFrostKiwi%2FMirrorball++language%3AGLSL&type=code and what is actually in that directory: https://github.com/FrostKiwi/Mirrorball/tree/main/src/shd
You see two file types.
The GLSL Fragment Shaders with a .fs file extension.
The GLSL Vertex Shaders with a .vs file extension
.fs for fragment shaders and .vs for vertex shaders are a common choise along side .frag and .vert. So this is not a repo-specific naming, but a common one.
Checklist:
.vs
files, but all.fs
in those same repos have it):Apache License 2.0
Licence fileMIT licence
Licence fileGLSL
and.vs
is unique toGLSL
, at least in linguist.