@onerjs/core 8.26.3 → 8.26.4
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/Tasks/Rendering/objectRendererTask.js +0 -6
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/frameGraphContext.d.ts +1 -2
- package/FrameGraph/frameGraphContext.js +1 -4
- package/FrameGraph/frameGraphContext.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.d.ts +1 -1
- package/Lights/Clustered/clusteredLightContainer.js +5 -4
- package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
- package/Lights/pointLight.js +4 -4
- package/Lights/pointLight.js.map +1 -1
- package/Lights/rectAreaLight.js +4 -4
- package/Lights/rectAreaLight.js.map +1 -1
- package/Lights/spotLight.js +2 -2
- package/Lights/spotLight.js.map +1 -1
- package/Materials/Background/backgroundMaterial.d.ts +91 -19
- package/Materials/Background/backgroundMaterial.js +245 -17
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +4 -15
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +5 -28
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +69 -57
- package/Materials/Node/nodeMaterial.js +86 -9
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +1 -3
- package/Materials/Node/nodeMaterialBuildState.js +15 -35
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/PBR/index.d.ts +0 -5
- package/Materials/PBR/index.js +0 -5
- package/Materials/PBR/index.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +43 -57
- package/Materials/PBR/pbrBaseMaterial.js +304 -21
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.d.ts +78 -0
- package/Materials/PBR/pbrMaterial.js +110 -0
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/imageProcessingConfiguration.defines.d.ts +0 -25
- package/Materials/imageProcessingConfiguration.defines.js +0 -27
- package/Materials/imageProcessingConfiguration.defines.js.map +1 -1
- package/Materials/index.d.ts +0 -2
- package/Materials/index.js +0 -2
- package/Materials/index.js.map +1 -1
- package/Materials/material.d.ts +0 -14
- package/Materials/material.js +0 -14
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +0 -53
- package/Materials/materialHelper.functions.js +0 -297
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/standardMaterial.d.ts +121 -57
- package/Materials/standardMaterial.js +250 -21
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +0 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Misc/decorators.d.ts +0 -7
- package/Misc/decorators.js +0 -34
- package/Misc/decorators.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js +1 -10
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -1
- package/Particles/Node/Blocks/index.d.ts +0 -2
- package/Particles/Node/Blocks/index.js +0 -2
- package/Particles/Node/Blocks/index.js.map +1 -1
- package/Particles/Node/Blocks/particleInputBlock.js +1 -4
- package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.d.ts +1 -2
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +0 -45
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +1 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +4 -6
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/iblCdfGenerator.js +20 -28
- package/Rendering/iblCdfGenerator.js.map +1 -1
- package/Rendering/reflectiveShadowMap.d.ts +3 -3
- package/Shaders/ShadersInclude/backgroundUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/clusteredLightingFunctions.js +1 -3
- package/Shaders/ShadersInclude/clusteredLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +0 -34
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/importanceSampling.js +0 -4
- package/Shaders/ShadersInclude/importanceSampling.js.map +1 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js +0 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js +1 -1
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +0 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -3
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrHelperFunctions.js +0 -2
- package/Shaders/ShadersInclude/pbrHelperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +0 -28
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/importanceSampling.js +0 -4
- package/ShadersWGSL/ShadersInclude/importanceSampling.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -3
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js +0 -2
- package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +0 -21
- package/scene.js +3 -29
- package/scene.js.map +1 -1
- package/Materials/PBR/openPbrMaterial.d.ts +0 -998
- package/Materials/PBR/openPbrMaterial.js +0 -2069
- package/Materials/PBR/openPbrMaterial.js.map +0 -1
- package/Materials/floatingOriginMatrixOverrides.d.ts +0 -3
- package/Materials/floatingOriginMatrixOverrides.js +0 -91
- package/Materials/floatingOriginMatrixOverrides.js.map +0 -1
- package/Materials/imageProcessing.d.ts +0 -65
- package/Materials/imageProcessing.js +0 -162
- package/Materials/imageProcessing.js.map +0 -1
- package/Materials/uv.defines.d.ts +0 -22
- package/Materials/uv.defines.js +0 -24
- package/Materials/uv.defines.js.map +0 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.d.ts +0 -38
- package/Particles/Node/Blocks/particleLocalVariableBlock.js +0 -108
- package/Particles/Node/Blocks/particleLocalVariableBlock.js.map +0 -1
- package/Particles/Node/Blocks/particleVectorLengthBlock.d.ts +0 -26
- package/Particles/Node/Blocks/particleVectorLengthBlock.js +0 -50
- package/Particles/Node/Blocks/particleVectorLengthBlock.js.map +0 -1
|
@@ -11,6 +11,7 @@ import { Observable } from "../../Misc/observable.js";
|
|
|
11
11
|
import type { SubMesh } from "../../Meshes/subMesh.js";
|
|
12
12
|
import { MaterialDefines } from "../../Materials/materialDefines.js";
|
|
13
13
|
import type { NodeMaterialOptimizer } from "./Optimizers/nodeMaterialOptimizer.js";
|
|
14
|
+
import type { ImageProcessingConfiguration } from "../imageProcessingConfiguration.js";
|
|
14
15
|
import type { Nullable } from "../../types.js";
|
|
15
16
|
import { InputBlock } from "./Blocks/Input/inputBlock.js";
|
|
16
17
|
import type { TextureBlock } from "./Blocks/Dual/textureBlock.js";
|
|
@@ -30,6 +31,7 @@ import type { TriPlanarBlock } from "./Blocks/triPlanarBlock.js";
|
|
|
30
31
|
import type { BiPlanarBlock } from "./Blocks/biPlanarBlock.js";
|
|
31
32
|
import type { PrePassRenderer } from "../../Rendering/prePassRenderer.js";
|
|
32
33
|
import type { PrePassTextureBlock } from "./Blocks/Input/prePassTextureBlock.js";
|
|
34
|
+
import type { IImageProcessingConfigurationDefines } from "../imageProcessingConfiguration.defines.js";
|
|
33
35
|
import { ShaderLanguage } from "../shaderLanguage.js";
|
|
34
36
|
import { AbstractEngine } from "../../Engines/abstractEngine.js";
|
|
35
37
|
/**
|
|
@@ -43,51 +45,26 @@ export interface INodeMaterialEditorOptions {
|
|
|
43
45
|
backgroundColor?: Color4;
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
|
-
declare const NodeMaterialDefinesBase_base: {
|
|
47
|
-
new (...args: any[]): {
|
|
48
|
-
MAINUV1: boolean;
|
|
49
|
-
MAINUV2: boolean;
|
|
50
|
-
MAINUV3: boolean;
|
|
51
|
-
MAINUV4: boolean;
|
|
52
|
-
MAINUV5: boolean;
|
|
53
|
-
MAINUV6: boolean;
|
|
54
|
-
UV1: boolean;
|
|
55
|
-
UV2: boolean;
|
|
56
|
-
UV3: boolean;
|
|
57
|
-
UV4: boolean;
|
|
58
|
-
UV5: boolean;
|
|
59
|
-
UV6: boolean;
|
|
60
|
-
};
|
|
61
|
-
} & typeof MaterialDefines;
|
|
62
|
-
declare class NodeMaterialDefinesBase extends NodeMaterialDefinesBase_base {
|
|
63
|
-
}
|
|
64
|
-
declare const NodeMaterialDefines_base: {
|
|
65
|
-
new (...args: any[]): {
|
|
66
|
-
IMAGEPROCESSING: boolean;
|
|
67
|
-
VIGNETTE: boolean;
|
|
68
|
-
VIGNETTEBLENDMODEMULTIPLY: boolean;
|
|
69
|
-
VIGNETTEBLENDMODEOPAQUE: boolean;
|
|
70
|
-
TONEMAPPING: number;
|
|
71
|
-
CONTRAST: boolean;
|
|
72
|
-
COLORCURVES: boolean;
|
|
73
|
-
COLORGRADING: boolean;
|
|
74
|
-
COLORGRADING3D: boolean;
|
|
75
|
-
SAMPLER3DGREENDEPTH: boolean;
|
|
76
|
-
SAMPLER3DBGRMAP: boolean;
|
|
77
|
-
DITHER: boolean;
|
|
78
|
-
IMAGEPROCESSINGPOSTPROCESS: boolean;
|
|
79
|
-
SKIPFINALCOLORCLAMP: boolean;
|
|
80
|
-
EXPOSURE: boolean;
|
|
81
|
-
};
|
|
82
|
-
} & typeof NodeMaterialDefinesBase;
|
|
83
48
|
/** @internal */
|
|
84
|
-
export declare class NodeMaterialDefines extends
|
|
49
|
+
export declare class NodeMaterialDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {
|
|
85
50
|
/** Normal */
|
|
86
51
|
NORMAL: boolean;
|
|
87
52
|
/** Tangent */
|
|
88
53
|
TANGENT: boolean;
|
|
89
54
|
/** Vertex color */
|
|
90
55
|
VERTEXCOLOR_NME: boolean;
|
|
56
|
+
/** Uv1 **/
|
|
57
|
+
UV1: boolean;
|
|
58
|
+
/** Uv2 **/
|
|
59
|
+
UV2: boolean;
|
|
60
|
+
/** Uv3 **/
|
|
61
|
+
UV3: boolean;
|
|
62
|
+
/** Uv4 **/
|
|
63
|
+
UV4: boolean;
|
|
64
|
+
/** Uv5 **/
|
|
65
|
+
UV5: boolean;
|
|
66
|
+
/** Uv6 **/
|
|
67
|
+
UV6: boolean;
|
|
91
68
|
/** Prepass **/
|
|
92
69
|
PREPASS: boolean;
|
|
93
70
|
/** Prepass normal */
|
|
@@ -150,6 +127,36 @@ export declare class NodeMaterialDefines extends NodeMaterialDefines_base {
|
|
|
150
127
|
NUM_MORPH_INFLUENCERS: number;
|
|
151
128
|
/** Using a texture to store morph target data */
|
|
152
129
|
MORPHTARGETS_TEXTURE: boolean;
|
|
130
|
+
/** IMAGE PROCESSING */
|
|
131
|
+
IMAGEPROCESSING: boolean;
|
|
132
|
+
/** Vignette */
|
|
133
|
+
VIGNETTE: boolean;
|
|
134
|
+
/** Multiply blend mode for vignette */
|
|
135
|
+
VIGNETTEBLENDMODEMULTIPLY: boolean;
|
|
136
|
+
/** Opaque blend mode for vignette */
|
|
137
|
+
VIGNETTEBLENDMODEOPAQUE: boolean;
|
|
138
|
+
/** Tone mapping */
|
|
139
|
+
TONEMAPPING: number;
|
|
140
|
+
/** Contrast */
|
|
141
|
+
CONTRAST: boolean;
|
|
142
|
+
/** Exposure */
|
|
143
|
+
EXPOSURE: boolean;
|
|
144
|
+
/** Color curves */
|
|
145
|
+
COLORCURVES: boolean;
|
|
146
|
+
/** Color grading */
|
|
147
|
+
COLORGRADING: boolean;
|
|
148
|
+
/** 3D color grading */
|
|
149
|
+
COLORGRADING3D: boolean;
|
|
150
|
+
/** Sampler green depth */
|
|
151
|
+
SAMPLER3DGREENDEPTH: boolean;
|
|
152
|
+
/** Sampler for BGR map */
|
|
153
|
+
SAMPLER3DBGRMAP: boolean;
|
|
154
|
+
/** Dithering */
|
|
155
|
+
DITHER: boolean;
|
|
156
|
+
/** Using post process for image processing */
|
|
157
|
+
IMAGEPROCESSINGPOSTPROCESS: boolean;
|
|
158
|
+
/** Skip color clamp */
|
|
159
|
+
SKIPFINALCOLORCLAMP: boolean;
|
|
153
160
|
/** MISC. */
|
|
154
161
|
BUMPDIRECTUV: number;
|
|
155
162
|
/** Camera is orthographic */
|
|
@@ -185,27 +192,10 @@ export interface INodeMaterialOptions {
|
|
|
185
192
|
* Blocks that manage a texture
|
|
186
193
|
*/
|
|
187
194
|
export type NodeMaterialTextureBlocks = TextureBlock | ReflectionTextureBaseBlock | RefractionBlock | CurrentScreenBlock | ParticleTextureBlock | ImageSourceBlock | TriPlanarBlock | BiPlanarBlock | PrePassTextureBlock;
|
|
188
|
-
declare const NodeMaterialBase_base: {
|
|
189
|
-
new (...args: any[]): {
|
|
190
|
-
_imageProcessingConfiguration: import("../index.js").ImageProcessingConfiguration;
|
|
191
|
-
imageProcessingConfiguration: import("../index.js").ImageProcessingConfiguration;
|
|
192
|
-
_imageProcessingObserver: Nullable<import("../../Misc/observable.js").Observer<import("../index.js").ImageProcessingConfiguration>>;
|
|
193
|
-
_attachImageProcessingConfiguration(configuration: Nullable<import("../index.js").ImageProcessingConfiguration>): void;
|
|
194
|
-
cameraColorCurvesEnabled: boolean;
|
|
195
|
-
cameraColorGradingEnabled: boolean;
|
|
196
|
-
cameraToneMappingEnabled: boolean;
|
|
197
|
-
cameraExposure: number;
|
|
198
|
-
cameraContrast: number;
|
|
199
|
-
cameraColorGradingTexture: Nullable<BaseTexture>;
|
|
200
|
-
cameraColorCurves: Nullable<import("../index.js").ColorCurves>;
|
|
201
|
-
};
|
|
202
|
-
} & typeof PushMaterial;
|
|
203
|
-
declare class NodeMaterialBase extends NodeMaterialBase_base {
|
|
204
|
-
}
|
|
205
195
|
/**
|
|
206
196
|
* Class used to create a node based material built by assembling shader blocks
|
|
207
197
|
*/
|
|
208
|
-
export declare class NodeMaterial extends
|
|
198
|
+
export declare class NodeMaterial extends PushMaterial {
|
|
209
199
|
private static _BuildIdGenerator;
|
|
210
200
|
private _options;
|
|
211
201
|
private _vertexCompilationState;
|
|
@@ -285,6 +275,20 @@ export declare class NodeMaterial extends NodeMaterialBase {
|
|
|
285
275
|
/** Gets or sets options to control the node material overall behavior */
|
|
286
276
|
get options(): INodeMaterialOptions;
|
|
287
277
|
set options(options: INodeMaterialOptions);
|
|
278
|
+
/**
|
|
279
|
+
* Default configuration related to image processing available in the standard Material.
|
|
280
|
+
*/
|
|
281
|
+
protected _imageProcessingConfiguration: ImageProcessingConfiguration;
|
|
282
|
+
/**
|
|
283
|
+
* Gets the image processing configuration used either in this material.
|
|
284
|
+
*/
|
|
285
|
+
get imageProcessingConfiguration(): ImageProcessingConfiguration;
|
|
286
|
+
/**
|
|
287
|
+
* Sets the Default image processing configuration used either in the this material.
|
|
288
|
+
*
|
|
289
|
+
* If sets to null, the scene one is in use.
|
|
290
|
+
*/
|
|
291
|
+
set imageProcessingConfiguration(value: ImageProcessingConfiguration);
|
|
288
292
|
/**
|
|
289
293
|
* Gets an array of blocks that needs to be serialized even if they are not yet connected
|
|
290
294
|
*/
|
|
@@ -318,6 +322,15 @@ export declare class NodeMaterial extends NodeMaterialBase {
|
|
|
318
322
|
* @returns the class name
|
|
319
323
|
*/
|
|
320
324
|
getClassName(): string;
|
|
325
|
+
/**
|
|
326
|
+
* Keep track of the image processing observer to allow dispose and replace.
|
|
327
|
+
*/
|
|
328
|
+
private _imageProcessingObserver;
|
|
329
|
+
/**
|
|
330
|
+
* Attaches a new image processing configuration to the Standard Material.
|
|
331
|
+
* @param configuration
|
|
332
|
+
*/
|
|
333
|
+
protected _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>): void;
|
|
321
334
|
/**
|
|
322
335
|
* Get a block by its name
|
|
323
336
|
* @param name defines the name of the block to retrieve
|
|
@@ -650,4 +663,3 @@ export declare class NodeMaterial extends NodeMaterialBase {
|
|
|
650
663
|
*/
|
|
651
664
|
static CreateDefault(name: string, scene?: Scene): NodeMaterial;
|
|
652
665
|
}
|
|
653
|
-
export {};
|
|
@@ -42,16 +42,11 @@ import { EngineStore } from "../../Engines/engineStore.js";
|
|
|
42
42
|
import { Material } from "../material.js";
|
|
43
43
|
import { Logger } from "../../Misc/logger.js";
|
|
44
44
|
import { PrepareDefinesForCamera, PrepareDefinesForPrePass } from "../materialHelper.functions.js";
|
|
45
|
-
import { ImageProcessingDefinesMixin } from "../imageProcessingConfiguration.defines.js";
|
|
46
45
|
import { AbstractEngine } from "../../Engines/abstractEngine.js";
|
|
47
46
|
import { MaterialHelperGeometryRendering } from "../materialHelper.geometryrendering.js";
|
|
48
|
-
import { UVDefinesMixin } from "../uv.defines.js";
|
|
49
|
-
import { ImageProcessingMixin } from "../imageProcessing.js";
|
|
50
47
|
const onCreatedEffectParameters = { effect: null, subMesh: null };
|
|
51
|
-
class NodeMaterialDefinesBase extends UVDefinesMixin(MaterialDefines) {
|
|
52
|
-
}
|
|
53
48
|
/** @internal */
|
|
54
|
-
export class NodeMaterialDefines extends
|
|
49
|
+
export class NodeMaterialDefines extends MaterialDefines {
|
|
55
50
|
/**
|
|
56
51
|
* Creates a new NodeMaterialDefines
|
|
57
52
|
*/
|
|
@@ -63,6 +58,18 @@ export class NodeMaterialDefines extends ImageProcessingDefinesMixin(NodeMateria
|
|
|
63
58
|
this.TANGENT = false;
|
|
64
59
|
/** Vertex color */
|
|
65
60
|
this.VERTEXCOLOR_NME = false;
|
|
61
|
+
/** Uv1 **/
|
|
62
|
+
this.UV1 = false;
|
|
63
|
+
/** Uv2 **/
|
|
64
|
+
this.UV2 = false;
|
|
65
|
+
/** Uv3 **/
|
|
66
|
+
this.UV3 = false;
|
|
67
|
+
/** Uv4 **/
|
|
68
|
+
this.UV4 = false;
|
|
69
|
+
/** Uv5 **/
|
|
70
|
+
this.UV5 = false;
|
|
71
|
+
/** Uv6 **/
|
|
72
|
+
this.UV6 = false;
|
|
66
73
|
/** Prepass **/
|
|
67
74
|
this.PREPASS = false;
|
|
68
75
|
/** Prepass normal */
|
|
@@ -125,6 +132,36 @@ export class NodeMaterialDefines extends ImageProcessingDefinesMixin(NodeMateria
|
|
|
125
132
|
this.NUM_MORPH_INFLUENCERS = 0;
|
|
126
133
|
/** Using a texture to store morph target data */
|
|
127
134
|
this.MORPHTARGETS_TEXTURE = false;
|
|
135
|
+
/** IMAGE PROCESSING */
|
|
136
|
+
this.IMAGEPROCESSING = false;
|
|
137
|
+
/** Vignette */
|
|
138
|
+
this.VIGNETTE = false;
|
|
139
|
+
/** Multiply blend mode for vignette */
|
|
140
|
+
this.VIGNETTEBLENDMODEMULTIPLY = false;
|
|
141
|
+
/** Opaque blend mode for vignette */
|
|
142
|
+
this.VIGNETTEBLENDMODEOPAQUE = false;
|
|
143
|
+
/** Tone mapping */
|
|
144
|
+
this.TONEMAPPING = 0;
|
|
145
|
+
/** Contrast */
|
|
146
|
+
this.CONTRAST = false;
|
|
147
|
+
/** Exposure */
|
|
148
|
+
this.EXPOSURE = false;
|
|
149
|
+
/** Color curves */
|
|
150
|
+
this.COLORCURVES = false;
|
|
151
|
+
/** Color grading */
|
|
152
|
+
this.COLORGRADING = false;
|
|
153
|
+
/** 3D color grading */
|
|
154
|
+
this.COLORGRADING3D = false;
|
|
155
|
+
/** Sampler green depth */
|
|
156
|
+
this.SAMPLER3DGREENDEPTH = false;
|
|
157
|
+
/** Sampler for BGR map */
|
|
158
|
+
this.SAMPLER3DBGRMAP = false;
|
|
159
|
+
/** Dithering */
|
|
160
|
+
this.DITHER = false;
|
|
161
|
+
/** Using post process for image processing */
|
|
162
|
+
this.IMAGEPROCESSINGPOSTPROCESS = false;
|
|
163
|
+
/** Skip color clamp */
|
|
164
|
+
this.SKIPFINALCOLORCLAMP = false;
|
|
128
165
|
/** MISC. */
|
|
129
166
|
this.BUMPDIRECTUV = 0;
|
|
130
167
|
/** Camera is orthographic */
|
|
@@ -151,12 +188,10 @@ export class NodeMaterialDefines extends ImageProcessingDefinesMixin(NodeMateria
|
|
|
151
188
|
this[name] = value;
|
|
152
189
|
}
|
|
153
190
|
}
|
|
154
|
-
class NodeMaterialBase extends ImageProcessingMixin(PushMaterial) {
|
|
155
|
-
}
|
|
156
191
|
/**
|
|
157
192
|
* Class used to create a node based material built by assembling shader blocks
|
|
158
193
|
*/
|
|
159
|
-
export class NodeMaterial extends
|
|
194
|
+
export class NodeMaterial extends PushMaterial {
|
|
160
195
|
/**
|
|
161
196
|
* Checks if a block is a texture block
|
|
162
197
|
* @param block The block to check
|
|
@@ -211,6 +246,22 @@ export class NodeMaterial extends NodeMaterialBase {
|
|
|
211
246
|
set options(options) {
|
|
212
247
|
this._options = options;
|
|
213
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Gets the image processing configuration used either in this material.
|
|
251
|
+
*/
|
|
252
|
+
get imageProcessingConfiguration() {
|
|
253
|
+
return this._imageProcessingConfiguration;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Sets the Default image processing configuration used either in the this material.
|
|
257
|
+
*
|
|
258
|
+
* If sets to null, the scene one is in use.
|
|
259
|
+
*/
|
|
260
|
+
set imageProcessingConfiguration(value) {
|
|
261
|
+
this._attachImageProcessingConfiguration(value);
|
|
262
|
+
// Ensure the effect will be rebuilt.
|
|
263
|
+
this._markAllSubMeshesAsTexturesDirty();
|
|
264
|
+
}
|
|
214
265
|
/**
|
|
215
266
|
* Gets or sets the mode property
|
|
216
267
|
*/
|
|
@@ -308,6 +359,32 @@ export class NodeMaterial extends NodeMaterialBase {
|
|
|
308
359
|
getClassName() {
|
|
309
360
|
return "NodeMaterial";
|
|
310
361
|
}
|
|
362
|
+
/**
|
|
363
|
+
* Attaches a new image processing configuration to the Standard Material.
|
|
364
|
+
* @param configuration
|
|
365
|
+
*/
|
|
366
|
+
_attachImageProcessingConfiguration(configuration) {
|
|
367
|
+
if (configuration === this._imageProcessingConfiguration) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
// Detaches observer.
|
|
371
|
+
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
|
|
372
|
+
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
|
|
373
|
+
}
|
|
374
|
+
// Pick the scene configuration if needed.
|
|
375
|
+
if (!configuration) {
|
|
376
|
+
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
this._imageProcessingConfiguration = configuration;
|
|
380
|
+
}
|
|
381
|
+
// Attaches observer.
|
|
382
|
+
if (this._imageProcessingConfiguration) {
|
|
383
|
+
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {
|
|
384
|
+
this._markAllSubMeshesAsImageProcessingDirty();
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
311
388
|
/**
|
|
312
389
|
* Get a block by its name
|
|
313
390
|
* @param name defines the name of the block to retrieve
|