fix(📷): support for external texture#359
Draft
wcandillon wants to merge 37 commits into
Draft
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
Contributor
|
fire!!! |
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).
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
Resolved the merge conflicts and merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.