Browse Source

Fix ShaderBlock example;

bjorn 3 years ago
parent
commit
cc886b56fd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      api/lovr/graphics/ShaderBlock/init.lua

+ 2 - 2
api/lovr/graphics/ShaderBlock/init.lua

@@ -41,10 +41,10 @@ return {
       -- Create the shader, injecting the shader code for the block
       shader = lovr.graphics.newShader(
         block:getShaderCode('ModelBlock') .. [[
-        vec4 lovrMain() {
+        vec4 position(mat4 project, mat4 transform, vec4 vertex) {
           return lovrProjection * lovrTransform * modelPositions[gl_InstanceID] * lovrVertex;
         }
-      ]])
+      ]], nil)
 
       -- Bind the block to the shader
       shader:sendBlock('ModelBlock', block)