我需要将过滤器直接应用于移动设备相机,但目前它给了我一个空白屏幕,我尝试了几种方法,但似乎都没有。
import { Camera } from 'expo-camera';
import { Surface, } from 'gl-react-expo';
import ImageFilters from 'react-native-gl-image-filters';
<Surface style={{
flex:1
}}>
<ImageFilters
width={Dimensions.get('window').width}
height={Dimensions.get('window').height}
temperature={10000}
sharpen={1}
hue={0.5}
blur={0.5}
>
<Node blendFunc={{ src: "one", dst: "one minus src alpha" }}
shader={shaders.YFlip}
uniforms={camera && {
t: () => camera
}}
>
<Camera ref={(c) => camera = c}
style={{ flex: 1 }}
/>
</Node>
</ImageFilters>
</Surface>