Multisampled render to texture in ios

后端 未结 2 1167
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-31 23:37

I am attempting to render to a texture in ios with multisampling enabled and then use that texture in my final output. Is this possible?

So far I have only gotten black

2条回答
  •  悲&欢浪女
    2021-02-01 00:07

    I assume you've been working from the sample on this page?

    Remove the glFramebufferTexture2D call as this may be causing the multisample render buffer to detach and hence you are have a multisampled back buffer and a single sampled render buffer. Furthermore, creating a single sampled depth buffer wil solve your issues as it will not be paired with theat single sampled render buffer.

    Edit: When do you get the error? On the one creating the render buffer? If so you may be best off trying it exactly as in the link I posted (which I assume you are working for).

    ie.

    glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER, 4, GL_RGBA8_OES, width, height);
    

提交回复
热议问题