shader-toy icon indicating copy to clipboard operation
shader-toy copied to clipboard

Feature request: setting to start the shader paused

Open wmanning-cra opened this issue 2 years ago • 1 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.

wmanning-cra avatar Apr 20 '22 14:04 wmanning-cra

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.

Malacath-92 avatar Apr 30 '22 10:04 Malacath-92

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
}

Skagoo avatar Jun 11 '23 11:06 Skagoo

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.

Malacath-92 avatar Jun 11 '23 17:06 Malacath-92

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,

mzschwartz5 avatar Jun 22 '23 03:06 mzschwartz5

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

Skagoo avatar Jun 25 '23 10:06 Skagoo