Quellcode durchsuchen

Add note about vec3s in ShaderBlocks;

bjorn vor 7 Jahren
Ursprung
Commit
2a456b06d9
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  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 = {
           constructors = {
             "lovr.graphics.newShaderBlock"
             "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 = {
           methods = {
             {
             {
               name = "getOffset",
               name = "getOffset",

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

@@ -18,6 +18,8 @@ return {
   notes = [[
   notes = [[
     - A Shader can use up to 8 ShaderBlocks.
     - A Shader can use up to 8 ShaderBlocks.
     - ShaderBlocks can not contain textures.
     - 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 = [=[
   example = [=[
     function lovr.load()
     function lovr.load()