godotengine / godotengine/godot

Changing texture width height on Line2D with tiled texture doesn't update properly automatically

Open
#99,526 0 comments 0 reactions 0 assignees View on GitHub
bug topic:2d
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in:
v4.2.2.stable.official [15073afe3]
v4.3.stable.official.77dcf97d8
v4.4.dev5.official.9e6098432

### System information

MX Linux 23.3, 6.1.0-11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linux, OpenGL API 3.3.0 NVIDIA 535.183.01 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3060 Ti

### Issue description

Here is a view of the Line2D with a tiled texture.
![Image](https://github.com/user-attachments/assets/5ce376f0-a6fe-4ef3-a74f-c4bea57793dd)

Here I change height from 512 to 256. While the texture update, it doesn't properly reflect how it should be textured.
![Image](https://github.com/user-attachments/assets/8f521d22-1f9c-44de-ab79-fcf1f5805e64)

After toggling visibility, texture updates properly.
![Image](https://github.com/user-attachments/assets/333306e2-2d67-4c26-96bb-e3da1a529d92)

Changing texture size should trigger similar updates as toggling visibility (or changing width of line) --> this also causes proper update of texture.

---

Also see my document feedback where I encountered this: https://github.com/godotengine/godot-docs/issues/10297

### Steps to reproduce

Described above.

### Minimal reproduction project (MRP)

[mrp-line2d-tiledtexture-texturesizechanged.zip](https://github.com/user-attachments/files/17867316/mrp-line2d-tiledtexture-texturesizechanged.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached minimal reproduction project and reproduce the Line2D tiled-texture behavior when changing texture height or width. Trace the update path triggered by texture-size changes and compare it with visibility or line-width changes; done means the texture refreshes correctly without requiring either workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.