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
user defined clip plane #647
Comments
You should be able to get the WebGL context with |
I recently encountered the same problem while implementing reflective flat surfaces (aka 'mirrors' 😄 ) into three.js I successfully ported that method in three.js and here is a sample scene to show this live: http://jsfiddle.net/slayvin/PT32b/ The only remaining issue is that the renderTarget is rendered a frame behind, and I have no clue why! This causes some flickering when the camera moves too fast and when the mirror is going through other objects. Any idea on how to fix this? Do I need to implement a kind of multi-buffering method, or is it simply because I don't udpdate the camera matrix after modifying the frustum? If so, how can I do that? |
Mmmhh... I've tried setting Pretty cool though! Maybe we could abstract this into it's own object. |
Sweet. I also tried making sure the relevant matrices were current. If you are worried about lag, you have to update them before you use them. Unfortunately, it did not seem to matter when zooming quickly...
|
Hey many thanks guys!! Your suggestions made me reconsider the problem, and I noticed that there was no 'general' lag, but only flickering when the near clip plane changes (the mirror position compared to the mirrored camera position). So, you were almost there @WestLangley: it's the matrices of the mirrored camera you need to update, not the camera itself. Result: no more 'lag' : http://jsfiddle.net/slayvin/PT32b/2/ 😃
Yes, I've thought about it. It would be great to have a |
I'd like to use user defined clipping planes.
In openGL i would use:
How can I do the same with webGL?
The text was updated successfully, but these errors were encountered: