Phaser API Documentation

  Version: 
<static> parseFragmentShaderMaxTextures(fragmentShaderSource, maxTextures)

Description:

Checks the given Fragment Shader Source for %count% and %forloop% declarations and replaces those with GLSL code for setting texture = texture2D(uMainSampler[i], outTexCoord).

Parameters:

name type description
fragmentShaderSource string

The Fragment Shader source code to operate on.

maxTextures number

The number of maxTextures value.

Returns:
Description:

The modified Fragment Shader source.

Type:
  • string
Since: 3.50.0