stevensona/shader-toy

[Feature Request] watch changes for included glsl file as well.

jcyuan opened this issue · 8 comments

for example

image

changes in comm.glsl better to repreview atutomatically, but I think only save action takes effect that's enough.

the main file which has main method is good enough now: repreview for every changes.

really great tool, i love it!

If I understand you correctly then you could use a static glsl preview on main.glsl and this should already be supported.
With a dynamic preview you wouldn't be able to edit include files without causing those to be previewed (usually resulting in an error) anyways. And having a file change on disk, say because you have it open in another editor and are changing it there, won't result in any callbacks in VSCode. So I'm not sure how this could be improved right now.

@Malacath-92 hi, sorry for the confusing, i mean:

the preview window is being updated when i modify the code in the test.glsl (the main entry file in the pic), this is good.

but when i modify in comm.glsl (test.glsl refers some methods in it), the preview does not update.

How are you editing comm.glsl, without the preview trying to make that file compile automatically?

Besides the fact that I just embarrassingly realized that static previews are not available on the current version due to an error on my part, they do what you want and that is essentially why they were created.
shadertoy

@jcyuan when #96 goes through, please let me know if the static preview is sufficient for doing what you want.

looks great! i'll test later and let you know, thanks so much!

@jcyuan don't test yet, my PR is still open :)
So when a new version is deployed (the extension should notify you of that) you can check again

it works just fine now~ thanks.