SOLVED draw_rectangle_color not working with shader

I have this function and when I draw the draw_sprite_stretched_ext... the shader works but when I draw_rectangle_color instead of sprite_stretched it doesnt.. I really like the draw_rectangle effect how it turns out and would like to give the player the option to change colors etc.
GML:
function BackgroundEffects(argument0, argument1, argument2, argument3, argument4) {
        if argument0 {
                shader_set(shdr_wind)
                shader_set_uniform_f(uTime,current_time/1000)
                //draw_sprite_stretched_ext(sprBackgroundEffects, image_index, argument1, argument2, argument3, argument4, c_white, 1);
                draw_rectangle_color(_A-(_A/6), 0, _A+_WidthAllEnemies+(_A/6), 400, c_purple, c_black, c_purple, c_black, false);
                shader_reset()
            };
    };
Code:
//shdr_wind.vsh:

attribute vec3 in_Position;                  // (x,y,z)
attribute vec4 in_Colour;                    // (r,g,b,a)
attribute vec2 in_TextureCoord;              // (u,v)

varying vec2 v_vPosition;
varying vec4 v_vColour;
varying vec2 v_vTexcoord;

void main()
{
    vec4 object_space_pos = vec4( in_Position, 1);
    gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
    
    v_vPosition = in_Position.xy;
    v_vColour = in_Colour;
    v_vTexcoord = in_TextureCoord;
}
Code:
//shdr_wind.fsh
varying vec2 v_vPosition;
varying vec4 v_vColour;
varying vec2 v_vTexcoord;

uniform float Time;
vec2 Size = vec2(256,128);
vec2 Wave = vec2(48,5);

void main()
{
    vec2 Coord = v_vTexcoord + vec2(cos((v_vPosition.y/Wave.x+Time)*6.2831)*Wave.y,0)/Size*(1.0-v_vTexcoord.y);
    gl_FragColor = v_vColour * texture2D( gm_BaseTexture, Coord);
}
 

FoxyOfJungle

Kazan Games
This is because the draw_rectangle_color() function does not work as a texture, it only obtains colors, if you want to draw a textured shader, use vertex buffers or other forms of drawing other than these.

If you are wanting to draw a shape using a shader, you should be aware that most shaders expect the following inputs: vertex, texture, Colour. However, when using this function, only vertex and colour data are being passed in, and so the shader may not draw anything (or draw something but not correctly). If you need to draw shapes in this way then the shader should be customised with this in mind.
Here you can object some information about how the shader works:
 
Top