Browse Source

Texture:generateMipmaps;

bjorn 1 year ago
parent
commit
70b16ab58f
2 changed files with 4 additions and 1 deletions
  1. 1 1
      api/init.lua
  2. 3 0
      api/lovr/graphics/Texture/generateMipmaps.lua

+ 1 - 1
api/init.lua

@@ -22941,7 +22941,7 @@ return {
               description = "Regenerates mipmap levels of a texture.  This downscales pixels from the texture to progressively smaller sizes and saves them.  If the texture is drawn at a smaller scale later, the mipmaps are used, which smooths out the appearance and improves performance.",
               description = "Regenerates mipmap levels of a texture.  This downscales pixels from the texture to progressively smaller sizes and saves them.  If the texture is drawn at a smaller scale later, the mipmaps are used, which smooths out the appearance and improves performance.",
               key = "Texture:generateMipmaps",
               key = "Texture:generateMipmaps",
               module = "lovr.graphics",
               module = "lovr.graphics",
-              notes = "The texture must have been created with the `transfer` usage to mipmap it.\n\nThe texture can not be multisampled.\n\nTexture views can not currently be mipmapped.",
+              notes = "Mipmaps will automatically be regenerated for textures after rendering to them in a `Pass`. This can be disabled by rendering to a single-level texture view instead.\n\nThe texture must have been created with the `transfer` usage to mipmap it.\n\nThe texture can not be multisampled.\n\nTexture views can not currently be mipmapped.",
               related = {
               related = {
                 "Texture:setPixels",
                 "Texture:setPixels",
                 "Texture:getMipmapCount"
                 "Texture:getMipmapCount"

+ 3 - 0
api/lovr/graphics/Texture/generateMipmaps.lua

@@ -28,6 +28,9 @@ return {
     }
     }
   },
   },
   notes = [[
   notes = [[
+    Mipmaps will automatically be regenerated for textures after rendering to them in a `Pass`.
+    This can be disabled by rendering to a single-level texture view instead.
+
     The texture must have been created with the `transfer` usage to mipmap it.
     The texture must have been created with the `transfer` usage to mipmap it.
 
 
     The texture can not be multisampled.
     The texture can not be multisampled.