Welcome to Fractal Forums

Fractal Software => General Discussion => Topic started by: TruthSerum on May 31, 2015, 05:26:00 PM




Title: shadercap 1.0 release for windows
Post by: TruthSerum on May 31, 2015, 05:26:00 PM
As described here (http://www.fractalforums.com/general-discussion/tool-to-capture-glsl-shaders-to-video/), this tool can capture GLSL shaders to .webm video.

It is available from the website (http://www.movss.com/~rich/shadercap/). As mentioned, there is no support for textures yet.

(http://sigint9.github.io/shadercap/img/d.png)

The shader constants/parameters are:

  • fragCoord is the pixel position in normalized (-1 to 1) coordinates
  • iResolution stores the size (pixels) of the output image
  • iGlobalTime stores the elapsed time (seconds) of the animation

Here is an example of a shader program that can be rendered using ShaderCap:

Code:
uniform float iGlobalTime;
uniform vec2 iResolution;
varying vec2 fragCoord;
void main() {
  vec2 uv = fragCoord.xy * 0.5 + 0.5;
  gl_FragColor = vec4(uv,0.5+0.5*sin(iGlobalTime),1.0);
}

Please leave feedback or suggestions in this thread :)

**** EDIT ****

The parameters are no longer hardcoded. Use gl_FragCoord instead of varying vec2 fragCoord.


Title: Re: shadercap 1.0 release for windows
Post by: TruthSerum on June 06, 2015, 05:50:46 PM
I have added support for textures in version 1.1. You can download it here (http://www.movss.com/~rich/shadercap/).

https://www.youtube.com/watch?v=qooJLRNQE7I

(http://i.imgur.com/AzfYZePl.png)


Title: Re: shadercap 1.0 release for windows
Post by: Spscener84 on June 07, 2015, 11:21:44 AM
TruthSerum, very interesting proposal! That converter looks very handy. Is there any chance to take a look to the source code?

Thank you!  :D


Title: Re: shadercap 1.0 release for windows
Post by: TruthSerum on June 07, 2015, 07:13:57 PM
Thanks for the feedback. The code is currently a bit messy and I've not written any build instructions yet. After that I plan to post it on GitHub so you could build a Linux version too.


Title: Re: shadercap 1.0 release for windows
Post by: Spscener84 on June 12, 2015, 12:47:14 PM
TruthSerum, that'd be great, can't wait, any progress so far?  :D

In any case, one little question if it's still far away to be open sourced, what's the QT functionality which allows you to write to video directly? IMHO, it's great which you don't need to dump single frames and then using some external software to composite the video, that's quite time consuming whether you end up creating multiple videos from some particular shader experiment.

Regards  O0


Title: Re: shadercap 1.0 release for windows
Post by: TruthSerum on June 12, 2015, 02:33:17 PM
I've pushed it to GitHub and you can find it here (https://github.com/sigint9/shadercap).


Title: Re: shadercap 1.0 release for windows
Post by: 3dickulus on June 12, 2015, 03:44:12 PM
nice work! I hope I can learn something from this, maybe it can help me get fragmentarium off of QGLWidget and onto QOpenGLSurface to complete the move to Qt5
 :beer: :beer: :beer:


Title: Re: shadercap 1.0 release for windows
Post by: TruthSerum on April 15, 2017, 02:27:13 AM
Released version 1.2 to fix minor issue and upgrade to Qt 5.7

http://sigint9.github.io/shadercap/ (http://sigint9.github.io/shadercap/)