Skip to content

Difficulties getting the extension to work #97

Description

@MajorMoth

Let me preface this by saying I'm working with shader files that have a custom file extension (.swsl) which are essentially GLSL ver. 140 with some extra builtin things for handling lighting and others.
I have a mapping for file associations which makes all the other glsl language support extensions work flawlessly:

    "files.associations": {
        "*.swsl": "glsl"
        }

When I first installed the extension I had 2 errors, one about invalid arguments, and the other about a failure to find the shader stage. The first was fixed by changing the pattern in language settings:

        "glsllint.languageSettings": {

            "javascript": {
                "parser": "TSAST"
            },
            "javascriptreact": {
                "parser": "TSAST"
            },
            "typescript": {
                "parser": "TSAST"
            },
            "typescriptreact": {
                "parser": "TSAST"
            },
            "elm": {
                "parser": "REGEX",
                "patternStart": "\\[swsl", <-
                "patternEnd": "\\|\\]"
            }
        }

And the other was fixed by telling the extension to fallback to fragment shaders (all swsl shaders are only fragment shaders because the game is 2D)

The last issue is that the extension doesn't seem to do... anything? I know it's meant to lint the file upon saving but it either fails silently or doesn't even try.
For example, saving the file with a line of code like this:

Image

Doesn't give an error or anything like that. Nothing happens, the file saves and that's it.
The same thing happens for .glsl files too. When the game engine does the internal shader compilation, it spits out an error.glsl file with all the scaffolding, but the extension doesn't do anything with that either, even if I edit a line as such:

Image

I would love to use this extension, so any help is appreciated.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions