Skip to content

Commit 74f22b4

Browse files
committed
tracking 9.2; bit packing links
1 parent a1f0ebf commit 74f22b4

File tree

1 file changed

+8
-1
lines changed
  • articles/tutorials/advanced/2d_shaders/09_shadows_effect

1 file changed

+8
-1
lines changed

articles/tutorials/advanced/2d_shaders/09_shadows_effect/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,14 @@ When you run the game, you will see a totally blank game (other than the GUI). T
220220
| :-----------------------------------------------------------------: |
221221
| **Figure 9-6: A blank shadow buffer** |
222222

223-
We cannot implement the vertex shader theory until we can pack the `(B-A)` vector into the `Color` argument for the `SpriteBatch`. For the sake of brevity, we will skip over the derivation of these functions. If you would like to know more, research bit-packing.
223+
We cannot implement the vertex shader theory until we can pack the `(B-A)` vector into the `Color` argument for the `SpriteBatch`. We will use a technique called _bit-packing_. For the sake of brevity, we will skip over the derivation of these functions.
224+
225+
> [!tip]
226+
> _Bit-packing_ is a broad category of algorithms that change the underlaying bit representation of some variable. The most basic idea is that all of your variables are just _bits_, and its up to you how you want to arrange them. To learn more, check out the following articles,
227+
>
228+
> 1. [Wikipedia article on Bit Operations](https://en.wikipedia.org/wiki/Bitwise_operation)
229+
> 2. [A quick overview from Cornell](https://www.cs.cornell.edu/courses/cs3410/2024fa/notes/bitpack.html)
230+
> 3. [The Art of Packing Data](https://www.elopezr.com/the-art-of-packing-data/)
224231
225232
1. Add this function to your `PointLight` class:
226233

0 commit comments

Comments
 (0)