-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
depth peel example #15312
depth peel example #15312
Conversation
4345df1
to
a7e1f52
Compare
Looking good! I would rename |
monochromatic was just left there from debugging, to see the effect different. I was thinking of adding a more complex mesh (i struggled with transparency on mechanical parts, like plates with holes) but is it needed? Ie. any other thoughts? Some comments in the code or a description on the page might also be useful. |
Actually it's fairly self explanatory. All i can think of from my naive approach is trying to write to the main buffer instead of an off screen one. I'll remove the [wip]. |
This one's really messy but it does it with less buffers, and stencil i hope might speed things up a bit. I'm struggling getting the same blending though: https://raw.githack.com/pailhead/three.js/depth-peel-stencil/examples/webgl_materials_depthpeel.html |
Any concerns on landing this? |
I'm following this too. Where is the best place to get the most up-to-date code right now, so I can try and see if I can make my own implementation? |
Most up to date code for what? |
Your example. Should I just rip the files from the githack? |
Ah yes. It’s all contained within that example file. Unfortunately the other approach doesn’t work, because threejs locks the render buffers to render targets :( So the second link won’t work for you unless you also use the build from that branch. The first one will but it’s not very fast. |
Closing in favor of #24903. |
Hi, I've seen requests for something like this pop up in forums and on stack overflow. This is my naive implementation of depth peeling. I need to do more research on this myself but this shows the basic idea of the approach. I was wondering if it could be a useful example?
https://raw.githack.com/pailhead/three.js/depth-peel-example/examples/webgl_materials_depthpeel.html
I'm also not entirely sure if i even handled the blending correctly, since it is a bit different than the default behavior, but i can't tell is it because it's missing pieces below whats being rendered.