godotengine / godotengine/godot

ColorRect not scaling to entire viewport under BackBufferCopy with anchor preset set to full rect (& expand)

Open
#101,976 9 comments 0 reactions 0 assignees View on GitHub
documentation topic:2d
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in: 4.3-stable (commit 77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Compiled for double precision floats

### System information

6.12.9 (NixOS) 4.3-stable-77dcf97d82cbfe4e4615475fa52ca03da645dbd8 (Mobile preset)

### Issue description

A simple ColorRect won't scale to the window, even though its' parent (BackBufferCopy) copy mode is set to Viewport.

![Image](https://github.com/user-attachments/assets/b389cc2b-c0a4-486a-a7c1-00ab52e32580)

Reparenting said ColorRect to be directly under a Control node allows it to be @ fullscreen

![Image](https://github.com/user-attachments/assets/b70739a1-d637-44b1-aca8-a919cf4bcfab)

### Steps to reproduce

Add anything that should scale to the entire viewport under a BackBufferCopy. It won't scale unless you do hacks to work around it.

### Minimal reproduction project (MRP)

If it scales correctly, everything should be white and you won't see the low-poly sphere.

[Godot issue.zip](https://github.com/user-attachments/files/18531088/Godot.issue.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached minimal reproduction project and reproduce the layout behavior using BackBufferCopy, ColorRect, and the full-rect anchor preset. Compare the nested and directly parented cases, then verify that the ColorRect fills the viewport under BackBufferCopy without workaround changes; the expected result is an entirely white view with no visible low-poly sphere.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.