Class: ShaderGenerator

ShaderGenerator

new ShaderGenerator()

Generates shader from given values
Source:

Methods

getFragmentLightingWeightCalcArrayVertex(lightsCount, useSpecularMap, useNormalMap, useSpecularLighting) → {String}

Returns shader code for lighting calculation per fragment
Parameters:
Name Type Description
lightsCount Number
useSpecularMap Boolean
useNormalMap Boolean
useSpecularLighting Boolean
Source:
Returns:
string
Type
String

getTextureCalcArray(textureCount) → {String}

Returns shader code for handling multiple shaders
Parameters:
Name Type Description
textureCount Number
Source:
Returns:
string
Type
String

getVertexLightingWeightCalcArrayVertex(lightsCount) → {String}

Returns shader code for lighting calculation per vertex
Parameters:
Name Type Description
lightsCount Number
Source:
Returns:
string
Type
String

init()

Assembles shader according to given variable values
Source: