@onerjs/core 8.48.4 → 8.48.6
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/Animations/animatable.core.d.ts +13 -0
- package/Animations/animatable.core.js +46 -7
- package/Animations/animatable.core.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.js +10 -8
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/geospatialCameraMovement.js +2 -2
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.d.ts +105 -0
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.js +318 -0
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/index.d.ts +1 -0
- package/FrameGraph/Node/Blocks/index.js +1 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.d.ts +34 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js +144 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsSpatialBlurTask.d.ts +26 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsSpatialBlurTask.js +82 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsSpatialBlurTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsTracingTask.d.ts +61 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsTracingTask.js +207 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsTracingTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsVoxelizationTask.d.ts +104 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsVoxelizationTask.js +218 -0
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsVoxelizationTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.d.ts +217 -0
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js +640 -0
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js.map +1 -0
- package/FrameGraph/frameGraph.js +1 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/index.d.ts +1 -0
- package/FrameGraph/index.js +1 -0
- package/FrameGraph/index.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.d.ts +13 -2
- package/Materials/PBR/openpbrMaterial.js +47 -16
- package/Materials/PBR/openpbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrBRDFConfiguration.js +1 -1
- package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
- package/Materials/Textures/Filtering/hdrFiltering.js +6 -0
- package/Materials/Textures/Filtering/hdrFiltering.js.map +1 -1
- package/Materials/Textures/envCubeTexture.js +13 -13
- package/Materials/Textures/envCubeTexture.js.map +1 -1
- package/Materials/materialHelper.functions.js +1 -1
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Misc/textureTools.d.ts +3 -1
- package/Misc/textureTools.js +74 -13
- package/Misc/textureTools.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +33 -1
- package/Particles/baseParticleSystem.js +65 -0
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/computeShaderParticleSystem.js +6 -0
- package/Particles/computeShaderParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +24 -6
- package/Particles/gpuParticleSystem.js +85 -36
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.d.ts +0 -7
- package/Particles/particleSystem.js +3 -15
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +1 -3
- package/Particles/thinParticleSystem.js +1 -27
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Particles/webgl2ParticleSystem.js +7 -0
- package/Particles/webgl2ParticleSystem.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js +1 -1
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.d.ts +3 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +11 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +0 -19
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +21 -65
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +15 -52
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +129 -220
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +3 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/geometryBufferRenderer.d.ts +14 -5
- package/Rendering/geometryBufferRenderer.js +6 -2
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/geometryBufferRendererSceneComponent.d.ts +4 -6
- package/Rendering/geometryBufferRendererSceneComponent.js.map +1 -1
- package/Rendering/iblCdfGenerator.d.ts +10 -0
- package/Rendering/iblCdfGenerator.js +52 -17
- package/Rendering/iblCdfGenerator.js.map +1 -1
- package/Rendering/index.d.ts +0 -6
- package/Rendering/index.js +0 -6
- package/Rendering/index.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrDirectLighting.js +6 -1
- package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/gpuUpdateParticles.vertex.js +12 -6
- package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
- package/Shaders/iblShadowVoxelTracing.fragment.js +5 -1
- package/Shaders/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/Shaders/iblVoxelGrid.fragment.d.ts +1 -0
- package/Shaders/iblVoxelGrid.fragment.js +33 -5
- package/Shaders/iblVoxelGrid.fragment.js.map +1 -1
- package/Shaders/lod3D.fragment.d.ts +5 -0
- package/Shaders/lod3D.fragment.js +13 -0
- package/Shaders/lod3D.fragment.js.map +1 -0
- package/Shaders/openpbr.fragment.js +5 -0
- package/Shaders/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +6 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js +14 -7
- package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js +5 -1
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/iblVoxelGrid.fragment.js +1 -1
- package/ShadersWGSL/iblVoxelGrid.fragment.js.map +1 -1
- package/ShadersWGSL/lod3D.fragment.d.ts +5 -0
- package/ShadersWGSL/lod3D.fragment.js +13 -0
- package/ShadersWGSL/lod3D.fragment.js.map +1 -0
- package/ShadersWGSL/openpbr.fragment.js +5 -0
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { type Camera, type FrameGraph, type FrameGraphObjectList, type FrameGraphTextureHandle, type InternalTexture, type Mesh } from "../../../index.js";
|
|
2
|
+
import { type Material } from "../../../Materials/material.js";
|
|
3
|
+
import { Observable } from "../../../Misc/observable.js";
|
|
4
|
+
import { FrameGraphTask } from "../../frameGraphTask.js";
|
|
5
|
+
import "../../../Rendering/iblCdfGeneratorSceneComponent.js";
|
|
6
|
+
/**
|
|
7
|
+
* Composite task that owns the individual IBL shadows frame graph tasks.
|
|
8
|
+
* The frame graph remains flat internally, but this task groups the pipeline
|
|
9
|
+
* and owns the child task implementation details.
|
|
10
|
+
*/
|
|
11
|
+
export declare class FrameGraphIblShadowsRendererTask extends FrameGraphTask {
|
|
12
|
+
/** Final frame-graph texture handle produced by the task. */
|
|
13
|
+
readonly outputTexture: FrameGraphTextureHandle;
|
|
14
|
+
private readonly _voxelizationTask;
|
|
15
|
+
private readonly _tracingTask;
|
|
16
|
+
private readonly _spatialBlurTask;
|
|
17
|
+
private readonly _accumulationTask;
|
|
18
|
+
private _dependenciesResolved;
|
|
19
|
+
private _shadowOpacity;
|
|
20
|
+
private readonly _materialsWithRenderPlugin;
|
|
21
|
+
private readonly _outputTextureReadyObservable;
|
|
22
|
+
private _lastNotifiedOutputTexture;
|
|
23
|
+
private _observedEnvironmentTexture;
|
|
24
|
+
private _observedEnvironmentTextureUnsubscribe;
|
|
25
|
+
private _lastImportedIcdfTexture;
|
|
26
|
+
private _lastImportedEnvironmentTexture;
|
|
27
|
+
private _lastImportedBlueNoiseTexture;
|
|
28
|
+
private readonly _blueNoiseTexture;
|
|
29
|
+
private _cameraViewChangedObserver;
|
|
30
|
+
private _cdfTextureChangedObserver;
|
|
31
|
+
private _cdfGeneratedObserver;
|
|
32
|
+
private _environmentTextureChangedObserver;
|
|
33
|
+
private _beforeRenderDependencyObserver;
|
|
34
|
+
private _beforeRenderOutputReadyObserver;
|
|
35
|
+
private _blueNoiseLoadObserver;
|
|
36
|
+
private _texturesAllocatedObserver;
|
|
37
|
+
private _voxelizationCompleteObserver;
|
|
38
|
+
/**
|
|
39
|
+
* Gets the class name.
|
|
40
|
+
* @returns The class name.
|
|
41
|
+
*/
|
|
42
|
+
getClassName(): string;
|
|
43
|
+
get name(): string;
|
|
44
|
+
set name(value: string);
|
|
45
|
+
/**
|
|
46
|
+
* Whether the task is disabled.
|
|
47
|
+
*/
|
|
48
|
+
get disabled(): boolean;
|
|
49
|
+
set disabled(value: boolean);
|
|
50
|
+
/** Camera used by the tracing stage. */
|
|
51
|
+
get camera(): Camera;
|
|
52
|
+
/** Camera used by the tracing stage. */
|
|
53
|
+
set camera(value: Camera);
|
|
54
|
+
/** Object list used by voxelization. */
|
|
55
|
+
get objectList(): FrameGraphObjectList;
|
|
56
|
+
/** Object list used by voxelization. */
|
|
57
|
+
set objectList(value: FrameGraphObjectList);
|
|
58
|
+
/**
|
|
59
|
+
* Depth texture handle used by tracing and blur.
|
|
60
|
+
* This should be the screen-space depth of all objects in the scene
|
|
61
|
+
* that will receive shadows.
|
|
62
|
+
* It is important that this texture stores 32-bit depth values to avoid artifacts.
|
|
63
|
+
*/
|
|
64
|
+
depthTexture: FrameGraphTextureHandle;
|
|
65
|
+
/**
|
|
66
|
+
* World-space normal texture handle used by tracing and blur.
|
|
67
|
+
* This should store the world-space normals of all objects in the scene
|
|
68
|
+
* that will receive shadows. Each component should be normalized to [0, 1] rather than [-1, 1].
|
|
69
|
+
* Recommended to be 16-bit floating point though 8-bit unsigned byte can be used with minimal
|
|
70
|
+
* loss in quality.
|
|
71
|
+
*/
|
|
72
|
+
normalTexture: FrameGraphTextureHandle;
|
|
73
|
+
/**
|
|
74
|
+
* Position texture handle used by accumulation.
|
|
75
|
+
* This should store the world-space position of all objects in the scene
|
|
76
|
+
* that will receive shadows.
|
|
77
|
+
* Should be stored as 16-bit floating point.
|
|
78
|
+
*/
|
|
79
|
+
positionTexture: FrameGraphTextureHandle;
|
|
80
|
+
/**
|
|
81
|
+
* Velocity texture handle used by accumulation.
|
|
82
|
+
* This should store the linear velocity per pixel of all objects in the scene
|
|
83
|
+
* that will receive shadows.
|
|
84
|
+
* Should be stored as 16-bit floating point.
|
|
85
|
+
*/
|
|
86
|
+
velocityTexture: FrameGraphTextureHandle;
|
|
87
|
+
/** Number of tracing sample directions. */
|
|
88
|
+
get sampleDirections(): number;
|
|
89
|
+
/** Number of tracing sample directions. */
|
|
90
|
+
set sampleDirections(value: number);
|
|
91
|
+
/** Whether traced shadows preserve environment color. */
|
|
92
|
+
get coloredShadows(): boolean;
|
|
93
|
+
/** Whether traced shadows preserve environment color. */
|
|
94
|
+
set coloredShadows(value: boolean);
|
|
95
|
+
/** Opacity of voxel-traced shadows. */
|
|
96
|
+
get voxelShadowOpacity(): number;
|
|
97
|
+
/** Opacity of voxel-traced shadows. */
|
|
98
|
+
set voxelShadowOpacity(value: number);
|
|
99
|
+
/** Opacity of screen-space shadows. */
|
|
100
|
+
get ssShadowOpacity(): number;
|
|
101
|
+
/** Opacity of screen-space shadows. */
|
|
102
|
+
set ssShadowOpacity(value: number);
|
|
103
|
+
/** Number of screen-space shadow samples. */
|
|
104
|
+
get ssShadowSampleCount(): number;
|
|
105
|
+
/** Number of screen-space shadow samples. */
|
|
106
|
+
set ssShadowSampleCount(value: number);
|
|
107
|
+
/** Stride used by screen-space shadow sampling. */
|
|
108
|
+
get ssShadowStride(): number;
|
|
109
|
+
/** Stride used by screen-space shadow sampling. */
|
|
110
|
+
set ssShadowStride(value: number);
|
|
111
|
+
/** Distance scale used by screen-space shadow tracing. */
|
|
112
|
+
get ssShadowDistanceScale(): number;
|
|
113
|
+
/** Distance scale used by screen-space shadow tracing. */
|
|
114
|
+
set ssShadowDistanceScale(value: number);
|
|
115
|
+
/** Thickness scale used by screen-space shadow tracing. */
|
|
116
|
+
get ssShadowThicknessScale(): number;
|
|
117
|
+
/** Thickness scale used by screen-space shadow tracing. */
|
|
118
|
+
set ssShadowThicknessScale(value: number);
|
|
119
|
+
/** Voxel tracing normal bias. */
|
|
120
|
+
get voxelNormalBias(): number;
|
|
121
|
+
/** Voxel tracing normal bias. */
|
|
122
|
+
set voxelNormalBias(value: number);
|
|
123
|
+
/** Voxel tracing direction bias. */
|
|
124
|
+
get voxelDirectionBias(): number;
|
|
125
|
+
/** Voxel tracing direction bias. */
|
|
126
|
+
set voxelDirectionBias(value: number);
|
|
127
|
+
/** Environment rotation in radians. */
|
|
128
|
+
get envRotation(): number;
|
|
129
|
+
/** Environment rotation in radians. */
|
|
130
|
+
set envRotation(value: number);
|
|
131
|
+
/** Temporal shadow remanence while moving. */
|
|
132
|
+
get shadowRemanence(): number;
|
|
133
|
+
/** Temporal shadow remanence while moving. */
|
|
134
|
+
set shadowRemanence(value: number);
|
|
135
|
+
/** Final material shadow opacity. */
|
|
136
|
+
get shadowOpacity(): number;
|
|
137
|
+
/** Final material shadow opacity. */
|
|
138
|
+
set shadowOpacity(value: number);
|
|
139
|
+
/** Voxelization resolution exponent. */
|
|
140
|
+
get resolutionExp(): number;
|
|
141
|
+
/** Voxelization resolution exponent. */
|
|
142
|
+
set resolutionExp(value: number);
|
|
143
|
+
/** Voxelization refresh rate. */
|
|
144
|
+
get refreshRate(): number;
|
|
145
|
+
/** Voxelization refresh rate. */
|
|
146
|
+
set refreshRate(value: number);
|
|
147
|
+
/** Whether tri-planar voxelization is used. */
|
|
148
|
+
get triPlanarVoxelization(): boolean;
|
|
149
|
+
/** Whether tri-planar voxelization is used. */
|
|
150
|
+
set triPlanarVoxelization(value: boolean);
|
|
151
|
+
/** Current world-space voxel grid size. */
|
|
152
|
+
get voxelGridSize(): number;
|
|
153
|
+
/** True when the accumulated output texture is ready. */
|
|
154
|
+
get outputTextureReady(): boolean;
|
|
155
|
+
/** Notifies when the accumulated output texture becomes ready. */
|
|
156
|
+
get onOutputTextureReadyObservable(): Observable<InternalTexture>;
|
|
157
|
+
/** Triggers a voxelization refresh on the next eligible frame. */
|
|
158
|
+
updateVoxelization(): void;
|
|
159
|
+
/** Recomputes the voxelization scene bounds from the current object list. */
|
|
160
|
+
updateSceneBounds(): void;
|
|
161
|
+
/** Resets temporal accumulation. */
|
|
162
|
+
resetAccumulation(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Adds one or more materials that should receive IBL shadows.
|
|
165
|
+
* @param material The material or materials to register. If omitted, all scene materials are added.
|
|
166
|
+
*/
|
|
167
|
+
addShadowReceivingMaterial(material?: Material | Material[]): void;
|
|
168
|
+
/**
|
|
169
|
+
* Removes one or more materials from IBL shadow reception.
|
|
170
|
+
* @param material The material or materials to unregister.
|
|
171
|
+
*/
|
|
172
|
+
removeShadowReceivingMaterial(material: Material | Material[]): void;
|
|
173
|
+
/** Clears all registered shadow-receiving materials. */
|
|
174
|
+
clearShadowReceivingMaterials(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Adds one or more meshes to the voxelization object list.
|
|
177
|
+
* @param mesh The mesh or meshes to add.
|
|
178
|
+
*/
|
|
179
|
+
addShadowCastingMesh(mesh: Mesh | Mesh[]): void;
|
|
180
|
+
/**
|
|
181
|
+
* Removes one or more meshes from the voxelization object list.
|
|
182
|
+
* @param mesh The mesh or meshes to remove.
|
|
183
|
+
*/
|
|
184
|
+
removeShadowCastingMesh(mesh: Mesh | Mesh[]): void;
|
|
185
|
+
/** Clears all shadow-casting meshes from the voxelization object list. */
|
|
186
|
+
clearShadowCastingMeshes(): void;
|
|
187
|
+
private _initAsyncCancel;
|
|
188
|
+
initAsync(): Promise<unknown>;
|
|
189
|
+
isReady(): boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Records the parent task.
|
|
192
|
+
* Child tasks record the actual passes.
|
|
193
|
+
*/
|
|
194
|
+
record(): void;
|
|
195
|
+
/**
|
|
196
|
+
* Disposes the task and owned resources.
|
|
197
|
+
*/
|
|
198
|
+
dispose(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Creates a new IBL shadows composite task.
|
|
201
|
+
* @param name The task name.
|
|
202
|
+
* @param frameGraph The owning frame graph.
|
|
203
|
+
*/
|
|
204
|
+
constructor(name: string, frameGraph: FrameGraph);
|
|
205
|
+
private _disposeDependencyObservers;
|
|
206
|
+
private _disposeObservers;
|
|
207
|
+
private _setCamera;
|
|
208
|
+
private _observeEnvironmentTexture;
|
|
209
|
+
private _getEnvironmentTextureInternal;
|
|
210
|
+
private _getAccumulationOutputTexture;
|
|
211
|
+
private _notifyIfOutputTextureReady;
|
|
212
|
+
private _applyMaterialPluginParameters;
|
|
213
|
+
private _addShadowReceivingMaterialInternal;
|
|
214
|
+
private readonly _onEnvironmentTextureLoaded;
|
|
215
|
+
private _tryEnableShadowsTasks;
|
|
216
|
+
private _initialize;
|
|
217
|
+
}
|