marcusfu

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. Thanks for help! First, I try to replace pixi 5.2.1, the problem still happened. Next, re-creating TextureSystem and resetting the renderer state really have no effect.... But, when I only try to binding baseTexture or "baseTexture.update()" or "baseTexture.setSize()" on every upload, It seem work! Anyway, I try to present the bug and process in detail by video and picture. It use Jsmpeg and FFmpeg trans RTMP stream to yuv data, and convert yuv to rgb texture. Refer attach code above, I use PIXI.resources.Resource to call gl.texImage2D and baseTexture format, and try to update Texture of yuv on every upload. Situation1: No bind baseTexture and call gl.texImage2D every custom updateDataMethod(setUint8Array) , only call gl.texImage2D on upload once. Result: Mesh only show one frame texture data. can't follow video stream to update texture. Situation2: Call gl.texImage2D on upload once, bind baseTexture and call gl.texImage2D every custom updateDataMethod(setUint8Array). Result: Other sprite's texture confuse refer with mesh's texture. Situation3: Only Bind baseTexture every custom updateDataMethod(setUint8Array), and call gl.texImage2D on upload once. Result: It's look good, sprite's texture and mesh's texture correct. Actually, I try to change "this.bind(this.baseTexture)" to "baseTexture.update()" or "baseTexture.setSize()", the result is same. Just like you said, It will change all updateID's , and TextureSystem wlll see that texture was changed on bind. It seem ok, thanks for help to solve that question!!
  2. Thank for answer again! Actually, I try to make video yuv to rgb in pixi.texture. After decoded video data bind to three textures(yTexture, uTexture, vTexture), pixi.shader trans to rgb values in pixi.geometry, when video decoded data keep coming, that need to update textures(yTexture, uTexture, vTexture). It's ok that run only one yuv to rgb geometry in canvas, but add other sprite, the textures confuse problem happened. attach demo code. pixi_YUVRGB_demo.zip
  3. thanks for answer. I try to use texture resource API: https://pixijs.io/examples/#/textures/gradient-resource.js It work like that: The texture resource only show one frame, upload function only run once. How update gl.texImage2D by different data? I try to bindTexture on custom data update function, but other object(sprite, geometry) that add after mesh still force to mesh's texture.
  4. Hi, I want to create a mesh with shader, and through uniforms webGL textures to shader, I'm able use pixiapp.renderer.gl.createTexture, it works. But other sprite in pixiapp(PIXI.application) stage also force to mesh's webGL Texture is webGL texture binding index confusion? (gl.TEXTURE0) maybe need to use pixi webgl abstraction? does anyone have idea? best regrads.