Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(troika-three-utils): increase chance of program reuse in createD…
…erivedMaterial Related to #59. Different instances of the same Material class can easily give identical shader output; however we were injecting a unique id into the rewritten shader code for every instance, preventing the resulting shader code from ever being the same and causing separate compiled webgl programs for each instance. This change chooses a consistent id based on incoming derived material options, allowing the result to match when the input shader code is the same.
- Loading branch information