@carbonenginejs/runtime 0.1.0-alpha.2 → 0.1.0-alpha.3
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/global/model/CjsModel.js +3 -1
- package/dist/global/model/CjsModel.js.map +1 -1
- package/dist/global/model/document/CjsDocumentHydrator.js +5 -1
- package/dist/global/model/document/CjsDocumentHydrator.js.map +1 -1
- package/dist/global/schema/CjsSchema.js +98 -18
- package/dist/global/schema/CjsSchema.js.map +1 -1
- package/dist/global/schema/hydration.js +10 -8
- package/dist/global/schema/hydration.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/resource/CjsResMan.js +177 -4
- package/dist/resource/CjsResMan.js.map +1 -1
- package/dist/resource/format/CjsBlueReader.js +8 -1
- package/dist/resource/format/CjsBlueReader.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +7 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
- package/dist/resource/index.js +2 -0
- package/dist/resource/index.js.map +1 -1
- package/dist/resource/texture/SolidColorTextureConstructor.js +46 -0
- package/dist/resource/texture/SolidColorTextureConstructor.js.map +1 -0
- package/dist/resource/texture/TriTextureRes.js +43 -0
- package/dist/resource/texture/TriTextureRes.js.map +1 -1
- package/dist/resource/texture/index.js +2 -0
- package/dist/resource/texture/index.js.map +1 -1
- package/dist/resource/texture/solidColorTexture.js +111 -0
- package/dist/resource/texture/solidColorTexture.js.map +1 -0
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js +19 -8
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js.map +1 -1
- package/dist/trinity/eve/child/EveChildMesh.js +17 -3
- package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
- package/dist/trinity/eve/locator/EveLocatorSets.js +12 -3
- package/dist/trinity/eve/locator/EveLocatorSets.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +15 -2
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
- package/dist/trinity/eve/spaceObject/IEveSpaceObject2ParentData.js +44 -52
- package/dist/trinity/eve/spaceObject/IEveSpaceObject2ParentData.js.map +1 -1
- package/docs/resource/concepts/resource-lifecycle.md +10 -8
- package/docs/resource/formats/geometry-interchange.md +50 -0
- package/docs/resource/formats/webgl/decl-io.md +241 -397
- package/docs/resource/formats/webgl/memory-structured.md +91 -128
- package/docs/resource/formats/webgl/texture-sample.md +306 -469
- package/docs/resource/reference/classes/texture.md +11 -1
- package/docs/resource/reference/motherlode-cache.md +24 -11
- package/docs/resource/reference/queues.md +23 -1
- package/package.json +1 -1
|
@@ -191,54 +191,40 @@ pixel `usampler2D` data textures (see `DxbcGlslEmitter.js` `dcl_resource_structu
|
|
|
191
191
|
pixel branch), which compiles but consumes a texture unit each; on real drivers
|
|
192
192
|
the `_depth` quad variants overflow `MAX_TEXTURE_IMAGE_UNITS`(16).
|
|
193
193
|
|
|
194
|
-
**Superseded
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
`
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
`
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
(structured) / `vec4(0.0)` (sampled) — zeroing the per-tile light count makes the
|
|
214
|
-
light loop dead. The packager also strips those `resource` bindings from the
|
|
215
|
-
manifest JSON (`stripLightResourcesFromManifest`) so the Carbon WebGL runtime does not
|
|
216
|
-
synthesize a texture def (glType 0 → "Invalid shader texture definition") for the
|
|
217
|
-
now-undeclared light buffers. Opt-in, default off; every other package is
|
|
218
|
-
unchanged. A functional light constant-buffer path remains possible but was not
|
|
219
|
-
built.
|
|
194
|
+
**Superseded 2026-08-02 — keep the lights.** The recorded packed `RGBA32UI`
|
|
195
|
+
light texture and merged `Detail1/2/3Map` array put the `.sm_depth` variants
|
|
196
|
+
`unpackedskinned_quaddetailv5` at 15 texture units and
|
|
197
|
+
`unpackedskinned_quadheatdetailv5` at 16, lighting intact. Budget accounting
|
|
198
|
+
belongs to `/docs/contracts/webgl2-texture-budget.md`, not this opcode study.
|
|
199
|
+
`--stub-light-resources` remains an opt-in diagnostic, not the budget solution.
|
|
200
|
+
|
|
201
|
+
**Earlier 2026-07-08 stub path (default off):**
|
|
202
|
+
`packageTr2WebglEffect.js --stub-light-resources` resolves `LightBuffer`,
|
|
203
|
+
`LightIndexBuffer` and `LightProfileArray` from Carbon `.sm` reflection into
|
|
204
|
+
`emitGlsl`'s `stubResourceRegisters`. With RDEF stripped, names exist only in
|
|
205
|
+
that reflection; registers vary per permutation, not fixed sb11/sb12/s13.
|
|
206
|
+
The emitter removes selected declarations/bindings and returns
|
|
207
|
+
`uintBitsToFloat(0u)` for structured reads or `vec4(0.0)` for samples.
|
|
208
|
+
Zero per-tile count kills the light loop. `stripLightResourcesFromManifest`
|
|
209
|
+
removes matching JSON `resource` bindings, avoiding synthesis of an undeclared
|
|
210
|
+
glType-0 texture ("Invalid shader texture definition"). Other packages are
|
|
211
|
+
unchanged. The earlier study recorded a possible, unbuilt light-constant-buffer
|
|
212
|
+
alternative; that historical statement is not current implementation status.
|
|
220
213
|
|
|
221
214
|
Tested by `test/glsl-emitter.test.js` (synthetic pixel shaders with a structured
|
|
222
215
|
buffer / sampler2DArray: declared by default, dropped + no binding when the
|
|
223
216
|
register is in `stubResourceRegisters`, and only listed registers dropped) and
|
|
224
217
|
`test/stub-light-resources.test.js` (the packager's `resolveStubLightRegisters`
|
|
225
218
|
name→register resolution and `stripLightResourcesFromManifest` manifest filter,
|
|
226
|
-
in `scripts/stubLightResources.js`).
|
|
227
|
-
|
|
228
|
-
### Type rules
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
the "everything is `float vec4`, bitcast at use" register model this project
|
|
236
|
-
already commits to.
|
|
237
|
-
- This is a data-movement instruction, not a comparison — it does not produce a
|
|
238
|
-
0xFFFFFFFF/0 mask.
|
|
239
|
-
|
|
240
|
-
### Helpers needed
|
|
241
|
-
- `structuredLoadComponent(bufName, structIndex, byteOffset, component, destType)`
|
|
219
|
+
in `scripts/stubLightResources.js`).
|
|
220
|
+
|
|
221
|
+
### Type rules
|
|
222
|
+
Section A owns index/offset signedness and destination-driven casts. The source
|
|
223
|
+
resource's declared return type does **not** determine the result type.
|
|
224
|
+
This load moves data; it does not produce a 0xFFFFFFFF/0 comparison mask.
|
|
225
|
+
|
|
226
|
+
### Helpers needed
|
|
227
|
+
- `structuredLoadComponent(bufName, structIndex, byteOffset, component, destType)`
|
|
242
228
|
— reference-only (HLSLcc SSBO shape), needed if the emitter ever targets a
|
|
243
229
|
non-WebGL2 backend or documents the pre-rewrite intermediate form.
|
|
244
230
|
- `lowerBoneTransformsToCb3` (package-time text pass; port of
|
|
@@ -326,27 +312,20 @@ counter if the source operand has more than one swizzle element, else always
|
|
|
326
312
|
- No destination register write, so `_sat` never applies (DXBC does not attach
|
|
327
313
|
`_sat` to store instructions).
|
|
328
314
|
- Per-component write masking must exactly follow `psDest->ui32CompMask`
|
|
329
|
-
(`OPERAND_4_COMPONENT_MASK_MODE`), not the source operand's own mask.
|
|
330
|
-
|
|
331
|
-
### WebGL2 notes
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
file — see the `atomic_iadd` section for the one confirmed **non**-compute
|
|
344
|
-
counterexample in this family, `lensflareoccludert`, which is a pixel shader,
|
|
345
|
-
not compute); the emitter should detect and refuse rather than attempt
|
|
346
|
-
emission.
|
|
347
|
-
|
|
348
|
-
### Confidence
|
|
349
|
-
**Medium** on the HLSLcc reference lowering itself (directly read from source);
|
|
315
|
+
(`OPERAND_4_COMPONENT_MASK_MODE`), not the source operand's own mask.
|
|
316
|
+
|
|
317
|
+
### WebGL2 notes
|
|
318
|
+
The study excludes this writable-UAV/SSBO opcode: detect and refuse it.
|
|
319
|
+
There is no `cb3`-like write rewrite or CCPWGL uniform target for
|
|
320
|
+
per-invocation scatter writes. Of 930 instances, the sampled
|
|
321
|
+
`createhistograms.sm_depth` is tagged `stageName: "geometry"` in
|
|
322
|
+
`dx11-instruction-coverage.json`, but its workload and accompanying
|
|
323
|
+
`sync`/`dcl_thread_group` suggest mislabeled compute. See the atomic
|
|
324
|
+
section for the scanner-label limitation and confirmed pixel counterexample;
|
|
325
|
+
neither establishes a VS/PS `store_structured` path.
|
|
326
|
+
|
|
327
|
+
### Confidence
|
|
328
|
+
**Medium** on the HLSLcc reference lowering itself (directly read from source);
|
|
350
329
|
**high** on the WebGL2-scope conclusion (no counter-evidence of a vs/ps
|
|
351
330
|
`store_structured` shipping shader was found in the decision corpus, and the
|
|
352
331
|
project's own draft transpiler already special-cases the sibling UAV write
|
|
@@ -483,28 +462,23 @@ Identical bitcast-by-destination-type rule as `ld_structured` (float →
|
|
|
483
462
|
|
|
484
463
|
### Edge cases
|
|
485
464
|
Same swizzle-indirection caveat as `ld_structured` (component addressing follows
|
|
486
|
-
the resource operand's own swizzle if present).
|
|
487
|
-
|
|
488
|
-
### WebGL2 notes
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
`vs/ps`-reachable without a concrete counter-example (unlike `atomic_iadd`,
|
|
504
|
-
which has one — see that section).
|
|
505
|
-
|
|
506
|
-
### Confidence
|
|
507
|
-
**Medium** — HLSLcc source lowering is directly read and clear, but no shipping
|
|
465
|
+
the resource operand's own swizzle if present).
|
|
466
|
+
|
|
467
|
+
### WebGL2 notes
|
|
468
|
+
The study excludes raw-buffer reads absent a proven resource-specific rewrite.
|
|
469
|
+
The retired `BoneTransforms` splice matched `t0_buf[idx].value[...]`,
|
|
470
|
+
not flat `t0_buf[...]`; it cannot be assumed to cover raw buffers.
|
|
471
|
+
|
|
472
|
+
The earlier VS/PS claim was overreach. The sole sampled
|
|
473
|
+
`dx11-instruction-coverage.json` / `allOpcodeExamples` entry is
|
|
474
|
+
`graphics\effect.dx11\managed\space\specialfx\particles\gpu\emit.sm_depth`,
|
|
475
|
+
paired with `store_raw` in the same file/technique, both tagged
|
|
476
|
+
`stageName: "geometry"`. The particle-emission workload suggests compute,
|
|
477
|
+
not a confirmed VS/PS read. The atomic section owns the scanner caveat and
|
|
478
|
+
its distinct pixel counterexample; do not transfer that evidence to `ld_raw`.
|
|
479
|
+
|
|
480
|
+
### Confidence
|
|
481
|
+
**Medium** — HLSLcc source lowering is directly read and clear, but no shipping
|
|
508
482
|
corpus evidence of `ld_raw` reaching a WebGL2-validated vs/ps program was found
|
|
509
483
|
(only 54 instances total, none flagged in the skinning/JointMat decision
|
|
510
484
|
trail); the sole sampled corpus example is paired with `store_raw` in a
|
|
@@ -714,26 +688,23 @@ returnType)`.
|
|
|
714
688
|
### Edge cases
|
|
715
689
|
Requires resource-binding reflection (return type, dimension) exactly like
|
|
716
690
|
`store_uav_typed` — doubly blocked when `RDEF` is stripped, independent of the
|
|
717
|
-
image-type gap below.
|
|
718
|
-
|
|
719
|
-
### WebGL2 notes
|
|
720
|
-
`imageLoad
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
`
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
`
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
### Confidence
|
|
736
|
-
**High** — same corroboration as `store_uav_typed`, corrected to cite the
|
|
691
|
+
image-type gap below.
|
|
692
|
+
|
|
693
|
+
### WebGL2 notes
|
|
694
|
+
The study excludes `imageLoad`/image types from ES300, matching
|
|
695
|
+
`Dx11GlesDraftTranspiler.js:129` and the `TRANSPILING-GAPS.md` UAV
|
|
696
|
+
decision. Its 18 instances (versus 642 stores) suggest a small compute/UAV set,
|
|
697
|
+
not a proven VS/PS path. The sampled `dx11-instruction-coverage.json` /
|
|
698
|
+
`allOpcodeExamples` entry is
|
|
699
|
+
`graphics\effect.dx11\managed\space\postprocess\measureexposure.sm_depth`
|
|
700
|
+
(tone-mapping average-luminance compute), **not** `lensflareoccludert`.
|
|
701
|
+
The corpus table and atomic section retain that separate effect's confirmed pixel-stage
|
|
702
|
+
`dcl_unordered_access_view_typed`/`atomic_iadd` evidence
|
|
703
|
+
(`TRANSPILING-GAPS.md:100-114`); do not conflate the effects or transfer
|
|
704
|
+
compute-only reasoning between them.
|
|
705
|
+
|
|
706
|
+
### Confidence
|
|
707
|
+
**High** — same corroboration as `store_uav_typed`, corrected to cite the
|
|
737
708
|
right sampled effect (`measureexposure.sm_depth`, not `lensflareoccludert`).
|
|
738
709
|
|
|
739
710
|
---
|
|
@@ -787,29 +758,21 @@ below. Non-skinning structured loads are not generally refused: see the
|
|
|
787
758
|
pixel-stage lowering and packed-light closure above.
|
|
788
759
|
|
|
789
760
|
**Retired WebGL2 text-rewrite helpers:**
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
5. `rawLoadComponent(bufName, byteOffset, component, destType)`
|
|
806
|
-
6. `rawStoreComponent(bufName, byteOffset, component, value, srcType)`
|
|
807
|
-
7. `imageLoadTyped(uav, addr, returnType)`
|
|
808
|
-
8. `imageStoreTyped(uav, addr, value, returnType)`
|
|
809
|
-
9. `atomicUavOrTgsmOp(func, dest, addr, src, compare?, returnsPrevious?)`
|
|
810
|
-
|
|
811
|
-
**Detection/refusal helpers** (must run before emission; there is no GLSL ES
|
|
812
|
-
3.00 lowering to fall back to):
|
|
761
|
+
`lowerBoneTransformsToCb3` ports `lowerWebgl2SkinningAbi` +
|
|
762
|
+
`lowerStructuredBoneLoad` (`scripts/packageTr2WebglEffect.js:826-902`);
|
|
763
|
+
`lowerBlendIndicesToFloatAttribute` is the same pass's float-input rewrite
|
|
764
|
+
(`packageTr2WebglEffect.js:840-843`). The historical section above owns their
|
|
765
|
+
constraints; the pinned recipe owns the ordered operations, including
|
|
766
|
+
`cb3.data[26 + idx*3 + row]` and optional swizzling. They are not pending helpers.
|
|
767
|
+
|
|
768
|
+
**Reference-only helpers:** each opcode's “Helpers needed” subsection owns
|
|
769
|
+
its signature. These describe non-WebGL2 SSBO/UAV/atomic lowering for debugging
|
|
770
|
+
or a possible other backend, not final WebGL2 output: structured load/store,
|
|
771
|
+
raw load/store, typed image load/store and `atomicUavOrTgsmOp` (its
|
|
772
|
+
`compare` and `returnsPrevious` parameters are optional).
|
|
773
|
+
|
|
774
|
+
**Detection/refusal helpers** (must run before emission; there is no GLSL ES
|
|
775
|
+
3.00 lowering to fall back to):
|
|
813
776
|
10. `refuseComputeOnlyOpcode(opcodeName)` — for `sync`, `store_structured`
|
|
814
777
|
(non-skinning), `store_raw`, `store_uav_typed`, `ld_uav_typed`,
|
|
815
778
|
`atomic_iadd`, `imm_atomic_iadd`, `imm_atomic_exch`, `atomic_umax`,
|