-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Fix EffectComposer for vr mode #14274
Conversation
fbb6c12
to
f746b2d
Compare
f746b2d
to
7be36bf
Compare
|
||
context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff ); | ||
pass.scene.onAfterRender = function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe not create this function here? not sure though if it's easy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it actually seems extremely complicated, this is a tight loop though, not sure how much of a concern this should be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, good point. The function will be allocated once per frame. I'll factor it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As is it looks like it would be instantiated this.passes.length
times? I thought about it but it looked kinda complicated to carry the i
over.
@fernandojsg What do you think? |
i would LOVE to see this update! there's another PR on the subject here: #11376 |
@nbriz Thanks. I didn't see the other PR. This one makes use of the |
Closing in favor of #15840. |
With the new VR API (without VRControls / VREffect) the frame is rendered and submitted within the renderer. The current EffectComposer API is not suitable for VR use cases. This PR relies on the
onAfterRender
callback enabling postprocessing passes to access the frame before is submitted to the headset. I admit this is a bit of a contortion. I put myself at the disposal of the THREE gods to incorporate any API changes you think are appropriate.