Cloudflare workers webgl compatibility

I just wanted to inquire about the compatibility of Webgl for Cloudflare workers, I am currently compiling a frontend using bun and Sigmajs and am getting an error from my frontend deployment pertaining to shaders, yet when tested locally no errors are observed error:
Error: loadShader: error while compiling the shader: null attribute vec4 a_id; attribute vec4 a_color; attribute vec2 a_position; attribute float a_size; attribute float a_angle; uniform mat3 u_matrix; uniform float u_sizeRatio; uniform float u_correctionRatio; varying vec4 v_color; varying vec2 v_diffVector; varying float v_radius; varying float v_border; const float bias = 255.0 / 254.0; void main() { float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); vec2 position = a_position + diffVector; gl_Position = vec4( (u_matrix * vec3(position, 1)).xy, 0, 1 ); v_diffVector = diffVector; v_radius = size / 2.0; #ifdef PICKING_MODE // For picking mode, we use the ID as the color: v_color = a_id; #else // For normal mode, we use the color: v_color = a_color; #endif v_color.a *= bias; }
Error: loadShader: error while compiling the shader: null attribute vec4 a_id; attribute vec4 a_color; attribute vec2 a_position; attribute float a_size; attribute float a_angle; uniform mat3 u_matrix; uniform float u_sizeRatio; uniform float u_correctionRatio; varying vec4 v_color; varying vec2 v_diffVector; varying float v_radius; varying float v_border; const float bias = 255.0 / 254.0; void main() { float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); vec2 position = a_position + diffVector; gl_Position = vec4( (u_matrix * vec3(position, 1)).xy, 0, 1 ); v_diffVector = diffVector; v_radius = size / 2.0; #ifdef PICKING_MODE // For picking mode, we use the ID as the color: v_color = a_id; #else // For normal mode, we use the color: v_color = a_color; #endif v_color.a *= bias; }
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?