stevensona/shader-toy

Feature request: setting to start the shader paused

wmanning-cra opened this issue · 5 comments

I'm working on a raymarching shader that is currently very slow, and having my machine slow down drastically every time I start typing text makes it very hard to work. At the same time, I still want to be able to see the raymarcher update in real-time as I change settings.

This could be accomplished with a new flag for whether the shader should be paused immediately after updating.

Alternatively, perhaps it should just respect its current state: if it's paused before recompilation, it should be paused after recompilation.

I thought this should already be supported, e.g. the paused state should be maintained through reloads if the setting Reset State On Change Editor is disable. I can take a closer look to see if that currently works or not.

Skagoo commented

I can confirm that the following settings still results in the shader not being paused after updating. Is this a bug or a missing feature? Will any of the maintainers still go through the effort of merging a PR to address this issue?

{
        "shader-toy.resetStateOnChangeEditor": false,
	"shader-toy.pauseWholeRender": true
}

While it's very obvious that I haven't had any time or energy to work on this I'm still perfectly happy to merge PRs. However that's somewhat pointless as I don't have the ability to deploy a patch to the extension. I'll try to get in touch with @stevensona to see if we can make it possible for both of us to deploy.

I've also noticed this issue. Here's my personal workaround.

  1. Install the multicommand extension
  2. In your vscode keybindings file, define the following:
[{
    "key": "alt+enter",
    "command": "extension.multiCommand.execute",
    "args": {
        "sequence": [
            "workbench.action.files.save",
            "shader-toy.showGlslPreview",
            "shader-toy.pauseGlslPreviews"
        ]
    }
}]

Now, when you press alt + enter, the code will save, preview in the shader-toy extension, and pause. I also disabled these shader-toy settings:

    "shader-toy.reloadAutomatically": false,
    "shader-toy.reloadOnEditText": false,
    "shader-toy.resetStateOnChangeEditor": false,
Skagoo commented

Since I solely use this for passion projects I'm satisfied with @mzschwartz5 's workaround. Thanks a lot