math - What's the support for quaternions in OpenGL? -
considering modern opengl ( 3.x, 4.x, es 2 , 3, webgl ) , modern glsl, status of back upwards quaternions vs back upwards matrices ?
i'm finding more , more modern algorithms , papers of times bypass matrix representations , speak in terms of quaternions, ones lighting, still have find trace of quaternions within opengl or opengl arb extension.
what's status of quaternions khronos standard ?
nonexistent, can pass them shaders vec4 you'll have implement application of quat rotation vector yourself.
besides still need pass in vec3 translation , projection parameters.
most of time it's faster create equivalent matrix quat plus translation pls projection , pass in mat4 instead. largely because multiplying mat4 vector faster (and improve optimized in hardware) applying same rotation quat, , if plenty of mat4 wins in speed accounting effort needed transform quat mat4 representation.
opengl math matrix opengl-es quaternions
No comments:
Post a Comment