Jump to content

RenderTexture with own renderer


DEV362
 Share

Recommended Posts

Hi, can I use own renderer for each RenderTexture? I'm trying render a video into  texture which i want to use on multiple sprites, but with WebGL renderer there are problems with rendering videotexture in some browsers. So I want to use WebGL renderer only for rendering main stage and CanvasRenderer for "prerender" videotexture in RenderTexture. Is it possible?

 

 

Link to comment
Share on other sites

If you are using a canvas renderer for the precached texture, then you don't need a render texture at all. Just have a canvas renderer, draw to it, and then create a texture out of the canvas it is drawing to.

You can then use that texture in your webgl scene.

 

var renderer = new PIXI.WebGLRenderer(...);var canvasRenderer = new PIXI.CanvasRenderer(...);var cacheSprite = new PIXI.Sprite(PIXI.Texture.fromCanvas(canvasRenderer.view));canvasRenderer.render(precachedScene);renderer.render(cacheSprite);
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...