LightMapDiffuseMethod provides a diffuse shading method that uses a light map to modulate the calculated diffuse lighting. It is different from LightMapMethod in that the latter modulates the entire calculated pixel color, rather than only the diffuse lighting value.

Static variables

@:value(BlendMode.ADD)staticinlineread onlyADD:BlendMode = BlendMode.ADD

Indicates the light map should be added into the calculated shading result. This can be used to add pre-calculated lighting or global illumination.

@:value(BlendMode.MULTIPLY)staticinlineread onlyMULTIPLY:BlendMode = BlendMode.MULTIPLY

Indicates the light map should be multiplied with the calculated shading result. This can be used to add pre-calculated shadows or occlusion.

Constructor

@:value({ baseMethod : null, useSecondaryUV : false, blendMode : BlendMode.MULTIPLY })new(lightMap:Texture2DBase, blendMode:BlendMode = BlendMode.MULTIPLY, useSecondaryUV:Bool = false, ?baseMethod:BasicDiffuseMethod)

Creates a new LightMapDiffuseMethod method.

Parameters:

lightMap

The texture containing the light map.

blendMode

The blend mode with which the light map should be applied to the lighting result.

useSecondaryUV

Indicates whether the secondary UV set should be used to map the light map.

baseMethod

The diffuse method used to calculate the regular light-based lighting.

Variables

Inherited Variables

Inherited Methods

Defined by CompositeDiffuseMethod

dispose():Void

@inheritDoc

Defined by BasicDiffuseMethod

copyFrom(method:ShadingMethodBase):Void

@inheritDoc

generateMip(stage3DProxy:Stage3DProxy):Void

Forces the creation of the texture.

Parameters:

stage3DProxy

The Stage3DProxy used by the renderer

Defined by NamedAssetBase

assetPathEquals(name:String, ns:String):Bool

@:value({ overrideOriginal : true, ns : null })resetAssetPath(name:String, ?ns:String, overrideOriginal:Bool = true):Void