Open vikram-gupta opened 7 years ago
You'd need to somehow render this to a texture, and then use that texture as an input. You'd need to make sure that the texture this was rendered to was part of the same sharegroup as the GPUImage rendering context.
There's an example for how to do this with OpenGL rendering in the sample applications, and Scene Kit has capabilities for rendering scenes to textures.
Thanks @BradLarson !
Just wanted to confirm my understanding about the same. Please correct me if I am wrong.
We can use the following function to get the texture of the SkView
for every render cycle and blend the extracted texture with GPUImageMovie
.
- (SKTexture *)textureFromNode:(SKNode *)node;
However, the SkView
is getting rendered by iOS as I added it as a subview, so I am not sure if this gets rendered in same context. Do you think that the SkView
would be rendered in the same share group by default?
I also wanted to ask if there is a way to convert a dynamic/changing view into a stream similar to GPUImageMovie
so that whenever there is a change in the view, the blend filter automatically gets updated frames from the view and outputs a new blended frame?
I have a
SkView
which is having aSKEmitterNode
to generate particle animation. When I attach thisSkView
to the parent view, I am able to see the particle animation. However, I want to be able to do draw the particle animation offscreen directly on the pixel buffer. How can I do this?If the above is not possible, can I somehow blend
SkView
with theGPUImageMovie
?I came across this article where a snapshot of the SkView can be taken. However, I need to do this for every frame or every update on the
SkView
.What is a best way to do this? Any pointers would be really helpful.