new AxDynamicShaderWriter(animated, maxBones)
Creates a new dynamic shader writer object
The dynamic shader writer is used to generate the graphics device's shading program code in compliance with Axis' shading layers architecture
Parameters:
Name | Type | Description |
---|---|---|
animated |
Boolean | Denotes whether the shader should provide skeletal animation (skinning) |
maxBones |
Integer | The maximum number of bones in case the shader is animated |
Methods
AddShadingLayer(shadingOp, colorOp)
Adds a shading layer to the shader writer
Parameters:
Name | Type | Description |
---|---|---|
shadingOp |
AxShadingOperation | Shading operation for the layer to add |
colorOp |
AxColorOperation | Color operation for the layer |
ProvideColorOperationCode(shadingOp, colorOp, desiredFactorName, definitions, linePrefix, destArg, sourceArg)
Private
Creates the proper source code for a color operation. According to the color operation, a "factor" shader property is generated. The code is added to the given AxDynamicShaderBlockDefinitions.
Parameters:
Name | Type | Description |
---|---|---|
shadingOp |
AxShadingOperation | The shading operation for which the color operation code is to be generated. It is used to give the proper name to the factor |
colorOp |
AxColorOperation | The color operation which is to be performed |
desiredFactorName |
String | The desired name for the factor of the operation. The factor is a value which generally detrmines the effective amount of the sourceArg onto the destArg |
definitions |
AxDynamicShaderBlockDefinitions | The shader block definitions for which the color operation code shoud be generated |
linePrefix |
String | A prefix for each line of code, generated by the method. Typically used to add tabs |
destArg |
String | The destination argument, which is to hold the result of the operation |
sourceArg |
String | The souce argument, which is to be applied on the destination |