Package | flare.flsl |
Class | public class FLSLMaterial |
Inheritance | FLSLMaterial ![]() ![]() |
Subclasses | NullMaterial, QuadMaterial, Shader3D |
Property | Defined By | ||
---|---|---|---|
![]() | blendMode : int | Material3D | |
byteCode : ByteArray
Sets or gets the flsl byteCode associated with the material. | FLSLMaterial | ||
![]() | cullFace : String
The culling mode. | Material3D | |
currentTextuesPath : String [static]
FLSL shaders can request textures to be loaded, they ussualy are placed in the same directory as the flsl compiled file. | FLSLMaterial | ||
![]() | 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 | |
![]() | flags : uint
An engine defined variable to store different material properties. | Material3D | |
![]() | name : String
The name of the material. | Material3D | |
params : Dictionary
Contains a collection of flsl public declarations. | FLSLMaterial | ||
programs : Vector.<FLSLProgram>
Get or sets a collection of FLSLProgram structures to be used by this material. | FLSLMaterial | ||
![]() | scene : Scene3D [read-only]
Gets a reference to the scene that the material is associated. | Material3D | |
semantics : Array [static]
Semantics are used to bind static data into specific flsl parameters. | FLSLMaterial | ||
source : String | FLSLMaterial | ||
![]() | sourceFactor : String
The factor with which to multiply the source color. | Material3D | |
techniqueName : String
The name of the thecnique to use. | FLSLMaterial | ||
![]() | 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 |
Method | Defined By | ||
---|---|---|---|
FLSLMaterial(name:String, byteCode:ByteArray = null, techniqueName:String = null, compileAll:Boolean = false)
Creates a new FLSLMaterial that are used to create static pre-compiled flsl materials. | FLSLMaterial | ||
build():void
Compiles the material if it isn't already compiled. | FLSLMaterial | ||
[override]
Creates a clone of the FLSLMaterial. | FLSLMaterial | ||
dispose():void [override] | FLSLMaterial | ||
![]() | download():void
Downloads all the data uploaded to the graphics card. | Material3D | |
![]() |
Draw a mesh surface using the current material. | Material3D | |
getTechniqueNames():Array
Retirms all technique names available in the current shader. | FLSLMaterial | ||
rebuild():void
Forces to recompile the material. | FLSLMaterial | ||
setTechnique(name:String = null):void | FLSLMaterial | ||
![]() |
Associates and link the material with the scene to be uploaded. | Material3D | |
![]() |
Validates that the surface is compatible with the material. | Material3D |
byteCode | property |
byteCode:ByteArray
Sets or gets the flsl byteCode associated with the material.
public function get byteCode():ByteArray
public function set byteCode(value:ByteArray):void
currentTextuesPath | property |
public static var currentTextuesPath:String
FLSL shaders can request textures to be loaded, they ussualy are placed in the same directory as the flsl compiled file. This property allows to modify the texture location path to be used when loading external files.
params | property |
public var params:Dictionary
Contains a collection of flsl public declarations. Params may contain cero or many FLSL object such as FLSLParam, FLSLMatrix and FLSLSampler objects.
See also
programs | property |
programs:Vector.<FLSLProgram>
Get or sets a collection of FLSLProgram structures to be used by this material.
public function get programs():Vector.<FLSLProgram>
public function set programs(value:Vector.<FLSLProgram>):void
See also
semantics | property |
public static var semantics:Array
Semantics are used to bind static data into specific flsl parameters. For example, an input POSITION myPosition is binded with the position attribute automatically, and the engine knows that a geometry position attribute needs to be passed as a value. Semantics could be vector number values, Matrix3D objects, or vertex attributes indices, but the semantic data type declared in the flsl code, should match the values of the semantics declared in the AS3 side.
source | property |
public var source:String
techniqueName | property |
techniqueName:String
The name of the thecnique to use. If null, the first technique is used.
public function get techniqueName():String
public function set techniqueName(value:String):void
FLSLMaterial | () | Constructor |
public function FLSLMaterial(name:String, byteCode:ByteArray = null, techniqueName:String = null, compileAll:Boolean = false)
Creates a new FLSLMaterial that are used to create static pre-compiled flsl materials.
Parametersname:String — The name of the material.
| |
byteCode:ByteArray (default = null ) — The pre-compiled flsl binary code.
| |
techniqueName:String (default = null ) — The technique name of the flsl file to be used. If null, the first technique is used.
| |
compileAll:Boolean (default = false )
|
build | () | method |
public function build():void
Compiles the material if it isn't already compiled. You should not call to this method unless it's strictly necesary. Some scenarios are when the material contains any conditional compilation that has changed or when a texture has changed its mip, filter, wrap or bias properties.
clone | () | method |
override public function clone():Material3D
Creates a clone of the FLSLMaterial.
ReturnsMaterial3D — A cloned FLSLMaterial.
|
dispose | () | method |
override public function dispose():void
getTechniqueNames | () | method |
public function getTechniqueNames():Array
Retirms all technique names available in the current shader.
ReturnsArray — An array with all the technique names.
|
rebuild | () | method |
public function rebuild():void
Forces to recompile the material.
setTechnique | () | method |
public function setTechnique(name:String = null):void
Parameters
name:String (default = null )
|