hyperionlord Posted June 19, 2014 Share Posted June 19, 2014 Hello, there, I am currently developing a little Three.js web-game (just for fun), its a 3d sort of game where you will eventually have to run around and shoot stuff. I`m working on the "world" bit of the game at the moment, which is some sort of blocky world. I've been working on this by myself for the past month or so, but run into a little problem that I simply don't have a clue how to fix, and was hoping someone else had run into the issue before, or could diagnose the fix. its a problem in the rendering of the scenes, basically I have two Three.js scenes, one for the background (stars, sun, sky etc) and one for block world in the game, they are rendered one after another using a slightly hacked version of the EffectComposer to layer one rendered scene on top the other. The issue i`m having is that for whatever unknown reason the cloud / sky layer scene appears to be rendering "one frame behind", i.e. if you move the mouse quickly, you can see that it takes the background one frame to catch up with the foreground. i've investigated all sorts of potential causes, such as the camera not being updated in time, or half way between the scenes, but so far, I've not found a solution. If someone else has ran into the problem and knows the answer, or just wants to be adventurous and look at my source code (put your special javascript noob filter glasses on first though) that would be awesome. The 'game' is currently located at hyperioncube.com/test only works in chrome and firefox for the moment, and for some reason there is another bug with the pointer lock that means that sometimes pointer lock fails, and you cannot move. I've seen the exact same issue in other games as well, such as helloRun, so that one is less annoying than the sky thing. Oh yeah, i'm constantly working on it, usually during the evenings, so if you go to the page and its all completely broken, don't be surprised! Quote Link to comment Share on other sites More sharing options...
hyperionlord Posted June 22, 2014 Author Share Posted June 22, 2014 never mind, I figured it out this weekend (sort of).. I just re-wrote the EffectComposer so it does not have a read and write buffer, just a writebuffer, and got rid of the needsSwap thing as well. This will certainly be more than adequate for what I wish to do with it anyway! 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.