Skip to content

GLES3: Color.WHITE or Color(1, 1, 1, 1) is black when used inside _draw() function #80396

Closed
@WhalesState

Description

@WhalesState

Godot version

4.1.1-stable

System information

Windows 10

Issue description

this will draw black rect

func _draw():
	draw_rect(Rect2i(Vector2i.ZERO, img.get_size()), Color(1, 1, 1, 1), false)

func _draw():
	draw_rect(Rect2i(Vector2i.ZERO, img.get_size()), Color.WHITE, false)

image

while this will draw white rect

func _draw():
	draw_rect(Rect2i(Vector2i.ZERO, img.get_size()), Color(0.99, 1, 1, 1), false)

while this is weird but making circle draws Color(0.99, 1, 1, 1) makes also the _draw_rect to get fixed!

image

Steps to reproduce

use Color.WHITE inside any _draw() function or Color(1, 1, 1, 1) and it will draw black color instead of white color

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions