Three.js: PointerLockControls somehow change the position of stencil

203 views
Skip to first unread message

Szenia Zadvornykh

unread,
Mar 5, 2014, 8:05:02 AM3/5/14
to webgl-d...@googlegroups.com

Hello.

I'm using the stencil buffer to composite two THREE.js Scenes over each other. This works, but when I try to use PointerLockControls, moving the camera (using mouse or keyboard) somehow causes the stenciled part of the view to be moved/shifted. It seems to lag behind the camera position.

I've tried other controls (Trackball, Orbit), and this issue does not occur when using those.

Something seems to be clashing, but I have no idea where to look.

The PointerLock code is copied straight from the examples.

Here's a fiddle: http://jsfiddle.net/g8EWG/

If you move from left to right, or just look around, the shift is quite noticeable.

Any help would be greatly appreciated.

Paul Lewis

unread,
Mar 5, 2014, 10:58:38 AM3/5/14
to webgl-d...@googlegroups.com
Hey Szenia,

Someone here might be able to help you, but in my experience you'll likely find more help over on Stack Overflow. There's a dedicated tag for Three.js and as far as I know there are many people there who actively track it.

Thanks,
Paul


--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Kenneth Russell

unread,
Mar 5, 2014, 6:45:43 PM3/5/14
to webgl-d...@googlegroups.com
I can reproduce the shifting behavior here. It's odd, and pretty disconcerting.

For debugging purposes, could you please make your Fiddle work in
Firefox and Safari? I tried Firefox Nightly and current Safari with
WebGL enabled, and the pointer lock code didn't work in either.

Thanks,

-Ken
Reply all
Reply to author
Forward
0 new messages