Package | flare.materials |
Class | public class Shader3D |
Inheritance | Shader3D ![]() ![]() |
Subclasses | ParticleMaterial3D |
Property | Defined By | ||
---|---|---|---|
![]() | cullFace : String
The culling mode. | Material3D | |
![]() | depthCompare : String = lessEqual
The test comparasion to be used when depthWrite is 'true'. | Material3D | |
![]() | depthWrite : Boolean = true
Gets or sets whatever the material writes into the z-buffer. | Material3D | |
![]() | destFactor : String
The factor with which to multiply the destination color. | Material3D | |
enableLights : Boolean
Sets or gets if the material is affected by scene lights. | Shader3D | ||
filters : Array
Gets or sets an indexed Array of filters to use in the material. | Shader3D | ||
globalFilters : Array [static]
Defines an array of filters to be included on the materials that will be created after setting the global filters property. | Shader3D | ||
![]() | name : String
The name of the material. | Material3D | |
program : FLSLProgram3D [read-only]
Returns a shader program reference. | Shader3D | ||
![]() | scene : Scene3D [read-only]
Gets a reference to the scene that the material is associated. | Material3D | |
![]() | sourceFactor : String
The factor with which to multiply the source color. | Material3D | |
technique : FLSLFilter
Sets ot get the current method used for the vertex transform. | Shader3D | ||
![]() | transparent : Boolean
Sets or gets if the material should use alpha blending. | Material3D | |
![]() | twoSided : Boolean
Sets or gets if the material should be drawn useing both sides of the surfaces. | Material3D | |
updateAllInstances : Boolean = false
Sets or returns whatever the shader should force to update the material parameters for each shader instance separately. | Shader3D |
Method | Defined By | ||
---|---|---|---|
Shader3D(name:String, filters:Array = null, enableLights:Boolean = true, technique:FLSLFilter = null)
Creates a new dynamic filter Material. | Shader3D | ||
build():void
Force to recompile the material. | Shader3D | ||
![]() |
Clones the material. | Material3D | |
![]() | dispose():void
Eliminates all the resources associated to the material. | Material3D | |
![]() | download():void
Downloads all the data uploaded to the graphics card. | Material3D | |
![]() |
Draw a mesh surface using the current material. | Material3D | |
![]() |
Uploads the necesary data to the graphics card. | Material3D |
Event | Summary | Defined By | ||
---|---|---|---|---|
This event is dispatched when material filters has been changed or the material is re compiled. | Shader3D |
Constant | Defined By | ||
---|---|---|---|
VERTEX_HORIZONTAL_PARTICLE : FLSLFilter [static] | Shader3D | ||
VERTEX_NORMAL : FLSLFilter [static] | Shader3D | ||
VERTEX_PARTICLE : FLSLFilter [static] | Shader3D | ||
VERTEX_SKIN : FLSLFilter [static] | Shader3D | ||
VERTEX_VERTICAL_PARTICLE : FLSLFilter [static] | Shader3D |
enableLights | property |
enableLights:Boolean
Sets or gets if the material is affected by scene lights.
public function get enableLights():Boolean
public function set enableLights(value:Boolean):void
filters | property |
filters:Array
Gets or sets an indexed Array of filters to use in the material.
public function get filters():Array
public function set filters(value:Array):void
See also
globalFilters | property |
public static var globalFilters:Array
Defines an array of filters to be included on the materials that will be created after setting the global filters property. If the globalFilters array changes after the materials were compiled, you will need to call to build() mehotd again to recompile the shader. You can use this propery to apply a fog or color filter to all scene materials for example, but this property should be defined before the creation of the materials. You can change this property at any time, but it will only affect to those materials that are created after.
program | property |
program:FLSLProgram3D
[read-only] Returns a shader program reference.
public function get program():FLSLProgram3D
technique | property |
technique:FLSLFilter
Sets ot get the current method used for the vertex transform. Should be one of the constants defined VERTEX_NORMAL or VERTEX_SKIN.
public function get technique():FLSLFilter
public function set technique(value:FLSLFilter):void
See also
updateAllInstances | property |
public var updateAllInstances:Boolean = false
Sets or returns whatever the shader should force to update the material parameters for each shader instance separately. If the value is false, all instaces will be updated to the same values.
Shader3D | () | Constructor |
public function Shader3D(name:String, filters:Array = null, enableLights:Boolean = true, technique:FLSLFilter = null)
Creates a new dynamic filter Material.
Parametersname:String — The name of the material.
| |
filters:Array (default = null ) — Filters to use in the material.
| |
enableLights:Boolean (default = true ) — Sets if the material is affected by scene lights.
| |
technique:FLSLFilter (default = null ) — The current method used for the vertex transform. Should be one of the constants defined VERTEX_NORMAL or VERTEX_SKIN.
|
build | () | method |
public function build():void
Force to recompile the material. If don't need to call this method if you set the filters in the constructor or if you pass directly an array of filters to the filters property.
See also
changed | Event |
flash.events.Event
flash.events.Event
This event is dispatched when material filters has been changed or the material is re compiled.
VERTEX_HORIZONTAL_PARTICLE | Constant |
public static const VERTEX_HORIZONTAL_PARTICLE:FLSLFilter
VERTEX_NORMAL | Constant |
public static const VERTEX_NORMAL:FLSLFilter
VERTEX_PARTICLE | Constant |
public static const VERTEX_PARTICLE:FLSLFilter
VERTEX_SKIN | Constant |
public static const VERTEX_SKIN:FLSLFilter
VERTEX_VERTICAL_PARTICLE | Constant |
public static const VERTEX_VERTICAL_PARTICLE:FLSLFilter