rixdeturcan Posted May 21, 2014 Share Posted May 21, 2014 Hello, I'm an user of your great webgl framework. Actually, i'm trying to reproduce some realistic environement.In order to realize an ocean, i useda grid uniformly sampled in the eye space, then projected on the world Y-plane. To do that efficiently, I precompute the border positions of the tetragon out of the shader, then I interpolate in the shader linearly using the uv coordinates. To precompute them, I use the camera transform matrix (which I invert). This is done in the preprocess of the render function (BABYLON.Scene.beforeRender) I saw that if I move the camera fastly, there is a strange sliding effect of the plane, as it was late in time.I investigated, and saw that the transform matrix used in the render is not the same that the one in the preprocess ! I've found the source : the function BABYLON.Scene.setTransformMatrix is called for each cameras after the preprocess function: There is an issue I think. To solve that, I think that we should be able to register a preprocess function for each camera, in addition to the actual global preprocess function, which does not depend on the camera. What do you think about this fix ? Cordialy Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 21, 2014 Share Posted May 21, 2014 Next version will add two new callbacks:beforeCameraRender(camera) and afterCameraRender(camera) I think this will help you I'll update the repo later today Quote Link to comment Share on other sites More sharing options...
rixdeturcan Posted May 21, 2014 Author Share Posted May 21, 2014 It's great Thank you ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.