mirror of https://github.com/mosra/magnum.git
Browse Source
Originally it was for more convenient usage of homogeneous coordinates in shaders themselves, but it is actually not needed: * When passing three-component vector (3D position) to `vec4`, the last coordinate is implicitly set to `1`, thus there is no need to pass it explicitly in each attribute. * On the other hand, when passing three-component vector (2D position in homogeneous coordinates) to `vec3` with Z explicitly set to `1`, it still needs some swizzle magic to extend it to `vec4` gl_Position. Passing it as two-component vector results in nearly the same magic while saving precious memory.pull/7/head
7 changed files with 13 additions and 13 deletions
Loading…
Reference in new issue