Jump to content

Why is this not allowed?


trsh
 Share

Recommended Posts

for(var i = 0; i < 4; i ++){
                const triN = drawFaceTriangle(videoData.video_face_data.frames[0], renderTexture, faceData, mediaTexture);
                app.renderer.render(triN, renderTexture);
            }

 [.WebGL-000002191D5EC530] GL_INVALID_OPERATION: Feedback loop formed between Framebuffer and active Texture.

Link to comment
Share on other sites

12 minutes ago, ivan.popelyshev said:

input = output in your case, cant use renderTexture in sprite that is being in the same renderTexture. Its WebGL restriction. use another renderTexture.

But that I my intention. That the output becomes the input. Any workarounds?

Link to comment
Share on other sites

use two renderTextures, one of them is active. re-render one to second. I use that in pixi-layers: https://github.com/pixijs/pixi-layers/blob/master/src/Layer.ts#L68 , however my particular implementation somehow fails in v5, i didnt investigate yet :)

If you learn how to do it with two textures and changing sprite texture every time - you can go even further and try to make a fake texture that points to one or another, here's the trick from the same file:

	        if (group.useDoubleBuffer) {
		        renderer.texture.unbind(rt);
		        this.currentBufferIndex = 1 - this.currentBufferIndex;
		        let buffer = db[this.currentBufferIndex];
		        (rt.baseTexture as any)._glTextures = (buffer.baseTexture as any)._glTextures;
		        (rt.baseTexture as any).framebuffer = (buffer.baseTexture as any).framebuffer;
	        }

anyway, its not possible without two renderTextures. PixiJS does have flip-flopping only in FilterSystem and its not usable outside

Edited by ivan.popelyshev
Link to comment
Share on other sites

11 minutes ago, ivan.popelyshev said:

use two renderTextures, one of them is active. re-render one to second.

How do I re-render one to second? Sorry I did not understand that from ur examples.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...