cinder / Cinder-VR

66 stars 19 forks source link

Render targets on HTC Vive too small by half #19

Open totalgee opened 7 years ago

totalgee commented 7 years ago

Hi there, I was trying Cinder-VR with the Vive, and I found it looked very low-res and aliased, compared to other OpenGL programs I've developed using OpenVR. I think the main problem is that you're only using half the recommended render resolution (horizontally). The IVRSystem::GetRecommendedRenderTargetSize() method returns 1512x1680, but you're dividing that in half (for each eye). I believe the proper interpretation of this is the resolution per eye.

So... Currently, when using Cinder-VR on my Vive, my viewports are just 756x1680 (result of mHmd->getEyeViewport(eye)). This should be 1512x1680, either using one large render target of 3024x1680 (split into half the viewport each eye), or two targets of 1512x1680 each.

Besides this bug, it would also be very nice to have a scaling factor that could be applied when Cinder-VR creates its render targets, so we can deliberately down- or up-scale the targets as desired (either for better performance or better image quality). You seem to have something like this for Oculus (mScreenPercentage), but nothing for OpenVR.

Thanks - the library is great and very easy to use!

chaoticbob commented 7 years ago

Hey there,

Thank you for the tremendous feedback. We've been aware of this issue for quite some time and are working to fix it. Part of the problem is that we're not using MSAA and as you mentioned not fully paying attention to the scale from the underlying libs. Due to some complexity in the design, there hasn't been a solid solution for getting gl::Fbo to behave in a way that's fundamentally friendly with both Vive and Rift. There's a design coming that should address this both.

Scale factor would be a great addition. The scale factor for Oculus was more obvious than the one for Vive. But now after some experience of working on it, it seems like it could be applied to both.

This issue will be updated as we go along. Thanks again!

totalgee commented 6 years ago

(A year passes... The wind blows... Crickets chirp... ;-)

Hi there, just wondering if you're still planning any updates to this Cinder block? Guess I should just (continue to) do my own thing, VR-wise. Locally I've updated to most recent OpenVR, etc. I'd be happy to contribute the above fix, or a new OpenVR library, but you said you have a "design coming"...and I don't want to step on any existing work/redesign. I notice the Oculus SDK update from @num3ric (#25) has also been idle a long time.