|
@@ -34,13 +34,17 @@ export class PBRMaterialPropertyGridComponent extends React.Component<IPBRMateri
|
|
|
this.props.material.debugMode = state ? 21 : 0;
|
|
|
}
|
|
|
|
|
|
+ switchMetallicMode(state: boolean) {
|
|
|
+ this.props.material.debugMode = state ? 21 : 0;
|
|
|
+ }
|
|
|
+
|
|
|
renderTextures(onDebugSelectionChangeObservable: Observable<BaseTexture>) {
|
|
|
const material = this.props.material;
|
|
|
|
|
|
return (
|
|
|
<LineContainerComponent globalState={this.props.globalState} title="TEXTURES">
|
|
|
<TextureLinkLineComponent label="Albedo" texture={material.albedoTexture} propertyName="albedoTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
|
|
|
- <TextureLinkLineComponent label="Metallic" texture={material.metallicTexture} propertyName="metallicTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
|
|
|
+ <TextureLinkLineComponent customDebugAction={state => this.switchMetallicMode(state)} label="Metallic" texture={material.metallicTexture} propertyName="metallicTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
|
|
|
<TextureLinkLineComponent label="Reflection" texture={material.reflectionTexture} propertyName="reflectionTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
|
|
|
<TextureLinkLineComponent label="Refraction" texture={material.refractionTexture} propertyName="refractionTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
|
|
|
<TextureLinkLineComponent label="Micro-surface" texture={material.microSurfaceTexture} propertyName="microSurfaceTexture" material={material} onSelectionChangedObservable={this.props.onSelectionChangedObservable} onDebugSelectionChangeObservable={onDebugSelectionChangeObservable} />
|