WebGLRenderTarget

Home Forums Programming WebGLRenderTarget

This topic contains 5 replies, has 3 voices, and was last updated by Ivan Lyubovnikov Ivan Lyubovnikov 1 day, 14 hours ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #21611
    Avatar
    vincent
    Licensee

    I work on custom a function like Replace Texture. I need to do appear camera view on a mobile phone.

    In the previous version of Verge3D (V9), we create a v3d.WebGLRenderTarget in order to render the scene in it :
    var bufferTexture = new v3d.WebGLRenderTarget( window.innerWidth, window.innerHeight, {minFilter: v3d.LinearFilter, magFilter: v3d.NearestFilter, antialias: true});
    appInstance.renderer.render(scene , camera, bufferTexture);

    But now there is a bug at the execution. (I work with Verge3D 16.0)

    • This topic was modified 2 days, 13 hours ago by Avatar vincent.
    #21619
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Hi,

    But now there is a bug at the execution.

    what error is thrown in browser console?

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #21625
    Avatar
    vincent
    Licensee
    #21627
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    try this one:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #21630
    Avatar
    vincent
    Licensee
    #21650

    Hi vincent,

    You can also try to restore the scene’s original render target after rendering into “bufferTexture”:

    From the error you posted it looks like “bufferTexture” is used in the scene on some object as a texture while still being the active render target for this scene, which isn’t alowed, but it’s difficult to tell what’s going on without knowing the actual code.

    Co-founder and lead developer at Soft8Soft.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.