瀏覽代碼

Add note about vec3s in ShaderBlocks;

bjorn 7 年之前
父節點
當前提交
2a456b06d9
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 1
      api/init.lua
  2. 2 0
      api/lovr/graphics/ShaderBlock/init.lua

+ 1 - 1
api/init.lua

@@ -13040,7 +13040,7 @@ return {
           constructors = {
             "lovr.graphics.newShaderBlock"
           },
-          notes = "- A Shader can use up to 8 ShaderBlocks.\n- ShaderBlocks can not contain textures.",
+          notes = "- A Shader can use up to 8 ShaderBlocks.\n- ShaderBlocks can not contain textures.\n- Some systems have bugs with `vec3` variables in ShaderBlocks.  If you run into strange bugs,\n  try switching to a `vec4` for the variable.",
           methods = {
             {
               name = "getOffset",

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

@@ -18,6 +18,8 @@ return {
   notes = [[
     - A Shader can use up to 8 ShaderBlocks.
     - ShaderBlocks can not contain textures.
+    - Some systems have bugs with `vec3` variables in ShaderBlocks.  If you run into strange bugs,
+      try switching to a `vec4` for the variable.
   ]],
   example = [=[
     function lovr.load()