@zephyr3d/scene 0.9.14 → 0.9.16
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/animation/animationset.js.map +1 -1
- package/dist/app/engine.js +3 -1
- package/dist/app/engine.js.map +1 -1
- package/dist/asset/assetmanager.js +1 -0
- package/dist/asset/assetmanager.js.map +1 -1
- package/dist/camera/camera.js +87 -0
- package/dist/camera/camera.js.map +1 -1
- package/dist/index.d.ts +380 -6
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/material/meshmaterial.js +8 -1
- package/dist/material/meshmaterial.js.map +1 -1
- package/dist/material/shader/helper.js +6 -0
- package/dist/material/shader/helper.js.map +1 -1
- package/dist/material/skin.js +263 -0
- package/dist/material/skin.js.map +1 -0
- package/dist/posteffect/compositor.js +3 -0
- package/dist/posteffect/compositor.js.map +1 -1
- package/dist/posteffect/sao.js +1 -1
- package/dist/posteffect/sao.js.map +1 -1
- package/dist/posteffect/skinsss.js +194 -0
- package/dist/posteffect/skinsss.js.map +1 -0
- package/dist/posteffect/ssr.js +26 -49
- package/dist/posteffect/ssr.js.map +1 -1
- package/dist/posteffect/sss.js +1 -0
- package/dist/posteffect/sss.js.map +1 -1
- package/dist/posteffect/taa.js +2 -40
- package/dist/posteffect/taa.js.map +1 -1
- package/dist/render/abuffer_oit.js +1 -0
- package/dist/render/abuffer_oit.js.map +1 -1
- package/dist/render/drawable_mixin.js +1 -0
- package/dist/render/drawable_mixin.js.map +1 -1
- package/dist/render/fbm_wavegenerator.js +1 -0
- package/dist/render/fbm_wavegenerator.js.map +1 -1
- package/dist/render/gerstner_wavegenerator.js +1 -0
- package/dist/render/gerstner_wavegenerator.js.map +1 -1
- package/dist/render/globalbindgroup_allocator.js +1 -0
- package/dist/render/globalbindgroup_allocator.js.map +1 -1
- package/dist/render/lightpass.js +4 -1
- package/dist/render/lightpass.js.map +1 -1
- package/dist/render/render_queue.js +1 -0
- package/dist/render/render_queue.js.map +1 -1
- package/dist/render/renderer.js +1 -0
- package/dist/render/renderer.js.map +1 -1
- package/dist/render/rendergraph/device_pool_allocator.js +12 -5
- package/dist/render/rendergraph/device_pool_allocator.js.map +1 -1
- package/dist/render/rendergraph/executor.js +270 -1
- package/dist/render/rendergraph/executor.js.map +1 -1
- package/dist/render/rendergraph/forward_plus_builder.js +97 -9
- package/dist/render/rendergraph/forward_plus_builder.js.map +1 -1
- package/dist/render/rendergraph/types.js.map +1 -1
- package/dist/scene/basesprite.js +1 -0
- package/dist/scene/basesprite.js.map +1 -1
- package/dist/scene/batchgroup.js +1 -0
- package/dist/scene/batchgroup.js.map +1 -1
- package/dist/scene/environment.js +1 -0
- package/dist/scene/environment.js.map +1 -1
- package/dist/scene/light.js +6 -4
- package/dist/scene/light.js.map +1 -1
- package/dist/scene/mesh.js +1 -0
- package/dist/scene/mesh.js.map +1 -1
- package/dist/scene/msdftext.js +1 -0
- package/dist/scene/msdftext.js.map +1 -1
- package/dist/scene/msdftextsprite.js +1 -0
- package/dist/scene/msdftextsprite.js.map +1 -1
- package/dist/scene/particlesys.js +1 -0
- package/dist/scene/particlesys.js.map +1 -1
- package/dist/scene/scene.js +2 -0
- package/dist/scene/scene.js.map +1 -1
- package/dist/scene/terrain-cm/grass.js +1 -0
- package/dist/scene/terrain-cm/grass.js.map +1 -1
- package/dist/scene/terrain-cm/grassmaterial.js +1 -0
- package/dist/scene/terrain-cm/grassmaterial.js.map +1 -1
- package/dist/scene/terrain-cm/terrain-cm.js +1 -0
- package/dist/scene/terrain-cm/terrain-cm.js.map +1 -1
- package/dist/scene/water.js +1 -0
- package/dist/scene/water.js.map +1 -1
- package/dist/shaders/shadow.js +504 -1
- package/dist/shaders/shadow.js.map +1 -1
- package/dist/shadow/esm.js +1 -0
- package/dist/shadow/esm.js.map +1 -1
- package/dist/shadow/pcf_opt.js +1 -0
- package/dist/shadow/pcf_opt.js.map +1 -1
- package/dist/shadow/pcf_pd.js +1 -0
- package/dist/shadow/pcf_pd.js.map +1 -1
- package/dist/shadow/pcss.js +181 -0
- package/dist/shadow/pcss.js.map +1 -0
- package/dist/shadow/shader.js +1 -0
- package/dist/shadow/shader.js.map +1 -1
- package/dist/shadow/shadow_impl.js.map +1 -1
- package/dist/shadow/shadowmapper.js +86 -8
- package/dist/shadow/shadowmapper.js.map +1 -1
- package/dist/shadow/ssm.js +1 -0
- package/dist/shadow/ssm.js.map +1 -1
- package/dist/shadow/vsm.js +1 -0
- package/dist/shadow/vsm.js.map +1 -1
- package/dist/utility/serialization/manager.js +3 -1
- package/dist/utility/serialization/manager.js.map +1 -1
- package/dist/utility/serialization/scene/animation.js +1 -0
- package/dist/utility/serialization/scene/animation.js.map +1 -1
- package/dist/utility/serialization/scene/batch.js +1 -0
- package/dist/utility/serialization/scene/batch.js.map +1 -1
- package/dist/utility/serialization/scene/camera.js +122 -0
- package/dist/utility/serialization/scene/camera.js.map +1 -1
- package/dist/utility/serialization/scene/common.js +1 -0
- package/dist/utility/serialization/scene/common.js.map +1 -1
- package/dist/utility/serialization/scene/light.js +82 -21
- package/dist/utility/serialization/scene/light.js.map +1 -1
- package/dist/utility/serialization/scene/material.js +195 -3
- package/dist/utility/serialization/scene/material.js.map +1 -1
- package/dist/utility/serialization/scene/mesh.js +1 -0
- package/dist/utility/serialization/scene/mesh.js.map +1 -1
- package/dist/utility/serialization/scene/node.js +1 -0
- package/dist/utility/serialization/scene/node.js.map +1 -1
- package/dist/utility/serialization/scene/particle.js +1 -0
- package/dist/utility/serialization/scene/particle.js.map +1 -1
- package/dist/utility/serialization/scene/primitive.js +1 -0
- package/dist/utility/serialization/scene/primitive.js.map +1 -1
- package/dist/utility/serialization/scene/sprite.js +1 -0
- package/dist/utility/serialization/scene/sprite.js.map +1 -1
- package/dist/utility/serialization/scene/terrain.js +1 -0
- package/dist/utility/serialization/scene/terrain.js.map +1 -1
- package/dist/utility/serialization/scene/text.js +1 -0
- package/dist/utility/serialization/scene/text.js.map +1 -1
- package/dist/utility/serialization/scene/water.js +1 -0
- package/dist/utility/serialization/scene/water.js.map +1 -1
- package/dist/values.js +1 -0
- package/dist/values.js.map +1 -1
- package/package.json +2 -2
- package/dist/animation/joint_dynamics/convex_collider.js +0 -320
- package/dist/animation/joint_dynamics/convex_collider.js.map +0 -1
|
@@ -33,7 +33,7 @@ const _clusters = [];
|
|
|
33
33
|
const _devicePoolAllocator = new DevicePoolAllocator();
|
|
34
34
|
let _backDepthColorState = null;
|
|
35
35
|
let _frontDepthColorState = null;
|
|
36
|
-
const SURFACE_MRT_FLAGS = MaterialVaryingFlags.SSR_STORE_ROUGHNESS | MaterialVaryingFlags.SSS_STORE_PROFILE | MaterialVaryingFlags.SSS_STORE_DIFFUSE | MaterialVaryingFlags.SSS_STORE_NORMAL | MaterialVaryingFlags.SSS_STORE_TRANSMISSION;
|
|
36
|
+
const SURFACE_MRT_FLAGS = MaterialVaryingFlags.SSR_STORE_ROUGHNESS | MaterialVaryingFlags.SSS_STORE_PROFILE | MaterialVaryingFlags.SSS_STORE_DIFFUSE | MaterialVaryingFlags.SSS_STORE_NORMAL | MaterialVaryingFlags.SSS_STORE_TRANSMISSION | MaterialVaryingFlags.SKIN_SSS_STORE;
|
|
37
37
|
function getClusteredLight() {
|
|
38
38
|
return _clusters.length > 0 ? _clusters.pop() : new ClusteredLight();
|
|
39
39
|
}
|
|
@@ -46,6 +46,9 @@ function getCoreMaterial(material) {
|
|
|
46
46
|
function hasSSSMaterialCore(material) {
|
|
47
47
|
return !!getCoreMaterial(material)?.subsurfaceProfile;
|
|
48
48
|
}
|
|
49
|
+
function hasSkinSSSMaterialCore(material) {
|
|
50
|
+
return !!getCoreMaterial(material)?.skinSSS;
|
|
51
|
+
}
|
|
49
52
|
function renderQueueHasActiveSSS(renderQueue) {
|
|
50
53
|
const itemList = renderQueue.itemList;
|
|
51
54
|
if (!itemList) {
|
|
@@ -64,6 +67,24 @@ function renderQueueHasActiveSSS(renderQueue) {
|
|
|
64
67
|
}
|
|
65
68
|
return false;
|
|
66
69
|
}
|
|
70
|
+
function renderQueueHasActiveSkinSSS(renderQueue) {
|
|
71
|
+
const itemList = renderQueue.itemList;
|
|
72
|
+
if (!itemList) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
const lists = [
|
|
76
|
+
...itemList.opaque.lit,
|
|
77
|
+
...itemList.opaque.unlit
|
|
78
|
+
];
|
|
79
|
+
for (const list of lists){
|
|
80
|
+
for (const material of list.materialList){
|
|
81
|
+
if (hasSkinSSSMaterialCore(material)) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
67
88
|
function filterActualSSSItemList(items) {
|
|
68
89
|
return items.filter((item)=>hasSSSMaterialCore(item.drawable.getMaterial?.()));
|
|
69
90
|
}
|
|
@@ -185,6 +206,9 @@ function getLightPassColorAttachments(ctx, colorAttachment) {
|
|
|
185
206
|
if (ctx.materialFlags & MaterialVaryingFlags.SSS_STORE_TRANSMISSION) {
|
|
186
207
|
attachments.push(ctx.SSSTransmissionTexture);
|
|
187
208
|
}
|
|
209
|
+
if (ctx.materialFlags & MaterialVaryingFlags.SKIN_SSS_STORE) {
|
|
210
|
+
attachments.push(ctx.SkinSSSTexture);
|
|
211
|
+
}
|
|
188
212
|
return attachments.length === 1 ? attachments[0] : attachments;
|
|
189
213
|
}
|
|
190
214
|
/**
|
|
@@ -193,6 +217,7 @@ function getLightPassColorAttachments(ctx, colorAttachment) {
|
|
|
193
217
|
*/ function deriveForwardPlusOptions(scene, camera, deviceType, renderQueue) {
|
|
194
218
|
const ssr = camera.SSR && scene.env.light.envLight && scene.env.light.envLight.hasRadiance();
|
|
195
219
|
const sss = camera.SSS && renderQueueHasActiveSSS(renderQueue);
|
|
220
|
+
const skinSSS = camera.skinSSS && renderQueueHasActiveSkinSSS(renderQueue);
|
|
196
221
|
const needSceneColor = renderQueue.needSceneColor();
|
|
197
222
|
const needSceneColorWithDepth = renderQueue.needSceneColorWithDepth();
|
|
198
223
|
return {
|
|
@@ -205,12 +230,32 @@ function getLightPassColorAttachments(ctx, colorAttachment) {
|
|
|
205
230
|
needSceneColor,
|
|
206
231
|
needSceneColorWithDepth,
|
|
207
232
|
needsTransmissionDepthForSSR: !!ssr && needSceneColor && !needSceneColorWithDepth,
|
|
208
|
-
sss: !!sss
|
|
233
|
+
sss: !!sss,
|
|
234
|
+
skinSSS: !!skinSSS
|
|
209
235
|
};
|
|
210
236
|
}
|
|
237
|
+
// ─── Forward+ Graph Builder ─────────────────────────────────────────
|
|
238
|
+
/**
|
|
239
|
+
* Constructs a render graph representing the forward+ pipeline.
|
|
240
|
+
*
|
|
241
|
+
* Each step in the existing `SceneRenderer._renderScene` becomes a graph pass.
|
|
242
|
+
* Execute callbacks delegate to the existing rendering code, sharing a mutable
|
|
243
|
+
* `FrameState`.
|
|
244
|
+
*
|
|
245
|
+
* @param graph - The render graph to populate.
|
|
246
|
+
* @param ctx - The draw context for this frame.
|
|
247
|
+
* @param renderQueue - The culled render queue.
|
|
248
|
+
* @param options - Pipeline feature toggles.
|
|
249
|
+
* @returns The backbuffer handle (graph output).
|
|
250
|
+
*
|
|
251
|
+
* @public
|
|
252
|
+
*/ function buildForwardPlusGraph(graph, ctx, renderQueue, options) {
|
|
253
|
+
return buildForwardPlusGraphInternal(graph, ctx, renderQueue, options).backbuffer;
|
|
254
|
+
}
|
|
211
255
|
function buildForwardPlusGraphInternal(graph, ctx, renderQueue, options) {
|
|
212
256
|
const backbuffer = graph.importTexture('backbuffer');
|
|
213
257
|
ctx.SSS = !!options.sss;
|
|
258
|
+
ctx.SkinSSSTexture = null;
|
|
214
259
|
// Shared mutable frame state
|
|
215
260
|
const frame = {
|
|
216
261
|
ctx,
|
|
@@ -330,6 +375,7 @@ function buildForwardPlusGraphInternal(graph, ctx, renderQueue, options) {
|
|
|
330
375
|
const depthHandle = depthPassResult.depthHandle;
|
|
331
376
|
const motionVectorHandle = depthPassResult.motionVectorHandle;
|
|
332
377
|
const renderDepthAttachment = depthPassResult.graphDepthAttachmentHandle ?? depthPassResult.externalDepthAttachment ?? null;
|
|
378
|
+
const useFinalFramebufferAsIntermediate = !!depthPassResult.externalDepthAttachment && depthPassResult.externalDepthAttachment === ctx.finalFramebuffer?.getDepthAttachment();
|
|
333
379
|
let preLightTransmissionDepthToken;
|
|
334
380
|
if (options.needsTransmissionDepthForSSR) {
|
|
335
381
|
preLightTransmissionDepthToken = graph.addPass('TransmissionDepthForSSR', (builder)=>{
|
|
@@ -516,7 +562,8 @@ function buildForwardPlusGraphInternal(graph, ctx, renderQueue, options) {
|
|
|
516
562
|
if (writeSSSDiffuse && writeSSSTransmission && includeSSRSurfaceMRT && getSSSLightingTextureFormat(ctx, 2, includeSSRSurfaceMRT) !== ctx.colorFormat) {
|
|
517
563
|
writeSSSTransmission = false;
|
|
518
564
|
}
|
|
519
|
-
const
|
|
565
|
+
const writeSkinSSS = options.skinSSS;
|
|
566
|
+
const sssLightingAttachmentCount = (writeSSSDiffuse ? 1 : 0) + (writeSSSTransmission ? 1 : 0) + (writeSkinSSS ? 1 : 0);
|
|
520
567
|
const sssLightingFormat = getSSSLightingTextureFormat(ctx, sssLightingAttachmentCount, includeSSRSurfaceMRT);
|
|
521
568
|
const sssDiffuseHandle = writeSSSDiffuse ? builder.createTexture({
|
|
522
569
|
format: sssLightingFormat,
|
|
@@ -526,7 +573,10 @@ function buildForwardPlusGraphInternal(graph, ctx, renderQueue, options) {
|
|
|
526
573
|
format: sssLightingFormat,
|
|
527
574
|
label: 'sssTransmission'
|
|
528
575
|
}) : undefined;
|
|
529
|
-
const
|
|
576
|
+
const skinSSSHandle = writeSkinSSS ? builder.createTexture({
|
|
577
|
+
format: sssLightingFormat,
|
|
578
|
+
label: 'skinSSS'
|
|
579
|
+
}) : undefined;
|
|
530
580
|
const sceneColorFramebufferHandle = useFinalFramebufferAsIntermediate ? undefined : builder.createFramebuffer({
|
|
531
581
|
label: 'SceneColorFramebuffer',
|
|
532
582
|
width: ctx.renderWidth,
|
|
@@ -557,6 +607,7 @@ function buildForwardPlusGraphInternal(graph, ctx, renderQueue, options) {
|
|
|
557
607
|
}
|
|
558
608
|
ctx.SSSDiffuseTexture = sssDiffuseHandle ? rgCtx.getTexture(sssDiffuseHandle) : null;
|
|
559
609
|
ctx.SSSTransmissionTexture = sssTransmissionHandle ? rgCtx.getTexture(sssTransmissionHandle) : null;
|
|
610
|
+
ctx.SkinSSSTexture = skinSSSHandle ? rgCtx.getTexture(skinSSSHandle) : null;
|
|
560
611
|
const renderLightPass = ()=>renderMainLightPass(frame, sceneColorTex, sceneColorCopyTex, rgCtx, sceneColorFramebufferHandle, sceneColorCopyFramebufferHandle);
|
|
561
612
|
if (historyManager && lightHistoryReadBindings.length > 0) {
|
|
562
613
|
historyManager.beginReadScope(lightHistoryReadBindings.map((binding)=>({
|
|
@@ -613,19 +664,24 @@ function buildForwardPlusGraphInternal(graph, ctx, renderQueue, options) {
|
|
|
613
664
|
builder.read(binding.handle);
|
|
614
665
|
}
|
|
615
666
|
const outputBackbuffer = builder.write(backbuffer);
|
|
667
|
+
const taaHistoryColorHandle = useFinalFramebufferAsIntermediate ? outputBackbuffer : sceneColorHandle;
|
|
616
668
|
builder.setExecute((rgCtx)=>{
|
|
669
|
+
const renderAndCommitComposite = ()=>{
|
|
670
|
+
renderComposite(frame);
|
|
671
|
+
queueTAAHistoryCommit(frame, rgCtx, historyManager, taaHistoryColorHandle, motionVectorHandle);
|
|
672
|
+
};
|
|
617
673
|
if (historyManager && compositeHistoryReadBindings.length > 0) {
|
|
618
674
|
historyManager.beginReadScope(compositeHistoryReadBindings.map((binding)=>({
|
|
619
675
|
name: binding.name,
|
|
620
676
|
texture: rgCtx.getTexture(binding.handle)
|
|
621
677
|
})));
|
|
622
678
|
try {
|
|
623
|
-
|
|
679
|
+
renderAndCommitComposite();
|
|
624
680
|
} finally{
|
|
625
681
|
historyManager.endReadScope();
|
|
626
682
|
}
|
|
627
683
|
} else {
|
|
628
|
-
|
|
684
|
+
renderAndCommitComposite();
|
|
629
685
|
}
|
|
630
686
|
});
|
|
631
687
|
return outputBackbuffer;
|
|
@@ -684,7 +740,7 @@ function renderForwardSSSProfile(frame, profileFramebuffer, profileTexture, para
|
|
|
684
740
|
ctx.SSRNormalTexture = normalTexture;
|
|
685
741
|
ctx.compositor = null;
|
|
686
742
|
ctx.camera.commandBufferReuse = false;
|
|
687
|
-
ctx.materialFlags = ctx.materialFlags & ~(MaterialVaryingFlags.SSR_STORE_ROUGHNESS | MaterialVaryingFlags.SSS_STORE_PROFILE | MaterialVaryingFlags.SSS_STORE_NORMAL | MaterialVaryingFlags.SSS_STORE_DIFFUSE | MaterialVaryingFlags.SSS_STORE_TRANSMISSION) | profileFlags;
|
|
743
|
+
ctx.materialFlags = ctx.materialFlags & ~(MaterialVaryingFlags.SSR_STORE_ROUGHNESS | MaterialVaryingFlags.SSS_STORE_PROFILE | MaterialVaryingFlags.SSS_STORE_NORMAL | MaterialVaryingFlags.SSS_STORE_DIFFUSE | MaterialVaryingFlags.SSS_STORE_TRANSMISSION | MaterialVaryingFlags.SKIN_SSS_STORE) | profileFlags;
|
|
688
744
|
_scenePass.transmission = false;
|
|
689
745
|
_scenePass.renderOpaque = true;
|
|
690
746
|
_scenePass.renderTransparent = false;
|
|
@@ -914,7 +970,7 @@ function blitToCurrentColorAttachment(ctx, source) {
|
|
|
914
970
|
const device = ctx.device;
|
|
915
971
|
// Use RenderGraph-allocated scene color texture
|
|
916
972
|
const depthTex = frame.depthFramebuffer?.getDepthAttachment();
|
|
917
|
-
ctx.materialFlags &= ~(MaterialVaryingFlags.SSR_STORE_ROUGHNESS | MaterialVaryingFlags.SSS_STORE_PROFILE | MaterialVaryingFlags.SSS_STORE_DIFFUSE | MaterialVaryingFlags.SSS_STORE_NORMAL | MaterialVaryingFlags.SSS_STORE_TRANSMISSION);
|
|
973
|
+
ctx.materialFlags &= ~(MaterialVaryingFlags.SSR_STORE_ROUGHNESS | MaterialVaryingFlags.SSS_STORE_PROFILE | MaterialVaryingFlags.SSS_STORE_DIFFUSE | MaterialVaryingFlags.SSS_STORE_NORMAL | MaterialVaryingFlags.SSS_STORE_TRANSMISSION | MaterialVaryingFlags.SKIN_SSS_STORE);
|
|
918
974
|
if (ctx.SSR) {
|
|
919
975
|
ctx.materialFlags |= MaterialVaryingFlags.SSR_STORE_ROUGHNESS;
|
|
920
976
|
}
|
|
@@ -926,6 +982,9 @@ function blitToCurrentColorAttachment(ctx, source) {
|
|
|
926
982
|
ctx.materialFlags |= MaterialVaryingFlags.SSS_STORE_TRANSMISSION;
|
|
927
983
|
}
|
|
928
984
|
}
|
|
985
|
+
if (ctx.SkinSSSTexture) {
|
|
986
|
+
ctx.materialFlags |= MaterialVaryingFlags.SKIN_SSS_STORE;
|
|
987
|
+
}
|
|
929
988
|
if (depthTex === ctx.finalFramebuffer?.getDepthAttachment()) {
|
|
930
989
|
ctx.intermediateFramebuffer = ctx.finalFramebuffer;
|
|
931
990
|
} else if (sceneColorFramebufferHandle && !hasSurfaceMRT(ctx)) {
|
|
@@ -1004,6 +1063,34 @@ function blitToCurrentColorAttachment(ctx, source) {
|
|
|
1004
1063
|
/** @internal */ function renderTransmissionDepthPass(frame, rgCtx) {
|
|
1005
1064
|
renderSceneDepth(frame, frame.depthFramebuffer, rgCtx);
|
|
1006
1065
|
}
|
|
1066
|
+
function queueTAAHistoryCommit(frame, rgCtx, historyManager, colorHandle, motionVectorHandle) {
|
|
1067
|
+
const { ctx } = frame;
|
|
1068
|
+
if (!historyManager?.frameActive || !ctx.camera.TAA || !frame.options.motionVectors || !motionVectorHandle) {
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
const colorTexture = rgCtx.getTexture(colorHandle);
|
|
1072
|
+
const colorSize = {
|
|
1073
|
+
width: colorTexture.width,
|
|
1074
|
+
height: colorTexture.height
|
|
1075
|
+
};
|
|
1076
|
+
historyManager.queueRetainedCommit(RGHistoryResources.TAA_COLOR, {
|
|
1077
|
+
format: colorTexture.format,
|
|
1078
|
+
sizeMode: 'absolute',
|
|
1079
|
+
width: colorTexture.width,
|
|
1080
|
+
height: colorTexture.height
|
|
1081
|
+
}, colorSize, colorTexture);
|
|
1082
|
+
const motionVectorTexture = rgCtx.getTexture(motionVectorHandle);
|
|
1083
|
+
const motionVectorSize = {
|
|
1084
|
+
width: motionVectorTexture.width,
|
|
1085
|
+
height: motionVectorTexture.height
|
|
1086
|
+
};
|
|
1087
|
+
historyManager.queueRetainedCommit(RGHistoryResources.TAA_MOTION_VECTOR, {
|
|
1088
|
+
format: motionVectorTexture.format,
|
|
1089
|
+
sizeMode: 'absolute',
|
|
1090
|
+
width: motionVectorTexture.width,
|
|
1091
|
+
height: motionVectorTexture.height
|
|
1092
|
+
}, motionVectorSize, motionVectorTexture);
|
|
1093
|
+
}
|
|
1007
1094
|
/** @internal */ function renderComposite(frame) {
|
|
1008
1095
|
const { ctx } = frame;
|
|
1009
1096
|
ctx.compositor?.drawPostEffects(ctx, PostEffectLayer.end, ctx.linearDepthTexture);
|
|
@@ -1014,6 +1101,7 @@ function blitToCurrentColorAttachment(ctx, source) {
|
|
|
1014
1101
|
ctx.materialFlags &= ~MaterialVaryingFlags.SSS_STORE_DIFFUSE;
|
|
1015
1102
|
ctx.materialFlags &= ~MaterialVaryingFlags.SSS_STORE_NORMAL;
|
|
1016
1103
|
ctx.materialFlags &= ~MaterialVaryingFlags.SSS_STORE_TRANSMISSION;
|
|
1104
|
+
ctx.materialFlags &= ~MaterialVaryingFlags.SKIN_SSS_STORE;
|
|
1017
1105
|
if (ctx.intermediateFramebuffer && ctx.intermediateFramebuffer !== ctx.finalFramebuffer) {
|
|
1018
1106
|
const blitter = new CopyBlitter();
|
|
1019
1107
|
blitter.srgbOut = !ctx.finalFramebuffer;
|
|
@@ -1082,5 +1170,5 @@ function blitToCurrentColorAttachment(ctx, source) {
|
|
|
1082
1170
|
}
|
|
1083
1171
|
}
|
|
1084
1172
|
|
|
1085
|
-
export { deriveForwardPlusOptions, executeForwardPlusGraph };
|
|
1173
|
+
export { buildForwardPlusGraph, deriveForwardPlusOptions, executeForwardPlusGraph };
|
|
1086
1174
|
//# sourceMappingURL=forward_plus_builder.js.map
|