c++ - GLM SIMD implementation of LookAt -



c++ - GLM SIMD implementation of LookAt -

i've problem using glm math lib simd. i've encounter problem during calculation of lookat matrix.

follow lookat functions:

force_inline_alwaysinline const glm::detail::fmat4x4simd lookat( const glm::detail::fvec4simd &eyepos, const glm::detail::fvec4simd &lookatpos, const glm::detail::fvec4simd &upvec ) { glm::detail::fvec4simd v3x, v3y, v3z; v3y = glm::normalize(upvec); v3z = glm::normalize(eyepos - lookatpos); v3x = glm::normalize(glm::cross(v3y, v3z)); v3y = glm::cross(v3z, v3x); glm::detail::fmat4x4simd m4eyeframe = glm::detail::fmat4x4simd(v3x, v3y, v3z, eyepos); homecoming m4eyeframe; }

unfortunately doesn't work well, example: if eyepos (the photographic camera position) in 0,0,-10 , lookatpos (target position) in 0,0,0 , object @ position, view work well. if move eyepos on x or y axis, model seems deformed (like stretched) or disappears if had gone outside of frustum, in real still within. note: every 4th element of fvec4simd set 1.0f

i've read post: my sse implementation of lookat doesn't work cannot utilize within fmat4x4simd because of rows columns translation, maybe need shuffle elements convert row column, don't know how in fast way. impression, maybe problem lies elsewhere.

any suggestion?

c++ opengl sse simd glm

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -