Skip to content

Textures

Sinan Karakaya edited this page Sep 16, 2023 · 1 revision

Texture

This is the list of textures that can be defined :

Example

This is an example of texture config file

texture = {
    name = "solidColor";
    type = "color";
    color = {
        r = 0.2;
        g = 0.3;
        b = 0.1;
  }
}
  • name : Name of the texture
  • type : Type of the texture (with color or other texture)
  • color : Color of the texture color can be replaced by texture to use another texture as a texture.

SolidColor

This texture is a solid color texture.

texture = {
    name = "solidColor";
    type = "color";
    color = {
        r = 0.2;
        g = 0.3;
        b = 0.1;
  }
}

Checker

This texture is a checker texture.

texture = {
    name = "chesstexture";
    type = "color";
    colorA = {
        r = 0.2;
        g = 0.3;
        b = 0.1;
    };
    colorB = {
        r = 0.2;
        g = 0.2;
        b = 0.1;
    };
}

or

texture = {
    name = "chesstexture";
    type = "texture";
    textureA = {
        ... // Constructor of another texture
    };
    textureB = {
        ... // Constructor of another texture
    };
}

Image

This texture is an image texture.

texture = {
    name = "image";
    filename = "path/to/image";
}

Noise

This texture is a perlin noise texture.

texture = {
    name = "noise";
    scale = 4.0;
}

Strip

This texture is a strip texture.

texture = {
    name = "strip";
    type = "color";
    colorA = {
        r = 0.2;
        g = 0.3;
        b = 0.1;
    };
    colorB = {
        r = 0.2;
        g = 0.2;
        b = 0.1;
    };
    width = 0.1;
}

or

texture = {
    name = "strip";
    type = "texture";
    textureA = {
        ... // Constructor of another texture
    };
    textureB = {
        ... // Constructor of another texture
    };
    width = 0.1;
}

Gradient

This texture is a gradient texture.

texture = {
    name = "gradient";
    type = "color";
    colorA = {
        r = 0.2;
        g = 0.3;
        b = 0.1;
    };
    colorB = {
        r = 0.2;
        g = 0.2;
        b = 0.1;
    };
}

Blend

This texture is a blend texture.

texture = {
    name = "blend";
    type = "texture";
    textureA = {
        ... // Constructor of another texture
    };
    textureB = {
        ... // Constructor of another texture
    };
}

Ring

This texture is a ring texture.

texture = {
    name = "ring";
    type = "color";
    colorA = {
        r = 0.2;
        g = 0.3;
        b = 0.1;
    };
    colorB = {
        r = 0.2;
        g = 0.2;
        b = 0.1;
    };
    width = 0.1;
}

or

texture = {
    name = "ring";
    type = "texture";
    textureA = {
        ... // Constructor of another texture
    };
    textureB = {
        ... // Constructor of another texture
    };
    width = 0.1;
}

Clone this wiki locally