| Package | alternativa.engine3d.shadows |
| Class | public class OmniLightShadow |
| Inheritance | OmniLightShadow Shadow Object |
OmniLight). Shadow is rendered in fixed volume.
For binding of shadow to light source you need:
1) to set instance of the OmniLight as a value of property shadow of light source;
2) to add Object3D to corresponding list, using the method addCaster().
See also
| Property | Defined By | ||
|---|---|---|---|
| biasMultiplier : Number = 0.97
Degree of correcting offset of shadow map space. | OmniLightShadow | ||
![]() | debug : Boolean = false
Debug mode. | Shadow | |
| mapSize : int
Set resolution of shadow map. | OmniLightShadow | ||
| pcfOffset : Number
Offset of Percentage Closer Filtering. | OmniLightShadow | ||
| Method | Defined By | ||
|---|---|---|---|
OmniLightShadow(mapSize:int = 128, pcfOffset:Number = 0)
Создает экземпляр OmniLightShadow. | OmniLightShadow | ||
Adds given object to list of objects, that cast shadow. | OmniLightShadow | ||
clearCasters():void
Clears the list of objects, that cast shadow. | OmniLightShadow | ||
removeCaster(object:Object3D):void
Removes given object from shadow casters list. | OmniLightShadow | ||
| biasMultiplier | property |
public var biasMultiplier:Number = 0.97Degree of correcting offset of shadow map space. It need for getting rid of self-shadowing artifacts.
| mapSize | property |
mapSize:intSet resolution of shadow map. This property can get value of power of 2 (up to 2048). OmniLightShadow uses 6 shadow maps.
public function get mapSize():int public function set mapSize(value:int):void| pcfOffset | property |
pcfOffset:NumberOffset of Percentage Closer Filtering. This way of filtering is used for mitigation of shadow bounds.
public function get pcfOffset():Number public function set pcfOffset(value:Number):void| OmniLightShadow | () | Constructor |
public function OmniLightShadow(mapSize:int = 128, pcfOffset:Number = 0)Создает экземпляр OmniLightShadow.
ParametersmapSize:int (default = 128) — Размер карты теней. Должен быть степенью 2.
| |
pcfOffset:Number (default = 0) — Смягчение границ тени.
|
| addCaster | () | method |
public function addCaster(object:Object3D):voidAdds given object to list of objects, that cast shadow.
Parameters
object:Object3D — Added object.
|
| clearCasters | () | method |
public function clearCasters():voidClears the list of objects, that cast shadow.
| process | () | method |
| removeCaster | () | method |
public function removeCaster(object:Object3D):voidRemoves given object from shadow casters list.
Parameters
object:Object3D — Object which should be removed from shadow casters list.
|