@forgeax/engine-render 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/assembly/factory.d.ts +1 -1
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/material/assembly.d.ts +4 -17
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- package/dist/assembly/material/standard-layer-projection.d.ts.map +1 -1
- package/dist/assembly/material/surface-projection.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer.d.ts +0 -1
- package/dist/assembly/webgpu-renderer.d.ts.map +1 -1
- package/dist/authoring.mjs +1 -1
- package/dist/{chunk-JSEDTZYS.mjs → chunk-GF523LHF.mjs} +6 -6
- package/dist/chunk-GF523LHF.mjs.map +1 -0
- package/dist/{chunk-TCLDX7SZ.mjs → chunk-TMIASV2N.mjs} +403 -457
- package/dist/chunk-TMIASV2N.mjs.map +1 -0
- package/dist/{chunk-N3RT2EUR.mjs → chunk-YUQXSEHG.mjs} +87 -53
- package/dist/chunk-YUQXSEHG.mjs.map +1 -0
- package/dist/construct-renderer.mjs +153 -13
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/extract/contracts.d.ts +6 -6
- package/dist/extract/contracts.d.ts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/pipeline-spec-types.d.ts +2 -0
- package/dist/pipeline-spec-types.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts.map +1 -1
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +2 -2
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +20 -2
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts +3 -3
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/material-uniforms.d.ts +4 -0
- package/dist/record/material-uniforms.d.ts.map +1 -0
- package/dist/record/render-context.d.ts +2 -2
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts +2 -3
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/recovery/render-system-candidate.d.ts.map +1 -1
- package/dist/render-system-extract-tail.d.ts +2 -0
- package/dist/render-system-extract-tail.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +21 -10
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system.d.ts.map +1 -1
- package/dist/temporal/index.mjs +2 -2
- package/package.json +20 -20
- package/src/__tests__/fixtures/ai-weapon-spirit/README.md +20 -0
- package/src/__tests__/fixtures/ai-weapon-spirit/low-poly-toon.wgsl +178 -0
- package/src/__tests__/fixtures/ai-weapon-spirit/material.json +97 -0
- package/src/__tests__/fixtures/ai-weapon-spirit/painterly-surface.wgsl +55 -0
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +3 -3
- package/src/__tests__/gpu-driven-view.browser.test.ts +11 -3
- package/src/__tests__/material-contract-inventory.unit.test.ts +43 -0
- package/src/__tests__/{material-static-dynamic-route.unit.test.ts → material-layer-projection.unit.test.ts} +30 -47
- package/src/__tests__/material-program-dispatch.unit.test.ts +48 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +2 -2
- package/src/__tests__/skinned-shadow-caster.test.ts +14 -14
- package/src/__tests__/surface-variant-provenance.integration.test.ts +1 -1
- package/src/assembly/factory.ts +0 -3
- package/src/assembly/material/assembly.ts +8 -40
- package/src/assembly/material/standard-layer-projection.ts +3 -1
- package/src/assembly/material/surface-projection.ts +2 -1
- package/src/assembly/webgpu-renderer.ts +17 -9
- package/src/extract/contracts.ts +6 -6
- package/src/materials.ts +3 -3
- package/src/pipeline-spec-types.ts +2 -0
- package/src/pipeline-spec.ts +7 -3
- package/src/record/frame.ts +7 -1
- package/src/record/main-pass-geometry.ts +340 -279
- package/src/record/main-pass-material.ts +87 -2
- package/src/record/main-pass-sprite-draws.ts +65 -168
- package/src/record/main-pass.ts +24 -246
- package/src/record/material-uniforms.ts +186 -0
- package/src/record/render-context.ts +4 -0
- package/src/record/shadow-pass.ts +86 -28
- package/src/recovery/render-system-candidate.ts +5 -1
- package/src/render-system-extract-tail.ts +51 -11
- package/src/render-system-extract.ts +73 -63
- package/src/render-system.ts +19 -0
- package/dist/assembly/material/pipeline-projection.d.ts +0 -30
- package/dist/assembly/material/pipeline-projection.d.ts.map +0 -1
- package/dist/chunk-JSEDTZYS.mjs.map +0 -1
- package/dist/chunk-N3RT2EUR.mjs.map +0 -1
- package/dist/chunk-TCLDX7SZ.mjs.map +0 -1
- package/src/assembly/material/pipeline-projection.ts +0 -63
package/src/pipeline-spec.ts
CHANGED
|
@@ -248,7 +248,11 @@ export function cacheKeyOf(spec: PipelineSpec): string {
|
|
|
248
248
|
stripSegment,
|
|
249
249
|
`vl:${vlDigest}`,
|
|
250
250
|
renderStateHash(renderState),
|
|
251
|
-
].join(':') +
|
|
251
|
+
].join(':') +
|
|
252
|
+
uvSetCountSegment +
|
|
253
|
+
(shader.vertexEntry === undefined && shader.fragmentEntry === undefined
|
|
254
|
+
? ''
|
|
255
|
+
: `:entries:${JSON.stringify([shader.vertexEntry ?? null, shader.fragmentEntry ?? null])}`)
|
|
252
256
|
);
|
|
253
257
|
}
|
|
254
258
|
|
|
@@ -417,7 +421,7 @@ export function buildPipelineDescriptor(
|
|
|
417
421
|
const descriptor: Record<string, unknown> = {
|
|
418
422
|
vertex: {
|
|
419
423
|
module: modules.vertex,
|
|
420
|
-
entryPoint: modules.vertexEntryPoint ?? 'vs_main',
|
|
424
|
+
entryPoint: spec.shader.vertexEntry ?? modules.vertexEntryPoint ?? 'vs_main',
|
|
421
425
|
buffers: vertexBuffers,
|
|
422
426
|
},
|
|
423
427
|
};
|
|
@@ -426,7 +430,7 @@ export function buildPipelineDescriptor(
|
|
|
426
430
|
if (attachments.colorFormats.length > 0) {
|
|
427
431
|
descriptor.fragment = {
|
|
428
432
|
module: modules.fragment,
|
|
429
|
-
entryPoint: modules.fragmentEntryPoint ?? 'fs_main',
|
|
433
|
+
entryPoint: spec.shader.fragmentEntry ?? modules.fragmentEntryPoint ?? 'fs_main',
|
|
430
434
|
targets: attachments.colorFormats.map((fmt) => {
|
|
431
435
|
const target: Record<string, unknown> = { format: fmt };
|
|
432
436
|
if (renderState?.blend !== undefined) {
|
package/src/record/frame.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { uploadMaterialUniforms } from './material-uniforms';
|
|
1
2
|
// @forgeax/engine-runtime - RenderSystem record stage: frame.
|
|
2
3
|
// Extracted from render-system-record.ts (feat-20260704 M3/w17, pure move).
|
|
3
4
|
|
|
@@ -1925,7 +1926,11 @@ export function recordFrame(
|
|
|
1925
1926
|
// the swap-chain fallback uses its raw storage view. The encoder and
|
|
1926
1927
|
// sprite PSO must use the same resolved format because WebGPU requires
|
|
1927
1928
|
// attachment and pipeline target formats to match.
|
|
1928
|
-
const splitLdrSprite = computeSplitLdrSprite(
|
|
1929
|
+
const splitLdrSprite = computeSplitLdrSprite(
|
|
1930
|
+
validatedOrdered,
|
|
1931
|
+
tonemapActive,
|
|
1932
|
+
transparentDispatch,
|
|
1933
|
+
);
|
|
1929
1934
|
let ldrSpritePassView: TextureView | null = null;
|
|
1930
1935
|
if (splitLdrSprite) {
|
|
1931
1936
|
const unormViewRes = internals.device.createTextureView(currentTexture, {});
|
|
@@ -2155,6 +2160,7 @@ export function recordFrame(
|
|
|
2155
2160
|
directionalShadowCacheReuse: directionalShadowCache.reuse,
|
|
2156
2161
|
...(profilePhase !== undefined ? { profilePhase } : {}),
|
|
2157
2162
|
};
|
|
2163
|
+
uploadMaterialUniforms(passCtx);
|
|
2158
2164
|
const fallbackReadbackRequest = createReflectionFallbackReadbackRequest(internals, frameState);
|
|
2159
2165
|
if (fallbackReadbackRequest !== undefined) {
|
|
2160
2166
|
frameState.reflectionFallbackReadback = fallbackReadbackRequest;
|