Question

For a school project we need to implement the oculus rift in a previously made DX9 engine. All is going well, but I am stuck at the distortion part of implementing the oculus.

I came to the part where I need to implement my shader for the barrel distortion and for that you use 'float2' and 'float4'. I can't seem to find these types in the OVR SDK or anywhere else. This results in 'undefined identifiers'.

Does anyone know where I can find these constant types?

Thanks!

Was it helpful?

Solution

Those are HLSL (the Direct3D shader language) types. Those types won't compile in a C or C++ compiler. If you're trying to to do the distortion in a shader, then you need to be sending the shader source to the D3D shader compiler.

If you're trying to do the distortion outside of a shader, then you need to use a math library such as GLM to contain the vector types and do the math.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top