Hello, pouvez expliquer plus précisément ce que vous voulez faire ?
Je ne sais pas si c'est le meme sujet, mais de mon côté je voulais parvenir à conserver les frames d'un tampon et agir dessus avec un délai. Si votre projet se rapproche de ça, je peux me repencher dessus pour vous donner des infos. J'avais trouver un "trick" qui permette d'enfermer les frame d'un buffer.
En créant un buffer custom et en débranchantun node.
Aussi, j'avais essayé une autre astuce, j'avais pris des "snapshot" d'un buffer sous la forme de Material, ce qui crée des frames figés sur lesquelles on peur agir.
ISF with internal buffer seems not to work in WIRE
-
- Posts: 3
- Joined: Wed Sep 10, 2025 04:47
Re: ISF with internal buffer seems not to work in WIRE
Here is the ISF shader that demonstrates what I am referring to. The expected behavior would be feedback that swirls around like smoke. You can see that here: https://www.shadertoy.com/view/WtsSz2
Code: Select all
/*{
"CREDIT": "The Void",
"DESCRIPTION": "feedback test",
"CATEGORIES": [ "generator" ],
"INPUTS": [
{
"TYPE": "float",
"NAME": "circle_size",
"LABEL": "circle size",
"MIN" : "0",
"MAX" : "1"
},
{
"TYPE": "event",
"NAME": "reset",
},
{
"TYPE": "point2D",
"NAME": "offset"
}
],
"PASSES": [
{
"TARGET": "Feedback",
"FLOAT": true,
"PERSISTENT": true,
}
]
}*/
#define LOOKUP(COORD) IMG_PIXEL(Feedback,(COORD))
vec4 iMouse = vec4(0.0);
vec2 _xy = gl_FragCoord.xy;
vec2 _uv = isf_FragNormCoord.xy;
vec2 _uvc = gl_FragCoord.xy / RENDERSIZE.y - vec2(RENDERSIZE.x/RENDERSIZE.y/2, 0.5);
vec4 Field (vec2 position) {
// Rule 1 : All My Energy transates with my ordered Energy
vec2 velocityGuess = IMG_NORM_PIXEL(Feedback, position / RENDERSIZE.xy).xy;
vec2 positionGuess = position - velocityGuess;
return IMG_PIXEL(Feedback, positionGuess);
}
vec4 renderFeedback() {
if (reset || FRAMEINDEX < 3) {
return vec4(0.);
}
vec2 Me = gl_FragCoord.xy;
vec4 Energy = vec4(0.0);
// Energy = IMG_THIS_PIXEL(Feedback);
Energy = Field(Me);
// Energy.x =
vec4 temp = Energy;
// Neighborhood :
vec4 pX = Field(Me + vec2(1.0,0));
vec4 pY = Field(Me + vec2(0,1.0));
vec4 nX = Field(Me - vec2(1.0,0));
vec4 nY = Field(Me - vec2(0,1.0));
// Rule 2 : Disordered Energy diffuses completely :
Energy.b = (pX.b + pY.b + nX.b + nY.b)/4.0;
// Rule 3 : Order in the disordered Energy creates Order :
vec2 Force;
Force.x = nX.b - pX.b;
Force.y = nY.b - pY.b;
Energy.xy += Force/4.0;
// Rule 4 : Disorder in the ordered Energy creates Disorder :
Energy.b += (nX.x - pX.x + nY.y - pY.y)/4.;
// Gravity effect :
Energy.y -= Energy.w/300.0;
// Mass concervation :
Energy.w = mix(Energy.w, 1.0, step(length(_uvc), circle_size));
Energy.w *= 0.989;
return Energy;
}
void main() {
if(PASSINDEX == 0) {
gl_FragColor = renderFeedback();
} else if (PASSINDEX == 1) {
gl_FragColor = abs(IMG_THIS_PIXEL(Feedback)).wwww;
}
}
Re: ISF with internal buffer seems not to work in WIRE
Check your code on https://editor.isf.video/shaders/new
it seems to drop some errors
it seems to drop some errors
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
-
- Posts: 3
- Joined: Wed Sep 10, 2025 04:47
Re: ISF with internal buffer seems not to work in WIRE
I updated the shader to compile properly and am also getting no output on the ISF website. A possible reason could be the lack of bilinear filtering on the persistent buffers (there is no mention of this in the ISF spec)
For your convenience I created both a wire patch, ISF and shadertoy page with the same code:
https://www.shadertoy.com/view/wclfDl
https://editor.isf.video/shaders/68cb9d ... 001a42223f
Code: Select all
/*{
"CREDIT": "The Void",
"DESCRIPTION": "feedback test",
"CATEGORIES": [ "generator" ],
"INPUTS": [
{
"TYPE": "float",
"NAME": "circle_size",
"LABEL": "circle size",
"MIN" : "0",
"MAX" : "1",
"DEFAULT" : "0.5"
},
{
"TYPE": "event",
"NAME": "reset"
},
{
"TYPE": "point2D",
"NAME": "offset"
}
],
"PASSES": [
{
"TARGET": "Feedback",
"FLOAT": true,
"PERSISTENT": true
}
]
}*/
#define LOOKUP(COORD) IMG_PIXEL(Feedback,(COORD))
// vec4 iMouse = vec4(0.0);
vec4 Field (vec2 position) {
// Rule 1 : All My Energy transates with my ordered Energy
vec2 velocityGuess = IMG_NORM_PIXEL(Feedback, position / RENDERSIZE.xy).xy;
vec2 positionGuess = position - velocityGuess;
return IMG_PIXEL(Feedback, positionGuess);
}
vec4 renderFeedback() {
if (reset || FRAMEINDEX < 3) {
return vec4(0.);
}
vec2 Me = gl_FragCoord.xy;
vec4 Energy = vec4(0.0);
// Energy = IMG_THIS_PIXEL(Feedback);
Energy = Field(Me);
// Energy.x =
vec4 temp = Energy;
// Neighborhood :
vec4 pX = Field(Me + vec2(1.0,0));
vec4 pY = Field(Me + vec2(0,1.0));
vec4 nX = Field(Me - vec2(1.0,0));
vec4 nY = Field(Me - vec2(0,1.0));
// Rule 2 : Disordered Energy diffuses completely :
Energy.b = (pX.b + pY.b + nX.b + nY.b)/4.0;
// Rule 3 : Order in the disordered Energy creates Order :
vec2 Force;
Force.x = nX.b - pX.b;
Force.y = nY.b - pY.b;
Energy.xy += Force/4.0;
// Rule 4 : Disorder in the ordered Energy creates Disorder :
Energy.b += (nX.x - pX.x + nY.y - pY.y)/4.;
// Gravity effect :
Energy.y -= Energy.w/300.0;
// Mass concervation :
Energy.w = mix(Energy.w, 1.0, step(length((gl_FragCoord.xy / RENDERSIZE.y) - vec2(RENDERSIZE.x/RENDERSIZE.y/2.0, 0.5)), circle_size));
Energy.w *= 0.989;
return Energy;
}
void main() {
if(PASSINDEX == 0) {
gl_FragColor = renderFeedback();
} else if (PASSINDEX == 1) {
gl_FragColor = IMG_THIS_PIXEL(Feedback).wwww;
}
}
https://www.shadertoy.com/view/wclfDl
https://editor.isf.video/shaders/68cb9d ... 001a42223f
Re: ISF with internal buffer seems not to work in WIRE
With this code, I get circle in Wire, seems to look good to me?
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu