Skip to content

Texture.offset/repeat vs. Material.offset/repeat #3549

@WestLangley

Description

@WestLangley

As pointed out in this stackoverflow question, .offset and .repeat are properties of a texture, not a material.

Suppose, for example, a user wants to share a spritesheet across multiple materials. Currently that is not possible, since offset is a property of the texture, and can only be set once.

Also, making offset a property of a material would avoid the "uv repeat and offset setting priorities" in WebGLRenderer.

    // uv repeat and offset setting priorities
    //  1. color map
    //  2. specular map
    //  3. normal map
    //  4. bump map

This code logic forces all the texture offsets/repeats to be the same, anyway.

Should .offset and .repeat be properties of a material instead?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions