| Package | com.yogurt3d.core.materials.shaders.base |
| Class | public class Shader |
| Inheritance | Shader Object |
| Subclasses | ShaderAmbient, ShaderDiffuse, ShaderEnvMapping, ShaderEnvMapReflectivityMap, ShaderHitObject, ShaderHitTriangle, ShaderNormalsDebug, ShaderShadow, ShaderSolidFill, ShaderSpecular, ShaderTexture |
| Property | Defined By | ||
|---|---|---|---|
| key : String
Key string of a shader. | Shader | ||
| params : ShaderParameters
Returns the shader parameters. | Shader | ||
| requiresBoneData : Boolean
Flag indicating the shader requires bone indices and bone weights for selected mesh.\n
BoneIndices are loaded into va4 and va5 on the gpu program, total of 8 influences.\n
BoneWeights are loaded into va6 and va7 on the gpu program, total of 8 influences.\n
If flag is set to false, no vertex attributes are loaded on 4,5,6,7\n
| Shader | ||
| requiresLight : Boolean | Shader | ||
| requiresShadowCastingLight : Boolean | Shader | ||
| requiresTangents : Boolean
Flag indicating the shader requires bone indices and bone weights for selected mesh.\n
BoneIndices are loaded into va4 and va5 on the gpu program, total of 8 influences.\n
| Shader | ||
| Method | Defined By | ||
|---|---|---|---|
Shader()
Constructor of the shader class. | Shader | ||
disposeShaders():void | Shader | ||
getFragmentProgram(_lightType:String):ByteArray | Shader | ||
getProgram(_context3D:Context3D, _lightType:String, _meshKey:String):Program3D
Returns the Program3D object for this shader. | Shader | ||
getVertexProgram(_meshKey:String):ByteArray | Shader | ||
| key | property |
key:StringKey string of a shader. This key is used to cache Program3D objects, when the same shader is used several times. This key must be unique for every shader program you write. So this means if the AGAL changes you must change the key accordingly.
public function get key():String public function set key(value:String):void| params | property |
params:ShaderParametersReturns the shader parameters.
public function get params():ShaderParameters public function set params(value:ShaderParameters):voidSee also
| requiresBoneData | property |
requiresBoneData:BooleanFlag indicating the shader requires bone indices and bone weights for selected mesh.\n BoneIndices are loaded into va4 and va5 on the gpu program, total of 8 influences.\n BoneWeights are loaded into va6 and va7 on the gpu program, total of 8 influences.\n If flag is set to false, no vertex attributes are loaded on 4,5,6,7\n
public function get requiresBoneData():Boolean public function set requiresBoneData(value:Boolean):void| requiresLight | property |
requiresLight:Boolean public function get requiresLight():Boolean public function set requiresLight(value:Boolean):void| requiresShadowCastingLight | property |
requiresShadowCastingLight:Boolean public function get requiresShadowCastingLight():Boolean public function set requiresShadowCastingLight(value:Boolean):void| requiresTangents | property |
requiresTangents:BooleanFlag indicating the shader requires bone indices and bone weights for selected mesh.\n BoneIndices are loaded into va4 and va5 on the gpu program, total of 8 influences.\n
public function get requiresTangents():Boolean public function set requiresTangents(value:Boolean):void| Shader | () | Constructor |
public function Shader()Constructor of the shader class. You must call this constructor using super() from your own class that extends Shader.
| disposeShaders | () | method |
public function disposeShaders():void
| getFragmentProgram | () | method |
public function getFragmentProgram(_lightType:String):ByteArray
Parameters
_lightType:String |
ByteArray —
|
| getProgram | () | method |
public function getProgram(_context3D:Context3D, _lightType:String, _meshKey:String):Program3DReturns the Program3D object for this shader. \n This function uses it's parameters to determine to fetch the appropiate Program3D object.\n
Parameters
_context3D:Context3D | |
_lightType:String | |
_meshKey:String |
Program3D —
|
| getVertexProgram | () | method |
public function getVertexProgram(_meshKey:String):ByteArray
Parameters
_meshKey:String |
ByteArray —
|