-
-
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
Not update renderer property for ArrayCamera render #11051
Conversation
Hmm... I think this will have side effects. I'll merge and fix if I find anything. |
Thanks! |
I reverted this... I'll have a proper look tomorrow. |
Let me explain my proposal again. The current code's problem is rendering with In the following example,
because of this code in
three.js/src/renderers/WebGLRenderer.js Lines 1419 to 1427 in 433d0fe
My idea is to set viewport/scissor with Even if my idea wouldn't work, I think we should reset viewport/scissor in the end of |
I think I understand. It'll be better to have the example so I can make sure the code is robust. |
Yup, I'll make. |
No rush! |
I made jsfiddle. http://jsfiddle.net/o5rvfg9x/2/
It should render three spheres (left, right, and center) but |
This PR provides proper property update for rendering with
ArrayCamera
andenables Post Processing with VR.
If I'm right, we shouldn't update
WebGLRenderer
properties for rendering withArrayCamera
because it affects next render call. Updating state is good enough.
For example, assume we render with
EffectComposer
,first pass is render pass with
WebVRCamera(ArrayCamera)
andsecond pass is shader pass with
OrthographicCamera
.The
WebGLRenderer
viewport/scissor property update of first render pass affectsthe second shader pass so it results in rendering left/right into right side.
Current
With this change