Why would render textures lag the oculus and not the editor?
Hey guys, I've recently started developing with the oculus dk2 to create a first person driving simulation. I was using three cameras and three render textures for the rear view mirror and side mirrors. When the game runs with them on, the editor reads a steady 50 fps, no drops regardless of motion. looking through the oculus however it gets very choppy with low framerates. If the render textures are not active, the stats stay the same for the editor but the oculus runs smooth. Any ideas why the quality is noticeably different between editor and oculus? Or if not, any more efficient suggestions for mirrors? Thanks
Answer by Naphier · Apr 19, 2016 at 10:46 PM
50fps in the editor is probably too low in the first place. You need a fairly solid 75fps (if your monitor VSyncs at 60hz then check the attainable fps with vsync off, but turn it back on for the Oculus build). If the Oculus is getting less than 75fps it will frame skip down to 37fps or worse. You'll likely need to do a bit of optimization. Make sure the mirror camera's have appropriate fov and clipping places. You may be able to get away with a single camera and apply the render image from that to each mirror (just scale the UV and offset or add a special shader for the side mirror effects). beyond that, you'll need to work on your game's frame rate by making good use of static/dynamic batching. Or get a better rig :P
Actually, now that I have a moment to think about this, I found a problem with this answer. I was getting 50-60fps consistently regardless of the render textures on or off. It was only the oculus display that changed to a lower frame rate so it shouldn't be frame skipping because of any underlying fps numbers alone. Weird that it would effect the oculus fps but not the editor fps.
Is that with vSync on or off? If the application runs lower than 75fps then the Oculus will drop frame rate to 37. Have you actually tested the frame rate on the Oculus to tell if it is low frame rate?
Not yet, I will make sure I test the actual oculus frame rate next time I get access. Is vsync on by default or not? We didn't change it so I would assume it was on.
Answer by Jibbles · Apr 20, 2016 at 12:35 AM
Fair call. Wasn't even paying attention to the base fps level ha. Cheers for the quick response. Optimization is needed for sure, the uni computers art the greatest.