@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
76 lines (75 loc) • 2.81 kB
TypeScript
import { NodeMaterialBlock } from "../../nodeMaterialBlock.js";
import type { NodeMaterialBuildState } from "../../nodeMaterialBuildState.js";
import type { NodeMaterialConnectionPoint } from "../../nodeMaterialBlockConnectionPoint.js";
import type { Scene } from "../../../../scene.js";
import type { AbstractMesh } from "../../../../Meshes/abstractMesh.js";
import type { NodeMaterialDefines, NodeMaterial } from "../../nodeMaterial.js";
import type { Effect } from "../../../effect.js";
import type { Mesh } from "../../../../Meshes/mesh.js";
/**
* Color spaces supported by the fragment output block
*/
export declare enum FragmentOutputBlockColorSpace {
/** Unspecified */
NoColorSpace = 0,
/** Gamma */
Gamma = 1,
/** Linear */
Linear = 2
}
/**
* Block used to output the final color
*/
export declare class FragmentOutputBlock extends NodeMaterialBlock {
private _linearDefineName;
private _gammaDefineName;
private _additionalColorDefineName;
/**
* Create a new FragmentOutputBlock
* @param name defines the block name
*/
constructor(name: string);
/** Gets or sets a boolean indicating if content needs to be converted to gamma space */
convertToGammaSpace: boolean;
/** Gets or sets a boolean indicating if content needs to be converted to linear space */
convertToLinearSpace: boolean;
/** Gets or sets a boolean indicating if logarithmic depth should be used */
useLogarithmicDepth: boolean;
/**
* Gets or sets the color space used for the block
*/
get colorSpace(): FragmentOutputBlockColorSpace;
set colorSpace(value: FragmentOutputBlockColorSpace);
/**
* Gets the current class name
* @returns the class name
*/
getClassName(): string;
/**
* Initialize the block and prepare the context for build
* @param state defines the state that will be used for the build
*/
initialize(state: NodeMaterialBuildState): void;
/**
* Gets the rgba input component
*/
get rgba(): NodeMaterialConnectionPoint;
/**
* Gets the rgb input component
*/
get rgb(): NodeMaterialConnectionPoint;
/**
* Gets the a input component
*/
get a(): NodeMaterialConnectionPoint;
/**
* Gets the additionalColor input component (named glow in the UI for now)
*/
get additionalColor(): NodeMaterialConnectionPoint;
prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
bind(effect: Effect, nodeMaterial: NodeMaterial, mesh?: Mesh): void;
protected _buildBlock(state: NodeMaterialBuildState): this;
protected _dumpPropertiesCode(): string;
serialize(): any;
_deserialize(serializationObject: any, scene: Scene, rootUrl: string): void;
}