Browse Source

Update Layer docs;

bjorn 11 months ago
parent
commit
dbb86dc5f4

+ 0 - 92
api/init.lua

@@ -26085,29 +26085,6 @@ return {
                 }
               }
             },
-            {
-              name = "getSharpen",
-              summary = "Get the sharpening mode of the layer.",
-              description = "Returns whether the layer is sharpened.  This will improve quality when the layer is rendered at a larger size than its texture resolution, at the cost of performance.  Sharpening is currently only supported on Quest devices.",
-              key = "Layer:getSharpen",
-              module = "lovr.headset",
-              related = {
-                "Layer:getSupersample",
-                "Layer:setSupersample"
-              },
-              variants = {
-                {
-                  arguments = {},
-                  returns = {
-                    {
-                      name = "sharpen",
-                      type = "boolean",
-                      description = "Whether the layer is sharpened."
-                    }
-                  }
-                }
-              }
-            },
             {
               name = "getSize",
               summary = "Get the size of the layer.",
@@ -26133,29 +26110,6 @@ return {
                 }
               }
             },
-            {
-              name = "getSupersample",
-              summary = "Get the supersample mode of the layer.",
-              description = "Returns whether the layer is supersampled.  This will improve quality when the layer is rendered at a smaller size than its texture resolution, at the cost of performance.  Supersampling is currently only supported on Quest devices.",
-              key = "Layer:getSupersample",
-              module = "lovr.headset",
-              related = {
-                "Layer:getSharpen",
-                "Layer:setSharpen"
-              },
-              variants = {
-                {
-                  arguments = {},
-                  returns = {
-                    {
-                      name = "supersampled",
-                      type = "boolean",
-                      description = "Whether the layer is supersampled."
-                    }
-                  }
-                }
-              }
-            },
             {
               name = "getTexture",
               summary = "Get the texture for the layer.",
@@ -26388,29 +26342,6 @@ return {
                 }
               }
             },
-            {
-              name = "setSharpen",
-              summary = "Set the sharpening mode of the layer.",
-              description = "Sets the sharpen mode for the layer.  This will improve quality when the layer is rendered at a larger size than its texture resolution, at the cost of performance.  Sharpening is currently only supported on Quest devices.",
-              key = "Layer:setSharpen",
-              module = "lovr.headset",
-              related = {
-                "Layer:getSupersample",
-                "Layer:setSupersample"
-              },
-              variants = {
-                {
-                  arguments = {
-                    {
-                      name = "sharpen",
-                      type = "boolean",
-                      description = "Whether sharpening should be enabled."
-                    }
-                  },
-                  returns = {}
-                }
-              }
-            },
             {
               name = "setSize",
               summary = "Set the size of the layer.",
@@ -26436,29 +26367,6 @@ return {
                 }
               }
             },
-            {
-              name = "setSupersample",
-              summary = "Set the supersample mode of the layer.",
-              description = "Sets the supersample mode for the layer.  This will improve quality when the layer is rendered at a smaller size than its texture resolution, at the cost of performance.  Supersampling is currently only supported on Quest devices.",
-              key = "Layer:setSupersample",
-              module = "lovr.headset",
-              related = {
-                "Layer:getSharpen",
-                "Layer:setSharpen"
-              },
-              variants = {
-                {
-                  arguments = {
-                    {
-                      name = "supersampled",
-                      type = "boolean",
-                      description = "Whether supersampling should be enabled."
-                    }
-                  },
-                  returns = {}
-                }
-              }
-            },
             {
               name = "setViewMask",
               summary = "Set the view mask of the layer.",

+ 0 - 25
api/lovr/headset/Layer/getSharpen.lua

@@ -1,25 +0,0 @@
-return {
-  summary = 'Get the sharpening mode of the layer.',
-  description = [[
-    Returns whether the layer is sharpened.  This will improve quality when the layer is rendered at
-    a larger size than its texture resolution, at the cost of performance.  Sharpening is currently
-    only supported on Quest devices.
-  ]],
-  arguments = {},
-  returns = {
-    sharpen = {
-      type = 'boolean',
-      description = 'Whether the layer is sharpened.'
-    }
-  },
-  variants = {
-    {
-      arguments = {},
-      returns = { 'sharpen' }
-    }
-  },
-  related = {
-    'Layer:getSupersample',
-    'Layer:setSupersample'
-  }
-}

+ 0 - 25
api/lovr/headset/Layer/getSupersample.lua

@@ -1,25 +0,0 @@
-return {
-  summary = 'Get the supersample mode of the layer.',
-  description = [[
-    Returns whether the layer is supersampled.  This will improve quality when the layer is rendered
-    at a smaller size than its texture resolution, at the cost of performance.  Supersampling is
-    currently only supported on Quest devices.
-  ]],
-  arguments = {},
-  returns = {
-    supersampled = {
-      type = 'boolean',
-      description = 'Whether the layer is supersampled.'
-    }
-  },
-  variants = {
-    {
-      arguments = {},
-      returns = { 'supersampled' }
-    }
-  },
-  related = {
-    'Layer:getSharpen',
-    'Layer:setSharpen'
-  }
-}

+ 0 - 25
api/lovr/headset/Layer/setSharpen.lua

@@ -1,25 +0,0 @@
-return {
-  summary = 'Set the sharpening mode of the layer.',
-  description = [[
-    Sets the sharpen mode for the layer.  This will improve quality when the layer is rendered at a
-    larger size than its texture resolution, at the cost of performance.  Sharpening is currently
-    only supported on Quest devices.
-  ]],
-  arguments = {
-    sharpen = {
-      type = 'boolean',
-      description = 'Whether sharpening should be enabled.'
-    }
-  },
-  returns = {},
-  variants = {
-    {
-      arguments = { 'sharpen' },
-      returns = {}
-    }
-  },
-  related = {
-    'Layer:getSupersample',
-    'Layer:setSupersample'
-  }
-}

+ 0 - 25
api/lovr/headset/Layer/setSupersample.lua

@@ -1,25 +0,0 @@
-return {
-  summary = 'Set the supersample mode of the layer.',
-  description = [[
-    Sets the supersample mode for the layer.  This will improve quality when the layer is rendered
-    at a smaller size than its texture resolution, at the cost of performance.  Supersampling is
-    currently only supported on Quest devices.
-  ]],
-  arguments = {
-    supersampled = {
-      type = 'boolean',
-      description = 'Whether supersampling should be enabled.'
-    }
-  },
-  returns = {},
-  variants = {
-    {
-      arguments = { 'supersampled' },
-      returns = {}
-    }
-  },
-  related = {
-    'Layer:getSharpen',
-    'Layer:setSharpen'
-  }
-}

+ 15 - 0
api/lovr/headset/newLayer.lua

@@ -14,6 +14,21 @@ return {
     height = {
       type = 'number',
       description = 'The height of the Layer texture, in pixels.'
+    },
+    options = {
+      type = 'table',
+      description = 'Optional options for the Layer.',
+      table = {
+        {
+          name = 'filter',
+          default = 'true',
+          description = [[
+            Whether the VR runtime is allowed to apply filtering effects to the Layer, such as
+            sharpening and supersampling.  This can improve text legibility and reduces "shimmering"
+            artifacts, but may reduce performance.
+          ]]
+        }
+      }
     }
   },
   returns = {