Live scene optics — WebGPU preview v5 Look through a spherical glass lens at actual, current Unity mesh geometry. Moving a registered object, its animated bones, the lens or MainCamera changes the refracted view every frame. No photograph or secondary camera is used. Register objects that are already loaded: await setOpticalObjects(["penguin", "backdrop"]); await createOpticalLens("glass", 0, 4, 0, 1, 1.5, 1); Move/change the lens: name, x, y, z, radius, refractive index, rays per pixel. await setOpticalLens("glass", 0.3, 4, 0, 1, 1.5, 4); await removeOpticalLens("glass"); var status = await getLiveOpticsState(); Use existing load() for CS objects, and wait until loading finishes before registration. setOpticalObjects REPLACES the optical geometry selection; it does not load, duplicate, freeze or change the physics of those objects. Object position/rotation and animation continue through normal CS commands. clearRun/clearCode/clearGPUInstances also remove optical lenses and registration. Keep registration and lens setup in the saved editor code for restoration. Quality: 1 or 4 primary rays per displayed lens pixel, selected by the last argument. Each ray traces sphere entry/exit, reflection and transmission against the registered geometry. Four averages subpixel samples and costs more GPU work. Use a compact quality control and Apply button. Changing a slider only selects the next value; Apply sends setOpticalLens. This is separate from the number of visible diagram rays in drawOpticalRays. The live lens is display-resolution, not the 128-pixel source-image demonstration. Material textures are resampled to 256x256 at registration. No photographic source URL is required. Current scope: perspective MainCamera outside the lens, spherical homogeneous glass, Snell refraction, exact unpolarized Fresnel at boundaries and up to eight internal reflections for TIR. Ordinary partial internal-reflection branches are not accumulated; this is not a full light transport solver. No diffraction, dispersion, caustic illumination or coupled multiple lenses. One lens per line of sight. The lens is a visual surface, not a Rigidbody or collision object. Registered opaque MeshFilter and SkinnedMeshRenderer geometry: up to32 named roots,64 renderers,100000 triangles,64 materials. Static meshes must be readable; unsupported geometry produces an error, never a screenshot fallback. Terrain, particles and unregistered meshes are not traced. Misses use ambient lighting. Shading uses base color/texture, the main directional light and ambient SH; not all URP material effects, shadows, transparency or normal maps are reproduced. GPU traverses triangle BVHs and shades rays; CPU supplies current transforms. Skinned meshes are baked/refitted on CPU each frame, so this is not CPU-free. Inspect performance with the actual registered models before increasing quality. For a live lens experiment use these v5 functions. The older renderOpticalImage and viewOpticalImage take a FLAT SOURCE PICTURE and are separate diagnostic/ projection tools. Do not substitute them for looking at a live Unity object. Capturing the live result or projecting it onto a measurement screen is a useful additional output; a general live-geometry screen projection is not yet exposed.