Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add clearDepth attribute to RenderPass #10159
This makes it possible to clear the depth buffer before a RenderPass, which is useful when trying to render overlays using a second scene. I was struggling with this limitation myself when I came across an unanswered Stack Overflow question with the exact same issue: http://stackoverflow.com/questions/40548144/multiple-scenes-rendering-using-three-renderpass
This solution works for our use case, and seems like it would be useful for at least one other person, so I figured I'd open a PR. It's very likely that there's some way to solve this using the WebGLRenderer options as is, but I haven't found it yet.