Skip to content

Commit 3a5b609

Browse files
author
Mike Bond
committed
Minor changes
1 parent 372bd07 commit 3a5b609

File tree

4 files changed

+16
-46
lines changed

4 files changed

+16
-46
lines changed

packages/dev/core/src/Materials/PBR/openPbrMaterial.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { Nullable } from "../../types";
55
import { Scene } from "../../scene";
66
import { Color3, Color4, TmpColors } from "../../Maths/math.color";
77
import { ImageProcessingConfiguration } from "../imageProcessingConfiguration";
8-
import type { BaseTexture } from "../Textures/baseTexture";
8+
import type { BaseTexture } from "../../Materials/Textures/baseTexture";
99
import { PBRBaseMaterial } from "./pbrBaseMaterial";
1010
import { RegisterClass } from "../../Misc/typeStore";
1111
import { Material } from "../material";
@@ -166,7 +166,7 @@ export class OpenPBRMaterialDefines extends ImageProcessingDefinesMixin(OpenPBRM
166166
public MICROSURFACEMAP = false;
167167
public MICROSURFACEMAPDIRECTUV = 0;
168168

169-
public METALLICWORKFLOW = false;
169+
public METALLICWORKFLOW = true;
170170
public ROUGHNESSSTOREINMETALMAPALPHA = false;
171171
public ROUGHNESSSTOREINMETALMAPGREEN = false;
172172
public METALLNESSSTOREINMETALMAPBLUE = false;
@@ -2121,8 +2121,6 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
21212121
TmpColors.Color4[0].a = f0;
21222122
ubo.updateDirectColor4("vReflectivityColor", TmpColors.Color4[0]);
21232123
ubo.updateColor4("vMetallicReflectanceFactors", this._metallicReflectanceColor, this._metallicF0Factor);
2124-
} else {
2125-
ubo.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
21262124
}
21272125

21282126
ubo.updateColor3("vEmissiveColor", MaterialFlags.EmissiveTextureEnabled ? this._emissiveColor : Color3.BlackReadOnly);

packages/dev/core/src/Materials/PBR/pbrBaseMaterial.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ import { PBRBRDFConfiguration } from "./pbrBRDFConfiguration";
1515
import { PrePassConfiguration } from "../prePassConfiguration";
1616
import { Color3, TmpColors } from "../../Maths/math.color";
1717

18-
import { ImageProcessingDefinesMixin } from "../imageProcessingConfiguration.defines";
19-
import { ImageProcessingConfiguration } from "../imageProcessingConfiguration";
20-
import type { Effect, IEffectCreationOptions } from "../effect";
21-
import type { IMaterialCompilationOptions, ICustomShaderNameResolveOptions } from "../material";
22-
import { Material } from "../material";
18+
import { ImageProcessingDefinesMixin } from "../../Materials/imageProcessingConfiguration.defines";
19+
import { ImageProcessingConfiguration } from "../../Materials/imageProcessingConfiguration";
20+
import type { Effect, IEffectCreationOptions } from "../../Materials/effect";
21+
import type { IMaterialCompilationOptions, ICustomShaderNameResolveOptions } from "../../Materials/material";
22+
import { Material } from "../../Materials/material";
2323
import { MaterialPluginEvent } from "../materialPluginEvent";
24-
import { MaterialDefines } from "../materialDefines";
25-
import { PushMaterial } from "../pushMaterial";
24+
import { MaterialDefines } from "../../Materials/materialDefines";
25+
import { PushMaterial } from "../../Materials/pushMaterial";
2626

27-
import type { BaseTexture } from "../Textures/baseTexture";
28-
import type { RenderTargetTexture } from "../Textures/renderTargetTexture";
27+
import type { BaseTexture } from "../../Materials/Textures/baseTexture";
28+
import type { RenderTargetTexture } from "../../Materials/Textures/renderTargetTexture";
2929

3030
import { MaterialFlags } from "../materialFlags";
3131
import { Constants } from "../../Engines/constants";
3232
import type { IAnimatable } from "../../Animations/animatable.interface";
3333

34-
import "../Textures/baseTexture.polynomial";
34+
import "../../Materials/Textures/baseTexture.polynomial";
3535

3636
import { EffectFallbacks } from "../effectFallbacks";
3737
import { PBRClearCoatConfiguration } from "./pbrClearCoatConfiguration";

packages/dev/core/src/Materials/imageProcessing.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { serializeAsImageProcessingConfiguration } from "../Misc/decorators";
33
import type { Nullable } from "../types";
44
import type { ImageProcessingConfiguration } from "./imageProcessingConfiguration";
55
import type { Observer } from "../Misc/observable";
6-
import type { BaseTexture } from "./Textures/baseTexture";
7-
import type { ColorCurves } from "./colorCurves";
6+
import type { BaseTexture } from "../Materials/Textures/baseTexture";
7+
import type { ColorCurves } from "../Materials/colorCurves";
88

99
// Explicit re-export of types to help TypeScript resolve them in declaration files
10-
export type { Observer } from "../Misc/observable";
11-
export type { ColorCurves } from "./colorCurves";
10+
// export type { Observer } from "../Misc/observable";
11+
// export type { ColorCurves } from "./colorCurves";
1212

1313
type Constructor<T = {}> = new (...args: any[]) => T;
1414

packages/dev/core/src/Shaders/openpbr.vertex.fx

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,6 @@ attribute vec4 color;
4848
#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)
4949
#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)
5050

51-
#ifdef CLEARCOAT
52-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)
53-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)
54-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)
55-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)
56-
#endif
57-
58-
#ifdef IRIDESCENCE
59-
#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)
60-
#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)
61-
#endif
62-
63-
#ifdef SHEEN
64-
#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)
65-
#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)
66-
#endif
67-
68-
#ifdef ANISOTROPIC
69-
#include<samplerVertexDeclaration>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)
70-
#endif
71-
72-
#ifdef SUBSURFACE
73-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)
74-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)
75-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)
76-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor)
77-
#endif
78-
7951
// Output
8052
varying vec3 vPositionW;
8153
#if DEBUGMODE > 0

0 commit comments

Comments
 (0)