Class: AxDynamicShaderWriter

AxDynamicShaderWriter(animated, maxBones)

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
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


AddShadingLayer(shadingOp, colorOp)

Adds a shading layer to the shader writer
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.
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

Documentation generated by JSDoc 3.5.3 on Mon Feb 19 2018 20:39:26 GMT+0200 (FLE Standard Time)