<undefined> 0 -1 0 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 application_surface_draw_enable(0); fxaa_on = 1; fxaa_strength = 4; 1 603 7 0 0 -1 2 self 0 0 1 application_surface_draw_enable(1); 1 603 7 0 0 -1 2 self 0 0 1 // DISABLE ALPHABLEND BECAUSE SURFACES // draw_enable_alphablend(0); // GET OFFSET OF THE APPLICATION SURFACE FOR MANUAL DRAWING // var offset = application_get_position(); // SET THE SHADER // if(fxaa_on) { shader_set(sha_fxaa); var tex = surface_get_texture(application_surface); shader_set_uniform_f(shader_get_uniform(sha_fxaa, "u_texel"), texture_get_texel_width(tex), texture_get_texel_height(tex)); shader_set_uniform_f(shader_get_uniform(sha_fxaa, "u_strength"), fxaa_strength); } // DRAW THE APPLICATION SURFACE // draw_surface(application_surface, offset[0], offset[1]); // RESET ALPHABLEND // draw_enable_alphablend(1); // RESET THE SHADER // if(fxaa_on) { shader_reset(); } 1 603 7 0 0 -1 2 self 0 0 1 var txt = "Press Space to toggle FXAA, left/right to change the strength"; if(fxaa_on) { txt += "#FXAA: On"; } else { txt += "#FXAA: Off"; } txt += "#Strength: " + string(fxaa_strength); draw_set_colour(c_black); draw_text(5, 5, txt); draw_set_colour(c_white); draw_text(4, 4, txt); 1 603 7 0 0 -1 2 self 0 0 1 fxaa_strength = min(10, fxaa_strength + 1); 1 603 7 0 0 -1 2 self 0 0 1 fxaa_strength = max(0, fxaa_strength - 1); 1 603 7 0 0 -1 2 self 0 0 1 fxaa_on = !fxaa_on; 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 0