-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1200: Fix issue with aggregated errors in shader display when using …
…local matrices (#1205) * Updated getDerivedValue() to return const and fixed issue with mutation in JsiImageShader node The Image Shader node was previously set up so that the local matrix was updated multiple times, aggregating errors when the transform prop was not changed. This mutation is not something we wan't so this PR changes the getDerivedValue() on props to return a readonly value - which can NOT be mutatet. Any mutations must be done by creating a copy locally and modifying it. This caused a few other props to no longer compile, and these were also updated after this change to avoid any extra mutations. I tried writing a test for this, but since it required us to control multiple render passes I was not able to get the test runner to deterministically do this correctly. Instead the Filters example has been updated with touch and state - clicking on the example should no longer cause aggregated errors in the shader. fixes #1200 * CI: Lint / Clang format * Updated after CR * Add test Co-authored-by: William Candillon <[email protected]>
- Loading branch information
1 parent
b51f0b9
commit 4ac3c16
Showing
10 changed files
with
78 additions
and
32 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters