Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Vrally's avatar
Vrally
Protege
13 years ago

Connection between render target and distortion scale?

Hi,

While working a bit with the distortion scale implementation in my code I tried to understand the coupling between the distortion scale value and the size of the render target.

The Rift has a native resolution of 1280x800 but since we are doing barrel distortion the documentation suggests scaling up the render target to 1600x1000 (i.e. increase by 25%). But how is this value related to the distortion scale? When looking through the code in the Oculus SDK demos I see no direct connection between render target size and distortion scale. The value you get from Oculus SDK distortion scale calculation is nowhere near 25% (The actual value is about 1.71). And I understand that we get a larger value because the lenses are not positioned in the centre of the screen (lensOffset).

But how is the optimal render target size calculated? I.e. how do we know from the distortion value of 1.71 that we need a render target that is 25% larger than the native resolution?

16 Replies