# Material Constants

These constants define properties common to all material types, with the exception of Texture Combine Operations which only apply to [page:MeshBasicMaterial.combine MeshBasicMaterial], [page:MeshLambertMaterial.combine MeshLambertMaterial] and [page:MeshPhongMaterial.combine MeshPhongMaterial].

## Side

`THREE.FrontSide THREE.BackSide THREE.DoubleSide`

Defines which side of faces will be rendered - front, back or both. Default is [page:Constant FrontSide].

## Blending Mode

`THREE.NoBlending THREE.NormalBlending THREE.AdditiveBlending THREE.SubtractiveBlending THREE.MultiplyBlending THREE.CustomBlending`

These control the source and destination blending equations for the material's RGB and Alpha sent to the WebGLRenderer for use by WebGL.
[page:Constant NormalBlending] is the default.
Note that [page:Constant CustomBlending] must be set to use [page:CustomBlendingEquation Custom Blending Equations].
See the [example:webgl_materials_blending materials / blending] example.

## Depth Mode

`THREE.NeverDepth THREE.AlwaysDepth THREE.EqualDepth THREE.LessDepth THREE.LessEqualDepth THREE.GreaterEqualDepth THREE.GreaterDepth THREE.NotEqualDepth`

Which depth function the material uses to compare incoming pixels Z-depth against the current Z-depth buffer value. If the result of the comparison is true, the pixel will be drawn.
[page:Materials NeverDepth] will never return true.
[page:Materials AlwaysDepth] will always return true.
[page:Materials EqualDepth] will return true if the incoming pixel Z-depth is equal to the current buffer Z-depth.
[page:Materials LessDepth] will return true if the incoming pixel Z-depth is less than the current buffer Z-depth.
[page:Materials LessEqualDepth] is the default and will return true if the incoming pixel Z-depth is less than or equal to the current buffer Z-depth.
[page:Materials GreaterEqualDepth] will return true if the incoming pixel Z-depth is greater than or equal to the current buffer Z-depth.
[page:Materials GreaterDepth] will return true if the incoming pixel Z-depth is greater than the current buffer Z-depth.
[page:Materials NotEqualDepth] will return true if the incoming pixel Z-depth is not equal to the current buffer Z-depth.

## Texture Combine Operations

`THREE.MultiplyOperation THREE.MixOperation THREE.AddOperation`

These define how the result of the surface's color is combined with the environment map (if present), for [page:MeshBasicMaterial.combine MeshBasicMaterial], [page:MeshLambertMaterial.combine MeshLambertMaterial] and [page:MeshPhongMaterial.combine MeshPhongMaterial].
[page:Constant MultiplyOperation] is the default and multiplies the environment map color with the surface color.
[page:Constant MixOperation] uses reflectivity to blend between the two colors.
[page:Constant AddOperation] adds the two colors.

## Stencil Functions

`THREE.NeverStencilFunc THREE.LessStencilFunc THREE.EqualStencilFunc THREE.LessEqualStencilFunc THREE.GreaterStencilFunc THREE.NotEqualStencilFunc THREE.GreaterEqualStencilFunc THREE.AlwaysStencilFunc`

Which stencil function the material uses to determine whether or not to perform a stencil operation.
[page:Materials NeverStencilFunc] will never return true.
[page:Materials LessStencilFunc] will return true if the stencil reference value is less than the current stencil value.
[page:Materials EqualStencilFunc] will return true if the stencil reference value is equal to the current stencil value.
[page:Materials LessEqualStencilFunc] will return true if the stencil reference value is less than or equal to the current stencil value.
[page:Materials GreaterStencilFunc] will return true if the stencil reference value is greater than the current stencil value.
[page:Materials NotEqualStencilFunc] will return true if the stencil reference value is not equal to the current stencil value.
[page:Materials GreaterEqualStencilFunc] will return true if the stencil reference value is greater than or equal to the current stencil value.
[page:Materials AlwaysStencilFunc] will always return true.

## Stencil Operations

`THREE.ZeroStencilOp THREE.KeepStencilOp THREE.ReplaceStencilOp THREE.IncrementStencilOp THREE.DecrementStencilOp THREE.IncrementWrapStencilOp THREE.DecrementWrapStencilOp THREE.InvertStencilOp`

Which stencil operation the material will perform on the stencil buffer pixel if the provided stencil function passes.
[page:Materials ZeroStencilOp] will set the stencil value to 0.
[page:Materials KeepStencilOp] will not change the current stencil value.
[page:Materials ReplaceStencilOp] will replace the stencil value with the specified stencil reference value.
[page:Materials IncrementStencilOp] will increment the current stencil value by `1`.
[page:Materials DecrementStencilOp] will decrement the current stencil value by `1`.
[page:Materials IncrementWrapStencilOp] will increment the current stencil value by `1`. If the value increments past `255` it will be set to `0`.
[page:Materials DecrementWrapStencilOp] will increment the current stencil value by `1`. If the value decrements below `0` it will be set to `255`.
[page:Materials InvertStencilOp] will perform a bitwise inversion of the current stencil value.

## Normal map type

`THREE.TangentSpaceNormalMap THREE.ObjectSpaceNormalMap`

Defines the type of the normal map. For TangentSpaceNormalMap, the information is relative to the underlying surface. For ObjectSpaceNormalMap, the information is relative to the object orientation. Default is [page:Constant TangentSpaceNormalMap].

## GLSL Version

`THREE.GLSL1 THREE.GLSL3`

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]