Page 1 of 1

ISF with internal buffer seems not to work in WIRE

Posted: Sat Jul 20, 2024 18:24
by jobee
Hey all dear resolumers,
I try to use ISF in Wire.
Some shaders work in the ISF Editor and some works in Millumin, but doesn't work at all or partially in WIRE. Especially ISF using buffers doesn't work.
Is that a frequent problem?
I rode the ISF WIRE webpage https://resolume.com/support/en/isf
But this doesn't seems like to tell me why this doesn't work.
Here is an exemple of a ISF shader, it works well in Millumin but I tried to make work in Wire without success.
Could you tell me why?
This is a shader built to create a stop-motion effect.
Best regards

Jonathan

/*
{
"CATEGORIES": [
"Automatically Converted",
"Shadertoy"
],
"DESCRIPTION": "Automatically converted from https://www.shadertoy.com/view/Xst3Wf by aiekick. Britney Stop Motion",
"IMPORTED": {
},
"INPUTS": [
{
"NAME": "inputImage",
"TYPE": "image"
}
],
"PASSES": [
{
"FLOAT": true,
"PERSISTENT": true,
"TARGET": "BufferA"
},
{
}
]
}

*/


#define FRAME_INTERVAL 60

void main() {
if (PASSINDEX == 0) {


if (mod(float(FRAMEINDEX), float(FRAME_INTERVAL)) == 0.) // init with britney
{
gl_FragColor = IMG_NORM_PIXEL(inputImage,mod(gl_FragCoord.xy / RENDERSIZE.xy,1.0));
}
else
{
gl_FragColor = IMG_NORM_PIXEL(BufferA,mod(gl_FragCoord.xy / RENDERSIZE.xy,1.0)); // read buffer and keep britney
}

}
else if (PASSINDEX == 1) {


gl_FragColor = IMG_NORM_PIXEL(BufferA,mod(gl_FragCoord.xy / RENDERSIZE.xy,1.0));
}

}

Re: ISF that works in Millumin but not in WIRE

Posted: Tue Jul 23, 2024 12:22
by jobee
That seems like ISF working with an internal buffer have problems in Resolume?
Could you confirm or explain if not?
Best regards

Jonathan

Re: ISF with internal buffer seems not to work in WIRE

Posted: Mon Jul 29, 2024 15:11
by jobee
Yes, Isf dealing with direct video with no buffer works for me. And the ISF code I copied above works in ISF Editor, Millumin but not in Wire.
Could please tell me if there is a way to do this work?
Best regards

Jonathan

Re: ISF with internal buffer seems not to work in WIRE

Posted: Mon Jul 29, 2024 20:25
by Zoltán
ISF multipass should work since Wire 7.5. are you using a later Wire version?

try this code, for multipass testing:
https://docs.isf.video/ref_multipass.ht ... ss-shaders

Re: ISF with internal buffer seems not to work in WIRE

Posted: Wed Jul 31, 2024 13:37
by jobee
Thanks Zoltan,
My Wire version is 7.21 (as shown in the attached file).
I bought the renewal of my licence to get last Wire version, but I can't see how to update it to 7.5, and this is not automatic updating. What can I do?

Re: ISF with internal buffer seems not to work in WIRE

Posted: Mon Aug 05, 2024 12:17
by Zoltán
7.21 is later than 7.5
You can get it from the download page.

How does the ISF example for the buffer work on your machine?

Re: ISF with internal buffer seems not to work in WIRE

