Texture renderer and particle alignment

I am using render to texture to create a missile cam. (like TestCameraMan).

I render the whole scene to the texture.

Now when the missile cam is active, the particles get aligned to the texture renderer and this is visible to the main camera as well.



You can see what i mean if you watch the asteroid trail in the movie:

particle alignment



Something similar happens with the LensFlare effect also.

Does anyone know how to avoid such side effects when using a texture renderer?

I don't know how you are doing this, but perhaps you could do the render to texture in the update thread of the main scene, and re-update the particles after the RTT has finished to make them realign to the main camera without its temporal alignment to RTT being shown in the main oneā€¦ (I just said something that I bet is impossible to comprehend  :P)

hehe, well the problem with the particles is gone if i simply move the texture renderer into the update method, but then i have problems with the skybox, since i would need to move it and call updateGeometricState twice on it, which is usually a bad idea i guess.

Well, since you really need the skybox to be in both places for rendering twice, I guess there is no way to avoid that.  :wink: