godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.88k stars 3.17k forks source link

Clearer explanation of back buffer regions #5218

Open tlitookilakin opened 3 years ago

tlitookilakin commented 3 years ago

Your Godot version: 3.3.stable.official

Issue description: BackBufferCopy in rect mode and Visualserver.canvas_item_set_copy_to_backbuffer both use global screen-space coordinates/dimensions, which is an important detail omitted from the documentation of both. (A BackBufferCopy rect does not inherit parent transforms and must be transformed manually. Also, screen-space is y-flipped compared to global world-space and must be transformed manually when using either)

URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/classes/class_backbuffercopy.html https://docs.godotengine.org/en/stable/classes/class_visualserver.html#class-visualserver-method-canvas-item-set-copy-to-backbuffer

Calinou commented 3 years ago

Also, screen-space is y-flipped compared to global world-space and must be transformed manually when using either)

Note that this isn't the case anymore in 4.0, as viewports aren't vertically flipped anymore internally.