stevensona/shader-toy

Feature request: export as video

Closed this issue · 7 comments

A great addition would be to be able to export the result as a video file

Absolutely! This VScode extension appears to run just about every GLSL shader possible.

Currently, I've been using https://github.com/polyfloyd/shady and https://github.com/danilw/shadertoy-to-video-with-FBO as export tools but they both don't work with a great deal of shaders.

I was looking for this feature :=) Capturing frames as png could be also good for creating h res videos with FFmpeg :=))))

589290 commented

@Malacath-92 would it be possible to allow the user to set the fps (framerate) that you hardcoded here: a6e765d#diff-ecf15ea18da90e8c77dff30f58aab5bdbf7de703ea34240d41527be44c176688R459 to 30fps?

Perhaps in a settings page?

...or maybe by the presence of a specific override constant in the glsl file itself?

I added the option, I don't think it is a guarantee tho with the web api from my short tests.

589290 commented

I agree with your opinion, there's a lot of things in the browser engine than can cause jank and make the canvas record operation miss the target framerate. This has been my experience working with it in the past. However, I still believe it will be useful to record certain shaders w/ low fps values and others w/ higher values.

Thank you for smashing this out! Eagerly awaiting your change to hit stable.

I'll be on vacation for 4 weeks so I'll publish this now. Please just report any issues as usual, if there are serious bugs I will find the time to fix them.

589290 commented

The recording function works extremely well for every shader I threw at it! Very nice work!

However, I did not see the option for adjusting the framerate, perhaps in the next release?

One small bug : #172