GLES3: Fix canvas shader use of undefined draw_data

Fixes #71551.
This commit is contained in:
Rémi Verschelde 2023-01-17 13:17:44 +01:00
parent 19152765de
commit 226daf9b59
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 2 deletions

View File

@ -579,10 +579,10 @@ void main() {
if (normal_used || (using_light && bool(read_draw_data_flags & FLAGS_DEFAULT_NORMAL_MAP_USED))) {
normal.xy = texture(normal_texture, uv).xy * vec2(2.0, -2.0) - vec2(1.0, -1.0);
if (bool(draw_data.flags & FLAGS_FLIP_H)) {
if (bool(read_draw_data_flags & FLAGS_FLIP_H)) {
normal.x = -normal.x;
}
if (bool(draw_data.flags & FLAGS_FLIP_V)) {
if (bool(read_draw_data_flags & FLAGS_FLIP_V)) {
normal.y = -normal.y;
}
normal.z = sqrt(1.0 - dot(normal.xy, normal.xy));