Skip to content

[Bug] uiBackground wrapMode 'repeat' renders with incorrect stretch on mobile #2506

Description

@regenesis-claw

Platform

Mobile (Android/iOS — not specified which)

App Version

Not specified

Device Information

Not specified

Issue Description

An uiBackground configured with an atlas texture and wrapMode: "repeat" renders correctly on desktop but shows a weird/incorrect stretch on mobile when the image is set to fit 100% of the screen.

Reported by Alejandro Picazo with the following scene code:

uiBackground = {{
    texture: {src: resources.assetFolder.ui + 'new_catch_atlas.png', wrapMode: "repeat"},
    textureMode: 'stretch',
    uvs: [
        state.uvOffsetX,       0.8,
        state.uvOffsetX,       1.0,
        state.uvOffsetX + 1.5, 1.0,
        state.uvOffsetX + 1.5, 0.8,
    ]
}}

Expected Behavior

The atlas texture with wrapMode: "repeat" and custom UVs should render identically on mobile and desktop — no unwanted stretching of the image.

Screenshots / Media

Two screenshots were attached in the originating Slack thread showing desktop (correct) vs mobile (stretched) rendering — not included here, ask reporter to attach directly to this issue if needed.

Steps to Reproduce

  1. Configure a uiBackground with an atlas texture, wrapMode: "repeat", textureMode: "stretch", and custom UVs (as above) sized to fit 100% of the screen.
  2. Run the scene on desktop — image renders correctly.
  3. Run the same scene on mobile — part of the image gets a weird stretch.

Occurrence

Not specified


Requested by Mateo via Slack

Image Image

Metadata

Metadata

Assignees

Type

Fields

No fields configured for Bug.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions