feat(📸): importExternalTexture part 0#372
Conversation
# Conflicts: # apps/example/src/App.tsx # apps/example/src/Home.tsx # apps/example/src/Route.ts # apps/example/src/SharedTextureMemory/SharedTextureMemory.tsx # packages/webgpu/android/cpp/AndroidPlatformContext.h # packages/webgpu/apple/ApplePlatformContext.h # packages/webgpu/apple/ApplePlatformContext.mm # packages/webgpu/apple/AppleVideoPlayer.h # packages/webgpu/apple/AppleVideoPlayer.mm # packages/webgpu/cpp/rnwgpu/PlatformContext.h # packages/webgpu/cpp/rnwgpu/api/GPUDevice.h # packages/webgpu/cpp/rnwgpu/api/GPUSharedTextureMemory.cpp # packages/webgpu/cpp/rnwgpu/api/RNWebGPU.h # packages/webgpu/cpp/rnwgpu/api/VideoFrame.h # packages/webgpu/cpp/rnwgpu/api/VideoPlayer.h # packages/webgpu/src/Canvas.tsx # packages/webgpu/src/index.tsx
# Conflicts: # apps/example/ios/Podfile.lock # apps/example/package.json # apps/example/src/App.tsx # apps/example/src/Home.tsx # apps/example/src/Route.ts # yarn.lock
Replace the per-frame fromEquirectangularTexture blit with a real THREE.CubeCamera that renders a layer-1-only sky sphere wearing the worklet-updated camera feed. The reflection now picks up any scene geometry placed on layer 1, not just the panorama itself. https://claude.ai/code/session_01Sgh5mWoT9XBAYQotQFf94g
The front camera is a narrow-FOV image, not a 360° environment, so wrapping it equirectangularly produces an obviously fake "your face is the world" look. Treat the frame as a virtual screen at the viewer's location instead: a billboarded plane sized at the camera's natural 9:16 aspect that tracks the orbit camera each frame. The CubeCamera at the helmet's center bakes that plane into the cube faces, so surfaces facing the viewer pick up the user's face the way a real chrome object would, while a soft hemisphere- gradient backdrop fills the rest so grazing reflections don't fall to black. Env texture changes from 1024×512 (stretched equirect) to 540×960 (matches the rotated frame's aspect — no more distortion).
…react-native-webgpu into external-texture-min
|
Great stuff! Just to verify; does the YUV import path support full range on iOS? I think right now both full range ( That might produce wrong colors in YUV, especially noticeable in highlights or dark areas. But I might be wrong this is based on an AI summary of the PR |
|
I asked Codex to summarize support for specific pixel formats that VisionCamera can produce: Checked current main as of June 2, 2026:
Legend:
Android
iOS
|
|
Realistically speaking, you would only ever use |
|
Also I think we can import frames in formats like |
Uh oh!
There was an error while loading. Please reload this page.