@carbonenginejs/runtime-trinity 0.7.0 → 0.8.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/eve/scene/EveSpaceScene.js +287 -1
- package/dist/eve/scene/EveSpaceScene.js.map +1 -1
- package/dist/eve/spaceObject/EveTransform.js +43 -1
- package/dist/eve/spaceObject/EveTransform.js.map +1 -1
- package/dist/trinityCore/rawData/CjsPerFrameLayouts.js +517 -0
- package/dist/trinityCore/rawData/CjsPerFrameLayouts.js.map +1 -0
- package/dist/trinityCore/rawData/CjsPerObjectLayouts.js +9 -150
- package/dist/trinityCore/rawData/CjsPerObjectLayouts.js.map +1 -1
- package/dist/trinityCore/rawData/RawData.js +31 -3
- package/dist/trinityCore/rawData/RawData.js.map +1 -1
- package/dist/trinityCore/rawData/constantLayout.js +175 -0
- package/dist/trinityCore/rawData/constantLayout.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { Types, IDENTITY, ZERO4, toRawLayout, buildLayouts } from './constantLayout.js';
|
|
2
|
+
|
|
3
|
+
// Per-frame constant-data layouts.
|
|
4
|
+
//
|
|
5
|
+
// The twin of CjsPerObjectLayouts, one tier up: these are the buffers bound
|
|
6
|
+
// once per frame rather than once per draw. Every EVE shader's global input
|
|
7
|
+
// list opens with `PerFrameVS;PerFramePS;` (ParserUtils.cpp:525-533 recognises
|
|
8
|
+
// exactly those two names), so nothing can be bound without them.
|
|
9
|
+
//
|
|
10
|
+
// Same rules as the per-object catalog, for the same reason - Carbon memcpys
|
|
11
|
+
// the C++ struct into the buffer, so declaration order IS the byte layout:
|
|
12
|
+
//
|
|
13
|
+
// vs - bound to the vertex stage (Carbon's perFrameVsMask also covers
|
|
14
|
+
// cs/gs/hs/ds; see EveSpaceScene.cpp:824)
|
|
15
|
+
// ps - bound to the pixel stage
|
|
16
|
+
//
|
|
17
|
+
// Every matrix here is TRANSPOSED except the two Carbon comments call out:
|
|
18
|
+
// `ViewInverseTransposeMat` is stored UNtransposed, because the shader wants
|
|
19
|
+
// column_major and the value wanted is already the transpose - so
|
|
20
|
+
// transpose(transpose(m)) == m (EveSpaceScene.cpp:3023-3024, 3079-3080). See
|
|
21
|
+
// the carbon-math-conventions skill.
|
|
22
|
+
//
|
|
23
|
+
// There are two families, and they are NOT interchangeable:
|
|
24
|
+
//
|
|
25
|
+
// Tr2PerFrame* - Tr2ConstantBufferFormats.h:53-92, the generic engine
|
|
26
|
+
// block used by interiors, WoD baking, and primitives.
|
|
27
|
+
// EveSpaceScene* - EveSpaceScene.h:240-327, the much larger space-scene
|
|
28
|
+
// block, with shadow cascades and froxel fog.
|
|
29
|
+
//
|
|
30
|
+
// A shader reads whichever its scene binds; both start at the same register
|
|
31
|
+
// (Tr2Renderer::GetPerFrameVSStartRegister), which is why the names collide in
|
|
32
|
+
// HLSL but the layouts do not.
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* EveSpaceScene.h:218-223. Nested in both space-scene blocks; laid out inline
|
|
36
|
+
* because the catalog resolves flat float offsets, not nested structs.
|
|
37
|
+
*
|
|
38
|
+
* `DirWorld` is stored NEGATED and normalized - shaders work with the
|
|
39
|
+
* direction TO the light (EveSpaceScene.cpp:3039).
|
|
40
|
+
*/
|
|
41
|
+
const SUN_DATA = Object.freeze({
|
|
42
|
+
SunDirWorld: {
|
|
43
|
+
type: Types.VECTOR3
|
|
44
|
+
},
|
|
45
|
+
SunUnusedPad0: {
|
|
46
|
+
type: Types.FLOAT
|
|
47
|
+
},
|
|
48
|
+
SunDiffuseColor: {
|
|
49
|
+
type: Types.COLOR
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/** Tr2ShadowMap.h:15. */
|
|
54
|
+
const SHADOW_FRUSTUM_COUNT = 16;
|
|
55
|
+
|
|
56
|
+
/** Tr2ConstantBufferFormats.h:53 - the generic per-frame vertex block. */
|
|
57
|
+
const Tr2PerFrame = Object.freeze({
|
|
58
|
+
vs: {
|
|
59
|
+
struct: "Tr2PerFrameVSData",
|
|
60
|
+
fields: {
|
|
61
|
+
ViewInverseTransposeMat: {
|
|
62
|
+
type: Types.MATRIX4,
|
|
63
|
+
default: IDENTITY
|
|
64
|
+
},
|
|
65
|
+
sunDirWorld: {
|
|
66
|
+
type: Types.VECTOR4
|
|
67
|
+
},
|
|
68
|
+
sceneFogColor: {
|
|
69
|
+
type: Types.COLOR
|
|
70
|
+
},
|
|
71
|
+
ViewProjectionMat: {
|
|
72
|
+
type: Types.MATRIX4,
|
|
73
|
+
default: IDENTITY
|
|
74
|
+
},
|
|
75
|
+
ViewMat: {
|
|
76
|
+
type: Types.MATRIX4,
|
|
77
|
+
default: IDENTITY
|
|
78
|
+
},
|
|
79
|
+
ProjectionMat: {
|
|
80
|
+
type: Types.MATRIX4,
|
|
81
|
+
default: IDENTITY
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
/** Tr2ConstantBufferFormats.h:73. */
|
|
86
|
+
ps: {
|
|
87
|
+
struct: "Tr2PerFramePSData",
|
|
88
|
+
fields: {
|
|
89
|
+
ViewInverseTransposeMat: {
|
|
90
|
+
type: Types.MATRIX4,
|
|
91
|
+
default: IDENTITY
|
|
92
|
+
},
|
|
93
|
+
sceneAmbientColor: {
|
|
94
|
+
type: Types.COLOR
|
|
95
|
+
},
|
|
96
|
+
sceneFogColor: {
|
|
97
|
+
type: Types.COLOR
|
|
98
|
+
},
|
|
99
|
+
sunDirWorld: {
|
|
100
|
+
type: Types.VECTOR4
|
|
101
|
+
},
|
|
102
|
+
sunDiffuseColor: {
|
|
103
|
+
type: Types.COLOR
|
|
104
|
+
},
|
|
105
|
+
sunSpecularColor: {
|
|
106
|
+
type: Types.COLOR
|
|
107
|
+
},
|
|
108
|
+
maxFogAmount: {
|
|
109
|
+
type: Types.FLOAT
|
|
110
|
+
},
|
|
111
|
+
maxFogDistance: {
|
|
112
|
+
type: Types.FLOAT
|
|
113
|
+
},
|
|
114
|
+
minFogDistance: {
|
|
115
|
+
type: Types.FLOAT
|
|
116
|
+
},
|
|
117
|
+
/** +1 for normal RH culling, -1 for LH culling. */
|
|
118
|
+
cullDirection: {
|
|
119
|
+
type: Types.FLOAT
|
|
120
|
+
},
|
|
121
|
+
ViewProjectionMat: {
|
|
122
|
+
type: Types.MATRIX4,
|
|
123
|
+
default: IDENTITY
|
|
124
|
+
},
|
|
125
|
+
shScale: {
|
|
126
|
+
type: Types.FLOAT
|
|
127
|
+
},
|
|
128
|
+
shadowCount: {
|
|
129
|
+
type: Types.FLOAT
|
|
130
|
+
},
|
|
131
|
+
invShadowSize: {
|
|
132
|
+
type: Types.FLOAT
|
|
133
|
+
},
|
|
134
|
+
radius: {
|
|
135
|
+
type: Types.FLOAT
|
|
136
|
+
},
|
|
137
|
+
/** xy - viewport width/height, zw - viewport offset. */
|
|
138
|
+
viewPort: {
|
|
139
|
+
type: Types.VECTOR4
|
|
140
|
+
},
|
|
141
|
+
ViewProjInverse: {
|
|
142
|
+
type: Types.MATRIX4,
|
|
143
|
+
default: IDENTITY
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Tr2ConstantBufferFormats.h:66 - the two-matrix block the debug renderer
|
|
151
|
+
* binds in place of the full VS one (Tr2InteriorScene.cpp:856).
|
|
152
|
+
*/
|
|
153
|
+
const Tr2PerFrameDebug = Object.freeze({
|
|
154
|
+
vs: {
|
|
155
|
+
struct: "Tr2PerFrameVSDataDebug",
|
|
156
|
+
fields: {
|
|
157
|
+
ViewInverseTransposeMat: {
|
|
158
|
+
type: Types.MATRIX4,
|
|
159
|
+
default: IDENTITY
|
|
160
|
+
},
|
|
161
|
+
ViewProjectionMat: {
|
|
162
|
+
type: Types.MATRIX4,
|
|
163
|
+
default: IDENTITY
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Tr2ConstantBufferFormats.h:10 - one register, bound by the shadow and SSAO
|
|
171
|
+
* depth passes.
|
|
172
|
+
*/
|
|
173
|
+
const Tr2PerFrameShadow = Object.freeze({
|
|
174
|
+
ps: {
|
|
175
|
+
struct: "Tr2PerFrameShadowPSData",
|
|
176
|
+
fields: {
|
|
177
|
+
/** The SSAO depth pass hijacks this to store zNear. */
|
|
178
|
+
lightRadius: {
|
|
179
|
+
type: Types.FLOAT
|
|
180
|
+
},
|
|
181
|
+
zFar: {
|
|
182
|
+
type: Types.FLOAT
|
|
183
|
+
},
|
|
184
|
+
unused2: {
|
|
185
|
+
type: Types.FLOAT
|
|
186
|
+
},
|
|
187
|
+
unused3: {
|
|
188
|
+
type: Types.FLOAT
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* EveSpaceScene.h:300-327 / :240-294 - the space-scene per-frame blocks.
|
|
196
|
+
*
|
|
197
|
+
* Ten matrices lead the vertex block because a space frame needs the current
|
|
198
|
+
* and previous view/projection pair (motion vectors) plus the shadow and
|
|
199
|
+
* env-map transforms.
|
|
200
|
+
*/
|
|
201
|
+
const EveSpaceScenePerFrame = Object.freeze({
|
|
202
|
+
vs: {
|
|
203
|
+
struct: "EveSpaceScenePerFrameVSData",
|
|
204
|
+
fields: {
|
|
205
|
+
ViewInverseTransposeMat: {
|
|
206
|
+
type: Types.MATRIX4,
|
|
207
|
+
default: IDENTITY
|
|
208
|
+
},
|
|
209
|
+
ViewProjectionMat: {
|
|
210
|
+
type: Types.MATRIX4,
|
|
211
|
+
default: IDENTITY
|
|
212
|
+
},
|
|
213
|
+
ViewMat: {
|
|
214
|
+
type: Types.MATRIX4,
|
|
215
|
+
default: IDENTITY
|
|
216
|
+
},
|
|
217
|
+
ProjectionMat: {
|
|
218
|
+
type: Types.MATRIX4,
|
|
219
|
+
default: IDENTITY
|
|
220
|
+
},
|
|
221
|
+
ShadowViewMat: {
|
|
222
|
+
type: Types.MATRIX4,
|
|
223
|
+
default: IDENTITY
|
|
224
|
+
},
|
|
225
|
+
ShadowViewProjectionMat: {
|
|
226
|
+
type: Types.MATRIX4,
|
|
227
|
+
default: IDENTITY
|
|
228
|
+
},
|
|
229
|
+
EnvMapRotationMat: {
|
|
230
|
+
type: Types.MATRIX4,
|
|
231
|
+
default: IDENTITY
|
|
232
|
+
},
|
|
233
|
+
ViewProjectionLast: {
|
|
234
|
+
type: Types.MATRIX4,
|
|
235
|
+
default: IDENTITY
|
|
236
|
+
},
|
|
237
|
+
ViewLast: {
|
|
238
|
+
type: Types.MATRIX4,
|
|
239
|
+
default: IDENTITY
|
|
240
|
+
},
|
|
241
|
+
ProjLast: {
|
|
242
|
+
type: Types.MATRIX4,
|
|
243
|
+
default: IDENTITY
|
|
244
|
+
},
|
|
245
|
+
// Sun data reaches the vertex stage too, so lighting that is cheap
|
|
246
|
+
// enough can be done per-vertex rather than per-pixel.
|
|
247
|
+
...SUN_DATA,
|
|
248
|
+
/** x = fogEnd/range, y = 1/range, z = fogMax. */
|
|
249
|
+
FogFactors: {
|
|
250
|
+
type: Types.VECTOR3
|
|
251
|
+
},
|
|
252
|
+
pad: {
|
|
253
|
+
type: Types.FLOAT
|
|
254
|
+
},
|
|
255
|
+
TargetResolution: {
|
|
256
|
+
type: Types.VECTOR2
|
|
257
|
+
},
|
|
258
|
+
FovXY: {
|
|
259
|
+
type: Types.VECTOR2
|
|
260
|
+
},
|
|
261
|
+
/** Reconstructs clip positions without the viewport adjustment. */
|
|
262
|
+
ViewportAdjustment: {
|
|
263
|
+
type: Types.VECTOR4,
|
|
264
|
+
default: [1, 1, 1, 1]
|
|
265
|
+
},
|
|
266
|
+
Time: {
|
|
267
|
+
type: Types.FLOAT
|
|
268
|
+
},
|
|
269
|
+
Upscaling: {
|
|
270
|
+
type: Types.FLOAT,
|
|
271
|
+
default: [1]
|
|
272
|
+
},
|
|
273
|
+
ViewportSize: {
|
|
274
|
+
type: Types.VECTOR2
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
ps: {
|
|
279
|
+
struct: "EveSpaceScenePerFramePSData",
|
|
280
|
+
fields: {
|
|
281
|
+
ViewInverseTransposeMat: {
|
|
282
|
+
type: Types.MATRIX4,
|
|
283
|
+
default: IDENTITY
|
|
284
|
+
},
|
|
285
|
+
ViewMat: {
|
|
286
|
+
type: Types.MATRIX4,
|
|
287
|
+
default: IDENTITY
|
|
288
|
+
},
|
|
289
|
+
EnvMapRotationMat: {
|
|
290
|
+
type: Types.MATRIX4,
|
|
291
|
+
default: IDENTITY
|
|
292
|
+
},
|
|
293
|
+
...SUN_DATA,
|
|
294
|
+
AmbientColor: {
|
|
295
|
+
type: Types.VECTOR3
|
|
296
|
+
},
|
|
297
|
+
ReflectionIntensity: {
|
|
298
|
+
type: Types.FLOAT
|
|
299
|
+
},
|
|
300
|
+
/** rgb = fog colour, a = fogMax. */
|
|
301
|
+
FogColor: {
|
|
302
|
+
type: Types.VECTOR4
|
|
303
|
+
},
|
|
304
|
+
// ViewportOffsetSize
|
|
305
|
+
ViewportOffset: {
|
|
306
|
+
type: Types.VECTOR2
|
|
307
|
+
},
|
|
308
|
+
ViewportSize: {
|
|
309
|
+
type: Types.VECTOR2
|
|
310
|
+
},
|
|
311
|
+
// RenderTargetData
|
|
312
|
+
TargetResolution: {
|
|
313
|
+
type: Types.VECTOR2
|
|
314
|
+
},
|
|
315
|
+
/** Legacy; Carbon always writes 1 (EveSpaceScene.cpp:3138). */
|
|
316
|
+
DepthMapSampleCount: {
|
|
317
|
+
type: Types.FLOAT,
|
|
318
|
+
default: [1]
|
|
319
|
+
},
|
|
320
|
+
Debug: {
|
|
321
|
+
type: Types.FLOAT
|
|
322
|
+
},
|
|
323
|
+
ShadowMapSettings: {
|
|
324
|
+
type: Types.VECTOR4,
|
|
325
|
+
default: [1, 1, 0, 0]
|
|
326
|
+
},
|
|
327
|
+
// ShadowMapSettings2
|
|
328
|
+
ShadowCameraRange: {
|
|
329
|
+
type: Types.VECTOR2,
|
|
330
|
+
default: [1, 0]
|
|
331
|
+
},
|
|
332
|
+
ShadowLightness: {
|
|
333
|
+
type: Types.FLOAT
|
|
334
|
+
},
|
|
335
|
+
ShadowQuality: {
|
|
336
|
+
type: Types.UINT32
|
|
337
|
+
},
|
|
338
|
+
// ProjectionData
|
|
339
|
+
ProjectionToView: {
|
|
340
|
+
type: Types.VECTOR2
|
|
341
|
+
},
|
|
342
|
+
FovXY: {
|
|
343
|
+
type: Types.VECTOR2
|
|
344
|
+
},
|
|
345
|
+
// MiscData
|
|
346
|
+
Time: {
|
|
347
|
+
type: Types.FLOAT
|
|
348
|
+
},
|
|
349
|
+
SceneMipLodBias: {
|
|
350
|
+
type: Types.FLOAT
|
|
351
|
+
},
|
|
352
|
+
Upscaling: {
|
|
353
|
+
type: Types.FLOAT,
|
|
354
|
+
default: [1]
|
|
355
|
+
},
|
|
356
|
+
GammaBrightness: {
|
|
357
|
+
type: Types.FLOAT
|
|
358
|
+
},
|
|
359
|
+
FrameIndex: {
|
|
360
|
+
type: Types.UINT32
|
|
361
|
+
},
|
|
362
|
+
/** 0 if off, 1 if on. */
|
|
363
|
+
Jittering: {
|
|
364
|
+
type: Types.UINT32
|
|
365
|
+
},
|
|
366
|
+
/** For the dynamic-light shadow atlas. */
|
|
367
|
+
InverseShadowMapAtlasSize: {
|
|
368
|
+
type: Types.FLOAT
|
|
369
|
+
},
|
|
370
|
+
ShadowMapAtlasEntryMinSizeLog2: {
|
|
371
|
+
type: Types.UINT32
|
|
372
|
+
},
|
|
373
|
+
// Carbon writes 1000/10000/100000/1000000 every frame
|
|
374
|
+
// (EveSpaceScene.cpp:3196-3199). No catalog default: the four
|
|
375
|
+
// slices differ, and a catalog default is one value repeated.
|
|
376
|
+
VolumetricSlices: {
|
|
377
|
+
type: Types.FLOAT,
|
|
378
|
+
count: 4
|
|
379
|
+
},
|
|
380
|
+
/** x..w = the zFar value of each cascade split. */
|
|
381
|
+
ShadowMapValues: {
|
|
382
|
+
type: Types.VECTOR4,
|
|
383
|
+
count: 4,
|
|
384
|
+
default: ZERO4
|
|
385
|
+
},
|
|
386
|
+
ShadowMatrixVal: {
|
|
387
|
+
type: Types.MATRIX4,
|
|
388
|
+
count: SHADOW_FRUSTUM_COUNT,
|
|
389
|
+
default: IDENTITY
|
|
390
|
+
},
|
|
391
|
+
SplitInfo: {
|
|
392
|
+
type: Types.VECTOR4
|
|
393
|
+
},
|
|
394
|
+
ProjectionInverseMat: {
|
|
395
|
+
type: Types.MATRIX4,
|
|
396
|
+
default: IDENTITY
|
|
397
|
+
},
|
|
398
|
+
CascadeRanges: {
|
|
399
|
+
type: Types.VECTOR4,
|
|
400
|
+
count: 16,
|
|
401
|
+
default: ZERO4
|
|
402
|
+
},
|
|
403
|
+
// Tr2VolumetricsRenderer::FroxelPerFrameData, laid out inline
|
|
404
|
+
// (Tr2VolumetricsRenderer.h:119-135). The renderer fills it.
|
|
405
|
+
FroxelFogColor: {
|
|
406
|
+
type: Types.VECTOR3
|
|
407
|
+
},
|
|
408
|
+
FroxelBackgroundVisibility: {
|
|
409
|
+
type: Types.FLOAT
|
|
410
|
+
},
|
|
411
|
+
FroxelBaseDensity: {
|
|
412
|
+
type: Types.FLOAT
|
|
413
|
+
},
|
|
414
|
+
FroxelMaxDistance: {
|
|
415
|
+
type: Types.FLOAT
|
|
416
|
+
},
|
|
417
|
+
FroxelMaxDistanceVisibility: {
|
|
418
|
+
type: Types.FLOAT
|
|
419
|
+
},
|
|
420
|
+
FroxelEnvironmentIntensity: {
|
|
421
|
+
type: Types.FLOAT
|
|
422
|
+
},
|
|
423
|
+
FroxelEnvironmentG: {
|
|
424
|
+
type: Types.FLOAT
|
|
425
|
+
},
|
|
426
|
+
FroxelPad0: {
|
|
427
|
+
type: Types.FLOAT
|
|
428
|
+
},
|
|
429
|
+
FroxelPad1: {
|
|
430
|
+
type: Types.FLOAT
|
|
431
|
+
},
|
|
432
|
+
FroxelPad2: {
|
|
433
|
+
type: Types.FLOAT
|
|
434
|
+
},
|
|
435
|
+
/** CcpMath::Sphere[2] - xyz centre, w radius. */
|
|
436
|
+
FroxelPlanets: {
|
|
437
|
+
type: Types.VECTOR4,
|
|
438
|
+
count: 2,
|
|
439
|
+
default: ZERO4
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
const GROUPS = Object.freeze({
|
|
445
|
+
Tr2PerFrame,
|
|
446
|
+
Tr2PerFrameDebug,
|
|
447
|
+
Tr2PerFrameShadow,
|
|
448
|
+
EveSpaceScenePerFrame
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Resolved per-frame layouts, keyed by struct name. Offsets are FLOAT offsets
|
|
453
|
+
* from the start of the buffer.
|
|
454
|
+
*
|
|
455
|
+
* Deliberately a sibling of CjsPerObjectLayouts rather than more entries in
|
|
456
|
+
* it: the two tiers have different lifetimes, different owners (scene vs
|
|
457
|
+
* renderable), and an engine binds them to different slots.
|
|
458
|
+
*/
|
|
459
|
+
class CjsPerFrameLayouts {
|
|
460
|
+
static Types = Types;
|
|
461
|
+
static Groups = GROUPS;
|
|
462
|
+
|
|
463
|
+
/** Tr2ShadowMap.h:15 - the cascade count ShadowMatrixVal is sized by. */
|
|
464
|
+
static SHADOW_FRUSTUM_COUNT = SHADOW_FRUSTUM_COUNT;
|
|
465
|
+
|
|
466
|
+
/** Resolved layouts by struct name, built once. */
|
|
467
|
+
static #layouts = null;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* The layout for one struct name, or null when it is not catalogued. A
|
|
471
|
+
* caller must treat null as "not covered" and fail rather than guess.
|
|
472
|
+
*/
|
|
473
|
+
static Get(struct) {
|
|
474
|
+
return CjsPerFrameLayouts.#Resolved().get(struct) ?? null;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/** Every catalogued struct name. */
|
|
478
|
+
static Names() {
|
|
479
|
+
return [...CjsPerFrameLayouts.#Resolved().keys()];
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/** A layout in the shape RawData consumes. */
|
|
483
|
+
static ToRawLayout(struct) {
|
|
484
|
+
const layout = CjsPerFrameLayouts.Get(struct);
|
|
485
|
+
return layout ? toRawLayout(layout) : null;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/** The group a struct belongs to, with its stage key, or null. */
|
|
489
|
+
static Find(struct) {
|
|
490
|
+
for (const [group, buffers] of Object.entries(GROUPS)) {
|
|
491
|
+
for (const [key, buffer] of Object.entries(buffers)) {
|
|
492
|
+
if (buffer.struct === struct) {
|
|
493
|
+
return {
|
|
494
|
+
group,
|
|
495
|
+
key,
|
|
496
|
+
buffer
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return null;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* The resolved layout map, built once on first use and cached.
|
|
506
|
+
* @returns {Map} struct name -> resolved layout
|
|
507
|
+
*/
|
|
508
|
+
static #Resolved() {
|
|
509
|
+
if (!CjsPerFrameLayouts.#layouts) {
|
|
510
|
+
CjsPerFrameLayouts.#layouts = buildLayouts(GROUPS, "CjsPerFrameLayouts");
|
|
511
|
+
}
|
|
512
|
+
return CjsPerFrameLayouts.#layouts;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export { CjsPerFrameLayouts, EveSpaceScenePerFrame, Tr2PerFrame, Tr2PerFrameDebug, Tr2PerFrameShadow };
|
|
517
|
+
//# sourceMappingURL=CjsPerFrameLayouts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CjsPerFrameLayouts.js","sources":["../../../../src/trinityCore/rawData/CjsPerFrameLayouts.js"],"sourcesContent":["// Per-frame constant-data layouts.\n//\n// The twin of CjsPerObjectLayouts, one tier up: these are the buffers bound\n// once per frame rather than once per draw. Every EVE shader's global input\n// list opens with `PerFrameVS;PerFramePS;` (ParserUtils.cpp:525-533 recognises\n// exactly those two names), so nothing can be bound without them.\n//\n// Same rules as the per-object catalog, for the same reason - Carbon memcpys\n// the C++ struct into the buffer, so declaration order IS the byte layout:\n//\n// vs - bound to the vertex stage (Carbon's perFrameVsMask also covers\n// cs/gs/hs/ds; see EveSpaceScene.cpp:824)\n// ps - bound to the pixel stage\n//\n// Every matrix here is TRANSPOSED except the two Carbon comments call out:\n// `ViewInverseTransposeMat` is stored UNtransposed, because the shader wants\n// column_major and the value wanted is already the transpose - so\n// transpose(transpose(m)) == m (EveSpaceScene.cpp:3023-3024, 3079-3080). See\n// the carbon-math-conventions skill.\n//\n// There are two families, and they are NOT interchangeable:\n//\n// Tr2PerFrame* - Tr2ConstantBufferFormats.h:53-92, the generic engine\n// block used by interiors, WoD baking, and primitives.\n// EveSpaceScene* - EveSpaceScene.h:240-327, the much larger space-scene\n// block, with shadow cascades and froxel fog.\n//\n// A shader reads whichever its scene binds; both start at the same register\n// (Tr2Renderer::GetPerFrameVSStartRegister), which is why the names collide in\n// HLSL but the layouts do not.\nimport { IDENTITY, Types, ZERO4, buildLayouts, toRawLayout } from \"./constantLayout.js\";\n\n\n/**\n * EveSpaceScene.h:218-223. Nested in both space-scene blocks; laid out inline\n * because the catalog resolves flat float offsets, not nested structs.\n *\n * `DirWorld` is stored NEGATED and normalized - shaders work with the\n * direction TO the light (EveSpaceScene.cpp:3039).\n */\nconst SUN_DATA = Object.freeze({\n SunDirWorld: { type: Types.VECTOR3 },\n SunUnusedPad0: { type: Types.FLOAT },\n SunDiffuseColor: { type: Types.COLOR }\n});\n\n\n/** Tr2ShadowMap.h:15. */\nconst SHADOW_FRUSTUM_COUNT = 16;\n\n\n/** Tr2ConstantBufferFormats.h:53 - the generic per-frame vertex block. */\nexport const Tr2PerFrame = Object.freeze({\n vs: {\n struct: \"Tr2PerFrameVSData\",\n fields: {\n ViewInverseTransposeMat: { type: Types.MATRIX4, default: IDENTITY },\n sunDirWorld: { type: Types.VECTOR4 },\n sceneFogColor: { type: Types.COLOR },\n ViewProjectionMat: { type: Types.MATRIX4, default: IDENTITY },\n ViewMat: { type: Types.MATRIX4, default: IDENTITY },\n ProjectionMat: { type: Types.MATRIX4, default: IDENTITY }\n }\n },\n\n /** Tr2ConstantBufferFormats.h:73. */\n ps: {\n struct: \"Tr2PerFramePSData\",\n fields: {\n ViewInverseTransposeMat: { type: Types.MATRIX4, default: IDENTITY },\n sceneAmbientColor: { type: Types.COLOR },\n sceneFogColor: { type: Types.COLOR },\n sunDirWorld: { type: Types.VECTOR4 },\n sunDiffuseColor: { type: Types.COLOR },\n sunSpecularColor: { type: Types.COLOR },\n maxFogAmount: { type: Types.FLOAT },\n maxFogDistance: { type: Types.FLOAT },\n minFogDistance: { type: Types.FLOAT },\n\n /** +1 for normal RH culling, -1 for LH culling. */\n cullDirection: { type: Types.FLOAT },\n\n ViewProjectionMat: { type: Types.MATRIX4, default: IDENTITY },\n shScale: { type: Types.FLOAT },\n shadowCount: { type: Types.FLOAT },\n invShadowSize: { type: Types.FLOAT },\n radius: { type: Types.FLOAT },\n\n /** xy - viewport width/height, zw - viewport offset. */\n viewPort: { type: Types.VECTOR4 },\n\n ViewProjInverse: { type: Types.MATRIX4, default: IDENTITY }\n }\n }\n});\n\n\n/**\n * Tr2ConstantBufferFormats.h:66 - the two-matrix block the debug renderer\n * binds in place of the full VS one (Tr2InteriorScene.cpp:856).\n */\nexport const Tr2PerFrameDebug = Object.freeze({\n vs: {\n struct: \"Tr2PerFrameVSDataDebug\",\n fields: {\n ViewInverseTransposeMat: { type: Types.MATRIX4, default: IDENTITY },\n ViewProjectionMat: { type: Types.MATRIX4, default: IDENTITY }\n }\n }\n});\n\n\n/**\n * Tr2ConstantBufferFormats.h:10 - one register, bound by the shadow and SSAO\n * depth passes.\n */\nexport const Tr2PerFrameShadow = Object.freeze({\n ps: {\n struct: \"Tr2PerFrameShadowPSData\",\n fields: {\n /** The SSAO depth pass hijacks this to store zNear. */\n lightRadius: { type: Types.FLOAT },\n zFar: { type: Types.FLOAT },\n unused2: { type: Types.FLOAT },\n unused3: { type: Types.FLOAT }\n }\n }\n});\n\n\n/**\n * EveSpaceScene.h:300-327 / :240-294 - the space-scene per-frame blocks.\n *\n * Ten matrices lead the vertex block because a space frame needs the current\n * and previous view/projection pair (motion vectors) plus the shadow and\n * env-map transforms.\n */\nexport const EveSpaceScenePerFrame = Object.freeze({\n vs: {\n struct: \"EveSpaceScenePerFrameVSData\",\n fields: {\n ViewInverseTransposeMat: { type: Types.MATRIX4, default: IDENTITY },\n ViewProjectionMat: { type: Types.MATRIX4, default: IDENTITY },\n ViewMat: { type: Types.MATRIX4, default: IDENTITY },\n ProjectionMat: { type: Types.MATRIX4, default: IDENTITY },\n ShadowViewMat: { type: Types.MATRIX4, default: IDENTITY },\n ShadowViewProjectionMat: { type: Types.MATRIX4, default: IDENTITY },\n EnvMapRotationMat: { type: Types.MATRIX4, default: IDENTITY },\n ViewProjectionLast: { type: Types.MATRIX4, default: IDENTITY },\n ViewLast: { type: Types.MATRIX4, default: IDENTITY },\n ProjLast: { type: Types.MATRIX4, default: IDENTITY },\n\n // Sun data reaches the vertex stage too, so lighting that is cheap\n // enough can be done per-vertex rather than per-pixel.\n ...SUN_DATA,\n\n /** x = fogEnd/range, y = 1/range, z = fogMax. */\n FogFactors: { type: Types.VECTOR3 },\n pad: { type: Types.FLOAT },\n\n TargetResolution: { type: Types.VECTOR2 },\n FovXY: { type: Types.VECTOR2 },\n\n /** Reconstructs clip positions without the viewport adjustment. */\n ViewportAdjustment: { type: Types.VECTOR4, default: [1, 1, 1, 1] },\n\n Time: { type: Types.FLOAT },\n Upscaling: { type: Types.FLOAT, default: [1] },\n ViewportSize: { type: Types.VECTOR2 }\n }\n },\n\n ps: {\n struct: \"EveSpaceScenePerFramePSData\",\n fields: {\n ViewInverseTransposeMat: { type: Types.MATRIX4, default: IDENTITY },\n ViewMat: { type: Types.MATRIX4, default: IDENTITY },\n EnvMapRotationMat: { type: Types.MATRIX4, default: IDENTITY },\n\n ...SUN_DATA,\n\n AmbientColor: { type: Types.VECTOR3 },\n ReflectionIntensity: { type: Types.FLOAT },\n\n /** rgb = fog colour, a = fogMax. */\n FogColor: { type: Types.VECTOR4 },\n\n // ViewportOffsetSize\n ViewportOffset: { type: Types.VECTOR2 },\n ViewportSize: { type: Types.VECTOR2 },\n\n // RenderTargetData\n TargetResolution: { type: Types.VECTOR2 },\n\n /** Legacy; Carbon always writes 1 (EveSpaceScene.cpp:3138). */\n DepthMapSampleCount: { type: Types.FLOAT, default: [1] },\n Debug: { type: Types.FLOAT },\n\n ShadowMapSettings: { type: Types.VECTOR4, default: [1, 1, 0, 0] },\n\n // ShadowMapSettings2\n ShadowCameraRange: { type: Types.VECTOR2, default: [1, 0] },\n ShadowLightness: { type: Types.FLOAT },\n ShadowQuality: { type: Types.UINT32 },\n\n // ProjectionData\n ProjectionToView: { type: Types.VECTOR2 },\n FovXY: { type: Types.VECTOR2 },\n\n // MiscData\n Time: { type: Types.FLOAT },\n SceneMipLodBias: { type: Types.FLOAT },\n Upscaling: { type: Types.FLOAT, default: [1] },\n GammaBrightness: { type: Types.FLOAT },\n\n FrameIndex: { type: Types.UINT32 },\n\n /** 0 if off, 1 if on. */\n Jittering: { type: Types.UINT32 },\n\n /** For the dynamic-light shadow atlas. */\n InverseShadowMapAtlasSize: { type: Types.FLOAT },\n ShadowMapAtlasEntryMinSizeLog2: { type: Types.UINT32 },\n\n // Carbon writes 1000/10000/100000/1000000 every frame\n // (EveSpaceScene.cpp:3196-3199). No catalog default: the four\n // slices differ, and a catalog default is one value repeated.\n VolumetricSlices: { type: Types.FLOAT, count: 4 },\n\n /** x..w = the zFar value of each cascade split. */\n ShadowMapValues: { type: Types.VECTOR4, count: 4, default: ZERO4 },\n\n ShadowMatrixVal: {\n type: Types.MATRIX4,\n count: SHADOW_FRUSTUM_COUNT,\n default: IDENTITY\n },\n\n SplitInfo: { type: Types.VECTOR4 },\n ProjectionInverseMat: { type: Types.MATRIX4, default: IDENTITY },\n CascadeRanges: { type: Types.VECTOR4, count: 16, default: ZERO4 },\n\n // Tr2VolumetricsRenderer::FroxelPerFrameData, laid out inline\n // (Tr2VolumetricsRenderer.h:119-135). The renderer fills it.\n FroxelFogColor: { type: Types.VECTOR3 },\n FroxelBackgroundVisibility: { type: Types.FLOAT },\n FroxelBaseDensity: { type: Types.FLOAT },\n FroxelMaxDistance: { type: Types.FLOAT },\n FroxelMaxDistanceVisibility: { type: Types.FLOAT },\n FroxelEnvironmentIntensity: { type: Types.FLOAT },\n FroxelEnvironmentG: { type: Types.FLOAT },\n FroxelPad0: { type: Types.FLOAT },\n FroxelPad1: { type: Types.FLOAT },\n FroxelPad2: { type: Types.FLOAT },\n\n /** CcpMath::Sphere[2] - xyz centre, w radius. */\n FroxelPlanets: { type: Types.VECTOR4, count: 2, default: ZERO4 }\n }\n }\n});\n\n\nconst GROUPS = Object.freeze({\n Tr2PerFrame,\n Tr2PerFrameDebug,\n Tr2PerFrameShadow,\n EveSpaceScenePerFrame\n});\n\n\n/**\n * Resolved per-frame layouts, keyed by struct name. Offsets are FLOAT offsets\n * from the start of the buffer.\n *\n * Deliberately a sibling of CjsPerObjectLayouts rather than more entries in\n * it: the two tiers have different lifetimes, different owners (scene vs\n * renderable), and an engine binds them to different slots.\n */\nexport class CjsPerFrameLayouts\n{\n\n static Types = Types;\n\n static Groups = GROUPS;\n\n /** Tr2ShadowMap.h:15 - the cascade count ShadowMatrixVal is sized by. */\n static SHADOW_FRUSTUM_COUNT = SHADOW_FRUSTUM_COUNT;\n\n /** Resolved layouts by struct name, built once. */\n static #layouts = null;\n\n /**\n * The layout for one struct name, or null when it is not catalogued. A\n * caller must treat null as \"not covered\" and fail rather than guess.\n */\n static Get(struct)\n {\n return CjsPerFrameLayouts.#Resolved().get(struct) ?? null;\n }\n\n /** Every catalogued struct name. */\n static Names()\n {\n return [...CjsPerFrameLayouts.#Resolved().keys()];\n }\n\n /** A layout in the shape RawData consumes. */\n static ToRawLayout(struct)\n {\n const layout = CjsPerFrameLayouts.Get(struct);\n\n return layout ? toRawLayout(layout) : null;\n }\n\n /** The group a struct belongs to, with its stage key, or null. */\n static Find(struct)\n {\n for (const [group, buffers] of Object.entries(GROUPS))\n {\n for (const [key, buffer] of Object.entries(buffers))\n {\n if (buffer.struct === struct)\n {\n return { group, key, buffer };\n }\n }\n }\n\n return null;\n }\n\n /**\n * The resolved layout map, built once on first use and cached.\n * @returns {Map} struct name -> resolved layout\n */\n static #Resolved()\n {\n if (!CjsPerFrameLayouts.#layouts)\n {\n CjsPerFrameLayouts.#layouts = buildLayouts(GROUPS, \"CjsPerFrameLayouts\");\n }\n\n return CjsPerFrameLayouts.#layouts;\n }\n\n}\n"],"names":["SUN_DATA","Object","freeze","SunDirWorld","type","Types","VECTOR3","SunUnusedPad0","FLOAT","SunDiffuseColor","COLOR","SHADOW_FRUSTUM_COUNT","Tr2PerFrame","vs","struct","fields","ViewInverseTransposeMat","MATRIX4","default","IDENTITY","sunDirWorld","VECTOR4","sceneFogColor","ViewProjectionMat","ViewMat","ProjectionMat","ps","sceneAmbientColor","sunDiffuseColor","sunSpecularColor","maxFogAmount","maxFogDistance","minFogDistance","cullDirection","shScale","shadowCount","invShadowSize","radius","viewPort","ViewProjInverse","Tr2PerFrameDebug","Tr2PerFrameShadow","lightRadius","zFar","unused2","unused3","EveSpaceScenePerFrame","ShadowViewMat","ShadowViewProjectionMat","EnvMapRotationMat","ViewProjectionLast","ViewLast","ProjLast","FogFactors","pad","TargetResolution","VECTOR2","FovXY","ViewportAdjustment","Time","Upscaling","ViewportSize","AmbientColor","ReflectionIntensity","FogColor","ViewportOffset","DepthMapSampleCount","Debug","ShadowMapSettings","ShadowCameraRange","ShadowLightness","ShadowQuality","UINT32","ProjectionToView","SceneMipLodBias","GammaBrightness","FrameIndex","Jittering","InverseShadowMapAtlasSize","ShadowMapAtlasEntryMinSizeLog2","VolumetricSlices","count","ShadowMapValues","ZERO4","ShadowMatrixVal","SplitInfo","ProjectionInverseMat","CascadeRanges","FroxelFogColor","FroxelBackgroundVisibility","FroxelBaseDensity","FroxelMaxDistance","FroxelMaxDistanceVisibility","FroxelEnvironmentIntensity","FroxelEnvironmentG","FroxelPad0","FroxelPad1","FroxelPad2","FroxelPlanets","GROUPS","CjsPerFrameLayouts","Groups","Get","get","Names","keys","ToRawLayout","layout","toRawLayout","Find","group","buffers","entries","key","buffer","#Resolved","buildLayouts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC3BC,EAAAA,WAAW,EAAE;IAAEC,IAAI,EAAEC,KAAK,CAACC;GAAS;AACpCC,EAAAA,aAAa,EAAE;IAAEH,IAAI,EAAEC,KAAK,CAACG;GAAO;AACpCC,EAAAA,eAAe,EAAE;IAAEL,IAAI,EAAEC,KAAK,CAACK;AAAM;AACzC,CAAC,CAAC;;AAGF;AACA,MAAMC,oBAAoB,GAAG,EAAE;;AAG/B;MACaC,WAAW,GAAGX,MAAM,CAACC,MAAM,CAAC;AACrCW,EAAAA,EAAE,EAAE;AACAC,IAAAA,MAAM,EAAE,mBAAmB;AAC3BC,IAAAA,MAAM,EAAE;AACJC,MAAAA,uBAAuB,EAAE;QAAEZ,IAAI,EAAEC,KAAK,CAACY,OAAO;AAAEC,QAAAA,OAAO,EAAEC;OAAU;AACnEC,MAAAA,WAAW,EAAE;QAAEhB,IAAI,EAAEC,KAAK,CAACgB;OAAS;AACpCC,MAAAA,aAAa,EAAE;QAAElB,IAAI,EAAEC,KAAK,CAACK;OAAO;AACpCa,MAAAA,iBAAiB,E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