Skip to content

v2.9.0

Compare
Choose a tag to compare
@wouterlucas wouterlucas released this 15 Jan 11:18
· 22 commits to main since this release

What's Changed

Feature: Texture Throttling πŸš€πŸŽ¨

Lightning 2.0 introduced the concept of "throttling" texture source creation (and inherently texture creation itself). This was designed to reduce strain on devices with limited pipelines for uploading data from the CPU to the GPU, as well as to limit the number of network requests per frame.

Prior to this feature, L3 would download texture sources and create GPU textures at the end of the rendering pipeline without any mechanism to control how many textures were created at once. In L3 2.8.0 and earlier, if you created 10k nodes, the system would attempt to spawn all 10k nodes in a single frame. While this might work smoothly on desktop Chrome devices with abundant resources, it quickly becomes a bottleneck on embedded devices with limited resources and much lower bus speeds/bandwidth.

Texture throttling introduces a queueing mechanism to regulate the number of texture sources being created/downloaded and textures being uploaded to the GPU. By default, this is set to 0, meaning the entire queue will be processed at once. This value can and should be configured per device or deployment by the consumer of the renderer for optimal performance. πŸ› οΈπŸŽ›οΈ

Related PRs:

Compatibility Changes πŸ”„πŸŒ

Lightning 3 faced some shortcomings on Chrome v38 due to incomplete ImageData implementations in the browser, issues with Uint8ClampedArray, and differences in the createImageBitmap signature across Chrome versions v51/52/54. πŸ–₯️🧩

The updates below resolve compatibility with Chrome v38 for color textures πŸ–ŒοΈπŸŽ¨ and introduce a createImageBitmap fingerprinting mechanism to ensure the most optimal path is used. πŸ› οΈβš‘

Other changes

Fixes

Features

Full Changelog: v2.8.0...v2.9.0