layershift 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/components/layershift.js +1782 -653
- package/dist/npm/layershift.es.js +5212 -2583
- package/dist/types/components/layershift/layershift-element.d.ts +10 -8
- package/dist/types/components/layershift/layershift-element.d.ts.map +1 -1
- package/dist/types/components/layershift/lifecycle.d.ts +77 -0
- package/dist/types/components/layershift/lifecycle.d.ts.map +1 -0
- package/dist/types/components/layershift/portal-element.d.ts +10 -8
- package/dist/types/components/layershift/portal-element.d.ts.map +1 -1
- package/dist/types/components/layershift/types.d.ts +8 -0
- package/dist/types/components/layershift/types.d.ts.map +1 -1
- package/dist/types/gpu-backend.d.ts +37 -0
- package/dist/types/gpu-backend.d.ts.map +1 -0
- package/dist/types/jfa-distance-field.d.ts +78 -0
- package/dist/types/jfa-distance-field.d.ts.map +1 -0
- package/dist/types/parallax-renderer-webgpu.d.ts +103 -0
- package/dist/types/parallax-renderer-webgpu.d.ts.map +1 -0
- package/dist/types/parallax-renderer.d.ts +54 -91
- package/dist/types/parallax-renderer.d.ts.map +1 -1
- package/dist/types/portal-renderer-webgpu.d.ts +199 -0
- package/dist/types/portal-renderer-webgpu.d.ts.map +1 -0
- package/dist/types/portal-renderer.d.ts +64 -65
- package/dist/types/portal-renderer.d.ts.map +1 -1
- package/dist/types/precomputed-depth.d.ts +9 -51
- package/dist/types/precomputed-depth.d.ts.map +1 -1
- package/dist/types/quality.d.ts +95 -0
- package/dist/types/quality.d.ts.map +1 -0
- package/dist/types/render-pass-webgpu.d.ts +76 -0
- package/dist/types/render-pass-webgpu.d.ts.map +1 -0
- package/dist/types/render-pass.d.ts +171 -0
- package/dist/types/render-pass.d.ts.map +1 -0
- package/dist/types/renderer-base.d.ts +124 -0
- package/dist/types/renderer-base.d.ts.map +1 -0
- package/dist/types/webgl-utils.d.ts +29 -0
- package/dist/types/webgl-utils.d.ts.map +1 -0
- package/dist/types/webgpu-utils.d.ts +42 -0
- package/dist/types/webgpu-utils.d.ts.map +1 -0
- package/package.json +38 -4
|
@@ -7,40 +7,46 @@
|
|
|
7
7
|
* and current mouse/gyro input, creating a continuous parallax effect
|
|
8
8
|
* with no discrete layer banding.
|
|
9
9
|
*
|
|
10
|
-
* ##
|
|
10
|
+
* ## Multi-pass architecture
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* The renderer uses a pass-based pipeline where each render pass is a
|
|
13
|
+
* self-contained unit with its own shader program and uniform cache,
|
|
14
|
+
* sharing a single fullscreen quad VAO and depth textures:
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* This is copied into a single-channel R8 texture on the GPU.
|
|
16
|
+
* 1. **Bilateral filter pass** — edge-preserving depth smoothing.
|
|
17
|
+
* Reads raw depth (UNIT 2), writes filtered depth (UNIT 1) via FBO.
|
|
18
|
+
* Runs at RVFC rate (~5fps, only when depth data changes).
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* 2. **Parallax pass** — per-pixel depth-based displacement.
|
|
21
|
+
* Reads video (UNIT 0) + filtered depth (UNIT 1), renders to screen.
|
|
22
|
+
* Runs at RAF rate (60-120fps).
|
|
22
23
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* Near objects (depth ≈ 0) move more; far objects (depth ≈ 1) less.
|
|
27
|
-
*
|
|
28
|
-
* 5. When POM is enabled, the shader ray-marches through the depth
|
|
29
|
-
* field to find the correct surface intersection, producing
|
|
30
|
-
* self-occlusion (near objects cover far objects behind them).
|
|
24
|
+
* Each pass is created by a factory function and conforms to a minimal
|
|
25
|
+
* interface. Adding a new post-processing pass requires only a new
|
|
26
|
+
* factory function and wiring it into the render loop.
|
|
31
27
|
*
|
|
32
28
|
* ## Texture memory
|
|
33
29
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
30
|
+
* 3 textures total: 1 video (RGBA), 1 raw depth (R8), 1 filtered depth (R8).
|
|
31
|
+
* The raw depth texture is uploaded from CPU when depth changes (~5fps).
|
|
32
|
+
* The filtered depth texture is rendered via FBO bilateral filter pass.
|
|
36
33
|
*/
|
|
37
|
-
import type {
|
|
34
|
+
import type { QualityTier } from './quality';
|
|
35
|
+
import { RendererBase } from './renderer-base';
|
|
38
36
|
/** Configuration subset relevant to the parallax renderer. */
|
|
39
37
|
export interface ParallaxRendererConfig {
|
|
40
38
|
parallaxStrength: number;
|
|
41
39
|
pomEnabled: boolean;
|
|
42
40
|
pomSteps: number;
|
|
43
41
|
overscanPadding: number;
|
|
42
|
+
/**
|
|
43
|
+
* Adaptive quality tier. Controls render resolution, depth resolution,
|
|
44
|
+
* sample counts, and bilateral kernel size.
|
|
45
|
+
* - 'auto' — probe device capabilities and classify automatically.
|
|
46
|
+
* - 'high' / 'medium' / 'low' — use the specified tier directly.
|
|
47
|
+
* - undefined — defaults to 'auto'.
|
|
48
|
+
*/
|
|
49
|
+
quality?: 'auto' | QualityTier;
|
|
44
50
|
/**
|
|
45
51
|
* Depth-adaptive shader parameters.
|
|
46
52
|
* When omitted, calibrated defaults matching the current hardcoded values
|
|
@@ -52,39 +58,15 @@ export interface ParallaxRendererConfig {
|
|
|
52
58
|
dofStart?: number;
|
|
53
59
|
dofStrength?: number;
|
|
54
60
|
}
|
|
55
|
-
export declare class ParallaxRenderer {
|
|
56
|
-
/** Debounce delay for resize events to avoid layout thrashing. */
|
|
57
|
-
private static readonly RESIZE_DEBOUNCE_MS;
|
|
58
|
-
/** Compile-time upper bound for the POM for-loop in GLSL. */
|
|
59
|
-
private static readonly MAX_POM_STEPS;
|
|
60
|
-
private readonly canvas;
|
|
61
|
+
export declare class ParallaxRenderer extends RendererBase {
|
|
61
62
|
private gl;
|
|
62
|
-
private
|
|
63
|
-
private
|
|
64
|
-
private
|
|
65
|
-
private
|
|
66
|
-
private
|
|
67
|
-
private readonly
|
|
68
|
-
private
|
|
69
|
-
private depthHeight;
|
|
70
|
-
private videoAspect;
|
|
71
|
-
private readDepth;
|
|
72
|
-
private readInput;
|
|
73
|
-
private playbackVideo;
|
|
74
|
-
/**
|
|
75
|
-
* Optional callback invoked on each new video frame (from RVFC).
|
|
76
|
-
* The Web Component uses this to dispatch the 'layershift-parallax:frame' event.
|
|
77
|
-
*/
|
|
78
|
-
private onVideoFrame;
|
|
79
|
-
private animationFrameHandle;
|
|
80
|
-
/** requestVideoFrameCallback handle (0 = inactive). */
|
|
81
|
-
private rvfcHandle;
|
|
82
|
-
/** Whether RVFC is supported on the current video element. */
|
|
83
|
-
private rvfcSupported;
|
|
84
|
-
private resizeObserver;
|
|
85
|
-
private resizeTimer;
|
|
86
|
-
private uvOffset;
|
|
87
|
-
private uvScale;
|
|
63
|
+
private quadVao;
|
|
64
|
+
private bilateralPass;
|
|
65
|
+
private parallaxPass;
|
|
66
|
+
private readonly textures;
|
|
67
|
+
private readonly videoSlot;
|
|
68
|
+
private readonly filteredDepthSlot;
|
|
69
|
+
private readonly rawDepthSlot;
|
|
88
70
|
/** Resolved config with all optional shader params filled from defaults. */
|
|
89
71
|
private readonly config;
|
|
90
72
|
/**
|
|
@@ -97,8 +79,8 @@ export declare class ParallaxRenderer {
|
|
|
97
79
|
*/
|
|
98
80
|
constructor(parent: HTMLElement, config: ParallaxRendererConfig);
|
|
99
81
|
/**
|
|
100
|
-
* Set up the scene: create video texture, depth
|
|
101
|
-
* static shader uniforms.
|
|
82
|
+
* Set up the scene: create video texture, depth textures + FBO, and
|
|
83
|
+
* set static shader uniforms.
|
|
102
84
|
*
|
|
103
85
|
* Call this once after the video element and depth data are loaded.
|
|
104
86
|
*
|
|
@@ -109,31 +91,12 @@ export declare class ParallaxRenderer {
|
|
|
109
91
|
*/
|
|
110
92
|
initialize(video: HTMLVideoElement, depthWidth: number, depthHeight: number): void;
|
|
111
93
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* When `requestVideoFrameCallback` is available, two loops run:
|
|
115
|
-
* 1. RVFC loop — fires once per new video frame, handles depth update.
|
|
116
|
-
* 2. RAF loop — fires at display refresh rate, handles input + render.
|
|
94
|
+
* Create render passes and shared fullscreen quad VAO.
|
|
117
95
|
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
96
|
+
* Each pass is a self-contained unit with its own program and uniform
|
|
97
|
+
* cache. They share a single VAO for the fullscreen quad geometry.
|
|
120
98
|
*/
|
|
121
|
-
start(video: HTMLVideoElement, readDepth: (timeSec: number) => Uint8Array, readInput: () => ParallaxInput, onVideoFrame?: (currentTime: number, frameNumber: number) => void): void;
|
|
122
|
-
/** Stop both render loops and release callbacks. */
|
|
123
|
-
stop(): void;
|
|
124
|
-
/** Stop rendering and release all GPU resources. */
|
|
125
|
-
dispose(): void;
|
|
126
|
-
/** Create the shader program, fullscreen quad VAO, and cache uniform locations. */
|
|
127
99
|
private initGPUResources;
|
|
128
|
-
/** Check whether requestVideoFrameCallback is available. */
|
|
129
|
-
private static isRVFCSupported;
|
|
130
|
-
/**
|
|
131
|
-
* RVFC callback — fires only when the browser presents a new video frame.
|
|
132
|
-
*
|
|
133
|
-
* Handles the depth texture update, which only needs to happen
|
|
134
|
-
* when the video frame actually changes (~24-30fps, not 60-120fps).
|
|
135
|
-
*/
|
|
136
|
-
private readonly videoFrameLoop;
|
|
137
100
|
/**
|
|
138
101
|
* Main render loop — called every animation frame at display refresh rate.
|
|
139
102
|
*
|
|
@@ -145,16 +108,16 @@ export declare class ParallaxRenderer {
|
|
|
145
108
|
* When RVFC is NOT supported, this falls back to the original behavior:
|
|
146
109
|
* depth update + input update + render all in a single RAF tick.
|
|
147
110
|
*/
|
|
148
|
-
|
|
149
|
-
/** Upload fresh depth data to the GPU texture. */
|
|
150
|
-
private updateDepthTexture;
|
|
111
|
+
protected onRenderFrame(): void;
|
|
151
112
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
113
|
+
* Upload raw depth data to the GPU and run the bilateral filter pass.
|
|
114
|
+
*
|
|
115
|
+
* Delegates to the bilateral filter pass object, which encapsulates
|
|
116
|
+
* the upload → FBO bind → draw → FBO unbind → viewport restore sequence.
|
|
117
|
+
*
|
|
118
|
+
* The parallax shader reads from filteredDepthTexture (UNIT 1).
|
|
154
119
|
*/
|
|
155
|
-
|
|
156
|
-
/** Debounce resize events to avoid expensive layout recalculations. */
|
|
157
|
-
private readonly scheduleResizeRecalculate;
|
|
120
|
+
protected onDepthUpdate(timeSec: number): void;
|
|
158
121
|
/**
|
|
159
122
|
* Recalculate the WebGL canvas size and UV transform to match the
|
|
160
123
|
* current container dimensions.
|
|
@@ -162,14 +125,14 @@ export declare class ParallaxRenderer {
|
|
|
162
125
|
* Cover-fit + overscan is expressed as a UV-space transform (offset + scale)
|
|
163
126
|
* rather than geometry resize. The fullscreen quad stays fixed at -1 to 1.
|
|
164
127
|
*/
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
/** Dispose textures
|
|
128
|
+
protected recalculateViewportLayout(): void;
|
|
129
|
+
/** Release all GPU resources. */
|
|
130
|
+
protected disposeRenderer(): void;
|
|
131
|
+
/** Rebuild GPU state after context restoration. */
|
|
132
|
+
protected onContextRestored(): void;
|
|
133
|
+
/** Dispose all textures via the registry (video, rawDepth, filteredDepth). */
|
|
171
134
|
private disposeTextures;
|
|
172
|
-
/** Dispose
|
|
135
|
+
/** Dispose render passes and shared VAO. */
|
|
173
136
|
private disposeGPUResources;
|
|
174
137
|
}
|
|
175
138
|
//# sourceMappingURL=parallax-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallax-renderer.d.ts","sourceRoot":"","sources":["../../src/parallax-renderer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"parallax-renderer.d.ts","sourceRoot":"","sources":["../../src/parallax-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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;;;OAUG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAwC/B;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAqB9C;;;;;;OAMG;IACH,SAAS,CAAC,yBAAyB,IAAI,IAAI;IA0B3C,iCAAiC;IACjC,SAAS,CAAC,eAAe,IAAI,IAAI;IAYjC,mDAAmD;IACnD,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAwBnC,8EAA8E;IAC9E,OAAO,CAAC,eAAe;IAOvB,4CAA4C;IAC5C,OAAO,CAAC,mBAAmB;CAmB5B"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal Renderer (WebGPU) — GPU-accelerated multi-pass portal compositing.
|
|
3
|
+
*
|
|
4
|
+
* WebGPU counterpart to `portal-renderer.ts` (WebGL2). Shares the same
|
|
5
|
+
* `RendererBase` abstract base class and `PortalRendererConfig` interface.
|
|
6
|
+
*
|
|
7
|
+
* ## Pipeline (per frame, 6 draw calls)
|
|
8
|
+
*
|
|
9
|
+
* 1. **Interior pass** — POM ray-march + lens depth + DOF + fog + color grade.
|
|
10
|
+
* MRT output: color (rgba8unorm) + depth (r8unorm) to offscreen textures.
|
|
11
|
+
*
|
|
12
|
+
* 2a. **Stencil mark** — triangulated SVG mesh into depth-stencil attachment.
|
|
13
|
+
* Color writes disabled, stencil ref=1 written.
|
|
14
|
+
*
|
|
15
|
+
* 2b. **Composite** — emissive interior passthrough with edge occlusion ramp,
|
|
16
|
+
* stencil-tested (only where stencil == 1).
|
|
17
|
+
*
|
|
18
|
+
* 2c. **Chamfer geometry** — Blinn-Phong lit ring with frosted-glass blur.
|
|
19
|
+
*
|
|
20
|
+
* 3. **Boundary effects** — rim lighting, refraction, chromatic fringe,
|
|
21
|
+
* volumetric edge wall. Alpha blended onto backbuffer.
|
|
22
|
+
*
|
|
23
|
+
* ## JFA Distance Field (cached, recomputed on resize)
|
|
24
|
+
*
|
|
25
|
+
* mask render -> seed extraction -> flood iterations -> distance conversion.
|
|
26
|
+
* Uses rg16float ping-pong textures. Runs at reduced resolution (quality tier).
|
|
27
|
+
*
|
|
28
|
+
* ## Key WebGPU differences from WebGL2 version
|
|
29
|
+
*
|
|
30
|
+
* - Stencil via explicit `depth24plus-stencil8` texture attachment.
|
|
31
|
+
* - MRT via multiple color attachments in a single render pass.
|
|
32
|
+
* - Float render targets (rg16float) natively supported — no extension needed.
|
|
33
|
+
* - Pipeline state objects bake blend/stencil/depth config at creation time.
|
|
34
|
+
* - Bind groups replace individual uniform calls.
|
|
35
|
+
* - Override constants for POM loop bound.
|
|
36
|
+
* - `writeTexture` with manual Y-flip (no UNPACK_FLIP_Y_WEBGL equivalent).
|
|
37
|
+
* - `copyExternalImageToTexture` for zero-copy video frame import.
|
|
38
|
+
*/
|
|
39
|
+
import { RendererBase } from './renderer-base';
|
|
40
|
+
import type { PortalRendererConfig } from './portal-renderer';
|
|
41
|
+
import type { ShapeMesh } from './shape-generator';
|
|
42
|
+
export declare class PortalRendererWebGPU extends RendererBase {
|
|
43
|
+
private device;
|
|
44
|
+
private context;
|
|
45
|
+
private canvasFormat;
|
|
46
|
+
private readonly config;
|
|
47
|
+
private quadBuffer;
|
|
48
|
+
private linearSampler;
|
|
49
|
+
private nearestSampler;
|
|
50
|
+
private interiorPipeline;
|
|
51
|
+
private interiorBindGroupLayout;
|
|
52
|
+
private stencilMarkPipeline;
|
|
53
|
+
private stencilMarkBindGroupLayout;
|
|
54
|
+
private compositePipeline;
|
|
55
|
+
private compositeBindGroupLayout;
|
|
56
|
+
private chamferPipeline;
|
|
57
|
+
private chamferBindGroupLayout;
|
|
58
|
+
private boundaryPipeline;
|
|
59
|
+
private boundaryBindGroupLayout;
|
|
60
|
+
private maskPipeline;
|
|
61
|
+
private maskBindGroupLayout;
|
|
62
|
+
private jfaSeedPipeline;
|
|
63
|
+
private jfaSeedBindGroupLayout;
|
|
64
|
+
private jfaFloodPipeline;
|
|
65
|
+
private jfaFloodBindGroupLayout;
|
|
66
|
+
private jfaDistPipeline;
|
|
67
|
+
private jfaDistBindGroupLayout;
|
|
68
|
+
private meshScaleUniformBuffer;
|
|
69
|
+
private interiorVertexUniformBuffer;
|
|
70
|
+
private interiorFragmentUniformBuffer;
|
|
71
|
+
private compositeUniformBuffer;
|
|
72
|
+
private boundaryUniformBuffer;
|
|
73
|
+
private chamferUniformBuffer;
|
|
74
|
+
private jfaSeedUniformBuffer;
|
|
75
|
+
private jfaFloodUniformBuffer;
|
|
76
|
+
private jfaDistUniformBuffer;
|
|
77
|
+
private interiorBindGroup;
|
|
78
|
+
private stencilMarkBindGroup;
|
|
79
|
+
private compositeBindGroup;
|
|
80
|
+
private chamferBindGroup;
|
|
81
|
+
private boundaryBindGroup;
|
|
82
|
+
private maskBindGroup;
|
|
83
|
+
private jfaSeedBindGroup;
|
|
84
|
+
private jfaDistBindGroup;
|
|
85
|
+
private videoTexture;
|
|
86
|
+
private videoTextureView;
|
|
87
|
+
private depthTexture;
|
|
88
|
+
private depthTextureView;
|
|
89
|
+
private interiorColorTexture;
|
|
90
|
+
private interiorColorView;
|
|
91
|
+
private interiorDepthTexture;
|
|
92
|
+
private interiorDepthView;
|
|
93
|
+
private fboWidth;
|
|
94
|
+
private fboHeight;
|
|
95
|
+
private depthStencilTexture;
|
|
96
|
+
private depthStencilView;
|
|
97
|
+
private dsWidth;
|
|
98
|
+
private dsHeight;
|
|
99
|
+
private jfaMaskTexture;
|
|
100
|
+
private jfaMaskView;
|
|
101
|
+
private jfaPingTexture;
|
|
102
|
+
private jfaPingView;
|
|
103
|
+
private jfaPongTexture;
|
|
104
|
+
private jfaPongView;
|
|
105
|
+
private jfaDistTexture;
|
|
106
|
+
private jfaDistView;
|
|
107
|
+
private jfaWidth;
|
|
108
|
+
private jfaHeight;
|
|
109
|
+
private jfaDirty;
|
|
110
|
+
private stencilVertexBuffer;
|
|
111
|
+
private stencilIndexBuffer;
|
|
112
|
+
private stencilIndexCount;
|
|
113
|
+
private boundaryVertexBuffer;
|
|
114
|
+
private boundaryVertexCount;
|
|
115
|
+
private chamferVertexBuffer;
|
|
116
|
+
private chamferVertexCount;
|
|
117
|
+
private meshAspect;
|
|
118
|
+
private meshScaleX;
|
|
119
|
+
private meshScaleY;
|
|
120
|
+
private lightDirX;
|
|
121
|
+
private lightDirY;
|
|
122
|
+
private lightDir3;
|
|
123
|
+
private depthFlipBuffer;
|
|
124
|
+
private readonly offsetData;
|
|
125
|
+
constructor(parent: HTMLElement, config: PortalRendererConfig, device: GPUDevice, adapterInfo: GPUAdapterInfo);
|
|
126
|
+
initialize(video: HTMLVideoElement, depthWidth: number, depthHeight: number, mesh: ShapeMesh): void;
|
|
127
|
+
private createInteriorPipeline;
|
|
128
|
+
private createStencilMarkPipeline;
|
|
129
|
+
private createCompositePipeline;
|
|
130
|
+
private createChamferPipeline;
|
|
131
|
+
private createBoundaryPipeline;
|
|
132
|
+
private createMaskPipeline;
|
|
133
|
+
private createJFASeedPipeline;
|
|
134
|
+
private createJFAFloodPipeline;
|
|
135
|
+
private createJFADistPipeline;
|
|
136
|
+
private uploadStencilMesh;
|
|
137
|
+
private uploadBoundaryMesh;
|
|
138
|
+
private uploadChamferMesh;
|
|
139
|
+
private writeStaticInteriorUniforms;
|
|
140
|
+
private writeStaticCompositeUniforms;
|
|
141
|
+
private writeStaticChamferUniforms;
|
|
142
|
+
private writeStaticBoundaryUniforms;
|
|
143
|
+
private rebuildInteriorBindGroup;
|
|
144
|
+
private rebuildStencilMarkBindGroup;
|
|
145
|
+
private rebuildCompositeBindGroup;
|
|
146
|
+
private rebuildChamferBindGroup;
|
|
147
|
+
private rebuildBoundaryBindGroup;
|
|
148
|
+
private rebuildMaskBindGroup;
|
|
149
|
+
private rebuildJFASeedBindGroup;
|
|
150
|
+
private rebuildJFADistBindGroup;
|
|
151
|
+
/** Rebuild all bind groups that reference textures (after resize or init). */
|
|
152
|
+
private rebuildBindGroups;
|
|
153
|
+
private createInteriorFBO;
|
|
154
|
+
private createDepthStencilTexture;
|
|
155
|
+
private createJFAResources;
|
|
156
|
+
private computeDistanceField;
|
|
157
|
+
/**
|
|
158
|
+
* Flip depth data vertically.
|
|
159
|
+
*
|
|
160
|
+
* WebGPU writeTexture has no UNPACK_FLIP_Y_WEBGL equivalent. Video frames
|
|
161
|
+
* are imported with flipY:true via copyExternalImageToTexture, so depth
|
|
162
|
+
* data must also be flipped to maintain spatial alignment.
|
|
163
|
+
*/
|
|
164
|
+
private flipDepthY;
|
|
165
|
+
private fallbackTexture;
|
|
166
|
+
private createFallbackTextureView;
|
|
167
|
+
/**
|
|
168
|
+
* Main render loop -- 6 draw calls per frame.
|
|
169
|
+
*
|
|
170
|
+
* Pass 1: Interior -> MRT offscreen textures.
|
|
171
|
+
* Pass 2a: Stencil mark -> depth-stencil attachment.
|
|
172
|
+
* Pass 2b: Composite -> canvas (stencil-tested).
|
|
173
|
+
* Pass 2c: Chamfer geometry -> canvas.
|
|
174
|
+
* Pass 3: Boundary effects -> canvas (alpha blended).
|
|
175
|
+
* JFA: runs inside command encoder when dirty (cached on resize).
|
|
176
|
+
*/
|
|
177
|
+
protected onRenderFrame(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Upload depth data to the GPU texture.
|
|
180
|
+
* Called from the RVFC loop at video frame rate, or from RAF fallback.
|
|
181
|
+
*/
|
|
182
|
+
protected onDepthUpdate(timeSec: number): void;
|
|
183
|
+
protected recalculateViewportLayout(): void;
|
|
184
|
+
/**
|
|
185
|
+
* WebGPU device loss recovery.
|
|
186
|
+
*
|
|
187
|
+
* Device loss is handled via the `device.lost` promise (set in constructor).
|
|
188
|
+
* Full recovery requires re-requesting adapter + device, which is managed
|
|
189
|
+
* at the Web Component level by re-creating the renderer.
|
|
190
|
+
*/
|
|
191
|
+
protected onContextRestored(): void;
|
|
192
|
+
protected disposeRenderer(): void;
|
|
193
|
+
private disposeTextures;
|
|
194
|
+
private disposeInteriorFBO;
|
|
195
|
+
private disposeDepthStencilTexture;
|
|
196
|
+
private disposeJFAResources;
|
|
197
|
+
private disposeGeometryBuffers;
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=portal-renderer-webgpu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-renderer-webgpu.d.ts","sourceRoot":"","sources":["../../src/portal-renderer-webgpu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAI9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA+InD,qBAAa,oBAAqB,SAAQ,YAAY;IAEpD,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,YAAY,CAAmB;IAGvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAG9C,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,aAAa,CAA2B;IAChD,OAAO,CAAC,cAAc,CAA2B;IAGjD,OAAO,CAAC,gBAAgB,CAAkC;IAC1D,OAAO,CAAC,uBAAuB,CAAmC;IAClE,OAAO,CAAC,mBAAmB,CAAkC;IAC7D,OAAO,CAAC,0BAA0B,CAAmC;IACrE,OAAO,CAAC,iBAAiB,CAAkC;IAC3D,OAAO,CAAC,wBAAwB,CAAmC;IACnE,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,sBAAsB,CAAmC;IACjE,OAAO,CAAC,gBAAgB,CAAkC;IAC1D,OAAO,CAAC,uBAAuB,CAAmC;IAGlE,OAAO,CAAC,YAAY,CAAkC;IACtD,OAAO,CAAC,mBAAmB,CAAmC;IAC9D,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,sBAAsB,CAAmC;IACjE,OAAO,CAAC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/
|
|
32
|
-
import type { ParallaxInput } from './input-handler';
|
|
33
32
|
import type { ShapeMesh } from './shape-generator';
|
|
33
|
+
import type { QualityTier } from './quality';
|
|
34
|
+
import { RendererBase } from './renderer-base';
|
|
34
35
|
export interface PortalRendererConfig {
|
|
35
36
|
parallaxStrength: number;
|
|
36
37
|
overscanPadding: number;
|
|
37
38
|
/** POM step count for interior (default: 16). */
|
|
38
39
|
pomSteps: number;
|
|
40
|
+
/**
|
|
41
|
+
* Adaptive quality tier. Controls render resolution, JFA resolution,
|
|
42
|
+
* depth resolution, and sample counts.
|
|
43
|
+
* - 'auto' — probe device capabilities and classify automatically.
|
|
44
|
+
* - 'high' / 'medium' / 'low' — use the specified tier directly.
|
|
45
|
+
* - undefined — defaults to 'auto'.
|
|
46
|
+
*/
|
|
47
|
+
quality?: 'auto' | QualityTier;
|
|
39
48
|
rimLightIntensity: number;
|
|
40
49
|
rimLightColor: [number, number, number];
|
|
41
50
|
rimLightWidth: number;
|
|
@@ -66,7 +75,7 @@ export interface PortalRendererConfig {
|
|
|
66
75
|
chamferWidth: number;
|
|
67
76
|
/** Chamfer angle in degrees (0 = face-forward, 90 = wall). Default: 45 */
|
|
68
77
|
chamferAngle: number;
|
|
69
|
-
/** Chamfer base color [r, g, b] in 0
|
|
78
|
+
/** Chamfer base color [r, g, b] in 0-1 range. Default: [0.15, 0.15, 0.18] */
|
|
70
79
|
chamferColor: [number, number, number];
|
|
71
80
|
/** Chamfer ambient light level. Default: 0.12 */
|
|
72
81
|
chamferAmbient: number;
|
|
@@ -81,29 +90,36 @@ export interface PortalRendererConfig {
|
|
|
81
90
|
/** 3D light direction [x, y, z] for chamfer lighting (will be normalized). */
|
|
82
91
|
lightDirection: [number, number, number];
|
|
83
92
|
}
|
|
84
|
-
export declare
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
export declare function buildEdgeMesh(edgeVertices: Float32Array): {
|
|
94
|
+
vertices: Float32Array;
|
|
95
|
+
count: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Build geometric chamfer ring around each contour with smooth per-vertex
|
|
99
|
+
* normals and inner/outer lerp parameter for progressive blur.
|
|
100
|
+
*
|
|
101
|
+
* Normals are averaged between adjacent segments at shared vertices so the
|
|
102
|
+
* chamfer surface appears smooth rather than faceted. The `lerpT` value is
|
|
103
|
+
* 0 at the inner (silhouette) edge and 1 at the outer edge, driving blur
|
|
104
|
+
* intensity in the fragment shader.
|
|
105
|
+
*
|
|
106
|
+
* Vertex format: [x, y, nx3, ny3, nz3, lerpT] — 6 floats per vertex.
|
|
107
|
+
*/
|
|
108
|
+
export declare function buildChamferMesh(edgeVertices: Float32Array, contourOffsets: number[], contourIsHole: boolean[], chamferWidth: number, chamferAngle: number): {
|
|
109
|
+
vertices: Float32Array;
|
|
110
|
+
count: number;
|
|
111
|
+
};
|
|
112
|
+
export declare class PortalRenderer extends RendererBase {
|
|
87
113
|
private gl;
|
|
88
|
-
private
|
|
89
|
-
private
|
|
90
|
-
private
|
|
91
|
-
private
|
|
92
|
-
private
|
|
93
|
-
private
|
|
94
|
-
private
|
|
95
|
-
private
|
|
96
|
-
private
|
|
97
|
-
private chamferProgram;
|
|
98
|
-
private stencilUniforms;
|
|
99
|
-
private maskUniforms;
|
|
100
|
-
private jfaSeedUniforms;
|
|
101
|
-
private jfaFloodUniforms;
|
|
102
|
-
private jfaDistUniforms;
|
|
103
|
-
private interiorUniforms;
|
|
104
|
-
private compositeUniforms;
|
|
105
|
-
private boundaryUniforms;
|
|
106
|
-
private chamferUniforms;
|
|
114
|
+
private stencilPass;
|
|
115
|
+
private maskPass;
|
|
116
|
+
private jfaSeedPass;
|
|
117
|
+
private jfaFloodPass;
|
|
118
|
+
private jfaDistPass;
|
|
119
|
+
private interiorPass;
|
|
120
|
+
private compositePass;
|
|
121
|
+
private boundaryPass;
|
|
122
|
+
private chamferPass;
|
|
107
123
|
private quadVao;
|
|
108
124
|
private stencilVao;
|
|
109
125
|
private stencilIndexCount;
|
|
@@ -112,41 +128,19 @@ export declare class PortalRenderer {
|
|
|
112
128
|
private boundaryVertexCount;
|
|
113
129
|
private chamferVao;
|
|
114
130
|
private chamferVertexCount;
|
|
115
|
-
private
|
|
116
|
-
private
|
|
131
|
+
private readonly textures;
|
|
132
|
+
private readonly videoSlot;
|
|
133
|
+
private readonly depthSlot;
|
|
117
134
|
private interiorFbo;
|
|
118
135
|
private interiorColorTex;
|
|
119
136
|
private interiorDepthTex;
|
|
120
137
|
private fboWidth;
|
|
121
138
|
private fboHeight;
|
|
122
|
-
private
|
|
123
|
-
private
|
|
124
|
-
private jfaPingFbo;
|
|
125
|
-
private jfaPingTex;
|
|
126
|
-
private jfaPongFbo;
|
|
127
|
-
private jfaPongTex;
|
|
128
|
-
private distFbo;
|
|
129
|
-
private distTex;
|
|
130
|
-
private jfaWidth;
|
|
131
|
-
private jfaHeight;
|
|
132
|
-
private distFieldDirty;
|
|
133
|
-
private depthWidth;
|
|
134
|
-
private depthHeight;
|
|
135
|
-
private videoAspect;
|
|
139
|
+
private jfa;
|
|
140
|
+
private hasColorBufferFloat;
|
|
136
141
|
private meshAspect;
|
|
137
142
|
private meshScaleX;
|
|
138
143
|
private meshScaleY;
|
|
139
|
-
private readDepth;
|
|
140
|
-
private readInput;
|
|
141
|
-
private playbackVideo;
|
|
142
|
-
private onVideoFrame;
|
|
143
|
-
private animationFrameHandle;
|
|
144
|
-
private rvfcHandle;
|
|
145
|
-
private rvfcSupported;
|
|
146
|
-
private resizeObserver;
|
|
147
|
-
private resizeTimer;
|
|
148
|
-
private uvOffset;
|
|
149
|
-
private uvScale;
|
|
150
144
|
private lightDirX;
|
|
151
145
|
private lightDirY;
|
|
152
146
|
private lightDir3;
|
|
@@ -161,25 +155,30 @@ export declare class PortalRenderer {
|
|
|
161
155
|
private createFBO;
|
|
162
156
|
private createJFAResources;
|
|
163
157
|
private computeDistanceField;
|
|
164
|
-
start(video: HTMLVideoElement, readDepth: (timeSec: number) => Uint8Array, readInput: () => ParallaxInput, onVideoFrame?: (currentTime: number, frameNumber: number) => void): void;
|
|
165
|
-
stop(): void;
|
|
166
|
-
dispose(): void;
|
|
167
158
|
private initGPUResources;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
159
|
+
/**
|
|
160
|
+
* Main render loop — called every animation frame at display refresh rate.
|
|
161
|
+
*
|
|
162
|
+
* Handles interior FBO rendering, stencil marking, emissive composite,
|
|
163
|
+
* chamfer geometry, and boundary effects in a multi-pass pipeline.
|
|
164
|
+
*/
|
|
165
|
+
protected onRenderFrame(): void;
|
|
166
|
+
/**
|
|
167
|
+
* Upload depth data to the GPU texture.
|
|
168
|
+
* Called from the RVFC loop at video frame rate, or from RAF fallback.
|
|
169
|
+
*/
|
|
170
|
+
protected onDepthUpdate(timeSec: number): void;
|
|
171
|
+
protected recalculateViewportLayout(): void;
|
|
172
|
+
/** Rebuild GPU state after context restoration. */
|
|
173
|
+
protected onContextRestored(): void;
|
|
174
|
+
/** Dispose source textures via the registry (video, depth). */
|
|
178
175
|
private disposeTextures;
|
|
179
176
|
private disposeFBO;
|
|
180
|
-
private disposeJFA;
|
|
181
177
|
private disposeStencilGeometry;
|
|
182
178
|
private disposeBoundaryGeometry;
|
|
179
|
+
/** Dispose all GPU resources — called by base class dispose(). */
|
|
180
|
+
protected disposeRenderer(): void;
|
|
181
|
+
/** Dispose all render passes and shared VAO. */
|
|
183
182
|
private disposeGPUResources;
|
|
184
183
|
}
|
|
185
184
|
//# sourceMappingURL=portal-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal-renderer.d.ts","sourceRoot":"","sources":["../../src/portal-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"portal-renderer.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