Dynamic resolution: Camera.rect.x and y VS "Scale Render"
SDK 0.4.2 beta
Hi there,
I implemented some kind of a dynamic resolution script that adjusts the "resolution" of the two eye cameras.
First I wanted to do this via "Scale Render" of OVRCameraController, which didn't work at all. In my case Scale Render DID reduce resolution, but by rendering a smaller rectangle of the original rect AND also not even the center of the original rect, but the bottom left corner. I Don't know if this behavior is intended, but I at least couldn't make sense of it or somehow "recenter and zoom out" to keep the same view (see screenshots).
http://www.fierythings.com/games/Gooze/GoozeDemo_ScaleRender.jpg
BUT, what I came across was that adjusting the rect.x and rect.y properties of the two cameras seemed to have the effect I wanted. I must say, I have NO clue why the position of these viewports is supposed to adjust the resolution of the cameras, but I'm guessing it has something to do with how the unity integration renders to rendertextures and then combines everything together again.
So in my case dynamically pushing the cameras' rect.x/y values towards 1.0 reduces resolution and at 0.0 you basically have the original resolution. I used a threshold value for the FPS, so my script always tries to aim for the perfect balance of resolution and quality, though I also limited it to 0.5, so the resolution wouldn't drop beyond a certain amount. And it only performs a resolution change every 0.5s, so you wouldn't loose too many FPS because of the overhead. This seems to work quite well and the quality difference is almost not visible at all.
Well I wanted to share this with you guys. Maybe someone else has some opinion on this or made different experiences? Also I don't know if at some point my solution is going to break because of SDK changes?
Cheers
Hi there,
I implemented some kind of a dynamic resolution script that adjusts the "resolution" of the two eye cameras.
First I wanted to do this via "Scale Render" of OVRCameraController, which didn't work at all. In my case Scale Render DID reduce resolution, but by rendering a smaller rectangle of the original rect AND also not even the center of the original rect, but the bottom left corner. I Don't know if this behavior is intended, but I at least couldn't make sense of it or somehow "recenter and zoom out" to keep the same view (see screenshots).
http://www.fierythings.com/games/Gooze/GoozeDemo_ScaleRender.jpg
BUT, what I came across was that adjusting the rect.x and rect.y properties of the two cameras seemed to have the effect I wanted. I must say, I have NO clue why the position of these viewports is supposed to adjust the resolution of the cameras, but I'm guessing it has something to do with how the unity integration renders to rendertextures and then combines everything together again.
So in my case dynamically pushing the cameras' rect.x/y values towards 1.0 reduces resolution and at 0.0 you basically have the original resolution. I used a threshold value for the FPS, so my script always tries to aim for the perfect balance of resolution and quality, though I also limited it to 0.5, so the resolution wouldn't drop beyond a certain amount. And it only performs a resolution change every 0.5s, so you wouldn't loose too many FPS because of the overhead. This seems to work quite well and the quality difference is almost not visible at all.
Well I wanted to share this with you guys. Maybe someone else has some opinion on this or made different experiences? Also I don't know if at some point my solution is going to break because of SDK changes?
Cheers
