Menu â–¾ â–´

#15 TODOs and Features Queue

open
nobody
2018-04-12
2018-01-03
Anonymous
No

Originally created by: recp

General

  • [ ] Unit tests (In Progress) [important]
  • [ ] ARM Neon Arch (In Progress)
  • [ ] Unit tests for comparing cglm with glm results [important]
  • [ ] Unaligned operations (e.g. glm_umat4_mul)
  • [x] Extra documentation
  • [ ] Performance tests

Quaternion

  • [x] Matrix to Quaternion
  • [ ] Euler to Quaternion
  • [x] Rotate vector with quat (we already have glm_vec_rotate(vec, angle, axis))
  • [ ] Half precision float (16 bit) support
  • [x] Unit tests

Precision

  • [ ] Half precision float (16 bit)
  • [ ] Double precision float (64 bit double)

Convenient Functions

There could be inline wrapper for some functions e.g. glm_vec_crossand glm_vec_dot like glm_cross and glm_dot. Original functions must stay where they are. This is not necessary but could help to write code fast and more readable .

One another things there could be convenient functions for operations like this ( it is just example ):

/* v = v1 * v2 + v3 * v4 + v5 * v6 */
vec3 sum;
vec3 tmp, tmp2;

glm_vec_mulv(v1, v2, sum);

glm_vec_mulv(v3, v4, tmp2);
glm_vec_add(tmp2, sum, sum);

glm_vec_mulv(v5, v6, tmp2);
glm_vec_add(tmp2, sum, sum);
/* ... */

It could be something like this:

/* v = v1 * v2 + v3 * v4 + v5 * v6 */
vec3 sum;

glm_vec_mulv(v1, v2, sum);

glm_vec_muladd(v3, v4, sum);
glm_vec_muladd(v5, v6, sum);

/* ... */

this is also not necessary, just my thoughts. In short I mean convenient functions for +=, *=, -=, /=

Also any feature request, feedback or contribution are welcome. We can use this issue collect feature requests and feedbacks

Discussion

  • Anonymous

    Anonymous - 2018-01-05

    Originally posted by: recp

    Rename glm_scale1 to glm_scale_uni

     
  • Anonymous

    Anonymous - 2018-01-08

    Originally posted by: recp

    Find perpendicular vector util e.g. glm_vec_perpendicular or glm_vec_orthogonal or glm_vec_ortho, the last one seems cool!

    I found a good, fast solution, only subtraction: https://www.quora.com/How-do-I-find-a-vector-perpendicular-to-another-vector/answer/Tom-Thompson-1?srid=uEqzq

    We must add this to cglm. For rendering shadowmap this could be useful for selecting UP vector against light direction.

     
  • Anonymous

    Anonymous - 2018-01-15

    Originally posted by: recp

    Proposals for double and half precision names

    Types
    Double: vec3d vec4d mat4d
    Half: vec3h vec4h mat4h

    Unaligned Types:
    Double: uvec4d umat4d
    Half: uvec4h umat4h

    Proposals for double

    1. glm_dbl_mat4_mul
    2. glm_dmat4_mul
    3. glm_mat4d_mul
    4. glm_mat4_mul_dbl
    5. glm_mat4_muld
    6. glm_mat4_mul64
    7. glmd_mat4_mul <- looks good but there will be call verison glmcd_mat4_mul

    Proposals for half precision

    1. glm_half_mat4_mul or glm_hlf_mat4_mul
    2. glm_hmat4_mul
    3. glm_mat4h_mul
    4. glm_mat4_mul_half or glm_mat4_mul_hlf
    5. glm_mat4_mulh
    6. glm_mat4_mul16
    7. glmh_mat4_mul or glm16_mat4_mul <- looks good

    glm_lookatd or glm_dbl_lookat or glm_dlookat or glmd_lookat
    glm_lookath or glm_hlf_lookat or glm_hlookat or glmh_lookat

    We must select best name for future use, mat4 is used for example. Also there will be unaligned versions for vec4 and mat4 based functions including quaternions

    We already use glmc_ for pre-compiled functions. We could continue use this style like glmd_ or glmh_ or glm64_ or glm16_ ...

    Alternative name proposals are welcome!

     
  • Anonymous

    Anonymous - 2018-01-19

    Originally posted by: recp

    TODOs for vector:

    • glm_vec_shuffle, glm_vec4_shuffle
    • SSE3, SSE4 support for dot, cross products
    • glm_vec_muladd, glm_vec4_muladd 
    • glm_vec_hadd, glm_vec4_hadd similar to SIMD hadd, hsub
    • reflect, refract, clamp, step, smoothstep, mix
     
  • Anonymous

    Anonymous - 2018-04-02

    Originally posted by: recp

    • vec_exp
    • vec_log
    • vec_pow = exp(log(v) * p)

    especially vec4 version could use SIMD instructions.

    I want to add these functions because we could use glm_vec4_pow(srgb, 2.2f, linear) for sRGB to LINEAR or vise versa glm_vec4_pow(linear, 1.0f / 2.2f, srgb)

     

Log in to post a comment.

MongoDB Logo MongoDB