Interface: CameraShaderBindings
Defined in: react-native/webgpu/cameraShaderBindings.ts:93
Everything a fragment shader needs to sample the live camera. Build once at setup with createCameraShaderBindings; the fields are safe to capture into the frame worklet.
Properties​
bindGroupIndex​
readonlybindGroupIndex:number
Defined in: react-native/webgpu/cameraShaderBindings.ts:111
The group index the bindings are declared at.
bindGroupLayout​
readonlybindGroupLayout:GPUBindGroupLayout
Defined in: react-native/webgpu/cameraShaderBindings.ts:107
Layout of the camera bind group; place it at bindGroupIndex in your pipeline layout.
bindingDeclarations​
readonlybindingDeclarations:string
Defined in: react-native/webgpu/cameraShaderBindings.ts:105
WGSL declaring the camera texture_external and sampler at bindGroupIndex. TypeGPU
cannot emit an external-texture binding, so prepend this to the WGSL your shader resolves to.
cameraPixelLayout​
readonlycameraPixelLayout:CameraPixelLayout
Defined in: react-native/webgpu/cameraShaderBindings.ts:100
The pixel layout the sampler decodes.
sampleCamera​
readonlysampleCamera:SampleCameraFn
Defined in: react-native/webgpu/cameraShaderBindings.ts:98
The camera sampler as a TypeGPU function — call sampleCamera(uv) from your TGSL fragment
shader. Same value as sampleCameraForPixelLayout for cameraPixelLayout.
sampler​
readonlysampler:GPUSampler
Defined in: react-native/webgpu/cameraShaderBindings.ts:109
The linear-filtering sampler bound at binding 1.