Shaders I recently downloaded this CRT Pixel Shader

G

George Gates

Guest
https://marketplace.yoyogames.com/assets/701/crt-pixel-shader

how exactly would I get this code to work for fullscreen or views..
when I'm not in full screen it's fine, when I go into fullscreen it puts a border around the box like this:
good.png
if anyone knows how to modify the codes to get it to work in full screen or just draw the effect over the screen let me know...
here's the codes:

Shader:

attribute vec3 in_Position;
attribute vec4 in_Colour;
attribute vec2 in_TextureCoord;

varying vec2 v_vTexcoord;

void main()
{
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * vec4(in_Position, 1.0);
v_vTexcoord = in_TextureCoord;
}

Object:

- Create:
draw_set_font(font0);

application_surface_draw_enable(false);

crt_surface_scale = 3;

crt_surface_width = view_wview[0] * crt_surface_scale;
crt_surface_height = view_hview[0] * crt_surface_scale;

surface_width = view_wview[0];
surface_height = view_hview[0];

uni_crt_sizes = shader_get_uniform(sh_CRT_HTML5, "u_crt_sizes");
distortion = shader_get_uniform(sh_CRT_HTML5, "distortion");

var_distortion_ammount = 0.01;

surface_resize(application_surface, surface_width, surface_height)

- Draw:
shader_set(sh_CRT_HTML5);
shader_set_uniform_f(uni_crt_sizes, surface_width, surface_height,crt_surface_width, crt_surface_height);
shader_set_uniform_f(distortion, var_distortion_ammount);
draw_surface_part_ext(application_surface, 0, 0, view_wview[0], view_hview[0], 0, 0, crt_surface_scale, crt_surface_scale, c_white, 1);
shader_reset();
 
Top