|
@@ -9,6 +9,7 @@ import { LineContainerComponent } from "../../../lineContainerComponent";
|
|
import { Color3LineComponent } from "../../../lines/color3LineComponent";
|
|
import { Color3LineComponent } from "../../../lines/color3LineComponent";
|
|
import { CheckBoxLineComponent } from "../../../lines/checkBoxLineComponent";
|
|
import { CheckBoxLineComponent } from "../../../lines/checkBoxLineComponent";
|
|
import { SliderLineComponent } from "../../../lines/sliderLineComponent";
|
|
import { SliderLineComponent } from "../../../lines/sliderLineComponent";
|
|
|
|
+import { OptionsLineComponent } from "../../../lines/optionsLineComponent";
|
|
import { CommonMaterialPropertyGridComponent } from "./commonMaterialPropertyGridComponent";
|
|
import { CommonMaterialPropertyGridComponent } from "./commonMaterialPropertyGridComponent";
|
|
import { TextureLinkLineComponent } from "../../../lines/textureLinkLineComponent";
|
|
import { TextureLinkLineComponent } from "../../../lines/textureLinkLineComponent";
|
|
import { LockObject } from "../lockObject";
|
|
import { LockObject } from "../lockObject";
|
|
@@ -54,6 +55,58 @@ export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMateri
|
|
render() {
|
|
render() {
|
|
const material = this.props.material;
|
|
const material = this.props.material;
|
|
|
|
|
|
|
|
+ const debugMode = [
|
|
|
|
+ { label: "None", value: 0 },
|
|
|
|
+ // Geometry
|
|
|
|
+ { label: "Normalized position", value: 1 },
|
|
|
|
+ { label: "Normals", value: 2 },
|
|
|
|
+ { label: "Tangents", value: 3 },
|
|
|
|
+ { label: "Bitangents", value: 4 },
|
|
|
|
+ { label: "Bump Normals", value: 5 },
|
|
|
|
+ { label: "UV1", value: 6 },
|
|
|
|
+ { label: "UV2", value: 7 },
|
|
|
|
+ { label: "ClearCoat Normals", value: 8 },
|
|
|
|
+ { label: "ClearCoat Tangents", value: 9 },
|
|
|
|
+ { label: "ClearCoat Bitangents", value: 10 },
|
|
|
|
+ { label: "Anisotropic Normals", value: 11 },
|
|
|
|
+ // Maps
|
|
|
|
+ { label: "Albdeo Map", value: 20 },
|
|
|
|
+ { label: "Ambient Map", value: 21 },
|
|
|
|
+ { label: "Opacity Map", value: 22 },
|
|
|
|
+ { label: "Emissive Map", value: 23 },
|
|
|
|
+ { label: "Light Map", value: 24 },
|
|
|
|
+ { label: "Metallic Map", value: 25 },
|
|
|
|
+ { label: "Reflectivity Map", value: 26 },
|
|
|
|
+ { label: "ClearCoat Map", value: 27 },
|
|
|
|
+ { label: "ClearCoat Tint Map", value: 28 },
|
|
|
|
+ // Env
|
|
|
|
+ { label: "Env Refraction", value: 40 },
|
|
|
|
+ { label: "Env Reflection", value: 41 },
|
|
|
|
+ { label: "Env Clear Coat", value: 42 },
|
|
|
|
+ // Lighting
|
|
|
|
+ { label: "Direct Diffuse", value: 50 },
|
|
|
|
+ { label: "Direct Specular", value: 51 },
|
|
|
|
+ { label: "Direct Clear Coat", value: 52 },
|
|
|
|
+ { label: "Env Irradiance", value: 53 },
|
|
|
|
+ // Lighting Params
|
|
|
|
+ { label: "Surface Albedo", value: 60 },
|
|
|
|
+ { label: "Reflectance 0", value: 61 },
|
|
|
|
+ { label: "Roughness", value: 62 },
|
|
|
|
+ { label: "AlphaG", value: 63 },
|
|
|
|
+ { label: "NdotV", value: 64 },
|
|
|
|
+ { label: "ClearCoat Color", value: 65 },
|
|
|
|
+ { label: "ClearCoat Roughness", value: 66 },
|
|
|
|
+ { label: "ClearCoat NdotV", value: 67 },
|
|
|
|
+ // Misc
|
|
|
|
+ { label: "SEO", value: 70 },
|
|
|
|
+ { label: "EHO", value: 71 },
|
|
|
|
+ { label: "Energy Factor", value: 72 },
|
|
|
|
+ { label: "Specular Reflectance", value: 73 },
|
|
|
|
+ { label: "Clear Coat Reflectance", value: 74 },
|
|
|
|
+ { label: "Luminance Over Alpha", value: 75 },
|
|
|
|
+ { label: "Alpha", value: 76 },
|
|
|
|
+ ];
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div className="pane">
|
|
<div className="pane">
|
|
<CommonMaterialPropertyGridComponent globalState={this.props.globalState} lockObject={this.props.lockObject} material={material} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<CommonMaterialPropertyGridComponent globalState={this.props.globalState} lockObject={this.props.lockObject} material={material} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
@@ -152,6 +205,11 @@ export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMateri
|
|
<CheckBoxLineComponent label="Horizon occlusion " target={material} propertyName="useHorizonOcclusion" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<CheckBoxLineComponent label="Horizon occlusion " target={material} propertyName="useHorizonOcclusion" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<CheckBoxLineComponent label="Unlit" target={material} propertyName="unlit" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<CheckBoxLineComponent label="Unlit" target={material} propertyName="unlit" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
</LineContainerComponent>
|
|
</LineContainerComponent>
|
|
|
|
+ <LineContainerComponent globalState={this.props.globalState} title="DEBUG" closed={true}>
|
|
|
|
+ <OptionsLineComponent label="Debug mode" options={debugMode} target={material} propertyName="debugMode" />
|
|
|
|
+ <SliderLineComponent label="Split position" target={material} propertyName="debugLimit" minimum={-1} maximum={1} step={0.01} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
|
|
+ <SliderLineComponent label="Output factor" target={material} propertyName="debugFactor" minimum={0} maximum={5} step={0.01} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
|
|
+ </LineContainerComponent>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
}
|
|
}
|