Skip to content

Commit

Permalink
Switch to multiline shader source for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
maiself committed Apr 2, 2016
1 parent 4ca4bb3 commit fd0f4fd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ const InvertWindowEffect = new Lang.Class({

_init: function(params) {
this.parent(params);
this.set_shader_source('uniform sampler2D tex; void main() { vec4 color = texture2D(tex, cogl_tex_coord_in[0].st); color.rgb /= color.a; color.rgb = vec3(1.0, 1.0, 1.0) - color.rgb; color.rgb *= color.a; cogl_color_out = color * cogl_color_in; }');
this.set_shader_source(' \
uniform sampler2D tex; \
void main() { \
vec4 color = texture2D(tex, cogl_tex_coord_in[0].st); \
color.rgb /= color.a; \
color.rgb = vec3(1.0, 1.0, 1.0) - color.rgb; \
color.rgb *= color.a; \
cogl_color_out = color * cogl_color_in; \
} \
');
},

vfunc_paint_target: function() {
Expand Down

0 comments on commit fd0f4fd

Please sign in to comment.