-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multisampled framebuffer support #115
Comments
Question about pex-context syntax though : is it e.g. webgpu
Which would suggest But the thing is we don’t expose fbos…we just have passes...so maybe it’s actually ctx.pass({
color: [ colorTexture ],
numSamples: 16 //auto allocate render buffer matching texture size, blit and resolve on pass end
}} A bit automagic but it’s not like we blit fbos left and right outside of this single usecase ever. Or even better: ctx.pass({
//auto allocate render buffer matching texture size, blit and resolve on pass end
color: [ { texture: colorTexture, numSamples: 16 } ]
}} |
Live example here https://codesandbox.io/s/webgl-multi-sampled-mrt-fbos-1vhkif |
mrdoob/three.js#23300 (comment)
|
Spotted this from the three issue tracker. If you need a more complete example as far as reviews made in three, see this gist which forgoes temporary FBO attachments when blitting and instead disassembles/reconstructs attachments https://gist.github.com/CodyJasonBennett/edbc4372d3c9a921ebc3e46cb5899ba8. This is less clean, but much more memory efficient. Regarding the API, blit can copy any frame buffer -- whether that be user-created or native to the underlying canvas implementation. There might be a consideration for how one would copy to/from the canvas with this API. This is useful for where you might want to sample depth from a forward pass, often done in hybrid/forward+ rendering setups. A constraint in WebGPU is that the mesh pipeline would also be multi-sampled, so this would not be isolated to the render passes. I'm not very familiar with Pex's internals, but this can be tricky to deal with from a design perspective. |
- ctx: add maxSamples - texture: add storage - framebuffer: add gl.RENDERBUFFER as attachment - renderbuffer: add msaa options #115
There is also in issue the blitFramebuffer can copy only one renderbuffer at the time although (manually) fixable. That's another vote for hiding complexity inside pex-context
|
Is available in WebGL 2
Example usage renderbufferStorageMultisample + blitframebuffer: https://stackoverflow.com/a/55976760/1527470
The text was updated successfully, but these errors were encountered: