diff options
Diffstat (limited to 'drivers/gles2/shaders/canvas.glsl')
-rw-r--r-- | drivers/gles2/shaders/canvas.glsl | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index cee68a58ff..ba69ca9b6e 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -1,3 +1,4 @@ +/* clang-format off */ [vertex] #ifdef USE_GLES_OVER_GL @@ -9,6 +10,7 @@ precision mediump int; #endif uniform highp mat4 projection_matrix; +/* clang-format on */ uniform highp mat4 modelview_matrix; uniform highp mat4 extra_matrix; attribute highp vec2 vertex; // attrib:0 @@ -29,8 +31,12 @@ uniform vec4 src_rect; uniform highp float time; +/* clang-format off */ + VERTEX_SHADER_GLOBALS +/* clang-format on */ + vec2 select(vec2 a, vec2 b, bvec2 c) { vec2 ret; @@ -74,17 +80,21 @@ void main() { #endif -{ - vec2 src_vtx = outvec.xy; + { + vec2 src_vtx = outvec.xy; + /* clang-format off */ + VERTEX_SHADER_CODE -} + /* clang-format on */ + } color_interp = color; gl_Position = projection_matrix * modelview_matrix * outvec; } +/* clang-format off */ [fragment] #ifdef USE_GLES_OVER_GL @@ -96,6 +106,7 @@ precision mediump int; #endif uniform sampler2D color_texture; // texunit:-1 +/* clang-format on */ uniform highp vec2 color_texpixel_size; uniform mediump sampler2D normal_texture; // texunit:-2 @@ -118,8 +129,12 @@ uniform vec2 screen_pixel_size; #endif +/* clang-format off */ + FRAGMENT_SHADER_GLOBALS +/* clang-format on */ + void main() { vec4 color = color_interp; @@ -129,11 +144,13 @@ void main() { #ifdef SCREEN_UV_USED vec2 screen_uv = gl_FragCoord.xy * screen_pixel_size; #endif -{ + { + /* clang-format off */ FRAGMENT_SHADER_CODE -} + /* clang-format on */ + } color *= final_modulate; |