@onerjs/core 8.26.4 → 8.26.5
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 +6 -0
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/frameGraphContext.d.ts +2 -1
- package/FrameGraph/frameGraphContext.js +4 -1
- package/FrameGraph/frameGraphContext.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.d.ts +1 -1
- package/Lights/Clustered/clusteredLightContainer.js +4 -5
- 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 +19 -91
- package/Materials/Background/backgroundMaterial.js +17 -245
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +15 -4
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +28 -5
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +57 -69
- package/Materials/Node/nodeMaterial.js +9 -86
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -1
- package/Materials/Node/nodeMaterialBuildState.js +35 -15
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/PBR/index.d.ts +5 -0
- package/Materials/PBR/index.js +5 -0
- package/Materials/PBR/index.js.map +1 -1
- package/Materials/PBR/openPbrMaterial.d.ts +998 -0
- package/Materials/PBR/openPbrMaterial.js +2069 -0
- package/Materials/PBR/openPbrMaterial.js.map +1 -0
- package/Materials/PBR/pbrBaseMaterial.d.ts +57 -43
- package/Materials/PBR/pbrBaseMaterial.js +21 -304
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.d.ts +0 -78
- package/Materials/PBR/pbrMaterial.js +0 -110
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/floatingOriginMatrixOverrides.d.ts +3 -0
- package/Materials/floatingOriginMatrixOverrides.js +91 -0
- package/Materials/floatingOriginMatrixOverrides.js.map +1 -0
- package/Materials/imageProcessing.d.ts +65 -0
- package/Materials/imageProcessing.js +162 -0
- package/Materials/imageProcessing.js.map +1 -0
- package/Materials/imageProcessingConfiguration.defines.d.ts +25 -0
- package/Materials/imageProcessingConfiguration.defines.js +27 -0
- package/Materials/imageProcessingConfiguration.defines.js.map +1 -1
- package/Materials/index.d.ts +2 -0
- package/Materials/index.js +2 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.d.ts +14 -0
- package/Materials/material.js +14 -0
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +53 -0
- package/Materials/materialHelper.functions.js +297 -0
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/standardMaterial.d.ts +57 -121
- package/Materials/standardMaterial.js +21 -250
- package/Materials/standardMaterial.js.map +1 -1
- package/Materials/uv.defines.d.ts +22 -0
- package/Materials/uv.defines.js +24 -0
- package/Materials/uv.defines.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Misc/decorators.d.ts +7 -0
- package/Misc/decorators.js +34 -0
- package/Misc/decorators.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js +10 -1
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -1
- package/Particles/Node/Blocks/index.d.ts +2 -0
- package/Particles/Node/Blocks/index.js +2 -0
- package/Particles/Node/Blocks/index.js.map +1 -1
- package/Particles/Node/Blocks/particleInputBlock.js +4 -1
- package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.d.ts +38 -0
- package/Particles/Node/Blocks/particleLocalVariableBlock.js +108 -0
- package/Particles/Node/Blocks/particleLocalVariableBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleVectorLengthBlock.d.ts +26 -0
- package/Particles/Node/Blocks/particleVectorLengthBlock.js +50 -0
- package/Particles/Node/Blocks/particleVectorLengthBlock.js.map +1 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.d.ts +2 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +45 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +2 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +6 -4
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/iblCdfGenerator.js +28 -20
- 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 +3 -1
- 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 +34 -0
- 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 +4 -0
- package/Shaders/ShadersInclude/importanceSampling.js.map +1 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js +1 -0
- 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 +1 -0
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +3 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrHelperFunctions.js +2 -0
- 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 +28 -0
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/importanceSampling.js +4 -0
- 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 +3 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js +2 -0
- 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 +21 -0
- package/scene.js +29 -3
- package/scene.js.map +1 -1
|
@@ -11,7 +11,6 @@ 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";
|
|
15
14
|
import type { Nullable } from "../../types.js";
|
|
16
15
|
import { InputBlock } from "./Blocks/Input/inputBlock.js";
|
|
17
16
|
import type { TextureBlock } from "./Blocks/Dual/textureBlock.js";
|
|
@@ -31,7 +30,6 @@ import type { TriPlanarBlock } from "./Blocks/triPlanarBlock.js";
|
|
|
31
30
|
import type { BiPlanarBlock } from "./Blocks/biPlanarBlock.js";
|
|
32
31
|
import type { PrePassRenderer } from "../../Rendering/prePassRenderer.js";
|
|
33
32
|
import type { PrePassTextureBlock } from "./Blocks/Input/prePassTextureBlock.js";
|
|
34
|
-
import type { IImageProcessingConfigurationDefines } from "../imageProcessingConfiguration.defines.js";
|
|
35
33
|
import { ShaderLanguage } from "../shaderLanguage.js";
|
|
36
34
|
import { AbstractEngine } from "../../Engines/abstractEngine.js";
|
|
37
35
|
/**
|
|
@@ -45,26 +43,51 @@ export interface INodeMaterialEditorOptions {
|
|
|
45
43
|
backgroundColor?: Color4;
|
|
46
44
|
};
|
|
47
45
|
}
|
|
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;
|
|
48
83
|
/** @internal */
|
|
49
|
-
export declare class NodeMaterialDefines extends
|
|
84
|
+
export declare class NodeMaterialDefines extends NodeMaterialDefines_base {
|
|
50
85
|
/** Normal */
|
|
51
86
|
NORMAL: boolean;
|
|
52
87
|
/** Tangent */
|
|
53
88
|
TANGENT: boolean;
|
|
54
89
|
/** Vertex color */
|
|
55
90
|
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;
|
|
68
91
|
/** Prepass **/
|
|
69
92
|
PREPASS: boolean;
|
|
70
93
|
/** Prepass normal */
|
|
@@ -127,36 +150,6 @@ export declare class NodeMaterialDefines extends MaterialDefines implements IIma
|
|
|
127
150
|
NUM_MORPH_INFLUENCERS: number;
|
|
128
151
|
/** Using a texture to store morph target data */
|
|
129
152
|
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;
|
|
160
153
|
/** MISC. */
|
|
161
154
|
BUMPDIRECTUV: number;
|
|
162
155
|
/** Camera is orthographic */
|
|
@@ -192,10 +185,27 @@ export interface INodeMaterialOptions {
|
|
|
192
185
|
* Blocks that manage a texture
|
|
193
186
|
*/
|
|
194
187
|
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
|
+
}
|
|
195
205
|
/**
|
|
196
206
|
* Class used to create a node based material built by assembling shader blocks
|
|
197
207
|
*/
|
|
198
|
-
export declare class NodeMaterial extends
|
|
208
|
+
export declare class NodeMaterial extends NodeMaterialBase {
|
|
199
209
|
private static _BuildIdGenerator;
|
|
200
210
|
private _options;
|
|
201
211
|
private _vertexCompilationState;
|
|
@@ -275,20 +285,6 @@ export declare class NodeMaterial extends PushMaterial {
|
|
|
275
285
|
/** Gets or sets options to control the node material overall behavior */
|
|
276
286
|
get options(): INodeMaterialOptions;
|
|
277
287
|
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);
|
|
292
288
|
/**
|
|
293
289
|
* Gets an array of blocks that needs to be serialized even if they are not yet connected
|
|
294
290
|
*/
|
|
@@ -322,15 +318,6 @@ export declare class NodeMaterial extends PushMaterial {
|
|
|
322
318
|
* @returns the class name
|
|
323
319
|
*/
|
|
324
320
|
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;
|
|
334
321
|
/**
|
|
335
322
|
* Get a block by its name
|
|
336
323
|
* @param name defines the name of the block to retrieve
|
|
@@ -663,3 +650,4 @@ export declare class NodeMaterial extends PushMaterial {
|
|
|
663
650
|
*/
|
|
664
651
|
static CreateDefault(name: string, scene?: Scene): NodeMaterial;
|
|
665
652
|
}
|
|
653
|
+
export {};
|
|
@@ -42,11 +42,16 @@ 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";
|
|
45
46
|
import { AbstractEngine } from "../../Engines/abstractEngine.js";
|
|
46
47
|
import { MaterialHelperGeometryRendering } from "../materialHelper.geometryrendering.js";
|
|
48
|
+
import { UVDefinesMixin } from "../uv.defines.js";
|
|
49
|
+
import { ImageProcessingMixin } from "../imageProcessing.js";
|
|
47
50
|
const onCreatedEffectParameters = { effect: null, subMesh: null };
|
|
51
|
+
class NodeMaterialDefinesBase extends UVDefinesMixin(MaterialDefines) {
|
|
52
|
+
}
|
|
48
53
|
/** @internal */
|
|
49
|
-
export class NodeMaterialDefines extends
|
|
54
|
+
export class NodeMaterialDefines extends ImageProcessingDefinesMixin(NodeMaterialDefinesBase) {
|
|
50
55
|
/**
|
|
51
56
|
* Creates a new NodeMaterialDefines
|
|
52
57
|
*/
|
|
@@ -58,18 +63,6 @@ export class NodeMaterialDefines extends MaterialDefines {
|
|
|
58
63
|
this.TANGENT = false;
|
|
59
64
|
/** Vertex color */
|
|
60
65
|
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;
|
|
73
66
|
/** Prepass **/
|
|
74
67
|
this.PREPASS = false;
|
|
75
68
|
/** Prepass normal */
|
|
@@ -132,36 +125,6 @@ export class NodeMaterialDefines extends MaterialDefines {
|
|
|
132
125
|
this.NUM_MORPH_INFLUENCERS = 0;
|
|
133
126
|
/** Using a texture to store morph target data */
|
|
134
127
|
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;
|
|
165
128
|
/** MISC. */
|
|
166
129
|
this.BUMPDIRECTUV = 0;
|
|
167
130
|
/** Camera is orthographic */
|
|
@@ -188,10 +151,12 @@ export class NodeMaterialDefines extends MaterialDefines {
|
|
|
188
151
|
this[name] = value;
|
|
189
152
|
}
|
|
190
153
|
}
|
|
154
|
+
class NodeMaterialBase extends ImageProcessingMixin(PushMaterial) {
|
|
155
|
+
}
|
|
191
156
|
/**
|
|
192
157
|
* Class used to create a node based material built by assembling shader blocks
|
|
193
158
|
*/
|
|
194
|
-
export class NodeMaterial extends
|
|
159
|
+
export class NodeMaterial extends NodeMaterialBase {
|
|
195
160
|
/**
|
|
196
161
|
* Checks if a block is a texture block
|
|
197
162
|
* @param block The block to check
|
|
@@ -246,22 +211,6 @@ export class NodeMaterial extends PushMaterial {
|
|
|
246
211
|
set options(options) {
|
|
247
212
|
this._options = options;
|
|
248
213
|
}
|
|
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
|
-
}
|
|
265
214
|
/**
|
|
266
215
|
* Gets or sets the mode property
|
|
267
216
|
*/
|
|
@@ -359,32 +308,6 @@ export class NodeMaterial extends PushMaterial {
|
|
|
359
308
|
getClassName() {
|
|
360
309
|
return "NodeMaterial";
|
|
361
310
|
}
|
|
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
|
-
}
|
|
388
311
|
/**
|
|
389
312
|
* Get a block by its name
|
|
390
313
|
* @param name defines the name of the block to retrieve
|