WebGLRenderer: add copyFramebufferToTexture3D()#21734
WebGLRenderer: add copyFramebufferToTexture3D()#21734DavidPeicho wants to merge 5 commits intomrdoob:devfrom
Conversation
|
Any chance this gets merged before the next release cycle? ❤️ |
|
Definitely! May I ask again for also adding an example of usage though? 😇 |
|
I thought I could sneak under the example 🏴☠️ Let me add one yes 😄 |
|
Okay I went a bit crazy on the example but I am doing a simple shadow volume. It will use the Might be a good idea to take the cloud shader out maybe? I am using it here as well and we have like 3 examples with their own version. I need a slight modification here I can hide that beyond some |
|
Is this still WIP? |
|
The example isn't ready yet. If we want to merge I should maybe split that into two PRs. Important note: I will add a note in the doc as well concerning that issue. |
|
In this case let's convert it into a draft PR for now. |
|
@DavidPeicho Sorry for pushing this to the next release. I think it'd be good to have some clarity regarding ANGLE. |
|
@kenrussell Is this the same issue as #21893? |
|
@mrdoob sorry for delay replying - no, this is a different problem. It's KhronosGroup/WebGL#2558 , https://crbug.com/1131224 , and https://crbug.com/angleproject/5009 . It should be possible to work around this by using the same kind of texture everywhere - i.e., TEXTURE_2D_ARRAY for both the color and depth attachments. Is that feasible? |
|
@kenrussell Thanks for replying. The goal of this particular PR was to implement a generic method to copy from a framebuffer attachement with layers, so On a personal note (not related to Three.js), I can't use In the meantime, we can keep this PR on stall until the bug is fixed. Otherwise, I guess we could add a disclaimer in the doc saying it doesn't work with the ANGLE backend. I understand though if you don't want to do that @mrdoob and if you prefer to just wait |
|
Just coming across this - with the recent changes to renderer.copyFramebufferToTexture3D( srcPos, dstPos, shadowVolume.texture );would turn into: renderer.copyTextureToTexture( shadowRenderTarget.texture, shadowVolume.texture, box_bounds_2d, dst_pos_3d );Looking at |
Description
This PR adds support to copy from the framebuffer to a 3D texture at a given offset. This is similar to the already existing
copyFramebufferToTexture.