-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description:
Currently, react-three-fiber supports React Native via @react-three/fiber/native using expo-gl for OpenGL rendering. However, there is no built-in way to extract textures or video frames from image/video sources for use as textures in React Native. Support for texture extraction and frame access is currently only available on the web platform.
Adding texture extraction support for images and videos in React Native would enable advanced use cases such as:
Using decoded video frames as textures directly in 3D scenes.
Sharing video/image textures efficiently with native GPU APIs for real-time compositing.
Bridging between React Native Skia (or other image/video processing libraries) and Three.js/react-three-fiber for seamless multimedia and 3D rendering integration.
Proposed API/Implementation Ideas:
Provide an API or hook to extract GPU texture handles or raw frame buffers from image/video sources in React Native.
Integrate with or leverage existing OpenGL contexts managed by expo-gl to expose textures usable by Three.js materials.
Enable texture updating for video textures on React Native similar to web's VideoTexture.
Motivation:
This feature would empower React Native developers building complex multimedia apps combining 3D graphics, video processing, and real-time effects using react-three-fiber and related libraries, removing a current limitation on React Native texture usage.