Posted: Sun Aug 25, 2024 21:21
by jobee
Hey there, back from holidays, I hope everything is fine :-)!
I modified I shader from ShaderToy (https://www.shadertoy.com/view/DlBSRm). And now this works perfectly in ISF Editor. It's a Motion track shader, it show only the moving pixel of the video. I imported it in Wire, and now the ISF in Wire only takes the textureIn, apply the Draw INTENSITY, BLUR FAC... of the effect on the textureIn (IChannel 0) but doesn't apply the movement tracking. Here a screenshot joined and here is the code. ALSO Here is a link to the editable compiled patch https://docs.google.com/document/d/1W54 ... drive_link Every ISF using buffer (I think this one do that) I'm using in Wire seems to have problems.

/*{
"CATEGORIES": [
"Automatically Converted",
"Shadertoy"
],
"DESCRIPTION": "Automatically converted from https://www.shadertoy.com/view/DlBSRm by SimonOakey. This setup is done to track and visualize motion of any kind in some kind of buffery graphic. Simple Color shift is used to draw some kind of temporal aspect into it. The framerate fps \"steps\" still suck. ideas? :)",
"INPUTS": [
{
"NAME": "iChannel0",
"TYPE": "image"
},
{
"NAME": "draw_intensity",
"TYPE": "float",
"MIN": 0.0,
"MAX": 2.0,
"DEFAULT": 1.2
},
{
"NAME": "blur_fac",
"TYPE": "float",
"MIN": 0.0,
"MAX": 7.0,
"DEFAULT": 2.0
},
{
"NAME": "noise_intensity",
"TYPE": "float",
"MIN": 0.0,
"MAX": 2.0,
"DEFAULT": 0.2
}
],
"ISFVSN": "2",
"PASSES": [
{
"FLOAT": true,
"PERSISTENT": true,
"TARGET": "BufferA"
},
{
"FLOAT": true,
"PERSISTENT": true,
"TARGET": "BufferB"
},
{
"FLOAT": true,
"PERSISTENT": true,
"TARGET": "BufferC"
},
{
"FLOAT": true,
"PERSISTENT": true,
"TARGET": "BufferD"
},
{}
]
}
*/

float iFrameRate = 60.;
float frameRatio = RENDERSIZE.x / RENDERSIZE.y;

// random function
#define rand(n) fract(cos(n * 89.42) * 343.42)

#define fade_speed 0.9995 //
#define bg_col vec3(.1, .1, .1) // set some fixed background color
#define feedback_displace_y .0001

#ifndef saturate
#define saturate(v) clamp(v, 0., 1.)
#endif

vec3 hue2rgb(float hue) {
hue = fract(hue);
return saturate(vec3(
abs(hue * 6. - 3.) - 1.,
2. - abs(hue * 6. - 2.),
2. - abs(hue * 6. - 4.)
));
}

void main() {
if (PASSINDEX == 0) {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
gl_FragColor = IMG_NORM_PIXEL(BufferB, mod(uv, 1.0));
}
else if (PASSINDEX == 1) {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv.x = 1.0 - uv.x;
uv.y = 1.0 - uv.y;

vec3 col = vec3(0.0);
vec2 off = 2.0 / RENDERSIZE.xy;
float tick = 0.;

for (float i = -blur_fac; i < blur_fac; i++) {
for (float j = -blur_fac; j < blur_fac; j++) {
col += IMG_NORM_PIXEL(iChannel0, uv + vec2(i, j) * off).rgb;
tick++;
}
}
gl_FragColor = vec4(col / tick, 1.0);
}
else if (PASSINDEX == 2) {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
vec3 color1 = IMG_NORM_PIXEL(BufferB, mod(uv, 1.0)).rgb;
vec3 color2 = IMG_NORM_PIXEL(BufferA, mod(uv, 1.0)).rgb;

float motion = abs((0.299 * color1.r + 0.587 * color1.g + 0.114 * color1.b) - (0.299 * color2.r + 0.587 * color2.g + 0.114 * color2.b));
vec3 color = vec3(draw_intensity * motion);
gl_FragColor = vec4(color, 1.0);
}
else if (PASSINDEX == 3) {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
uv.y += feedback_displace_y;
vec3 col_0 = IMG_NORM_PIXEL(BufferC, mod(uv, 1.0)).rgb;
vec3 col_1 = IMG_NORM_PIXEL(BufferD, mod(uv, 1.0)).rgb;
gl_FragColor = vec4(mix(col_1, clamp(col_0, col_1 - .7 / 255.0, col_1 + 32.0 / 255.0), fade_speed), 1.0);
}
else if (PASSINDEX == 4) {
vec2 uv = gl_FragCoord.xy / RENDERSIZE.xy;
vec3 col_0 = IMG_NORM_PIXEL(BufferD, mod(uv, 1.0)).rgb;
gl_FragColor = vec4(col_0, 1.);
}
}

Re: ISF with internal buffer seems not to work in WIRE

Posted: Mon Aug 26, 2024 14:23
by Zoltán
Might be the formatting, but I get a bunch of errors with this code on the ISF site.
the drive link points to a doc, not the pathc, so can't check that.

Re: ISF with internal buffer seems not to work in WIRE

Posted: Fri Mar 07, 2025 21:25
by dtristram
I do not believe FLOAT persistent buffers are supported. My investigations indicate persistent buffers only have values from zero to one. Prove me wrong, please!