C
Ceymoonie
Guest
I've been trying for about a week now, but I just can't find a working solution. The easiest way seems to be surface stacking, so this:
But that just results in a white screen.
The next thing I did was the obvious, combining the two shaders. However, I got stuck at this part:
The first line comes from the CRT shader, and the column comes from the RGB-shift shader. But instead of combining them, all this does is choose the shader at the bottom.
I don't want to make this post too bulky, so I'll leave it at that. Please tell me if you have any more ideas.
Code:
surface_set_target(rgbSurface);
shader_set(shRGB);
draw_set_blend_mode_ext(bm_one, bm_inv_src_color);
draw_surface_ext(application_surface, modX + 0, modY + 0, crt_surface_scale, crt_surface_scale, 0, c_white, 1);
draw_set_blend_mode(bm_normal);
shader_reset();
surface_reset_target();
surface_set_target(crtSurface);
shader_set(shCRT);
shader_set_uniform_f(uni_crt_sizes, surface_width, surface_height,crt_surface_width, crt_surface_height);
shader_set_uniform_f(distort, var_distort);
shader_set_uniform_f(distortion, var_distortion_ammount);
shader_set_uniform_f(border, var_border);
draw_surface_ext(rgbSurface, modX + 0, modY + 0, crt_surface_scale, crt_surface_scale, 0, c_white, 1);
shader_reset();
surface_reset_target();
draw_surface(crtSurface, 0, 0);
The next thing I did was the obvious, combining the two shaders. However, I got stuck at this part:
Code:
gl_FragColor = vec4(mul_res, 1.0);
gl_FragColor.r = (v_vColour * texture2D(gm_BaseTexture, vec2(newcoordx.r, newcoordy.r))).r;
gl_FragColor.g = (v_vColour * texture2D(gm_BaseTexture, vec2(newcoordx.g, newcoordy.g + offset))).g;
gl_FragColor.b = (v_vColour * texture2D(gm_BaseTexture, vec2(newcoordx.b, newcoordy.b))).b;
I don't want to make this post too bulky, so I'll leave it at that. Please tell me if you have any more ideas.