From b71cec668abe3ba541a2712a2342bca9489b03f7 Mon Sep 17 00:00:00 2001 From: Samuel Ammonius <104873652+sammonius@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:46:44 -0330 Subject: [PATCH] Update canvas_item_shader.rst I tested it and it is upper left, not lower left. This is the CanvasItem shader I used to test it: shader_type canvas_item; void fragment() { if(distance(FRAGCOORD.xy, vec2(40, 40)) < 30.0) COLOR = vec4(1,0,0,1); else COLOR = vec4(0,0,0,1); } --- tutorials/shaders/shader_reference/canvas_item_shader.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/shaders/shader_reference/canvas_item_shader.rst b/tutorials/shaders/shader_reference/canvas_item_shader.rst index 3090093e5..581f77543 100644 --- a/tutorials/shaders/shader_reference/canvas_item_shader.rst +++ b/tutorials/shaders/shader_reference/canvas_item_shader.rst @@ -159,7 +159,7 @@ it to the ``NORMALMAP`` property. Godot will handle converting it for use in 2D | Built-in | Description | +=============================================+===============================================================+ | in vec4 **FRAGCOORD** | Coordinate of pixel center. In screen space. ``xy`` specifies | -| | position in window. Origin is lower-left. | +| | position in window. Origin is upper-left. | +---------------------------------------------+---------------------------------------------------------------+ | in vec2 **SCREEN_PIXEL_SIZE** | Size of individual pixels. Equal to inverse of resolution. | +---------------------------------------------+---------------------------------------------------------------+