Skip to content

Commit

Permalink
GLES3: Fix canvas shader use of undefined draw_data
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed Jan 17, 2023
1 parent 1915276 commit 226daf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gles3/shaders/canvas.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 226daf9

Please sign in to comment.