@ignifx/core 0.14.0 → 0.15.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/dist/agx-tone-mapping-Cgt844j6.js +53 -0
- package/dist/agx-tone-mapping-Cgt844j6.js.map +1 -0
- package/dist/auto-exposure-uzPn0beO.js +246 -0
- package/dist/auto-exposure-uzPn0beO.js.map +1 -0
- package/dist/bloom-hdr-CLtQj-oY.js +315 -0
- package/dist/bloom-hdr-CLtQj-oY.js.map +1 -0
- package/dist/contact-shadows-T523EXaP.js +84 -0
- package/dist/contact-shadows-T523EXaP.js.map +1 -0
- package/dist/{environment-Cq2BmA96.js → environment-DPi0_0SP.js} +18 -4
- package/dist/environment-DPi0_0SP.js.map +1 -0
- package/dist/gtao-_nr0b6-E.js +630 -0
- package/dist/gtao-_nr0b6-E.js.map +1 -0
- package/dist/hdr-output-BrUvpAsE.js +525 -0
- package/dist/hdr-output-BrUvpAsE.js.map +1 -0
- package/dist/index.d.ts +452 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +900 -43
- package/dist/index.js.map +1 -1
- package/dist/{instanced-mesh-instance-DYwH0vLi.js → instanced-mesh-instance-NnODkvqK.js} +2 -2
- package/dist/{instanced-mesh-instance-DYwH0vLi.js.map → instanced-mesh-instance-NnODkvqK.js.map} +1 -1
- package/dist/mat4-D6exvAuO.js +949 -0
- package/dist/mat4-D6exvAuO.js.map +1 -0
- package/dist/{render-path-Dx0learj.js → render-path-Be7WgN7r.js} +35 -4
- package/dist/render-path-Be7WgN7r.js.map +1 -0
- package/dist/{render-texture-IuR0iFVa.js → render-texture-C_TnaSz2.js} +28 -2
- package/dist/render-texture-C_TnaSz2.js.map +1 -0
- package/dist/scene-color-passes-DlNr-qyZ.js +65 -0
- package/dist/scene-color-passes-DlNr-qyZ.js.map +1 -0
- package/dist/scene-inputs-BxGOsnIZ.js +318 -0
- package/dist/scene-inputs-BxGOsnIZ.js.map +1 -0
- package/dist/{shader-material-CDQ0Y5kN.js → shader-material-B6p66wB8.js} +17 -6
- package/dist/shader-material-B6p66wB8.js.map +1 -0
- package/dist/{shader-material-BPb_oEZQ.js → shader-material-C0TAUr4t.js} +102 -4
- package/dist/shader-material-C0TAUr4t.js.map +1 -0
- package/dist/ssgi-Dm-maZrc.js +113 -0
- package/dist/ssgi-Dm-maZrc.js.map +1 -0
- package/dist/{surface-shader-CwQ03yHG.js → surface-shader-BaK0kvBB.js} +2 -2
- package/dist/{surface-shader-CwQ03yHG.js.map → surface-shader-BaK0kvBB.js.map} +1 -1
- package/dist/taa-BwBZLy11.js +480 -0
- package/dist/taa-BwBZLy11.js.map +1 -0
- package/dist/{vec3-T2PasQZv.js → vec3-D-0Y2mzE.js} +4 -948
- package/dist/vec3-D-0Y2mzE.js.map +1 -0
- package/package.json +1 -1
- package/dist/environment-Cq2BmA96.js.map +0 -1
- package/dist/hdr-output-DDpIo4Q5.js +0 -300
- package/dist/hdr-output-DDpIo4Q5.js.map +0 -1
- package/dist/render-path-Dx0learj.js.map +0 -1
- package/dist/render-texture-IuR0iFVa.js.map +0 -1
- package/dist/shader-material-BPb_oEZQ.js.map +0 -1
- package/dist/shader-material-CDQ0Y5kN.js.map +0 -1
- package/dist/vec3-T2PasQZv.js.map +0 -1
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import { n as Mat4 } from "./mat4-D6exvAuO.js";
|
|
2
|
+
import { createCopyToTextureTask, createEffectRenderTask, createEffectWrapper, createSurfaceRenderTargetTexture, disposeEffectWrapper, disposeRenderTargetTexture, onRenderTargetTextureResize, setEffectTexture, setEffectUniforms } from "@babylonjs/lite";
|
|
3
|
+
//#region src/lite/gpu/taa.ts
|
|
4
|
+
/**
|
|
5
|
+
* Temporal anti-aliasing (`docs/plan/2026-11-gi-phase-1-execution-plan.md`, steps G5 and G6;
|
|
6
|
+
* `docs/architecture/07-rendering.md` §2.13). Its own chunk: the renderer imports it only when
|
|
7
|
+
* `rendering.taa.enabled` is on, so a project without TAA loads none of it and its frame graph has
|
|
8
|
+
* none of these tasks (`CONSTITUTION.md` §2.5). HDR only: it runs on linear `rgba16float` colour,
|
|
9
|
+
* between the scene pass and the HDR output pass.
|
|
10
|
+
*
|
|
11
|
+
* ```text
|
|
12
|
+
* scene-inputs (depth, velocity) → scene (jittered) → taa-jitter → taa-resolve → resolved
|
|
13
|
+
* resolved ─(copy)─→ history
|
|
14
|
+
* resolved ─ taa-output (sharpen) ─→ hdr scene target
|
|
15
|
+
* depth ─ taa-depth ─→ previous depth
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* - **Jitter.** Every frame the scene pass's view-projection is offset by a Halton (2,3) sub-pixel
|
|
19
|
+
* step, written over the first 64 bytes of the scene task's scene uniform buffer after the task
|
|
20
|
+
* wrote its own (the trick Lite's own `createTaaPostProcessTask` uses, `lib/post-process/taa.js`).
|
|
21
|
+
* Only the GPU copy is jittered: Lite's camera caches, picking, `Camera.worldToScreen` and the
|
|
22
|
+
* scene-inputs geometry pass all see the clean matrices.
|
|
23
|
+
* - **Reprojection.** Where the geometry pass drew, the previous position comes from the scene-inputs
|
|
24
|
+
* velocity (the nearest depth in the 3×3 neighbourhood picks the texel). Where it drew nothing (the
|
|
25
|
+
* sky), the pixel is reprojected through the inverse view-projection and the previous one. Lite
|
|
26
|
+
* 1.34's PBR velocity tracks camera motion only, so a moving PBR mesh relies on the clamp below.
|
|
27
|
+
* - **Clamping.** History is clipped to the variance box of the current 3×3 neighbourhood in YCoCg,
|
|
28
|
+
* on colour compressed by `c / (1 + max(c))` so bright HDR texels do not flicker.
|
|
29
|
+
* - **Rejection.** History is dropped where the reprojected position leaves the screen, and where
|
|
30
|
+
* the depth stored last frame at that position disagrees with where this pixel's surface would
|
|
31
|
+
* have been (a disocclusion).
|
|
32
|
+
* - **Reset.** On the first frame, a resize, a camera cut (a jump further than `cutDistance`, or a
|
|
33
|
+
* turn over 60° in one frame) and on {@link TaaHandle.reset}.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* The frame-graph task names, in the order they run after `"scene"`.
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
const TAA_TASK_NAMES = {
|
|
41
|
+
jitter: "ignifx:taa-jitter",
|
|
42
|
+
resolve: "ignifx:taa-resolve",
|
|
43
|
+
history: "ignifx:taa-history",
|
|
44
|
+
output: "ignifx:taa-output",
|
|
45
|
+
depth: "ignifx:taa-depth"
|
|
46
|
+
};
|
|
47
|
+
/** How many Halton (2,3) points the jitter cycles through. */
|
|
48
|
+
const HALTON_SAMPLES = 8;
|
|
49
|
+
/** Cosine of the largest turn in one frame that is not a camera cut (60°). */
|
|
50
|
+
const CUT_COSINE = .5;
|
|
51
|
+
/** Relative depth disagreement above which reprojected history counts as disoccluded. */
|
|
52
|
+
const DEPTH_TOLERANCE = .05;
|
|
53
|
+
/** The resolve's uniform block: inverse view-projection, previous view-projection, params, size. */
|
|
54
|
+
const RESOLVE_FLOATS = 40;
|
|
55
|
+
/**
|
|
56
|
+
* The `index`-th element of the Halton sequence in `base`.
|
|
57
|
+
*
|
|
58
|
+
* @param index - 1-based index.
|
|
59
|
+
* @param base - The base, 2 or 3.
|
|
60
|
+
* @returns A value in `[0, 1)`.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
function halton(index, base) {
|
|
65
|
+
let fraction = 1;
|
|
66
|
+
let result = 0;
|
|
67
|
+
let rest = index;
|
|
68
|
+
while (rest > 0) {
|
|
69
|
+
fraction /= base;
|
|
70
|
+
result += fraction * (rest % base);
|
|
71
|
+
rest = Math.floor(rest / base);
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Whether the camera moved far enough between two frames to count as a cut.
|
|
77
|
+
*
|
|
78
|
+
* @param previous - Last frame's eye position and forward axis: `[x, y, z, fx, fy, fz]`.
|
|
79
|
+
* @param current - This frame's, in the same layout.
|
|
80
|
+
* @param cutDistance - The largest jump that is not a cut, in world units.
|
|
81
|
+
* @returns `true` for a cut.
|
|
82
|
+
*
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
function isCameraCut(previous, current, cutDistance) {
|
|
86
|
+
const dx = (current[0] ?? 0) - (previous[0] ?? 0);
|
|
87
|
+
const dy = (current[1] ?? 0) - (previous[1] ?? 0);
|
|
88
|
+
const dz = (current[2] ?? 0) - (previous[2] ?? 0);
|
|
89
|
+
if (dx * dx + dy * dy + dz * dz > cutDistance * cutDistance) return true;
|
|
90
|
+
return (current[3] ?? 0) * (previous[3] ?? 0) + (current[4] ?? 0) * (previous[4] ?? 0) + (current[5] ?? 0) * (previous[5] ?? 0) < CUT_COSINE;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The resolve pass's fragment shader.
|
|
94
|
+
*
|
|
95
|
+
* @returns The WGSL, with Lite's `effectFragment` entry point.
|
|
96
|
+
*
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
function taaResolveFragmentWgsl() {
|
|
100
|
+
return `struct TaaUniforms{invViewProj:mat4x4<f32>,prevViewProj:mat4x4<f32>,params:vec4<f32>,size:vec4<f32>};
|
|
101
|
+
@group(0)@binding(0)var<uniform>taa:TaaUniforms;
|
|
102
|
+
@group(0)@binding(1)var currentColor:texture_2d<f32>;
|
|
103
|
+
@group(0)@binding(2)var historyColor:texture_2d<f32>;
|
|
104
|
+
@group(0)@binding(3)var sceneDepth:texture_depth_2d;
|
|
105
|
+
@group(0)@binding(4)var sceneVelocity:texture_2d<f32>;
|
|
106
|
+
@group(0)@binding(5)var previousDepth:texture_2d<f32>;
|
|
107
|
+
fn taaCompress(c:vec3<f32>)->vec3<f32>{return c/(1.0+max(c.r,max(c.g,c.b)));}
|
|
108
|
+
fn taaExpand(c:vec3<f32>)->vec3<f32>{return c/max(1.0-max(c.r,max(c.g,c.b)),1e-4);}
|
|
109
|
+
fn taaToYCoCg(c:vec3<f32>)->vec3<f32>{return vec3<f32>(0.25*c.r+0.5*c.g+0.25*c.b,0.5*c.r-0.5*c.b,-0.25*c.r+0.5*c.g-0.25*c.b);}
|
|
110
|
+
fn taaFromYCoCg(c:vec3<f32>)->vec3<f32>{let t=c.x-c.z;return vec3<f32>(t+c.y,c.x+c.z,t-c.y);}
|
|
111
|
+
fn taaCatmullRom(t:f32)->vec4<f32>{let t2=t*t;let t3=t2*t;
|
|
112
|
+
return vec4<f32>(-0.5*t3+t2-0.5*t,1.5*t3-2.5*t2+1.0,-1.5*t3+2.0*t2+0.5*t,0.5*t3-0.5*t2);}
|
|
113
|
+
fn taaHistory(pos:vec2<f32>,size:vec2<i32>)->vec3<f32>{
|
|
114
|
+
let p=pos-vec2<f32>(0.5);let base=floor(p);let f=p-base;
|
|
115
|
+
var wx=taaCatmullRom(f.x);var wy=taaCatmullRom(f.y);var sum=vec3<f32>(0.0);
|
|
116
|
+
for(var j=0;j<4;j++){for(var i=0;i<4;i++){
|
|
117
|
+
let q=clamp(vec2<i32>(base)+vec2<i32>(i-1,j-1),vec2<i32>(0),size-vec2<i32>(1));
|
|
118
|
+
sum+=textureLoad(historyColor,q,0).rgb*(wx[i]*wy[j]);}}
|
|
119
|
+
return max(sum,vec3<f32>(0.0));}
|
|
120
|
+
@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{
|
|
121
|
+
let size=vec2<i32>(taa.size.xy);
|
|
122
|
+
let pixel=vec2<i32>(fragment.position.xy);
|
|
123
|
+
let current=textureLoad(currentColor,pixel,0);
|
|
124
|
+
let currentY=taaToYCoCg(taaCompress(max(current.rgb,vec3<f32>(0.0))));
|
|
125
|
+
var m1=vec3<f32>(0.0);var m2=vec3<f32>(0.0);
|
|
126
|
+
var lo=vec3<f32>(1e9);var hi=vec3<f32>(-1e9);
|
|
127
|
+
var nearest=0.0;var nearestPixel=pixel;
|
|
128
|
+
for(var y=-1;y<=1;y++){for(var x=-1;x<=1;x++){
|
|
129
|
+
let q=clamp(pixel+vec2<i32>(x,y),vec2<i32>(0),size-vec2<i32>(1));
|
|
130
|
+
let c=taaToYCoCg(taaCompress(max(textureLoad(currentColor,q,0).rgb,vec3<f32>(0.0))));
|
|
131
|
+
m1+=c;m2+=c*c;lo=min(lo,c);hi=max(hi,c);
|
|
132
|
+
let d=textureLoad(sceneDepth,q,0);
|
|
133
|
+
if(d>nearest){nearest=d;nearestPixel=q;}}}
|
|
134
|
+
let uv=fragment.position.xy/taa.size.xy;
|
|
135
|
+
let depth=textureLoad(sceneDepth,pixel,0);
|
|
136
|
+
let ndc=vec4<f32>(uv.x*2.0-1.0,1.0-uv.y*2.0,depth,1.0);
|
|
137
|
+
let world=taa.invViewProj*ndc;
|
|
138
|
+
let prevClip=taa.prevViewProj*world;
|
|
139
|
+
var prevUv:vec2<f32>;
|
|
140
|
+
if(nearest>0.0){let v=textureLoad(sceneVelocity,nearestPixel,0).xy;prevUv=uv+vec2<f32>(v.x,-v.y);}
|
|
141
|
+
else{let p=prevClip.xy/prevClip.w;prevUv=vec2<f32>(p.x*0.5+0.5,0.5-p.y*0.5);}
|
|
142
|
+
var alpha=taa.params.x;
|
|
143
|
+
if(taa.params.y>0.5||prevClip.w<=0.0||any(prevUv<vec2<f32>(0.0))||any(prevUv>vec2<f32>(1.0))){alpha=1.0;}
|
|
144
|
+
if(depth>0.0&&alpha<1.0){
|
|
145
|
+
let stored=textureLoad(previousDepth,clamp(vec2<i32>(prevUv*taa.size.xy),vec2<i32>(0),size-vec2<i32>(1)),0).r;
|
|
146
|
+
let expected=prevClip.z/prevClip.w;
|
|
147
|
+
if(abs(expected-stored)>taa.params.w*max(expected,1e-6)){alpha=1.0;}}
|
|
148
|
+
var history=taaToYCoCg(taaCompress(taaHistory(prevUv*taa.size.xy,size)));
|
|
149
|
+
if(taa.params.z>0.5){
|
|
150
|
+
let mean=m1/9.0;let sigma=sqrt(max(m2/9.0-mean*mean,vec3<f32>(0.0)));
|
|
151
|
+
let boxLo=max(lo,mean-1.25*sigma);let boxHi=min(hi,mean+1.25*sigma);
|
|
152
|
+
let centre=0.5*(boxLo+boxHi);let extent=max(0.5*(boxHi-boxLo),vec3<f32>(1e-5));
|
|
153
|
+
let offset=history-centre;let unit=abs(offset/extent);let m=max(unit.x,max(unit.y,unit.z));
|
|
154
|
+
if(m>1.0){history=centre+offset/m;}}
|
|
155
|
+
let blended=mix(history,currentY,alpha);
|
|
156
|
+
return vec4<f32>(max(taaExpand(taaFromYCoCg(blended)),vec3<f32>(0.0)),current.a);}`;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* The output pass's fragment shader: an optional sharpen, clamped to the cross neighbourhood so it
|
|
160
|
+
* cannot ring, from the resolved colour into the HDR scene target.
|
|
161
|
+
*
|
|
162
|
+
* @returns The WGSL.
|
|
163
|
+
*
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
function taaOutputFragmentWgsl() {
|
|
167
|
+
return `struct TaaOutputUniforms{params:vec4<f32>};
|
|
168
|
+
@group(0)@binding(0)var<uniform>taaOutput:TaaOutputUniforms;
|
|
169
|
+
@group(0)@binding(1)var resolvedColor:texture_2d<f32>;
|
|
170
|
+
@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{
|
|
171
|
+
let pixel=vec2<i32>(fragment.position.xy);
|
|
172
|
+
let c=textureLoad(resolvedColor,pixel,0);
|
|
173
|
+
let k=taaOutput.params.x;
|
|
174
|
+
if(k<=0.0){return c;}
|
|
175
|
+
let last=vec2<i32>(textureDimensions(resolvedColor))-vec2<i32>(1);
|
|
176
|
+
let n=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(0,-1),vec2<i32>(0),last),0).rgb;
|
|
177
|
+
let s=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(0,1),vec2<i32>(0),last),0).rgb;
|
|
178
|
+
let e=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(1,0),vec2<i32>(0),last),0).rgb;
|
|
179
|
+
let w=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(-1,0),vec2<i32>(0),last),0).rgb;
|
|
180
|
+
let lo=min(c.rgb,min(min(n,s),min(e,w)));let hi=max(c.rgb,max(max(n,s),max(e,w)));
|
|
181
|
+
let sharp=c.rgb+(c.rgb-0.25*(n+s+e+w))*k;
|
|
182
|
+
return vec4<f32>(clamp(sharp,lo,hi),c.a);}`;
|
|
183
|
+
}
|
|
184
|
+
/** The depth copy's fragment shader: scene depth into an `r32float` target the next frame reads. */
|
|
185
|
+
const DEPTH_COPY_WGSL = `@group(0)@binding(0)var sceneDepth:texture_depth_2d;
|
|
186
|
+
@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{
|
|
187
|
+
return vec4<f32>(textureLoad(sceneDepth,vec2<i32>(fragment.position.xy),0),0.0,0.0,1.0);}`;
|
|
188
|
+
/**
|
|
189
|
+
* Builds the TAA passes and splices them in between the scene pass and the HDR output pass.
|
|
190
|
+
*
|
|
191
|
+
* @remarks
|
|
192
|
+
* Call it after the HDR render path exists. The lease is the caller's; it is released when the
|
|
193
|
+
* frame graph disposes the jitter task.
|
|
194
|
+
*
|
|
195
|
+
* @param engine - The engine.
|
|
196
|
+
* @param scene - The scene with an HDR render path.
|
|
197
|
+
* @param hdr - The HDR output handle.
|
|
198
|
+
* @param inputs - A scene-inputs lease (depth, velocity).
|
|
199
|
+
* @param options - The tuning.
|
|
200
|
+
* @param isFrameGraphBuilt - Whether the tasks must be recorded now.
|
|
201
|
+
* @returns The handle.
|
|
202
|
+
*
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
function installTemporalAntiAliasing(engine, scene, hdr, inputs, options, isFrameGraphBuilt) {
|
|
206
|
+
const resolved = surfaceTarget(engine, "ignifx:taa-resolved", "rgba16float");
|
|
207
|
+
const history = surfaceTarget(engine, "ignifx:taa-history", "rgba16float");
|
|
208
|
+
const previousDepth = surfaceTarget(engine, "ignifx:taa-previous-depth", "r32float");
|
|
209
|
+
const targets = [
|
|
210
|
+
resolved,
|
|
211
|
+
history,
|
|
212
|
+
previousDepth
|
|
213
|
+
];
|
|
214
|
+
const resolveEffect = createEffectWrapper(engine, {
|
|
215
|
+
name: TAA_TASK_NAMES.resolve,
|
|
216
|
+
fragmentWGSL: taaResolveFragmentWgsl(),
|
|
217
|
+
bindings: [
|
|
218
|
+
{
|
|
219
|
+
name: "taa",
|
|
220
|
+
binding: 0,
|
|
221
|
+
kind: "uniform",
|
|
222
|
+
uniformByteLength: 160
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "currentColor",
|
|
226
|
+
binding: 1,
|
|
227
|
+
kind: "texture"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "historyColor",
|
|
231
|
+
binding: 2,
|
|
232
|
+
kind: "texture"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "sceneDepth",
|
|
236
|
+
binding: 3,
|
|
237
|
+
kind: "texture",
|
|
238
|
+
textureSampleType: "depth"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "sceneVelocity",
|
|
242
|
+
binding: 4,
|
|
243
|
+
kind: "texture"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: "previousDepth",
|
|
247
|
+
binding: 5,
|
|
248
|
+
kind: "texture",
|
|
249
|
+
textureSampleType: "unfilterable-float"
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
});
|
|
253
|
+
const outputEffect = createEffectWrapper(engine, {
|
|
254
|
+
name: TAA_TASK_NAMES.output,
|
|
255
|
+
fragmentWGSL: taaOutputFragmentWgsl(),
|
|
256
|
+
bindings: [{
|
|
257
|
+
name: "taaOutput",
|
|
258
|
+
binding: 0,
|
|
259
|
+
kind: "uniform",
|
|
260
|
+
uniformByteLength: 16
|
|
261
|
+
}, {
|
|
262
|
+
name: "resolvedColor",
|
|
263
|
+
binding: 1,
|
|
264
|
+
kind: "texture"
|
|
265
|
+
}]
|
|
266
|
+
});
|
|
267
|
+
const depthEffect = createEffectWrapper(engine, {
|
|
268
|
+
name: TAA_TASK_NAMES.depth,
|
|
269
|
+
fragmentWGSL: DEPTH_COPY_WGSL,
|
|
270
|
+
bindings: [{
|
|
271
|
+
name: "sceneDepth",
|
|
272
|
+
binding: 0,
|
|
273
|
+
kind: "texture",
|
|
274
|
+
textureSampleType: "depth"
|
|
275
|
+
}]
|
|
276
|
+
});
|
|
277
|
+
const effects = [
|
|
278
|
+
resolveEffect,
|
|
279
|
+
outputEffect,
|
|
280
|
+
depthEffect
|
|
281
|
+
];
|
|
282
|
+
let resetPending = true;
|
|
283
|
+
let resetCount = 0;
|
|
284
|
+
const bind = () => {
|
|
285
|
+
setEffectTexture(resolveEffect, 1, hdr.sceneTexture);
|
|
286
|
+
setEffectTexture(resolveEffect, 2, history.texture);
|
|
287
|
+
setEffectTexture(resolveEffect, 3, inputs.depth);
|
|
288
|
+
setEffectTexture(resolveEffect, 4, inputs.velocity);
|
|
289
|
+
setEffectTexture(resolveEffect, 5, previousDepth.texture);
|
|
290
|
+
setEffectTexture(outputEffect, 1, resolved.texture);
|
|
291
|
+
setEffectTexture(depthEffect, 0, inputs.depth);
|
|
292
|
+
};
|
|
293
|
+
bind();
|
|
294
|
+
const onResize = () => {
|
|
295
|
+
bind();
|
|
296
|
+
resetPending = true;
|
|
297
|
+
};
|
|
298
|
+
const stops = [inputs.onChange(onResize), ...targets.map((target) => onRenderTargetTextureResize(target, onResize))];
|
|
299
|
+
setEffectUniforms(outputEffect, new Float32Array([
|
|
300
|
+
Math.max(0, options.sharpness),
|
|
301
|
+
0,
|
|
302
|
+
0,
|
|
303
|
+
0
|
|
304
|
+
]));
|
|
305
|
+
const resolveTask = createEffectRenderTask({
|
|
306
|
+
name: TAA_TASK_NAMES.resolve,
|
|
307
|
+
effect: resolveEffect,
|
|
308
|
+
target: resolved.rt,
|
|
309
|
+
clear: false
|
|
310
|
+
}, engine, scene);
|
|
311
|
+
const historyTask = createCopyToTextureTask({
|
|
312
|
+
name: TAA_TASK_NAMES.history,
|
|
313
|
+
sourceTexture: resolved.rt,
|
|
314
|
+
targetTexture: history.rt
|
|
315
|
+
}, engine, scene);
|
|
316
|
+
const outputTask = createEffectRenderTask({
|
|
317
|
+
name: TAA_TASK_NAMES.output,
|
|
318
|
+
effect: outputEffect,
|
|
319
|
+
target: hdr.sceneTarget,
|
|
320
|
+
clear: false
|
|
321
|
+
}, engine, scene);
|
|
322
|
+
const depthTask = createEffectRenderTask({
|
|
323
|
+
name: TAA_TASK_NAMES.depth,
|
|
324
|
+
effect: depthEffect,
|
|
325
|
+
target: previousDepth.rt,
|
|
326
|
+
clear: false
|
|
327
|
+
}, engine, scene);
|
|
328
|
+
const uniforms = new Float32Array(RESOLVE_FLOATS);
|
|
329
|
+
const jittered = /* @__PURE__ */ new Float32Array(16);
|
|
330
|
+
const viewProjection = new Mat4();
|
|
331
|
+
const inverse = new Mat4();
|
|
332
|
+
const previousViewProjection = /* @__PURE__ */ new Float32Array(16);
|
|
333
|
+
const previousPose = /* @__PURE__ */ new Float32Array(6);
|
|
334
|
+
const pose = /* @__PURE__ */ new Float32Array(6);
|
|
335
|
+
const jitter = [0, 0];
|
|
336
|
+
let haltonIndex = 0;
|
|
337
|
+
let lastWidth = 0;
|
|
338
|
+
let lastHeight = 0;
|
|
339
|
+
const blend = Math.min(1, Math.max(.01, options.blend));
|
|
340
|
+
const jitterTask = {
|
|
341
|
+
name: TAA_TASK_NAMES.jitter,
|
|
342
|
+
engine,
|
|
343
|
+
scene,
|
|
344
|
+
_passes: [],
|
|
345
|
+
record() {},
|
|
346
|
+
execute() {
|
|
347
|
+
const width = hdr.sceneTexture.width;
|
|
348
|
+
const height = hdr.sceneTexture.height;
|
|
349
|
+
const uniformsOf = sceneTaskUniforms(hdr.sceneTask);
|
|
350
|
+
if (width <= 0 || height <= 0 || uniformsOf === null) return 0;
|
|
351
|
+
const clean = uniformsOf.data;
|
|
352
|
+
for (let index = 0; index < 3; index += 1) {
|
|
353
|
+
pose[index] = clean[32 + index] ?? 0;
|
|
354
|
+
pose[3 + index] = clean[18 + 4 * index] ?? 0;
|
|
355
|
+
}
|
|
356
|
+
let reset = resetPending || width !== lastWidth || height !== lastHeight;
|
|
357
|
+
if (!reset && isCameraCut(previousPose, pose, options.cutDistance)) reset = true;
|
|
358
|
+
if (reset) {
|
|
359
|
+
resetCount += 1;
|
|
360
|
+
previousViewProjection.set(clean.subarray(0, 16));
|
|
361
|
+
}
|
|
362
|
+
resetPending = false;
|
|
363
|
+
lastWidth = width;
|
|
364
|
+
lastHeight = height;
|
|
365
|
+
previousPose.set(pose);
|
|
366
|
+
haltonIndex = haltonIndex % HALTON_SAMPLES + 1;
|
|
367
|
+
jitter[0] = halton(haltonIndex, 2) - .5;
|
|
368
|
+
jitter[1] = halton(haltonIndex, 3) - .5;
|
|
369
|
+
const jx = jitter[0] * 2 / width;
|
|
370
|
+
const jy = jitter[1] * 2 / height;
|
|
371
|
+
for (let column = 0; column < 4; column += 1) {
|
|
372
|
+
const base = column * 4;
|
|
373
|
+
const w = clean[base + 3] ?? 0;
|
|
374
|
+
jittered[base] = (clean[base] ?? 0) + jx * w;
|
|
375
|
+
jittered[base + 1] = (clean[base + 1] ?? 0) + jy * w;
|
|
376
|
+
jittered[base + 2] = clean[base + 2] ?? 0;
|
|
377
|
+
jittered[base + 3] = w;
|
|
378
|
+
}
|
|
379
|
+
deviceOf(engine)?.queue.writeBuffer(uniformsOf.buffer, 0, jittered);
|
|
380
|
+
const elements = viewProjection.elements;
|
|
381
|
+
for (let index = 0; index < 16; index += 1) elements[index] = clean[index] ?? 0;
|
|
382
|
+
if (!Mat4.invertToRef(elements, inverse)) inverse.identity();
|
|
383
|
+
uniforms.set(inverse.elements, 0);
|
|
384
|
+
uniforms.set(previousViewProjection, 16);
|
|
385
|
+
uniforms[32] = blend;
|
|
386
|
+
uniforms[33] = reset ? 1 : 0;
|
|
387
|
+
uniforms[34] = options.clamp ? 1 : 0;
|
|
388
|
+
uniforms[35] = DEPTH_TOLERANCE;
|
|
389
|
+
uniforms[36] = width;
|
|
390
|
+
uniforms[37] = height;
|
|
391
|
+
setEffectUniforms(resolveEffect, uniforms);
|
|
392
|
+
previousViewProjection.set(clean.subarray(0, 16));
|
|
393
|
+
return 0;
|
|
394
|
+
},
|
|
395
|
+
dispose() {
|
|
396
|
+
for (const stop of stops) stop();
|
|
397
|
+
stops.length = 0;
|
|
398
|
+
for (const effect of effects) disposeEffectWrapper(effect);
|
|
399
|
+
for (const target of targets) disposeRenderTargetTexture(target);
|
|
400
|
+
inputs.release();
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
for (const task of [
|
|
404
|
+
jitterTask,
|
|
405
|
+
resolveTask,
|
|
406
|
+
historyTask,
|
|
407
|
+
outputTask,
|
|
408
|
+
depthTask
|
|
409
|
+
]) hdr.insertLinearTask(task, isFrameGraphBuilt);
|
|
410
|
+
return {
|
|
411
|
+
reset() {
|
|
412
|
+
resetPending = true;
|
|
413
|
+
},
|
|
414
|
+
get resetCount() {
|
|
415
|
+
return resetCount;
|
|
416
|
+
},
|
|
417
|
+
get jitter() {
|
|
418
|
+
return jitter;
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* A surface-sized colour target with a sampled facade.
|
|
424
|
+
*
|
|
425
|
+
* @param engine - The engine, which is also the surface.
|
|
426
|
+
* @param label - The GPU label.
|
|
427
|
+
* @param format - The colour format.
|
|
428
|
+
* @returns The target.
|
|
429
|
+
*/
|
|
430
|
+
function surfaceTarget(engine, label, format) {
|
|
431
|
+
return createSurfaceRenderTargetTexture(engine, {
|
|
432
|
+
lbl: label,
|
|
433
|
+
format,
|
|
434
|
+
samples: 1,
|
|
435
|
+
size: engine
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* The scene uniform buffer of Lite's render task and its clean CPU copy.
|
|
440
|
+
*
|
|
441
|
+
* @remarks
|
|
442
|
+
* Neither is declared in `index.d.ts`; both are created with the task
|
|
443
|
+
* (`lib/frame-graph/render-task-base.js`, `_sceneUBO` and `_suData`). If a later Lite renames them
|
|
444
|
+
* the jitter stops and TAA degrades to temporal smoothing without sub-pixel samples.
|
|
445
|
+
*
|
|
446
|
+
* @param task - The `"scene"` render task.
|
|
447
|
+
* @returns The two fields, or `null` when Lite no longer has them.
|
|
448
|
+
*/
|
|
449
|
+
function sceneTaskUniforms(task) {
|
|
450
|
+
const buffer = Reflect.get(task, "_sceneUBO");
|
|
451
|
+
const data = Reflect.get(task, "_suData");
|
|
452
|
+
if (!(data instanceof Float32Array) || data.length < 35 || !isGpuBuffer(buffer)) return null;
|
|
453
|
+
return {
|
|
454
|
+
buffer,
|
|
455
|
+
data
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Whether a value is a `GPUBuffer`.
|
|
460
|
+
*
|
|
461
|
+
* @param value - The value read from the task.
|
|
462
|
+
* @returns `true` for a buffer.
|
|
463
|
+
*/
|
|
464
|
+
function isGpuBuffer(value) {
|
|
465
|
+
return typeof GPUBuffer !== "undefined" && value instanceof GPUBuffer;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* An engine's current device; replaced after a device-loss recovery, so read on every use.
|
|
469
|
+
*
|
|
470
|
+
* @param engine - The engine.
|
|
471
|
+
* @returns The device, or `null`.
|
|
472
|
+
*/
|
|
473
|
+
function deviceOf(engine) {
|
|
474
|
+
const device = Reflect.get(engine, "_device");
|
|
475
|
+
return typeof GPUDevice !== "undefined" && device instanceof GPUDevice ? device : null;
|
|
476
|
+
}
|
|
477
|
+
//#endregion
|
|
478
|
+
export { installTemporalAntiAliasing };
|
|
479
|
+
|
|
480
|
+
//# sourceMappingURL=taa-BwBZLy11.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taa-BwBZLy11.js","names":[],"sources":["../src/lite/gpu/taa.ts"],"sourcesContent":["import {\n createCopyToTextureTask,\n createEffectRenderTask,\n createEffectWrapper,\n createSurfaceRenderTargetTexture,\n disposeEffectWrapper,\n disposeRenderTargetTexture,\n onRenderTargetTextureResize,\n setEffectTexture,\n setEffectUniforms,\n} from \"@babylonjs/lite\";\nimport { Mat4 } from \"../../math/mat4.js\";\nimport type { HdrOutputHandle } from \"./render-path.js\";\nimport type { SceneInputs } from \"./scene-inputs.js\";\nimport type { EffectWrapper, EngineContext, RenderTargetTextureResult, SceneContext, Task } from \"@babylonjs/lite\";\n\n/**\n * Temporal anti-aliasing (`docs/plan/2026-11-gi-phase-1-execution-plan.md`, steps G5 and G6;\n * `docs/architecture/07-rendering.md` §2.13). Its own chunk: the renderer imports it only when\n * `rendering.taa.enabled` is on, so a project without TAA loads none of it and its frame graph has\n * none of these tasks (`CONSTITUTION.md` §2.5). HDR only: it runs on linear `rgba16float` colour,\n * between the scene pass and the HDR output pass.\n *\n * ```text\n * scene-inputs (depth, velocity) → scene (jittered) → taa-jitter → taa-resolve → resolved\n * resolved ─(copy)─→ history\n * resolved ─ taa-output (sharpen) ─→ hdr scene target\n * depth ─ taa-depth ─→ previous depth\n * ```\n *\n * - **Jitter.** Every frame the scene pass's view-projection is offset by a Halton (2,3) sub-pixel\n * step, written over the first 64 bytes of the scene task's scene uniform buffer after the task\n * wrote its own (the trick Lite's own `createTaaPostProcessTask` uses, `lib/post-process/taa.js`).\n * Only the GPU copy is jittered: Lite's camera caches, picking, `Camera.worldToScreen` and the\n * scene-inputs geometry pass all see the clean matrices.\n * - **Reprojection.** Where the geometry pass drew, the previous position comes from the scene-inputs\n * velocity (the nearest depth in the 3×3 neighbourhood picks the texel). Where it drew nothing (the\n * sky), the pixel is reprojected through the inverse view-projection and the previous one. Lite\n * 1.34's PBR velocity tracks camera motion only, so a moving PBR mesh relies on the clamp below.\n * - **Clamping.** History is clipped to the variance box of the current 3×3 neighbourhood in YCoCg,\n * on colour compressed by `c / (1 + max(c))` so bright HDR texels do not flicker.\n * - **Rejection.** History is dropped where the reprojected position leaves the screen, and where\n * the depth stored last frame at that position disagrees with where this pixel's surface would\n * have been (a disocclusion).\n * - **Reset.** On the first frame, a resize, a camera cut (a jump further than `cutDistance`, or a\n * turn over 60° in one frame) and on {@link TaaHandle.reset}.\n */\n\n/**\n * The frame-graph task names, in the order they run after `\"scene\"`.\n *\n * @internal\n */\nexport const TAA_TASK_NAMES = {\n jitter: \"ignifx:taa-jitter\",\n resolve: \"ignifx:taa-resolve\",\n history: \"ignifx:taa-history\",\n output: \"ignifx:taa-output\",\n depth: \"ignifx:taa-depth\",\n} as const;\n\n/**\n * The tuning the TAA chunk reads, resolved from `rendering.taa`.\n *\n * @internal\n */\nexport interface TaaOptions {\n /** Weight of the current frame, 0–1; lower is smoother and slower to respond. */\n readonly blend: number;\n /** Output sharpening, 0–1. */\n readonly sharpness: number;\n /** Whether history is clipped to the current neighbourhood (off only to debug ghosting). */\n readonly clamp: boolean;\n /** How far the camera may move in one frame, in world units, before history resets. */\n readonly cutDistance: number;\n}\n\n/**\n * The installed TAA passes.\n *\n * @internal\n */\nexport interface TaaHandle {\n /** Drops the history on the next frame, as a camera cut does. */\n reset(): void;\n /** How many times history has been reset, first frame included; for tests and diagnostics. */\n readonly resetCount: number;\n /** The jitter of the last frame, in pixels, each in `[-0.5, 0.5)`. */\n readonly jitter: readonly [number, number];\n}\n\n/** How many Halton (2,3) points the jitter cycles through. */\nconst HALTON_SAMPLES = 8;\n\n/** Cosine of the largest turn in one frame that is not a camera cut (60°). */\nconst CUT_COSINE = 0.5;\n\n/** Relative depth disagreement above which reprojected history counts as disoccluded. */\nconst DEPTH_TOLERANCE = 0.05;\n\n/** The resolve's uniform block: inverse view-projection, previous view-projection, params, size. */\nconst RESOLVE_FLOATS = 40;\n\n/**\n * The `index`-th element of the Halton sequence in `base`.\n *\n * @param index - 1-based index.\n * @param base - The base, 2 or 3.\n * @returns A value in `[0, 1)`.\n *\n * @internal\n */\nexport function halton(index: number, base: number): number {\n let fraction = 1;\n let result = 0;\n let rest = index;\n while (rest > 0) {\n fraction /= base;\n result += fraction * (rest % base);\n rest = Math.floor(rest / base);\n }\n return result;\n}\n\n/**\n * Whether the camera moved far enough between two frames to count as a cut.\n *\n * @param previous - Last frame's eye position and forward axis: `[x, y, z, fx, fy, fz]`.\n * @param current - This frame's, in the same layout.\n * @param cutDistance - The largest jump that is not a cut, in world units.\n * @returns `true` for a cut.\n *\n * @internal\n */\nexport function isCameraCut(previous: ArrayLike<number>, current: ArrayLike<number>, cutDistance: number): boolean {\n const dx = (current[0] ?? 0) - (previous[0] ?? 0);\n const dy = (current[1] ?? 0) - (previous[1] ?? 0);\n const dz = (current[2] ?? 0) - (previous[2] ?? 0);\n if (dx * dx + dy * dy + dz * dz > cutDistance * cutDistance) {\n return true;\n }\n const dot =\n (current[3] ?? 0) * (previous[3] ?? 0) +\n (current[4] ?? 0) * (previous[4] ?? 0) +\n (current[5] ?? 0) * (previous[5] ?? 0);\n return dot < CUT_COSINE;\n}\n\n/**\n * The resolve pass's fragment shader.\n *\n * @returns The WGSL, with Lite's `effectFragment` entry point.\n *\n * @internal\n */\nexport function taaResolveFragmentWgsl(): string {\n return `struct TaaUniforms{invViewProj:mat4x4<f32>,prevViewProj:mat4x4<f32>,params:vec4<f32>,size:vec4<f32>};\n@group(0)@binding(0)var<uniform>taa:TaaUniforms;\n@group(0)@binding(1)var currentColor:texture_2d<f32>;\n@group(0)@binding(2)var historyColor:texture_2d<f32>;\n@group(0)@binding(3)var sceneDepth:texture_depth_2d;\n@group(0)@binding(4)var sceneVelocity:texture_2d<f32>;\n@group(0)@binding(5)var previousDepth:texture_2d<f32>;\nfn taaCompress(c:vec3<f32>)->vec3<f32>{return c/(1.0+max(c.r,max(c.g,c.b)));}\nfn taaExpand(c:vec3<f32>)->vec3<f32>{return c/max(1.0-max(c.r,max(c.g,c.b)),1e-4);}\nfn taaToYCoCg(c:vec3<f32>)->vec3<f32>{return vec3<f32>(0.25*c.r+0.5*c.g+0.25*c.b,0.5*c.r-0.5*c.b,-0.25*c.r+0.5*c.g-0.25*c.b);}\nfn taaFromYCoCg(c:vec3<f32>)->vec3<f32>{let t=c.x-c.z;return vec3<f32>(t+c.y,c.x+c.z,t-c.y);}\nfn taaCatmullRom(t:f32)->vec4<f32>{let t2=t*t;let t3=t2*t;\nreturn vec4<f32>(-0.5*t3+t2-0.5*t,1.5*t3-2.5*t2+1.0,-1.5*t3+2.0*t2+0.5*t,0.5*t3-0.5*t2);}\nfn taaHistory(pos:vec2<f32>,size:vec2<i32>)->vec3<f32>{\nlet p=pos-vec2<f32>(0.5);let base=floor(p);let f=p-base;\nvar wx=taaCatmullRom(f.x);var wy=taaCatmullRom(f.y);var sum=vec3<f32>(0.0);\nfor(var j=0;j<4;j++){for(var i=0;i<4;i++){\nlet q=clamp(vec2<i32>(base)+vec2<i32>(i-1,j-1),vec2<i32>(0),size-vec2<i32>(1));\nsum+=textureLoad(historyColor,q,0).rgb*(wx[i]*wy[j]);}}\nreturn max(sum,vec3<f32>(0.0));}\n@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{\nlet size=vec2<i32>(taa.size.xy);\nlet pixel=vec2<i32>(fragment.position.xy);\nlet current=textureLoad(currentColor,pixel,0);\nlet currentY=taaToYCoCg(taaCompress(max(current.rgb,vec3<f32>(0.0))));\nvar m1=vec3<f32>(0.0);var m2=vec3<f32>(0.0);\nvar lo=vec3<f32>(1e9);var hi=vec3<f32>(-1e9);\nvar nearest=0.0;var nearestPixel=pixel;\nfor(var y=-1;y<=1;y++){for(var x=-1;x<=1;x++){\nlet q=clamp(pixel+vec2<i32>(x,y),vec2<i32>(0),size-vec2<i32>(1));\nlet c=taaToYCoCg(taaCompress(max(textureLoad(currentColor,q,0).rgb,vec3<f32>(0.0))));\nm1+=c;m2+=c*c;lo=min(lo,c);hi=max(hi,c);\nlet d=textureLoad(sceneDepth,q,0);\nif(d>nearest){nearest=d;nearestPixel=q;}}}\nlet uv=fragment.position.xy/taa.size.xy;\nlet depth=textureLoad(sceneDepth,pixel,0);\nlet ndc=vec4<f32>(uv.x*2.0-1.0,1.0-uv.y*2.0,depth,1.0);\nlet world=taa.invViewProj*ndc;\nlet prevClip=taa.prevViewProj*world;\nvar prevUv:vec2<f32>;\nif(nearest>0.0){let v=textureLoad(sceneVelocity,nearestPixel,0).xy;prevUv=uv+vec2<f32>(v.x,-v.y);}\nelse{let p=prevClip.xy/prevClip.w;prevUv=vec2<f32>(p.x*0.5+0.5,0.5-p.y*0.5);}\nvar alpha=taa.params.x;\nif(taa.params.y>0.5||prevClip.w<=0.0||any(prevUv<vec2<f32>(0.0))||any(prevUv>vec2<f32>(1.0))){alpha=1.0;}\nif(depth>0.0&&alpha<1.0){\nlet stored=textureLoad(previousDepth,clamp(vec2<i32>(prevUv*taa.size.xy),vec2<i32>(0),size-vec2<i32>(1)),0).r;\nlet expected=prevClip.z/prevClip.w;\nif(abs(expected-stored)>taa.params.w*max(expected,1e-6)){alpha=1.0;}}\nvar history=taaToYCoCg(taaCompress(taaHistory(prevUv*taa.size.xy,size)));\nif(taa.params.z>0.5){\nlet mean=m1/9.0;let sigma=sqrt(max(m2/9.0-mean*mean,vec3<f32>(0.0)));\nlet boxLo=max(lo,mean-1.25*sigma);let boxHi=min(hi,mean+1.25*sigma);\nlet centre=0.5*(boxLo+boxHi);let extent=max(0.5*(boxHi-boxLo),vec3<f32>(1e-5));\nlet offset=history-centre;let unit=abs(offset/extent);let m=max(unit.x,max(unit.y,unit.z));\nif(m>1.0){history=centre+offset/m;}}\nlet blended=mix(history,currentY,alpha);\nreturn vec4<f32>(max(taaExpand(taaFromYCoCg(blended)),vec3<f32>(0.0)),current.a);}`;\n}\n\n/**\n * The output pass's fragment shader: an optional sharpen, clamped to the cross neighbourhood so it\n * cannot ring, from the resolved colour into the HDR scene target.\n *\n * @returns The WGSL.\n *\n * @internal\n */\nexport function taaOutputFragmentWgsl(): string {\n return `struct TaaOutputUniforms{params:vec4<f32>};\n@group(0)@binding(0)var<uniform>taaOutput:TaaOutputUniforms;\n@group(0)@binding(1)var resolvedColor:texture_2d<f32>;\n@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{\nlet pixel=vec2<i32>(fragment.position.xy);\nlet c=textureLoad(resolvedColor,pixel,0);\nlet k=taaOutput.params.x;\nif(k<=0.0){return c;}\nlet last=vec2<i32>(textureDimensions(resolvedColor))-vec2<i32>(1);\nlet n=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(0,-1),vec2<i32>(0),last),0).rgb;\nlet s=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(0,1),vec2<i32>(0),last),0).rgb;\nlet e=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(1,0),vec2<i32>(0),last),0).rgb;\nlet w=textureLoad(resolvedColor,clamp(pixel+vec2<i32>(-1,0),vec2<i32>(0),last),0).rgb;\nlet lo=min(c.rgb,min(min(n,s),min(e,w)));let hi=max(c.rgb,max(max(n,s),max(e,w)));\nlet sharp=c.rgb+(c.rgb-0.25*(n+s+e+w))*k;\nreturn vec4<f32>(clamp(sharp,lo,hi),c.a);}`;\n}\n\n/** The depth copy's fragment shader: scene depth into an `r32float` target the next frame reads. */\nconst DEPTH_COPY_WGSL = `@group(0)@binding(0)var sceneDepth:texture_depth_2d;\n@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{\nreturn vec4<f32>(textureLoad(sceneDepth,vec2<i32>(fragment.position.xy),0),0.0,0.0,1.0);}`;\n\n/** The two private fields of Lite 1.34's render task the jitter writes through. */\ninterface SceneTaskUniforms {\n /** The scene uniform buffer; the view-projection is its first 64 bytes. */\n readonly buffer: GPUBuffer;\n /** The clean CPU copy the task last uploaded; view-projection at 0–15, view at 16–31, eye at 32–34. */\n readonly data: Float32Array;\n}\n\n/**\n * Builds the TAA passes and splices them in between the scene pass and the HDR output pass.\n *\n * @remarks\n * Call it after the HDR render path exists. The lease is the caller's; it is released when the\n * frame graph disposes the jitter task.\n *\n * @param engine - The engine.\n * @param scene - The scene with an HDR render path.\n * @param hdr - The HDR output handle.\n * @param inputs - A scene-inputs lease (depth, velocity).\n * @param options - The tuning.\n * @param isFrameGraphBuilt - Whether the tasks must be recorded now.\n * @returns The handle.\n *\n * @internal\n */\nexport function installTemporalAntiAliasing(\n engine: EngineContext,\n scene: SceneContext,\n hdr: HdrOutputHandle,\n inputs: SceneInputs,\n options: TaaOptions,\n isFrameGraphBuilt: boolean,\n): TaaHandle {\n const resolved = surfaceTarget(engine, \"ignifx:taa-resolved\", \"rgba16float\");\n const history = surfaceTarget(engine, \"ignifx:taa-history\", \"rgba16float\");\n const previousDepth = surfaceTarget(engine, \"ignifx:taa-previous-depth\", \"r32float\");\n const targets = [resolved, history, previousDepth];\n\n const resolveEffect = createEffectWrapper(engine, {\n name: TAA_TASK_NAMES.resolve,\n fragmentWGSL: taaResolveFragmentWgsl(),\n bindings: [\n { name: \"taa\", binding: 0, kind: \"uniform\", uniformByteLength: RESOLVE_FLOATS * 4 },\n { name: \"currentColor\", binding: 1, kind: \"texture\" },\n { name: \"historyColor\", binding: 2, kind: \"texture\" },\n { name: \"sceneDepth\", binding: 3, kind: \"texture\", textureSampleType: \"depth\" },\n { name: \"sceneVelocity\", binding: 4, kind: \"texture\" },\n { name: \"previousDepth\", binding: 5, kind: \"texture\", textureSampleType: \"unfilterable-float\" },\n ],\n });\n const outputEffect = createEffectWrapper(engine, {\n name: TAA_TASK_NAMES.output,\n fragmentWGSL: taaOutputFragmentWgsl(),\n bindings: [\n { name: \"taaOutput\", binding: 0, kind: \"uniform\", uniformByteLength: 16 },\n { name: \"resolvedColor\", binding: 1, kind: \"texture\" },\n ],\n });\n const depthEffect = createEffectWrapper(engine, {\n name: TAA_TASK_NAMES.depth,\n fragmentWGSL: DEPTH_COPY_WGSL,\n bindings: [{ name: \"sceneDepth\", binding: 0, kind: \"texture\", textureSampleType: \"depth\" }],\n });\n const effects: readonly EffectWrapper[] = [resolveEffect, outputEffect, depthEffect];\n\n let resetPending = true;\n let resetCount = 0;\n const bind = (): void => {\n setEffectTexture(resolveEffect, 1, hdr.sceneTexture);\n setEffectTexture(resolveEffect, 2, history.texture);\n setEffectTexture(resolveEffect, 3, inputs.depth);\n setEffectTexture(resolveEffect, 4, inputs.velocity);\n setEffectTexture(resolveEffect, 5, previousDepth.texture);\n setEffectTexture(outputEffect, 1, resolved.texture);\n setEffectTexture(depthEffect, 0, inputs.depth);\n };\n bind();\n // A resize or a recovered device swaps the textures behind the facades: rebind, and drop history.\n const onResize = (): void => {\n bind();\n resetPending = true;\n };\n const stops = [inputs.onChange(onResize), ...targets.map((target) => onRenderTargetTextureResize(target, onResize))];\n setEffectUniforms(outputEffect, new Float32Array([Math.max(0, options.sharpness), 0, 0, 0]));\n\n const resolveTask = createEffectRenderTask(\n { name: TAA_TASK_NAMES.resolve, effect: resolveEffect, target: resolved.rt, clear: false },\n engine,\n scene,\n );\n const historyTask = createCopyToTextureTask(\n { name: TAA_TASK_NAMES.history, sourceTexture: resolved.rt, targetTexture: history.rt },\n engine,\n scene,\n );\n const outputTask = createEffectRenderTask(\n { name: TAA_TASK_NAMES.output, effect: outputEffect, target: hdr.sceneTarget, clear: false },\n engine,\n scene,\n );\n const depthTask = createEffectRenderTask(\n { name: TAA_TASK_NAMES.depth, effect: depthEffect, target: previousDepth.rt, clear: false },\n engine,\n scene,\n );\n\n const uniforms = new Float32Array(RESOLVE_FLOATS);\n const jittered = new Float32Array(16);\n const viewProjection = new Mat4();\n const inverse = new Mat4();\n const previousViewProjection = new Float32Array(16);\n const previousPose = new Float32Array(6);\n const pose = new Float32Array(6);\n const jitter: [number, number] = [0, 0];\n let haltonIndex = 0;\n let lastWidth = 0;\n let lastHeight = 0;\n const blend = Math.min(1, Math.max(0.01, options.blend));\n\n const jitterTask: Task & { readonly _passes: unknown[] } = {\n name: TAA_TASK_NAMES.jitter,\n engine,\n scene,\n _passes: [],\n record(): void {\n // Nothing to record: the work is uploads, done in `execute`.\n },\n execute(): number {\n const width = hdr.sceneTexture.width;\n const height = hdr.sceneTexture.height;\n const uniformsOf = sceneTaskUniforms(hdr.sceneTask);\n if (width <= 0 || height <= 0 || uniformsOf === null) {\n return 0;\n }\n const clean = uniformsOf.data;\n for (let index = 0; index < 3; index += 1) {\n pose[index] = clean[32 + index] ?? 0;\n // The view matrix's third row is the camera's forward axis (left-handed, +Z forward).\n pose[3 + index] = clean[18 + 4 * index] ?? 0;\n }\n let reset = resetPending || width !== lastWidth || height !== lastHeight;\n if (!reset && isCameraCut(previousPose, pose, options.cutDistance)) {\n reset = true;\n }\n if (reset) {\n resetCount += 1;\n previousViewProjection.set(clean.subarray(0, 16));\n }\n resetPending = false;\n lastWidth = width;\n lastHeight = height;\n previousPose.set(pose);\n\n haltonIndex = (haltonIndex % HALTON_SAMPLES) + 1;\n jitter[0] = halton(haltonIndex, 2) - 0.5;\n jitter[1] = halton(haltonIndex, 3) - 0.5;\n const jx = (jitter[0] * 2) / width;\n const jy = (jitter[1] * 2) / height;\n for (let column = 0; column < 4; column += 1) {\n const base = column * 4;\n const w = clean[base + 3] ?? 0;\n jittered[base] = (clean[base] ?? 0) + jx * w;\n jittered[base + 1] = (clean[base + 1] ?? 0) + jy * w;\n jittered[base + 2] = clean[base + 2] ?? 0;\n jittered[base + 3] = w;\n }\n const device = deviceOf(engine);\n device?.queue.writeBuffer(uniformsOf.buffer, 0, jittered);\n\n const elements = viewProjection.elements;\n for (let index = 0; index < 16; index += 1) {\n elements[index] = clean[index] ?? 0;\n }\n if (!Mat4.invertToRef(elements, inverse)) {\n inverse.identity();\n }\n uniforms.set(inverse.elements, 0);\n uniforms.set(previousViewProjection, 16);\n uniforms[32] = blend;\n uniforms[33] = reset ? 1 : 0;\n uniforms[34] = options.clamp ? 1 : 0;\n uniforms[35] = DEPTH_TOLERANCE;\n uniforms[36] = width;\n uniforms[37] = height;\n setEffectUniforms(resolveEffect, uniforms);\n previousViewProjection.set(clean.subarray(0, 16));\n return 0;\n },\n dispose(): void {\n for (const stop of stops) {\n stop();\n }\n stops.length = 0;\n for (const effect of effects) {\n disposeEffectWrapper(effect);\n }\n for (const target of targets) {\n disposeRenderTargetTexture(target);\n }\n inputs.release();\n },\n };\n\n for (const task of [jitterTask, resolveTask, historyTask, outputTask, depthTask]) {\n hdr.insertLinearTask(task, isFrameGraphBuilt);\n }\n\n return {\n reset(): void {\n resetPending = true;\n },\n get resetCount(): number {\n return resetCount;\n },\n get jitter(): readonly [number, number] {\n return jitter;\n },\n };\n}\n\n/**\n * A surface-sized colour target with a sampled facade.\n *\n * @param engine - The engine, which is also the surface.\n * @param label - The GPU label.\n * @param format - The colour format.\n * @returns The target.\n */\nfunction surfaceTarget(engine: EngineContext, label: string, format: GPUTextureFormat): RenderTargetTextureResult {\n return createSurfaceRenderTargetTexture(engine, { lbl: label, format, samples: 1, size: engine });\n}\n\n/**\n * The scene uniform buffer of Lite's render task and its clean CPU copy.\n *\n * @remarks\n * Neither is declared in `index.d.ts`; both are created with the task\n * (`lib/frame-graph/render-task-base.js`, `_sceneUBO` and `_suData`). If a later Lite renames them\n * the jitter stops and TAA degrades to temporal smoothing without sub-pixel samples.\n *\n * @param task - The `\"scene\"` render task.\n * @returns The two fields, or `null` when Lite no longer has them.\n */\nfunction sceneTaskUniforms(task: Task): SceneTaskUniforms | null {\n const buffer: unknown = Reflect.get(task, \"_sceneUBO\");\n const data: unknown = Reflect.get(task, \"_suData\");\n if (!(data instanceof Float32Array) || data.length < 35 || !isGpuBuffer(buffer)) {\n return null;\n }\n return { buffer, data };\n}\n\n/**\n * Whether a value is a `GPUBuffer`.\n *\n * @param value - The value read from the task.\n * @returns `true` for a buffer.\n */\nfunction isGpuBuffer(value: unknown): value is GPUBuffer {\n return typeof GPUBuffer !== \"undefined\" && value instanceof GPUBuffer;\n}\n\n/**\n * An engine's current device; replaced after a device-loss recovery, so read on every use.\n *\n * @param engine - The engine.\n * @returns The device, or `null`.\n */\nfunction deviceOf(engine: EngineContext): GPUDevice | null {\n const device: unknown = Reflect.get(engine, \"_device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