Skip to content

Conversation

@gonnavis
Copy link
Contributor

@gonnavis gonnavis commented Apr 4, 2021

The previous PRs #21403 #21537 solved the problem of the correct depth, but because Oblique Near-Plane Clipping was turned off, another problem was introduced: if there are objects between the virtualCamera and the groundReflector, errors will be displayed.

In the past two months, I have been keep thinking about how to compensate for the depth deviation caused by Oblique Near-Plane. Although have learnt something, I still haven't fully understood and found a suitable compensation method.

But in the end, recalled that there are clipping demos in exmaples, and turned out that there is no need for complex Oblique Near-Plane algorithms at all, threejs already has global clippingPlane ( which not influence depthTexture ) and I used it instead.

before vs after
image

@gonnavis gonnavis force-pushed the SSRpassReflectorClippingPlanePr branch from 4adce79 to ec49a1e Compare April 4, 2021 19:33
@mrdoob mrdoob added this to the r128 milestone Apr 5, 2021
@mrdoob mrdoob merged commit 2bfd25c into mrdoob:dev Apr 5, 2021
@mrdoob
Copy link
Owner

mrdoob commented Apr 5, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants