HTML5 GMS 2.3 HTML5 Z-Buffer Not Updating [BUG]

I draw two rectangles but use a shader in one to change the z value to be closer then turned on ztestenable and zwriteenable like so:

GML:
gpu_set_ztestenable(true);
gpu_set_zwriteenable(true);



shader_set(shd_test);
draw_set_color(c_blue);
draw_rectangle(x,y,x+20,y+20,0);
shader_reset();

draw_set_color(c_white);
draw_rectangle(50,50,70,70,0);

gpu_set_ztestenable(false);
gpu_set_zwriteenable(false);


Here is the vertex shader code (fragment not changed)

C++:
//
// Simple passthrough vertex shader
//
attribute vec3 in_Position; // (x,y,z)
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
attribute vec4 in_Colour; // (r,g,b,a)
attribute vec2 in_TextureCoord; // (u,v)



varying vec2 v_vTexcoord;
varying vec4 v_vColour;



void main()
{
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z-1., 1.0); // LINE THAT WAS CHANGED
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;

v_vColour = in_Colour;
v_vTexcoord = in_TextureCoord;
}


In the step function, I use the directional keys to change the x and y variables which moves the blue rectangle around. Now this works properly in windows but in HTML5, the z-buffer does not update! Here is a gif:



P.S. I sent this to the GMS2.3 beta bug posting forum but I'm not sure if the devs still check them out since its not beta anymore.
Link: https://help.yoyogames.com/hc/en-us/community/posts/360013430598-HTML5-Z-Buffer-not-updating
 
Top