Browse Source

lovrPoseMatrix note;

bjorn 7 years ago
parent
commit
a1abb051d8
2 changed files with 9 additions and 1 deletions
  1. 2 1
      api/init.lua
  2. 7 0
      api/lovr/graphics/Animator/init.lua

File diff suppressed because it is too large
+ 2 - 1
api/init.lua


+ 7 - 0
api/lovr/graphics/Animator/init.lua

@@ -9,6 +9,13 @@ return {
   constructors = {
   constructors = {
     'lovr.graphics.newAnimator'
     'lovr.graphics.newAnimator'
   },
   },
+  notes = [[
+    Animations require that you multiply vertices by a special pose matrix in your vertex shader:
+
+        vec4 vertex(mat4 projection, mat4 transform, vec4 vertex) {
+          return projection * transform * lovrPoseMatrix * vertex;
+        }
+  ]],
   example = [[
   example = [[
     function lovr.load()
     function lovr.load()
       model = lovr.graphics.newModel('model.fbx')
       model = lovr.graphics.newModel('model.fbx')

Some files were not shown because too many files changed in this diff