cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL Shaders and interoperability with Oculus Rift SDK ...

ckoeber
Honored Guest
Hello,

Question for OpenGL programmers: Did you have to modify your GLSL shaders to interact with Oculus Rift's SDK?

I am currently getting a black screen; I am not sure if it is because I have shader code that isn't sending the output color information to the right place.

Thank you.
1 REPLY 1

jherico
Adventurer
The 0.3.1 version of the SDK has it's own shaders. The only input you need to supply them is a texture that is the result of your render. It doesn't matter what your shaders do to render the image. They don't need to be tweaked to be compatible with the SDK.

That said, there are a number of issues with the OpenGL implementation in the currently released SDK. You can browse some other threads here to find the corrections you need to apply, mostly a matter of restoring changed state after calling ovrHmd_EndFrame(). Additionally, if you're using a Core profile, it's possible that your code simply won't work with the existing SDK, because they fail to use a Vertex Array Object in their rendering, which is required for core profiles (some cards will still render anyway, in contravention of the spec, but it depends on your card and driver).

You can also take a look at my Github copy of the SDK which has a number of the issues corrected. It requires the use of CMake to build the project artifacts.