How to animate uniforms for a shader? #1042
-
It looks like uniforms don't support SkiaValues, is there a good way to animate the uniforms? Is this on the roadmap? |
Beta Was this translation helpful? Give feedback.
Answered by
wcandillon
Oct 31, 2022
Replies: 1 comment 1 reply
-
Uniforms support Skia values. Could it be that you assign the value as a map value instead of the whole property? const uniforms = useComputedValue(() => ({ time: clock.current }), [clock]);
return (<Shader source={source} uniforms={uniforms} />); I hope this help. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cdosborn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uniforms support Skia values. Could it be that you assign the value as a map value instead of the whole property?
I hope this help.