decentraland / decentraland/godot-explorer

SDK7 UiBackground nine-slice tiles instead of stretching (Unity parity gap)

Open
#2,060 0 comments 0 reactions 0 assignees View on GitHub
bug feature parity
Dominant language
Rust
Stars
18
Forks
19
Avg merge
4d 2h
Merged PRs (30d)
43

Description

## Problem

The Godot port of `PBUiBackground` (component 1053) diverges from the Unity explorer's `DCLImage` semantics for nine-slice rendering:

- Nine-slice panels (e.g. HUD `panel_v2.png` with `textureSlices: 0.18`) **tile** their edge strips and inner area instead of stretching. Wood frame edges and cream interiors show repeating tiles; Unity stretches them smoothly.
- Opposing slices (`left+right`, `top+bottom`) aren't clamped to `1.0` before being applied as patch margins — divergent from Unity's `DCLImage.AdjustSlices()`.
- Protobuf UV index convention differs from Unity's `Extensions.ToDCLUVs`, causing axis-alignment and `region_rect` issues in `STRETCH` mode. Latent bug: the old `1.0 - max/min` formula could produce a negative `region_rect` height for valid inputs.

The long-standing `TODO: should be TILE or STRETCH?` in `dcl_ui_background.rs` confirms the open question.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.