Skip to content

Commit

Permalink
Further improvements to 20.4 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JujuAdams committed Nov 7, 2023
1 parent e0e5033 commit 77f5ce8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions docs/20.4/BulbMakeBitmask.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### `BulbMakeBitmask([group1], [group2], [group3], ...)`
# BulbMakeBitmask

 

`BulbMakeBitmask([group1], [group2], [group3], ...)`

**Returns:** 64-bit integer, the bitmask for the given series of boolean flags

Expand All @@ -9,4 +13,4 @@
|`[group3]`|boolean |Whether to include group 3 in the bitmask|
|`...` |boolean |*etc.* |

**Please note** that you may only have up to 64 groups when rendering via [`BulbRendererWithGroups()`](GML-Functions#bulbrendererwithgroupsambientcolour-mode-smooth-maxgroups-constructor) (and [`BulbRenderer()`](GML-Functions#bulbrendererambientcolour-mode-smooth-constructor) doesn't support groups at all).
You may only have up to 64 groups when rendering via `BulbRendererWithGroups()` (and `BulbRenderer()` doesn't support groups at all).
10 changes: 7 additions & 3 deletions docs/20.4/BulbRendererWithGroups.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### `BulbRendererWithGroups(ambientColour, mode, smooth, maxGroups)` ***constructor***
# BulbRendererWithGroups

 

`BulbRendererWithGroups(ambientColour, mode, smooth, maxGroups)` ***constructor***

**Constructor returns:** `BulbRendererWithGroups` struct

Expand All @@ -9,11 +13,11 @@
|`smooth` |boolean |Whether to render lights with texture filtering on, smoothing out the resulting image|
|`maxGroups` |integer |The maximum number of groups to consider, between 1 and 64 (inclusive) |

This function constructs a renderer very similar to [above](GML-Functions#bulbrendererambientcolour-mode-smooth-constructor), and its available methods and variables are the same and behave in the same way.
This function constructs a renderer very similar to `BulbRenderer()`, and its available methods and variables are the same and behave in the same way.

However, `BulbRendererWithGroups()` controls rendering using groups of occluders instead of treating all lights as being blocked by all occluders. What group each light and occluder is in is controlled by setting their `bitmask` member variable (see below).

?> There is a moderate performance penalty for rendering using groups. While the maximum possible number of groups is 64, try to use as few groups as possible. If you don't need groups at all or need the best possible performance, please use [`BulbRenderer()`](GML-Functions#bulbrendererambientcolour-mode-smooth-constructor) instead.
?> There is a moderate performance penalty for rendering using groups. While the maximum possible number of groups is 64, try to use as few groups as possible. If you don't need groups at all or need the best possible performance, please use `BulbRenderer() instead.

Lights and occluders can be in multiple groups at the same time. By default, all lights render occluders from all groups. Additionally, by default, occluders are added in all groups. Please edit `BULB_DEFAULT_LIGHT_BITMASK`, `BULB_DEFAULT_STATIC_BITMASK`, and `BULB_DEFAULT_DYNAMIC_BITMASK` to adjust default group behaviour (found in `__BulbConfig()`).

Expand Down

0 comments on commit 77f5ce8

Please sign in to comment.