Skip to content

Commit b1d5fab

Browse files
committed
Add precomputed fbm optimization for animated lights
1 parent 4605f2c commit b1d5fab

File tree

15 files changed

+451
-1
lines changed

15 files changed

+451
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.0
2+
3+
- Add animated lights shader optimizations. The following animations have been optimized: Bewitching Wave, Fairy Light, Ghostly Light, Smoke Patch, Swirling Fog, Vortex
4+
15
## 0.8.3
26

37
- Update polish translations (thanks @Lioheart)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ Replaces build in SVG icon rendering with a sprite atlas. Greatly reduces the am
5353
**Custom Spritesheets**\
5454
Allows for the replacement of arbitrary textures referenced in foundry with optimized spritesheets. To create your own spritesheets to replace build-in textures, simply name the spritesheet frames like the asset path referenced in foundry, prefixed by a `#` sign. For example, if a tile in your scene references a texture in `assets/tiles/my-fancy-tile.webp`, the spritesheet frame should be named `#assets/tiles/my-fancy-tile.webp`.
5555

56+
**Optimize animated lights**\
57+
Patches the shader of certain animated lights that use fbm (fractal brownian motion) noise to use precomputed noise textures where possible. This requires each client to load a few additional textures with associated memory overhead, but in my testing this is absolytely worth it.\
58+
Only of of the textures is actually saved in a GPU compressible format as it caused extremely blocky animations otherweise. If anyone as some ideas as to why this is, please create an issue or contact me on discord. :)
59+
5660
If you create custom spritesheets, it is strongly recommended to use GPU compressible textures. Supported formats are basis_universal files (`.basis`) with ETC1 texture compression and zstandard supercompression for Foundry VTT v12 and `.ktx2` files with either ETC1 or UASTC texture format and zstandard supercompression for Foundry VTT v13.
5761
[TexturePacker](https://www.codeandweb.com/texturepacker) can be used to quickly create spritesheets and has built-in support for `.basis` files with ETC1 compression.
5862

asset-sources/noise/fbm3-1_3_5.png

22.2 MB
Loading

asset-sources/noise/fbm4-1_6_8.png

15.6 MB
Loading
7.95 MB
Loading

assets/noise/fbm3-1_3_5.avif

1010 KB
Binary file not shown.

assets/noise/fbm4-1_6_8.avif

1.62 MB
Binary file not shown.

assets/noise/fbmHQ3-1_10.basis

1.5 MB
Binary file not shown.

lang/de.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
"token-ring-spritesheet-support": {
3737
"name": "Unterstützung für Spritesheets im dynamischen Token-Ring",
3838
"hint": "Erlaubt es, Token-Grafiken mit dynamischen Ringen durch Spritesheet-Texturen zu ersetzen. Dies ist nur nötig, wenn du dynamische Token-Ringe und den Austausch von Spritesheets verwendest, um Token-Grafiken (subject textures) auszutauschen."
39+
},
40+
"precomputed-noise-textures": {
41+
"name": "Optimierte animierte Lichter",
42+
"hint": "Optimiert den Shader von animierten Lichtern (Bewitching Wave, Fairy Light, Ghostly Light, Smoke Patch, Swirling Fog, Vortex) indem vorberechnete Texturen für das FBM Rauschen verwendet werden."
3943
}
4044
}
4145
}

lang/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
"token-ring-spritesheet-support": {
3737
"name": "Dynamic Token Spritesheet Support",
3838
"hint": "Allows tokens with dynamic rings to be replaced with spritesheet textures. This is only needed if you use dynamic token rings and the spritesheet substitution feature to replace token textures."
39+
},
40+
"precomputed-noise-textures": {
41+
"name": "Optimize animated lights",
42+
"hint": "Optimizes the shader of certain animated lights (Bewitching Wave, Fairy Light, Ghostly Light, Smoke Patch, Swirling Fog, Vortex) by utilizing precomputed FBM noise textures."
3943
}
4044
}
4145
}

0 commit comments

Comments
 (0)