Skip to content

GLSL fragment shader file recognized as JavaScript #5480

Locked Answered by lildude
teamclouday asked this question in Classification
Discussion options

You must be logged in to vote

I'm not an expert in JavaScript, so I'm wondering does .frag extension exist in JavaScript programming

It does… well, in a subset of JavaScript. It seems Angular uses this extension.

Interestingly, this looks like a random error, because the same problem does not occur in this repo, but exists in that one, where .frag is GLSL in both cases.

As both languages use the same extension, we need to rely on heuristics and the classifier to determine the language. There isn't currently a heuristic so we rely entirely on the classifier which is trained on the samples we have. In both cases, the samples we have appear to be quite small and similar to my naive eye, so the classifier has a higher…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@teamclouday
Comment options

@zdzieblowski
Comment options

Answer selected by teamclouday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants