CutCodeDown

General Technology => General Programming => Topic started by: Jason Knight on 19 Nov 2019, 07:23:03 pm

Title: Any openGL / Vulkan folks know about perspectives?
Post by: Jason Knight on 19 Nov 2019, 07:23:03 pm
I'm once again working on doing 360 degree projections in a 6:1 aspect across the top of the screen. The best way seems to be arctangent, but that means I can't use any of the native perspective calculations.

This means all my vector calculations can't seem to be done on the GPU in an efficient manner, making the game in question be painfully tied to the CPU. I mean I could try leveraging shaders, but sending the math to the GPU and then back to the CPU to send to the CPU again seems... bad.

Is there any way anyone's aware of to simply tell either OpenGL or Vulkan to widen the FOV to a 360x60 perspective, or is the Z divide simply so ingrained in the perspective map that it just can't do it.

Side note, I hate matrix math. How anyone can think that 64 multiplies of 32 values can be more efficient than two multiply, two divide, and two add/subtracts of six values utterly escapes me.... much less everyone feeling it was so much better a way they ended up throwing silicon at it.

But again, I do my 3d math using atan2 so...