LUT Sampling in React Native Skia Shader Returns Uniform Color #2617
Closed
Hello1nside
started this conversation in
General
Replies: 1 comment
-
I found a solution in the discussion: #1436 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm working on applying LUT (Lookup Table) filters to images in a React Native Expo app using @shopify/react-native-skia. However, when I attempt to sample the LUT in my shader, I'm encountering an issue where the shader consistently returns a uniform color (either orange or white), instead of applying the LUT correctly across the image.
I've tried multiple approaches, but the result is still a solid color, even when attempting to directly sample from specific UV coordinates within the LUT. Below are some details of my attempts, followed by the shader code and the results I'm seeing.
Environment:
React Native: 0.74.2
React Native Skia: 1.2.3
Expo: ^51.0.14
Problem Description:
App.tsx:
transition.ts:
Tests and Results:
Result: Uniform orange color.
Result: Uniform white color.
Result: The LUT image is rendered correctly on the screen, showing that the LUT is being loaded, but it's not properly sampled when used with color.rg as UV coordinates.
What I've Tried:
Expected Behavior:
I expect the LUT to apply color transformations to the image based on its RGB values. Instead of a uniform color, the LUT should modify the image's color channels correctly, based on the LUT's contents.
Actual Behavior:
The shader returns a uniform color (orange or white for this LUT, for other LUTs there is other colors), and the LUT doesn't seem to be sampled dynamically across the texture.
Conclusion:
It seems that the LUT texture is not being sampled properly based on the image's color.rg values. I would appreciate any insights into what might be causing this issue, or if there are any specific steps I can take to debug the LUT sampling.
Attached Files:
I have also attached the image and LUT files I am using in my project for further reference and testing:
Please feel free to use these files to replicate the issue.
Any insights or solutions are greatly appreciated!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions