© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•14mo ago
ℭ𝔦𝔭𝔥𝔢𝔯

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; }
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WebGL in Workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Prisma compatibility problem in cloudflare pages/workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
15mo ago
Latency Cloudflare Workers + Workers KV
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Cloudflare Workers Ratelimiting
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
7mo ago