dacha
    Preparing search index...

    Class ShaderAbstract

    Base class for the shaders of the Mesh component.

    Extend it and name the class with DefineShader. Every method gets the material options of the mesh as options.

    Shaders

    Index
    shaderName: string

    The name the configuration uses for the shader. DefineShader sets it, so a game usually does not assign it.

    • Runs when the renderer creates the shader. Returns the fragment shader code.

      Parameters

      • options: unknown

      Returns string

    • Runs every frame. When the returned string changes, the renderer creates the shader again. Optional.

      Parameters

      • name: string
      • options: unknown

      Returns string

    • Runs every frame. Write the new uniform values into uniforms. Optional.

      Parameters

      Returns void

    • Runs when the renderer creates the shader. Returns the vertex shader code.

      Parameters

      • options: unknown

      Returns string