Question
I want to feed the output of a ShaderEffect into itself, effectively generating a feedback loop.
My naive attempts has included simply linking a ShaderEffectSource and a ShaderEffect like so:
ShaderEffectSource {
id:buf1;
sourceItem: effect;
}
ShaderEffect {
id:effect;
property variant src: buf1;
//fragment shader then uses src as texture
}
My next naive approach included introducing a second ShaderEffectSource into the mix like so:
ShaderEffectSource {
id:buf1;
sourceItem: effect;
}
ShaderEffectSource {
id:buf2;
sourceItem: buf1;
}
ShaderEffect {
id:effect;
property variant src: buf2;
//fragment shader then uses src as texture
}
Neither of these approaches work however. It seems to work in one step but never feeds back in the end.
I have a feeling this is possible, but I am fairly new to QML and the quite possibly very logical and simple solution has eluded me. Any hints are welcome!
Answer
Answers with short working copy-pastable snippets are preferred :-)