@onerjs/core 8.27.12 → 8.27.14
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/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.d.ts +39 -0
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.js +86 -0
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.d.ts +34 -0
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.js +74 -0
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/index.d.ts +2 -0
- package/FrameGraph/Node/Blocks/index.js +2 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.d.ts +21 -0
- package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.js +18 -0
- package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.d.ts +22 -0
- package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.js +27 -0
- package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/sharpenTask.d.ts +17 -0
- package/FrameGraph/Tasks/PostProcesses/sharpenTask.js +23 -0
- package/FrameGraph/Tasks/PostProcesses/sharpenTask.js.map +1 -0
- package/FrameGraph/frameGraphTextureManager.d.ts +6 -2
- package/FrameGraph/frameGraphTextureManager.js +22 -8
- package/FrameGraph/frameGraphTextureManager.js.map +1 -1
- package/FrameGraph/index.d.ts +3 -0
- package/FrameGraph/index.js +3 -0
- package/FrameGraph/index.js.map +1 -1
- package/Materials/PBR/openPbrMaterial.d.ts +39 -0
- package/Materials/PBR/openPbrMaterial.js +46 -0
- package/Materials/PBR/openPbrMaterial.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +1 -7
- package/Materials/materialHelper.functions.js +2 -15
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/materialHelper.functions.pure.d.ts +10 -0
- package/Materials/materialHelper.functions.pure.js +21 -0
- package/Materials/materialHelper.functions.pure.js.map +1 -0
- package/Meshes/geometry.js +6 -6
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.js +2 -2
- package/Meshes/mesh.js.map +1 -1
- package/PostProcesses/index.d.ts +2 -0
- package/PostProcesses/index.js +2 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.d.ts +6 -2
- package/PostProcesses/screenSpaceCurvaturePostProcess.js +37 -13
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.d.ts +6 -3
- package/PostProcesses/sharpenPostProcess.js +39 -24
- package/PostProcesses/sharpenPostProcess.js.map +1 -1
- package/PostProcesses/thinCustomPostProcess.d.ts +20 -0
- package/PostProcesses/thinCustomPostProcess.js +32 -0
- package/PostProcesses/thinCustomPostProcess.js.map +1 -0
- package/PostProcesses/thinScreenSpaceCurvaturePostProcess.d.ts +36 -0
- package/PostProcesses/thinScreenSpaceCurvaturePostProcess.js +61 -0
- package/PostProcesses/thinScreenSpaceCurvaturePostProcess.js.map +1 -0
- package/PostProcesses/thinSharpenPostProcess.d.ts +40 -0
- package/PostProcesses/thinSharpenPostProcess.js +64 -0
- package/PostProcesses/thinSharpenPostProcess.js.map +1 -0
- package/Rendering/objectRenderer.js +3 -1
- package/Rendering/objectRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrDielectricReflectance.js +8 -9
- package/Shaders/ShadersInclude/openpbrDielectricReflectance.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrDirectLighting.js +13 -6
- package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +10 -2
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js +7 -1
- package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrFragmentSamplersDeclaration.js +2 -0
- package/Shaders/ShadersInclude/openpbrFragmentSamplersDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrThinFilmLayerData.d.ts +5 -0
- package/Shaders/ShadersInclude/openpbrThinFilmLayerData.js +27 -0
- package/Shaders/ShadersInclude/openpbrThinFilmLayerData.js.map +1 -0
- package/Shaders/ShadersInclude/openpbrUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/openpbrUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +6 -0
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -1
- package/Shaders/openpbr.fragment.d.ts +1 -0
- package/Shaders/openpbr.fragment.js +7 -1
- package/Shaders/openpbr.fragment.js.map +1 -1
- package/Shaders/openpbr.vertex.js +4 -0
- package/Shaders/openpbr.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js +2 -2
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +13 -6
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +10 -2
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrFragmentSamplersDeclaration.js +2 -0
- package/ShadersWGSL/ShadersInclude/openpbrFragmentSamplersDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrThinFilmLayerData.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/openpbrThinFilmLayerData.js +27 -0
- package/ShadersWGSL/ShadersInclude/openpbrThinFilmLayerData.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +3 -3
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/openpbr.fragment.d.ts +1 -0
- package/ShadersWGSL/openpbr.fragment.js +7 -1
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/openpbr.vertex.js +4 -0
- package/ShadersWGSL/openpbr.vertex.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +1 -1
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/ShadersWGSL/screenSpaceCurvature.fragment.d.ts +5 -0
- package/ShadersWGSL/screenSpaceCurvature.fragment.js +25 -0
- package/ShadersWGSL/screenSpaceCurvature.fragment.js.map +1 -0
- package/Sprites/spriteRenderer.js +1 -1
- package/Sprites/spriteRenderer.js.map +1 -1
- package/XR/motionController/index.d.ts +1 -0
- package/XR/motionController/index.js +1 -0
- package/XR/motionController/index.js.map +1 -1
- package/XR/motionController/webXRMotionControllerManager.js +1 -0
- package/XR/motionController/webXRMotionControllerManager.js.map +1 -1
- package/XR/motionController/webXROculusHandController.d.ts +25 -0
- package/XR/motionController/webXROculusHandController.js +246 -0
- package/XR/motionController/webXROculusHandController.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraph } from "../../../../index.js";
|
|
2
|
+
import { FrameGraphScreenSpaceCurvatureTask } from "../../../Tasks/PostProcesses/screenSpaceCurvatureTask.js";
|
|
3
|
+
import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block that implements the screen space curvature post process
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeRenderGraphScreenSpaceCurvaturePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
8
|
+
protected _frameGraphTask: FrameGraphScreenSpaceCurvatureTask;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task(): FrameGraphScreenSpaceCurvatureTask;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new NodeRenderGraphScreenSpaceCurvaturePostProcessBlock
|
|
15
|
+
* @param name defines the block name
|
|
16
|
+
* @param frameGraph defines the hosting frame graph
|
|
17
|
+
* @param scene defines the hosting scene
|
|
18
|
+
*/
|
|
19
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
|
20
|
+
/** Defines how much ridge the curvature effect displays. */
|
|
21
|
+
get ridge(): number;
|
|
22
|
+
set ridge(value: number);
|
|
23
|
+
/** Defines how much valley the curvature effect displays. */
|
|
24
|
+
get valley(): number;
|
|
25
|
+
set valley(value: number);
|
|
26
|
+
/**
|
|
27
|
+
* Gets the current class name
|
|
28
|
+
* @returns the class name
|
|
29
|
+
*/
|
|
30
|
+
getClassName(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the geometry view normal input component
|
|
33
|
+
*/
|
|
34
|
+
get geomViewNormal(): NodeRenderGraphConnectionPoint;
|
|
35
|
+
protected _buildBlock(state: NodeRenderGraphBuildState): void;
|
|
36
|
+
protected _dumpPropertiesCode(): string;
|
|
37
|
+
serialize(): any;
|
|
38
|
+
_deserialize(serializationObject: any): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
3
|
+
import { NodeRenderGraphBlockConnectionPointTypes } from "../../Types/nodeRenderGraphTypes.js";
|
|
4
|
+
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
5
|
+
import { FrameGraphScreenSpaceCurvatureTask } from "../../../Tasks/PostProcesses/screenSpaceCurvatureTask.js";
|
|
6
|
+
import { ThinScreenSpaceCurvaturePostProcess } from "../../../../PostProcesses/thinScreenSpaceCurvaturePostProcess.js";
|
|
7
|
+
import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
|
|
8
|
+
/**
|
|
9
|
+
* Block that implements the screen space curvature post process
|
|
10
|
+
*/
|
|
11
|
+
export class NodeRenderGraphScreenSpaceCurvaturePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
12
|
+
/**
|
|
13
|
+
* Gets the frame graph task associated with this block
|
|
14
|
+
*/
|
|
15
|
+
get task() {
|
|
16
|
+
return this._frameGraphTask;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create a new NodeRenderGraphScreenSpaceCurvaturePostProcessBlock
|
|
20
|
+
* @param name defines the block name
|
|
21
|
+
* @param frameGraph defines the hosting frame graph
|
|
22
|
+
* @param scene defines the hosting scene
|
|
23
|
+
*/
|
|
24
|
+
constructor(name, frameGraph, scene) {
|
|
25
|
+
super(name, frameGraph, scene);
|
|
26
|
+
this.registerInput("geomViewNormal", NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal);
|
|
27
|
+
this._finalizeInputOutputRegistering();
|
|
28
|
+
this._frameGraphTask = new FrameGraphScreenSpaceCurvatureTask(this.name, frameGraph, new ThinScreenSpaceCurvaturePostProcess(name, scene.getEngine()));
|
|
29
|
+
}
|
|
30
|
+
/** Defines how much ridge the curvature effect displays. */
|
|
31
|
+
get ridge() {
|
|
32
|
+
return this._frameGraphTask.postProcess.ridge;
|
|
33
|
+
}
|
|
34
|
+
set ridge(value) {
|
|
35
|
+
this._frameGraphTask.postProcess.ridge = value;
|
|
36
|
+
}
|
|
37
|
+
/** Defines how much valley the curvature effect displays. */
|
|
38
|
+
get valley() {
|
|
39
|
+
return this._frameGraphTask.postProcess.valley;
|
|
40
|
+
}
|
|
41
|
+
set valley(value) {
|
|
42
|
+
this._frameGraphTask.postProcess.valley = value;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Gets the current class name
|
|
46
|
+
* @returns the class name
|
|
47
|
+
*/
|
|
48
|
+
getClassName() {
|
|
49
|
+
return "NodeRenderGraphScreenSpaceCurvaturePostProcessBlock";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Gets the geometry view normal input component
|
|
53
|
+
*/
|
|
54
|
+
get geomViewNormal() {
|
|
55
|
+
return this._inputs[2];
|
|
56
|
+
}
|
|
57
|
+
_buildBlock(state) {
|
|
58
|
+
super._buildBlock(state);
|
|
59
|
+
this._frameGraphTask.normalTexture = this.geomViewNormal.connectedPoint?.value;
|
|
60
|
+
}
|
|
61
|
+
_dumpPropertiesCode() {
|
|
62
|
+
const codes = [];
|
|
63
|
+
codes.push(`${this._codeVariableName}.ridge = ${this.ridge};`);
|
|
64
|
+
codes.push(`${this._codeVariableName}.valley = ${this.valley};`);
|
|
65
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
66
|
+
}
|
|
67
|
+
serialize() {
|
|
68
|
+
const serializationObject = super.serialize();
|
|
69
|
+
serializationObject.ridge = this.ridge;
|
|
70
|
+
serializationObject.valley = this.valley;
|
|
71
|
+
return serializationObject;
|
|
72
|
+
}
|
|
73
|
+
_deserialize(serializationObject) {
|
|
74
|
+
super._deserialize(serializationObject);
|
|
75
|
+
this.ridge = serializationObject.ridge;
|
|
76
|
+
this.valley = serializationObject.valley;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
__decorate([
|
|
80
|
+
editableInPropertyPage("Ridge", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
81
|
+
], NodeRenderGraphScreenSpaceCurvaturePostProcessBlock.prototype, "ridge", null);
|
|
82
|
+
__decorate([
|
|
83
|
+
editableInPropertyPage("Valley", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
84
|
+
], NodeRenderGraphScreenSpaceCurvaturePostProcessBlock.prototype, "valley", null);
|
|
85
|
+
RegisterClass("BABYLON.NodeRenderGraphScreenSpaceCurvaturePostProcessBlock", NodeRenderGraphScreenSpaceCurvaturePostProcessBlock);
|
|
86
|
+
//# sourceMappingURL=screenSpaceCurvaturePostProcessBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenSpaceCurvaturePostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,kCAAkC,EAAE,iEAAqE;AAClH,OAAO,EAAE,mCAAmC,EAAE,yEAA+D;AAC7G,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;AACH,MAAM,OAAO,mDAAoD,SAAQ,mCAAmC;IAGxG;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,aAAa,CAAC,gBAAgB,EAAE,wCAAwC,CAAC,iBAAiB,CAAC,CAAC;QAEjG,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,IAAI,kCAAkC,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,mCAAmC,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC3J,CAAC;IAED,4DAA4D;IAE5D,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC;IAClD,CAAC;IAED,IAAW,KAAK,CAAC,KAAa;QAC1B,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;IACnD,CAAC;IAED,6DAA6D;IAE7D,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC;IACnD,CAAC;IAED,IAAW,MAAM,CAAC,KAAa;QAC3B,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,MAAM,GAAG,KAAK,CAAC;IACpD,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,qDAAqD,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAEkB,WAAW,CAAC,KAAgC;QAC3D,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAEzB,IAAI,CAAC,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,KAAgC,CAAC;IAC9G,CAAC;IAEkB,mBAAmB;QAClC,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,YAAY,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAC/D,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,aAAa,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACjE,OAAO,KAAK,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAC9C,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvC,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzC,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC7C,CAAC;CACJ;AA1DG;IADC,sBAAsB,CAAC,OAAO,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;gFAG/F;AAQD;IADC,sBAAsB,CAAC,QAAQ,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;iFAGhG;AAgDL,aAAa,CAAC,6DAA6D,EAAE,mDAAmD,CAAC,CAAC","sourcesContent":["import type { NodeRenderGraphConnectionPoint, Scene, NodeRenderGraphBuildState, FrameGraphTextureHandle, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphScreenSpaceCurvatureTask } from \"core/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask\";\r\nimport { ThinScreenSpaceCurvaturePostProcess } from \"core/PostProcesses/thinScreenSpaceCurvaturePostProcess\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the screen space curvature post process\r\n */\r\nexport class NodeRenderGraphScreenSpaceCurvaturePostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphScreenSpaceCurvatureTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new NodeRenderGraphScreenSpaceCurvaturePostProcessBlock\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this.registerInput(\"geomViewNormal\", NodeRenderGraphBlockConnectionPointTypes.TextureViewNormal);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphScreenSpaceCurvatureTask(this.name, frameGraph, new ThinScreenSpaceCurvaturePostProcess(name, scene.getEngine()));\r\n }\r\n\r\n /** Defines how much ridge the curvature effect displays. */\r\n @editableInPropertyPage(\"Ridge\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get ridge(): number {\r\n return this._frameGraphTask.postProcess.ridge;\r\n }\r\n\r\n public set ridge(value: number) {\r\n this._frameGraphTask.postProcess.ridge = value;\r\n }\r\n\r\n /** Defines how much valley the curvature effect displays. */\r\n @editableInPropertyPage(\"Valley\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get valley(): number {\r\n return this._frameGraphTask.postProcess.valley;\r\n }\r\n\r\n public set valley(value: number) {\r\n this._frameGraphTask.postProcess.valley = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphScreenSpaceCurvaturePostProcessBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry view normal input component\r\n */\r\n public get geomViewNormal(): NodeRenderGraphConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n super._buildBlock(state);\r\n\r\n this._frameGraphTask.normalTexture = this.geomViewNormal.connectedPoint?.value as FrameGraphTextureHandle;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.ridge = ${this.ridge};`);\r\n codes.push(`${this._codeVariableName}.valley = ${this.valley};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.ridge = this.ridge;\r\n serializationObject.valley = this.valley;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.ridge = serializationObject.ridge;\r\n this.valley = serializationObject.valley;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphScreenSpaceCurvaturePostProcessBlock\", NodeRenderGraphScreenSpaceCurvaturePostProcessBlock);\r\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Scene, FrameGraph } from "../../../../index.js";
|
|
2
|
+
import { FrameGraphSharpenTask } from "../../../Tasks/PostProcesses/sharpenTask.js";
|
|
3
|
+
import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
|
|
4
|
+
/**
|
|
5
|
+
* Block that implements the sharpen post process
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeRenderGraphSharpenPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
8
|
+
protected _frameGraphTask: FrameGraphSharpenTask;
|
|
9
|
+
/**
|
|
10
|
+
* Gets the frame graph task associated with this block
|
|
11
|
+
*/
|
|
12
|
+
get task(): FrameGraphSharpenTask;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new sharpen post process block
|
|
15
|
+
* @param name defines the block name
|
|
16
|
+
* @param frameGraph defines the hosting frame graph
|
|
17
|
+
* @param scene defines the hosting scene
|
|
18
|
+
*/
|
|
19
|
+
constructor(name: string, frameGraph: FrameGraph, scene: Scene);
|
|
20
|
+
/** How much of the original color should be applied. Setting this to 0 will display edge detection. */
|
|
21
|
+
get colorAmount(): number;
|
|
22
|
+
set colorAmount(value: number);
|
|
23
|
+
/** How much sharpness should be applied. */
|
|
24
|
+
get edgeAmount(): number;
|
|
25
|
+
set edgeAmount(value: number);
|
|
26
|
+
/**
|
|
27
|
+
* Gets the current class name
|
|
28
|
+
* @returns the class name
|
|
29
|
+
*/
|
|
30
|
+
getClassName(): string;
|
|
31
|
+
protected _dumpPropertiesCode(): string;
|
|
32
|
+
serialize(): any;
|
|
33
|
+
_deserialize(serializationObject: any): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { __decorate } from "../../../../tslib.es6.js";
|
|
2
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
3
|
+
import { editableInPropertyPage } from "../../../../Decorators/nodeDecorator.js";
|
|
4
|
+
import { FrameGraphSharpenTask } from "../../../Tasks/PostProcesses/sharpenTask.js";
|
|
5
|
+
import { ThinSharpenPostProcess } from "../../../../PostProcesses/thinSharpenPostProcess.js";
|
|
6
|
+
import { NodeRenderGraphBasePostProcessBlock } from "./basePostProcessBlock.js";
|
|
7
|
+
/**
|
|
8
|
+
* Block that implements the sharpen post process
|
|
9
|
+
*/
|
|
10
|
+
export class NodeRenderGraphSharpenPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {
|
|
11
|
+
/**
|
|
12
|
+
* Gets the frame graph task associated with this block
|
|
13
|
+
*/
|
|
14
|
+
get task() {
|
|
15
|
+
return this._frameGraphTask;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a new sharpen post process block
|
|
19
|
+
* @param name defines the block name
|
|
20
|
+
* @param frameGraph defines the hosting frame graph
|
|
21
|
+
* @param scene defines the hosting scene
|
|
22
|
+
*/
|
|
23
|
+
constructor(name, frameGraph, scene) {
|
|
24
|
+
super(name, frameGraph, scene);
|
|
25
|
+
this._finalizeInputOutputRegistering();
|
|
26
|
+
this._frameGraphTask = new FrameGraphSharpenTask(this.name, frameGraph, new ThinSharpenPostProcess(name, scene.getEngine()));
|
|
27
|
+
}
|
|
28
|
+
/** How much of the original color should be applied. Setting this to 0 will display edge detection. */
|
|
29
|
+
get colorAmount() {
|
|
30
|
+
return this._frameGraphTask.postProcess.colorAmount;
|
|
31
|
+
}
|
|
32
|
+
set colorAmount(value) {
|
|
33
|
+
this._frameGraphTask.postProcess.colorAmount = value;
|
|
34
|
+
}
|
|
35
|
+
/** How much sharpness should be applied. */
|
|
36
|
+
get edgeAmount() {
|
|
37
|
+
return this._frameGraphTask.postProcess.edgeAmount;
|
|
38
|
+
}
|
|
39
|
+
set edgeAmount(value) {
|
|
40
|
+
this._frameGraphTask.postProcess.edgeAmount = value;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Gets the current class name
|
|
44
|
+
* @returns the class name
|
|
45
|
+
*/
|
|
46
|
+
getClassName() {
|
|
47
|
+
return "NodeRenderGraphSharpenPostProcessBlock";
|
|
48
|
+
}
|
|
49
|
+
_dumpPropertiesCode() {
|
|
50
|
+
const codes = [];
|
|
51
|
+
codes.push(`${this._codeVariableName}.colorAmount = ${this.colorAmount};`);
|
|
52
|
+
codes.push(`${this._codeVariableName}.edgeAmount = ${this.edgeAmount};`);
|
|
53
|
+
return super._dumpPropertiesCode() + codes.join("\n");
|
|
54
|
+
}
|
|
55
|
+
serialize() {
|
|
56
|
+
const serializationObject = super.serialize();
|
|
57
|
+
serializationObject.colorAmount = this.colorAmount;
|
|
58
|
+
serializationObject.edgeAmount = this.edgeAmount;
|
|
59
|
+
return serializationObject;
|
|
60
|
+
}
|
|
61
|
+
_deserialize(serializationObject) {
|
|
62
|
+
super._deserialize(serializationObject);
|
|
63
|
+
this.colorAmount = serializationObject.colorAmount;
|
|
64
|
+
this.edgeAmount = serializationObject.edgeAmount;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
__decorate([
|
|
68
|
+
editableInPropertyPage("Color Amount", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
69
|
+
], NodeRenderGraphSharpenPostProcessBlock.prototype, "colorAmount", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
editableInPropertyPage("Edge Amount", 1 /* PropertyTypeForEdition.Float */, "PROPERTIES", { min: 0, max: 1 })
|
|
72
|
+
], NodeRenderGraphSharpenPostProcessBlock.prototype, "edgeAmount", null);
|
|
73
|
+
RegisterClass("BABYLON.NodeRenderGraphSharpenPostProcessBlock", NodeRenderGraphSharpenPostProcessBlock);
|
|
74
|
+
//# sourceMappingURL=sharpenPostProcessBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharpenPostProcessBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAA0B,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,oDAAwD;AACxF,OAAO,EAAE,sBAAsB,EAAE,4DAAkD;AACnF,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,mCAAmC;IAG3F;;OAEG;IACH,IAAoB,IAAI;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,YAAmB,IAAY,EAAE,UAAsB,EAAE,KAAY;QACjE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAE/B,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACjI,CAAC;IAED,uGAAuG;IAEvG,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,WAAW,CAAC;IACxD,CAAC;IAED,IAAW,WAAW,CAAC,KAAa;QAChC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,WAAW,GAAG,KAAK,CAAC;IACzD,CAAC;IAED,4CAA4C;IAE5C,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,UAAU,CAAC;IACvD,CAAC;IAED,IAAW,UAAU,CAAC,KAAa;QAC/B,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,UAAU,GAAG,KAAK,CAAC;IACxD,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,wCAAwC,CAAC;IACpD,CAAC;IAEkB,mBAAmB;QAClC,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,kBAAkB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QAC3E,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,iBAAiB,iBAAiB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAC9C,mBAAmB,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACnD,mBAAmB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACjD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC;QACnD,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACrD,CAAC;CACJ;AA7CG;IADC,sBAAsB,CAAC,cAAc,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;yEAGtG;AAQD;IADC,sBAAsB,CAAC,aAAa,wCAAgC,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;wEAGrG;AAmCL,aAAa,CAAC,gDAAgD,EAAE,sCAAsC,CAAC,CAAC","sourcesContent":["import type { Scene, FrameGraph } from \"core/index\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../../Decorators/nodeDecorator\";\r\nimport { FrameGraphSharpenTask } from \"core/FrameGraph/Tasks/PostProcesses/sharpenTask\";\r\nimport { ThinSharpenPostProcess } from \"core/PostProcesses/thinSharpenPostProcess\";\r\nimport { NodeRenderGraphBasePostProcessBlock } from \"./basePostProcessBlock\";\r\n\r\n/**\r\n * Block that implements the sharpen post process\r\n */\r\nexport class NodeRenderGraphSharpenPostProcessBlock extends NodeRenderGraphBasePostProcessBlock {\r\n protected override _frameGraphTask: FrameGraphSharpenTask;\r\n\r\n /**\r\n * Gets the frame graph task associated with this block\r\n */\r\n public override get task() {\r\n return this._frameGraphTask;\r\n }\r\n\r\n /**\r\n * Create a new sharpen post process block\r\n * @param name defines the block name\r\n * @param frameGraph defines the hosting frame graph\r\n * @param scene defines the hosting scene\r\n */\r\n public constructor(name: string, frameGraph: FrameGraph, scene: Scene) {\r\n super(name, frameGraph, scene);\r\n\r\n this._finalizeInputOutputRegistering();\r\n\r\n this._frameGraphTask = new FrameGraphSharpenTask(this.name, frameGraph, new ThinSharpenPostProcess(name, scene.getEngine()));\r\n }\r\n\r\n /** How much of the original color should be applied. Setting this to 0 will display edge detection. */\r\n @editableInPropertyPage(\"Color Amount\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get colorAmount(): number {\r\n return this._frameGraphTask.postProcess.colorAmount;\r\n }\r\n\r\n public set colorAmount(value: number) {\r\n this._frameGraphTask.postProcess.colorAmount = value;\r\n }\r\n\r\n /** How much sharpness should be applied. */\r\n @editableInPropertyPage(\"Edge Amount\", PropertyTypeForEdition.Float, \"PROPERTIES\", { min: 0, max: 1 })\r\n public get edgeAmount(): number {\r\n return this._frameGraphTask.postProcess.edgeAmount;\r\n }\r\n\r\n public set edgeAmount(value: number) {\r\n this._frameGraphTask.postProcess.edgeAmount = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"NodeRenderGraphSharpenPostProcessBlock\";\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codes: string[] = [];\r\n codes.push(`${this._codeVariableName}.colorAmount = ${this.colorAmount};`);\r\n codes.push(`${this._codeVariableName}.edgeAmount = ${this.edgeAmount};`);\r\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.colorAmount = this.colorAmount;\r\n serializationObject.edgeAmount = this.edgeAmount;\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n this.colorAmount = serializationObject.colorAmount;\r\n this.edgeAmount = serializationObject.edgeAmount;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.NodeRenderGraphSharpenPostProcessBlock\", NodeRenderGraphSharpenPostProcessBlock);\r\n"]}
|
|
@@ -21,6 +21,8 @@ export * from "./PostProcesses/grainPostProcessBlock.js";
|
|
|
21
21
|
export * from "./PostProcesses/imageProcessingPostProcessBlock.js";
|
|
22
22
|
export * from "./PostProcesses/motionBlurPostProcessBlock.js";
|
|
23
23
|
export * from "./PostProcesses/passPostProcessBlock.js";
|
|
24
|
+
export * from "./PostProcesses/sharpenPostProcessBlock.js";
|
|
25
|
+
export * from "./PostProcesses/screenSpaceCurvaturePostProcessBlock.js";
|
|
24
26
|
export * from "./PostProcesses/ssrPostProcessBlock.js";
|
|
25
27
|
export * from "./Rendering/csmShadowGeneratorBlock.js";
|
|
26
28
|
export * from "./Rendering/geometryRendererBlock.js";
|
|
@@ -21,6 +21,8 @@ export * from "./PostProcesses/grainPostProcessBlock.js";
|
|
|
21
21
|
export * from "./PostProcesses/imageProcessingPostProcessBlock.js";
|
|
22
22
|
export * from "./PostProcesses/motionBlurPostProcessBlock.js";
|
|
23
23
|
export * from "./PostProcesses/passPostProcessBlock.js";
|
|
24
|
+
export * from "./PostProcesses/sharpenPostProcessBlock.js";
|
|
25
|
+
export * from "./PostProcesses/screenSpaceCurvaturePostProcessBlock.js";
|
|
24
26
|
export * from "./PostProcesses/ssrPostProcessBlock.js";
|
|
25
27
|
export * from "./Rendering/csmShadowGeneratorBlock.js";
|
|
26
28
|
export * from "./Rendering/geometryRendererBlock.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAClE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./cullObjectsBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./executeBlock\";\r\nexport * from \"./inputBlock\";\r\nexport * from \"./outputBlock\";\r\nexport * from \"./resourceContainerBlock\";\r\n\r\nexport * from \"./Layers/glowLayerBlock\";\r\nexport * from \"./Layers/highlightLayerBlock\";\r\n\r\nexport * from \"./PostProcesses/anaglyphPostProcessBlock\";\r\nexport * from \"./PostProcesses/basePostProcessBlock\";\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/chromaticAberrationPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/convolutionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/fxaaPostProcessBlock\";\r\nexport * from \"./PostProcesses/grainPostProcessBlock\";\r\nexport * from \"./PostProcesses/imageProcessingPostProcessBlock\";\r\nexport * from \"./PostProcesses/motionBlurPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\nexport * from \"./PostProcesses/ssrPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/taaObjectRendererBlock\";\r\nexport * from \"./Rendering/utilityLayerRendererBlock\";\r\n\r\nexport * from \"./Teleport/teleportInBlock\";\r\nexport * from \"./Teleport/teleportOutBlock\";\r\n\r\nexport * from \"./Textures/clearBlock\";\r\nexport * from \"./Textures/copyTextureBlock\";\r\nexport * from \"./Textures/generateMipmapsBlock\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC;AAClE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sDAAsD,CAAC;AACrE,cAAc,qCAAqC,CAAC;AAEpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["export * from \"./cullObjectsBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./executeBlock\";\r\nexport * from \"./inputBlock\";\r\nexport * from \"./outputBlock\";\r\nexport * from \"./resourceContainerBlock\";\r\n\r\nexport * from \"./Layers/glowLayerBlock\";\r\nexport * from \"./Layers/highlightLayerBlock\";\r\n\r\nexport * from \"./PostProcesses/anaglyphPostProcessBlock\";\r\nexport * from \"./PostProcesses/basePostProcessBlock\";\r\nexport * from \"./PostProcesses/blackAndWhitePostProcessBlock\";\r\nexport * from \"./PostProcesses/bloomPostProcessBlock\";\r\nexport * from \"./PostProcesses/blurPostProcessBlock\";\r\nexport * from \"./PostProcesses/chromaticAberrationPostProcessBlock\";\r\nexport * from \"./PostProcesses/circleOfConfusionPostProcessBlock\";\r\nexport * from \"./PostProcesses/convolutionPostProcessBlock\";\r\nexport * from \"./PostProcesses/depthOfFieldPostProcessBlock\";\r\nexport * from \"./PostProcesses/extractHighlightsPostProcessBlock\";\r\nexport * from \"./PostProcesses/fxaaPostProcessBlock\";\r\nexport * from \"./PostProcesses/grainPostProcessBlock\";\r\nexport * from \"./PostProcesses/imageProcessingPostProcessBlock\";\r\nexport * from \"./PostProcesses/motionBlurPostProcessBlock\";\r\nexport * from \"./PostProcesses/passPostProcessBlock\";\r\nexport * from \"./PostProcesses/sharpenPostProcessBlock\";\r\nexport * from \"./PostProcesses/screenSpaceCurvaturePostProcessBlock\";\r\nexport * from \"./PostProcesses/ssrPostProcessBlock\";\r\n\r\nexport * from \"./Rendering/csmShadowGeneratorBlock\";\r\nexport * from \"./Rendering/geometryRendererBlock\";\r\nexport * from \"./Rendering/objectRendererBlock\";\r\nexport * from \"./Rendering/shadowGeneratorBlock\";\r\nexport * from \"./Rendering/taaObjectRendererBlock\";\r\nexport * from \"./Rendering/utilityLayerRendererBlock\";\r\n\r\nexport * from \"./Teleport/teleportInBlock\";\r\nexport * from \"./Teleport/teleportOutBlock\";\r\n\r\nexport * from \"./Textures/clearBlock\";\r\nexport * from \"./Textures/copyTextureBlock\";\r\nexport * from \"./Textures/generateMipmapsBlock\";\r\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FrameGraph, EffectWrapperCreationOptions, Observable, Effect } from "../../../index.js";
|
|
2
|
+
import { FrameGraphPostProcessTask } from "./postProcessTask.js";
|
|
3
|
+
import { ThinCustomPostProcess } from "../../../PostProcesses/thinCustomPostProcess.js";
|
|
4
|
+
/**
|
|
5
|
+
* Task which applies a custom post process.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FrameGraphCustomPostProcessTask extends FrameGraphPostProcessTask {
|
|
8
|
+
readonly postProcess: ThinCustomPostProcess;
|
|
9
|
+
/**
|
|
10
|
+
* Observable triggered when bind is called for the post process.
|
|
11
|
+
* Use this to set custom uniforms.
|
|
12
|
+
*/
|
|
13
|
+
onApplyObservable: Observable<Effect>;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a new custom post process task.
|
|
16
|
+
* @param name The name of the task.
|
|
17
|
+
* @param frameGraph The frame graph this task is associated with.
|
|
18
|
+
* @param options Options to configure the post process
|
|
19
|
+
*/
|
|
20
|
+
constructor(name: string, frameGraph: FrameGraph, options: EffectWrapperCreationOptions);
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FrameGraphPostProcessTask } from "./postProcessTask.js";
|
|
2
|
+
import { ThinCustomPostProcess } from "../../../PostProcesses/thinCustomPostProcess.js";
|
|
3
|
+
/**
|
|
4
|
+
* Task which applies a custom post process.
|
|
5
|
+
*/
|
|
6
|
+
export class FrameGraphCustomPostProcessTask extends FrameGraphPostProcessTask {
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new custom post process task.
|
|
9
|
+
* @param name The name of the task.
|
|
10
|
+
* @param frameGraph The frame graph this task is associated with.
|
|
11
|
+
* @param options Options to configure the post process
|
|
12
|
+
*/
|
|
13
|
+
constructor(name, frameGraph, options) {
|
|
14
|
+
super(name, frameGraph, new ThinCustomPostProcess(name, frameGraph.engine, options));
|
|
15
|
+
this.onApplyObservable = this.postProcess.onBindObservable;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=customPostProcessTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customPostProcessTask.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Tasks/PostProcesses/customPostProcessTask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAErF;;GAEG;AACH,MAAM,OAAO,+BAAgC,SAAQ,yBAAyB;IAS1E;;;;;OAKG;IACH,YAAY,IAAY,EAAE,UAAsB,EAAE,OAAqC;QACnF,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAErF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC;IAC/D,CAAC;CACJ","sourcesContent":["import type { FrameGraph, EffectWrapperCreationOptions, Observable, Effect } from \"core/index\";\r\nimport { FrameGraphPostProcessTask } from \"./postProcessTask\";\r\nimport { ThinCustomPostProcess } from \"../../../PostProcesses/thinCustomPostProcess\";\r\n\r\n/**\r\n * Task which applies a custom post process.\r\n */\r\nexport class FrameGraphCustomPostProcessTask extends FrameGraphPostProcessTask {\r\n public override readonly postProcess: ThinCustomPostProcess;\r\n\r\n /**\r\n * Observable triggered when bind is called for the post process.\r\n * Use this to set custom uniforms.\r\n */\r\n public onApplyObservable: Observable<Effect>;\r\n\r\n /**\r\n * Constructs a new custom post process task.\r\n * @param name The name of the task.\r\n * @param frameGraph The frame graph this task is associated with.\r\n * @param options Options to configure the post process\r\n */\r\n constructor(name: string, frameGraph: FrameGraph, options: EffectWrapperCreationOptions) {\r\n super(name, frameGraph, new ThinCustomPostProcess(name, frameGraph.engine, options));\r\n\r\n this.onApplyObservable = this.postProcess.onBindObservable;\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FrameGraph, FrameGraphTextureHandle, FrameGraphRenderPass } from "../../../index.js";
|
|
2
|
+
import { FrameGraphPostProcessTask } from "./postProcessTask.js";
|
|
3
|
+
import { ThinScreenSpaceCurvaturePostProcess } from "../../../PostProcesses/thinScreenSpaceCurvaturePostProcess.js";
|
|
4
|
+
/**
|
|
5
|
+
* Task which applies a screen space curvature post process.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FrameGraphScreenSpaceCurvatureTask extends FrameGraphPostProcessTask {
|
|
8
|
+
/**
|
|
9
|
+
* The normal texture to use for the screen space curvature effect.
|
|
10
|
+
* It must store normals in camera view space.
|
|
11
|
+
*/
|
|
12
|
+
normalTexture: FrameGraphTextureHandle;
|
|
13
|
+
readonly postProcess: ThinScreenSpaceCurvaturePostProcess;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a new circle of confusion task.
|
|
16
|
+
* @param name The name of the task.
|
|
17
|
+
* @param frameGraph The frame graph this task belongs to.
|
|
18
|
+
* @param thinPostProcess The thin post process to use for the task. If not provided, a new one will be created.
|
|
19
|
+
*/
|
|
20
|
+
constructor(name: string, frameGraph: FrameGraph, thinPostProcess?: ThinScreenSpaceCurvaturePostProcess);
|
|
21
|
+
record(skipCreationOfDisabledPasses?: boolean): FrameGraphRenderPass;
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FrameGraphPostProcessTask } from "./postProcessTask.js";
|
|
2
|
+
import { ThinScreenSpaceCurvaturePostProcess } from "../../../PostProcesses/thinScreenSpaceCurvaturePostProcess.js";
|
|
3
|
+
/**
|
|
4
|
+
* Task which applies a screen space curvature post process.
|
|
5
|
+
*/
|
|
6
|
+
export class FrameGraphScreenSpaceCurvatureTask extends FrameGraphPostProcessTask {
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new circle of confusion task.
|
|
9
|
+
* @param name The name of the task.
|
|
10
|
+
* @param frameGraph The frame graph this task belongs to.
|
|
11
|
+
* @param thinPostProcess The thin post process to use for the task. If not provided, a new one will be created.
|
|
12
|
+
*/
|
|
13
|
+
constructor(name, frameGraph, thinPostProcess) {
|
|
14
|
+
super(name, frameGraph, thinPostProcess || new ThinScreenSpaceCurvaturePostProcess(name, frameGraph.engine));
|
|
15
|
+
}
|
|
16
|
+
record(skipCreationOfDisabledPasses = false) {
|
|
17
|
+
if (this.sourceTexture === undefined || this.normalTexture === undefined) {
|
|
18
|
+
throw new Error(`FrameGraphScreenSpaceCurvatureTask "${this.name}": sourceTexture and normalTexture are required`);
|
|
19
|
+
}
|
|
20
|
+
const pass = super.record(skipCreationOfDisabledPasses, undefined, (context) => {
|
|
21
|
+
context.bindTextureHandle(this._postProcessDrawWrapper.effect, "normalSampler", this.normalTexture);
|
|
22
|
+
});
|
|
23
|
+
pass.addDependencies(this.normalTexture);
|
|
24
|
+
return pass;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=screenSpaceCurvatureTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenSpaceCurvatureTask.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,mCAAmC,EAAE,sEAA+D;AAE7G;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,yBAAyB;IAS7E;;;;;OAKG;IACH,YAAY,IAAY,EAAE,UAAsB,EAAE,eAAqD;QACnG,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,eAAe,IAAI,IAAI,mCAAmC,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACjH,CAAC;IAEe,MAAM,CAAC,4BAA4B,GAAG,KAAK;QACvD,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,CAAC,IAAI,iDAAiD,CAAC,CAAC;QACvH,CAAC;QAED,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,4BAA4B,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;YAC3E,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,uBAAuB,CAAC,MAAO,EAAE,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACzG,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEzC,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","sourcesContent":["import type { FrameGraph, FrameGraphTextureHandle, FrameGraphRenderPass } from \"core/index\";\r\nimport { FrameGraphPostProcessTask } from \"./postProcessTask\";\r\nimport { ThinScreenSpaceCurvaturePostProcess } from \"core/PostProcesses/thinScreenSpaceCurvaturePostProcess\";\r\n\r\n/**\r\n * Task which applies a screen space curvature post process.\r\n */\r\nexport class FrameGraphScreenSpaceCurvatureTask extends FrameGraphPostProcessTask {\r\n /**\r\n * The normal texture to use for the screen space curvature effect.\r\n * It must store normals in camera view space.\r\n */\r\n public normalTexture: FrameGraphTextureHandle;\r\n\r\n public override readonly postProcess: ThinScreenSpaceCurvaturePostProcess;\r\n\r\n /**\r\n * Constructs a new circle of confusion task.\r\n * @param name The name of the task.\r\n * @param frameGraph The frame graph this task belongs to.\r\n * @param thinPostProcess The thin post process to use for the task. If not provided, a new one will be created.\r\n */\r\n constructor(name: string, frameGraph: FrameGraph, thinPostProcess?: ThinScreenSpaceCurvaturePostProcess) {\r\n super(name, frameGraph, thinPostProcess || new ThinScreenSpaceCurvaturePostProcess(name, frameGraph.engine));\r\n }\r\n\r\n public override record(skipCreationOfDisabledPasses = false): FrameGraphRenderPass {\r\n if (this.sourceTexture === undefined || this.normalTexture === undefined) {\r\n throw new Error(`FrameGraphScreenSpaceCurvatureTask \"${this.name}\": sourceTexture and normalTexture are required`);\r\n }\r\n\r\n const pass = super.record(skipCreationOfDisabledPasses, undefined, (context) => {\r\n context.bindTextureHandle(this._postProcessDrawWrapper.effect!, \"normalSampler\", this.normalTexture);\r\n });\r\n\r\n pass.addDependencies(this.normalTexture);\r\n\r\n return pass;\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FrameGraph, FrameGraphRenderContext, FrameGraphRenderPass } from "../../../index.js";
|
|
2
|
+
import { FrameGraphPostProcessTask } from "./postProcessTask.js";
|
|
3
|
+
import { ThinSharpenPostProcess } from "../../../PostProcesses/thinSharpenPostProcess.js";
|
|
4
|
+
/**
|
|
5
|
+
* Task which applies a sharpen post process.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FrameGraphSharpenTask extends FrameGraphPostProcessTask {
|
|
8
|
+
readonly postProcess: ThinSharpenPostProcess;
|
|
9
|
+
/**
|
|
10
|
+
* Constructs a new sharpen task.
|
|
11
|
+
* @param name The name of the task.
|
|
12
|
+
* @param frameGraph The frame graph this task belongs to.
|
|
13
|
+
* @param thinPostProcess The thin post process to use for the task. If not provided, a new one will be created.
|
|
14
|
+
*/
|
|
15
|
+
constructor(name: string, frameGraph: FrameGraph, thinPostProcess?: ThinSharpenPostProcess);
|
|
16
|
+
record(skipCreationOfDisabledPasses?: boolean, additionalExecute?: (context: FrameGraphRenderContext) => void, additionalBindings?: (context: FrameGraphRenderContext) => void): FrameGraphRenderPass;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FrameGraphPostProcessTask } from "./postProcessTask.js";
|
|
2
|
+
import { ThinSharpenPostProcess } from "../../../PostProcesses/thinSharpenPostProcess.js";
|
|
3
|
+
/**
|
|
4
|
+
* Task which applies a sharpen post process.
|
|
5
|
+
*/
|
|
6
|
+
export class FrameGraphSharpenTask extends FrameGraphPostProcessTask {
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new sharpen task.
|
|
9
|
+
* @param name The name of the task.
|
|
10
|
+
* @param frameGraph The frame graph this task belongs to.
|
|
11
|
+
* @param thinPostProcess The thin post process to use for the task. If not provided, a new one will be created.
|
|
12
|
+
*/
|
|
13
|
+
constructor(name, frameGraph, thinPostProcess) {
|
|
14
|
+
super(name, frameGraph, thinPostProcess || new ThinSharpenPostProcess(name, frameGraph.engine));
|
|
15
|
+
}
|
|
16
|
+
record(skipCreationOfDisabledPasses = false, additionalExecute, additionalBindings) {
|
|
17
|
+
const pass = super.record(skipCreationOfDisabledPasses, additionalExecute, additionalBindings);
|
|
18
|
+
this.postProcess.textureWidth = this._sourceWidth;
|
|
19
|
+
this.postProcess.textureHeight = this._sourceHeight;
|
|
20
|
+
return pass;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=sharpenTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharpenTask.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FrameGraph/Tasks/PostProcesses/sharpenTask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,yDAAkD;AAEnF;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,yBAAyB;IAGhE;;;;;OAKG;IACH,YAAY,IAAY,EAAE,UAAsB,EAAE,eAAwC;QACtF,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,eAAe,IAAI,IAAI,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACpG,CAAC;IAEe,MAAM,CAClB,4BAA4B,GAAG,KAAK,EACpC,iBAA8D,EAC9D,kBAA+D;QAE/D,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,4BAA4B,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;QAE/F,IAAI,CAAC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAClD,IAAI,CAAC,WAAW,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QAEpD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","sourcesContent":["import type { FrameGraph, FrameGraphRenderContext, FrameGraphRenderPass } from \"core/index\";\r\nimport { FrameGraphPostProcessTask } from \"./postProcessTask\";\r\nimport { ThinSharpenPostProcess } from \"core/PostProcesses/thinSharpenPostProcess\";\r\n\r\n/**\r\n * Task which applies a sharpen post process.\r\n */\r\nexport class FrameGraphSharpenTask extends FrameGraphPostProcessTask {\r\n public override readonly postProcess: ThinSharpenPostProcess;\r\n\r\n /**\r\n * Constructs a new sharpen task.\r\n * @param name The name of the task.\r\n * @param frameGraph The frame graph this task belongs to.\r\n * @param thinPostProcess The thin post process to use for the task. If not provided, a new one will be created.\r\n */\r\n constructor(name: string, frameGraph: FrameGraph, thinPostProcess?: ThinSharpenPostProcess) {\r\n super(name, frameGraph, thinPostProcess || new ThinSharpenPostProcess(name, frameGraph.engine));\r\n }\r\n\r\n public override record(\r\n skipCreationOfDisabledPasses = false,\r\n additionalExecute?: (context: FrameGraphRenderContext) => void,\r\n additionalBindings?: (context: FrameGraphRenderContext) => void\r\n ): FrameGraphRenderPass {\r\n const pass = super.record(skipCreationOfDisabledPasses, additionalExecute, additionalBindings);\r\n\r\n this.postProcess.textureWidth = this._sourceWidth;\r\n this.postProcess.textureHeight = this._sourceHeight;\r\n\r\n return pass;\r\n }\r\n}\r\n"]}
|
|
@@ -25,6 +25,7 @@ type TextureEntry = {
|
|
|
25
25
|
textureDescriptionHash?: string;
|
|
26
26
|
lifespan?: TextureLifespan;
|
|
27
27
|
aliasHandle?: FrameGraphTextureHandle;
|
|
28
|
+
historyTexture?: boolean;
|
|
28
29
|
};
|
|
29
30
|
declare enum FrameGraphTextureNamespace {
|
|
30
31
|
Task = 0,
|
|
@@ -83,15 +84,18 @@ export declare class FrameGraphTextureManager {
|
|
|
83
84
|
/**
|
|
84
85
|
* Checks if a handle is a history texture (or points to a history texture, for a dangling handle)
|
|
85
86
|
* @param handle The handle to check
|
|
87
|
+
* @param checkAllTextures If false (default), the function will check if the handle is the main handle of a history texture (the first handle of the history texture).
|
|
88
|
+
* If true, the function will also check if the handle is one of the other handles of a history texture.
|
|
86
89
|
* @returns True if the handle is a history texture, otherwise false
|
|
87
90
|
*/
|
|
88
|
-
isHistoryTexture(handle: FrameGraphTextureHandle): boolean;
|
|
91
|
+
isHistoryTexture(handle: FrameGraphTextureHandle, checkAllTextures?: boolean): boolean;
|
|
89
92
|
/**
|
|
90
93
|
* Gets the creation options of a texture
|
|
91
94
|
* @param handle Handle of the texture
|
|
95
|
+
* @param preserveHistoryTextureFlag If true, the isHistoryTexture flag in the returned creation options will be the same as when the texture was created (default: false)
|
|
92
96
|
* @returns The creation options of the texture
|
|
93
97
|
*/
|
|
94
|
-
getTextureCreationOptions(handle: FrameGraphTextureHandle): FrameGraphTextureCreationOptions;
|
|
98
|
+
getTextureCreationOptions(handle: FrameGraphTextureHandle, preserveHistoryTextureFlag?: boolean): FrameGraphTextureCreationOptions;
|
|
95
99
|
/**
|
|
96
100
|
* Gets the description of a texture
|
|
97
101
|
* @param handle Handle of the texture
|
|
@@ -103,22 +103,28 @@ export class FrameGraphTextureManager {
|
|
|
103
103
|
/**
|
|
104
104
|
* Checks if a handle is a history texture (or points to a history texture, for a dangling handle)
|
|
105
105
|
* @param handle The handle to check
|
|
106
|
+
* @param checkAllTextures If false (default), the function will check if the handle is the main handle of a history texture (the first handle of the history texture).
|
|
107
|
+
* If true, the function will also check if the handle is one of the other handles of a history texture.
|
|
106
108
|
* @returns True if the handle is a history texture, otherwise false
|
|
107
109
|
*/
|
|
108
|
-
isHistoryTexture(handle) {
|
|
110
|
+
isHistoryTexture(handle, checkAllTextures = false) {
|
|
109
111
|
const entry = this._textures.get(handle);
|
|
110
112
|
if (!entry) {
|
|
111
113
|
return false;
|
|
112
114
|
}
|
|
113
115
|
handle = entry.refHandle ?? handle;
|
|
114
|
-
|
|
116
|
+
if (!checkAllTextures) {
|
|
117
|
+
return this._historyTextures.has(handle);
|
|
118
|
+
}
|
|
119
|
+
return this._textures.get(handle)?.historyTexture === true;
|
|
115
120
|
}
|
|
116
121
|
/**
|
|
117
122
|
* Gets the creation options of a texture
|
|
118
123
|
* @param handle Handle of the texture
|
|
124
|
+
* @param preserveHistoryTextureFlag If true, the isHistoryTexture flag in the returned creation options will be the same as when the texture was created (default: false)
|
|
119
125
|
* @returns The creation options of the texture
|
|
120
126
|
*/
|
|
121
|
-
getTextureCreationOptions(handle) {
|
|
127
|
+
getTextureCreationOptions(handle, preserveHistoryTextureFlag = false) {
|
|
122
128
|
handle = this._textures.get(handle)?.refHandle ?? handle;
|
|
123
129
|
const entry = this._textures.get(handle);
|
|
124
130
|
const creationOptions = entry.creationOptions;
|
|
@@ -126,7 +132,7 @@ export class FrameGraphTextureManager {
|
|
|
126
132
|
size: textureSizeIsObject(creationOptions.size) ? { ...creationOptions.size } : creationOptions.size,
|
|
127
133
|
sizeIsPercentage: creationOptions.sizeIsPercentage,
|
|
128
134
|
options: FrameGraphTextureManager.CloneTextureOptions(creationOptions.options, entry.textureIndex),
|
|
129
|
-
isHistoryTexture: creationOptions.isHistoryTexture,
|
|
135
|
+
isHistoryTexture: preserveHistoryTextureFlag ? creationOptions.isHistoryTexture : false,
|
|
130
136
|
};
|
|
131
137
|
}
|
|
132
138
|
/**
|
|
@@ -305,9 +311,15 @@ export class FrameGraphTextureManager {
|
|
|
305
311
|
* @returns The absolute dimensions of the texture
|
|
306
312
|
*/
|
|
307
313
|
getAbsoluteDimensions(size, screenWidth, screenHeight) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
314
|
+
if (this._backBufferTextureOverriden) {
|
|
315
|
+
const backbufferColorTextureSize = this._textures.get(backbufferColorTextureHandle).creationOptions.size;
|
|
316
|
+
screenWidth ?? (screenWidth = backbufferColorTextureSize.width);
|
|
317
|
+
screenHeight ?? (screenHeight = backbufferColorTextureSize.height);
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
screenWidth ?? (screenWidth = this.engine.getRenderWidth(true));
|
|
321
|
+
screenHeight ?? (screenHeight = this.engine.getRenderHeight(true));
|
|
322
|
+
}
|
|
311
323
|
const { width, height } = getDimensionsFromTextureSize(size);
|
|
312
324
|
return {
|
|
313
325
|
width: Math.floor((width * screenWidth) / 100),
|
|
@@ -646,6 +658,7 @@ export class FrameGraphTextureManager {
|
|
|
646
658
|
firstTask: Number.MAX_VALUE,
|
|
647
659
|
lastTask: 0,
|
|
648
660
|
},
|
|
661
|
+
historyTexture: creationOptions.isHistoryTexture,
|
|
649
662
|
};
|
|
650
663
|
this._textures.set(handle, textureEntry);
|
|
651
664
|
if (namespace === FrameGraphTextureNamespace.External) {
|
|
@@ -659,6 +672,7 @@ export class FrameGraphTextureManager {
|
|
|
659
672
|
isHistoryTexture: false,
|
|
660
673
|
};
|
|
661
674
|
const pongTexture = this._createHandleForTexture(`${name} pong`, null, pongCreationOptions, namespace);
|
|
675
|
+
this._textures.get(pongTexture).historyTexture = true;
|
|
662
676
|
this._historyTextures.set(handle, { textures: [null, null], handles: [handle, pongTexture], index: 0, references: [] });
|
|
663
677
|
return handle;
|
|
664
678
|
}
|
|
@@ -698,7 +712,7 @@ export class FrameGraphTextureManager {
|
|
|
698
712
|
for (let key = iterator.next(); key.done !== true; key = iterator.next()) {
|
|
699
713
|
const textureHandle = key.value;
|
|
700
714
|
const textureEntry = this._textures.get(textureHandle);
|
|
701
|
-
if (textureEntry.refHandle !== undefined || textureEntry.namespace === FrameGraphTextureNamespace.External || this.
|
|
715
|
+
if (textureEntry.refHandle !== undefined || textureEntry.namespace === FrameGraphTextureNamespace.External || this.isHistoryTexture(textureHandle, true)) {
|
|
702
716
|
continue;
|
|
703
717
|
}
|
|
704
718
|
const textureHash = textureEntry.textureDescriptionHash;
|