Browse Source

Tell people how to use stencil better;

bjorn 2 years ago
parent
commit
72dd4d501e

+ 2 - 2
api/init.lua

@@ -15120,7 +15120,7 @@ return {
               description = "Sets the stencil test.  Any pixels that fail the stencil test won't be drawn.  For example, setting the stencil test to `('equal', 1)` will only draw pixels that have a stencil value of 1. The stencil buffer can be modified by drawing while stencil writes are enabled with `lovr.graphics.setStencilWrite`.",
               description = "Sets the stencil test.  Any pixels that fail the stencil test won't be drawn.  For example, setting the stencil test to `('equal', 1)` will only draw pixels that have a stencil value of 1. The stencil buffer can be modified by drawing while stencil writes are enabled with `lovr.graphics.setStencilWrite`.",
               key = "Pass:setStencilTest",
               key = "Pass:setStencilTest",
               module = "lovr.graphics",
               module = "lovr.graphics",
-              notes = "The stencil test is disabled by default.",
+              notes = "The stencil test is disabled by default.\n\nSetting the stencil test requires the `Pass` to have a depth texture with the `d24s8` or `d32fs8` format (the `s` means \"stencil\").  The `t.graphics.stencil` and `t.headset.stencil` flags in `lovr.conf` can be used to request a stencil format for the default window and headset passes, respectively.",
               related = {
               related = {
                 "Pass:setStencilWrite",
                 "Pass:setStencilWrite",
                 "Pass:setDepthTest"
                 "Pass:setDepthTest"
@@ -15161,7 +15161,7 @@ return {
               description = "Sets or disables stencil writes.  When stencil writes are enabled, any pixels drawn will update the values in the stencil buffer using the `StencilAction` set.",
               description = "Sets or disables stencil writes.  When stencil writes are enabled, any pixels drawn will update the values in the stencil buffer using the `StencilAction` set.",
               key = "Pass:setStencilWrite",
               key = "Pass:setStencilWrite",
               module = "lovr.graphics",
               module = "lovr.graphics",
-              notes = "By default, stencil writes are disabled.",
+              notes = "By default, stencil writes are disabled.\n\nSetting the stencil test requires the `Pass` to have a depth texture with the `d24s8` or `d32fs8` format (the `s` means \"stencil\").  The `t.graphics.stencil` and `t.headset.stencil` flags in `lovr.conf` can be used to request a stencil format for the default window and headset passes, respectively.",
               related = {
               related = {
                 "Pass:setStencilTest",
                 "Pass:setStencilTest",
                 "Pass:setDepthTest"
                 "Pass:setDepthTest"

+ 8 - 1
api/lovr/graphics/Pass/setStencilTest.lua

@@ -34,7 +34,14 @@ return {
       returns = {}
       returns = {}
     }
     }
   },
   },
-  notes = 'The stencil test is disabled by default.',
+  notes = [[
+    The stencil test is disabled by default.
+
+    Setting the stencil test requires the `Pass` to have a depth texture with the `d24s8` or
+    `d32fs8` format (the `s` means "stencil").  The `t.graphics.stencil` and `t.headset.stencil`
+    flags in `lovr.conf` can be used to request a stencil format for the default window and headset
+    passes, respectively.
+  ]],
   related = {
   related = {
     'Pass:setStencilWrite',
     'Pass:setStencilWrite',
     'Pass:setDepthTest'
     'Pass:setDepthTest'

+ 8 - 1
api/lovr/graphics/Pass/setStencilWrite.lua

@@ -44,7 +44,14 @@ return {
       returns = {}
       returns = {}
     }
     }
   },
   },
-  notes = 'By default, stencil writes are disabled.',
+  notes = [[
+    By default, stencil writes are disabled.
+
+    Setting the stencil test requires the `Pass` to have a depth texture with the `d24s8` or
+    `d32fs8` format (the `s` means "stencil").  The `t.graphics.stencil` and `t.headset.stencil`
+    flags in `lovr.conf` can be used to request a stencil format for the default window and headset
+    passes, respectively.
+  ]],
   related = {
   related = {
     'Pass:setStencilTest',
     'Pass:setStencilTest',
     'Pass:setDepthTest'
     'Pass:setDepthTest'