setFragmentShaderName method

void setFragmentShaderName(
  1. String name
)

Assigns the fragment shader by name from baseShaderLibrary.

The shader is resolved lazily on first use and then cached, so a material can be constructed before Scene.initializeStaticResources has loaded the base shader bundle. The shader is only needed at render time, which the engine already defers until the bundle is ready.

Implementation

void setFragmentShaderName(String name) {
  _fragmentShaderName = name;
  _fragmentShader = null;
}