Question regarding render target scaling from SDK Overview
Hello,
I'm working on integrating the Rift SDK into my own basic OpenGL engine.
I have the basics of stereo rendering working now; I am generating a seemingly correct projection/view matrix for each eye, and rendering the two perspectives to an OpenGL FBO/texture. That then gets rendered as-is to the main frame buffer. My initial FBO and main frame buffer FOV's resolution, etc are currently identical.
Now I'm trying to implement my GLSL lens distortion and chromatic aberration correction fragment shader. Most of what the SDK overview documentation describes makes sense, except this paragraph regarding scaling up my initial scene texture so that it will fill the screen after distortion. (This is taken from page 32 of Oculus_SDK_Overview_0.2.1):
I'm completely confused about what is meant here and how to adjust the screen size to obtain my fov? Are they just suggesting a shortcut by basing the texture fov by scaling known screen params? If anyone could explain this a bit better I'd appreciate it very much.
I'm working on integrating the Rift SDK into my own basic OpenGL engine.
I have the basics of stereo rendering working now; I am generating a seemingly correct projection/view matrix for each eye, and rendering the two perspectives to an OpenGL FBO/texture. That then gets rendered as-is to the main frame buffer. My initial FBO and main frame buffer FOV's resolution, etc are currently identical.
Now I'm trying to implement my GLSL lens distortion and chromatic aberration correction fragment shader. Most of what the SDK overview documentation describes makes sense, except this paragraph regarding scaling up my initial scene texture so that it will fill the screen after distortion. (This is taken from page 32 of Oculus_SDK_Overview_0.2.1):
Note that we compute the field of view of the distorted render target (RT), which is affected by the distortion
scale s and may not necessarily match the screen edge. Assuming that both the RT and the display have the
same aspect ratios, it is sufficient to adjust the screen size to correctly obtain fov.
I'm completely confused about what is meant here and how to adjust the screen size to obtain my fov? Are they just suggesting a shortcut by basing the texture fov by scaling known screen params? If anyone could explain this a bit better I'd appreciate it very much.
