|
@@ -14543,7 +14543,7 @@ return {
|
|
|
name = "getPass",
|
|
|
tag = "graphics-objects",
|
|
|
summary = "Get a temporary Pass.",
|
|
|
- description = "Creates and returns a Pass object, which is used to record commands for the GPU. Commands can be recorded by calling functions on the Pass. After recording a set of passes, they can be submitted for the GPU to process using `lovr.graphics.submit`.\n\nPass objects are **temporary** and only exist for a single frame. Once `lovr.graphics.submit` is called, any passes that were created during that frame become **invalid**. Each frame, a new set of passes must be created and recorded. LÖVR tries to detect if you use a pass after it's invalid, but this error checking is not 100% accurate at the moment.\n\nThere are 3 types of passes. Each type can record a specific type of command:\n\n- `render` passes render graphics to textures. The `lovr.draw` callback receives a render pass\n as an argument.\n- `compute` passes run compute shaders.\n- `transfer` passes can transfer data to/from GPU objects, like `Buffer` and `Texture`.",
|
|
|
+ description = "Creates and returns a Pass object, which is used to record commands for the GPU. Commands can be recorded by calling functions on the Pass. After recording a set of passes, they can be submitted for the GPU to process using `lovr.graphics.submit`.\n\nPass objects are **temporary** and only exist for a single frame. Once `lovr.graphics.submit` is called to end the frame, any passes that were created during that frame become **invalid**. Each frame, a new set of passes must be created and recorded. LÖVR tries to detect if you use a pass after it's invalid, but this error checking is not 100% accurate at the moment.\n\nThere are 3 types of passes. Each type can record a specific type of command:\n\n- `render` passes render graphics to textures. The `lovr.draw` callback receives a render pass\n as an argument.\n- `compute` passes run compute shaders.\n- `transfer` passes can transfer data to/from GPU objects, like `Buffer` and `Texture`.",
|
|
|
key = "lovr.graphics.getPass",
|
|
|
module = "lovr.graphics",
|
|
|
notes = "Fun facts about render passes:\n\n- Textures must have the same dimensions, layer counts, and sample counts.\n- Textures must have been created with the `render` `TextureUsage`.\n- If `mipmap` is true, then any textures with mipmaps must have the `transfer` `TextureUsage`.\n- It's okay to have zero color textures, but in this case there must be a depth texture.\n- Setting `clear` to `false` for textures is usually very slow on mobile GPUs.\n\nFor `compute` and `transfer` passes, all of the commands in the pass act as though they run in parallel. This means that writing to the same element of a buffer twice, or writing to it and reading from it again is not guaranteed to work properly on all GPUs. LÖVR is not currently able to check for this. If compute or transfers need to be sequenced, multiple passes should be used. It is, however, completely fine to read and write to non-overlapping regions of the same buffer or texture.",
|
|
@@ -14629,7 +14629,7 @@ return {
|
|
|
{
|
|
|
name = "clear",
|
|
|
type = "*",
|
|
|
- description = "How to clear the color textures at the beginning of the pass."
|
|
|
+ description = "How to clear the color textures at the beginning of the pass. If this is a boolean or a color, that value will be used for all color textures. It can also be a table of colors or booleans, one for each color texture. Colors may be provided as `Vec3`, `Vec4`, hexcodes, or tables of numbers. Note that tables of hexcode colors are ambiguous and therefore unsupported. When using a boolean, `true` means to do a \"fast clear\" that clears the texture to random data, and `false` means to not clear at all and instead load the texture's existing pixels."
|
|
|
},
|
|
|
{
|
|
|
name = "samples",
|