mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Use a src rect for copying from screen with CanvasGroup in the mobile backend
This commit is contained in:
parent
3b1806182a
commit
adfc9ccc44
4 changed files with 20 additions and 3 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#define FLAG_ALPHA_TO_ONE (1 << 5)
|
||||
#define FLAG_LINEAR (1 << 6)
|
||||
#define FLAG_NORMAL (1 << 7)
|
||||
#define FLAG_USE_SRC_SECTION (1 << 8)
|
||||
|
||||
#ifdef USE_MULTIVIEW
|
||||
layout(location = 0) out vec3 uv_interp;
|
||||
|
|
@ -54,6 +55,10 @@ void main() {
|
|||
if (bool(params.flags & FLAG_FLIP_Y)) {
|
||||
uv_interp.y = 1.0 - uv_interp.y;
|
||||
}
|
||||
|
||||
if (bool(params.flags & FLAG_USE_SRC_SECTION)) {
|
||||
uv_interp = params.section.xy + uv_interp * params.section.zw;
|
||||
}
|
||||
}
|
||||
|
||||
#[fragment]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue