diff --git a/src/engine/satellites.ts b/src/engine/satellites.ts index 6427c2b..ff8ac9f 100644 --- a/src/engine/satellites.ts +++ b/src/engine/satellites.ts @@ -533,6 +533,18 @@ export function createSatelliteLayer(boardRadius: number): SatelliteLayer { uPixelRatio: { value: 1 }, }, vertexShader: ` +/* + * DECLARED HERE, and it has to be. + * + * ShaderMaterial prepends three own built-ins — projectionMatrix, + * modelViewMatrix, position and the rest — but it does NOT prepend the custom + * uniforms declared in the uniforms object above. Putting one there and using it + * in the body without declaring it here compiles nowhere: the program fails with + * "uPixelRatio : undeclared identifier", three logs a shader error, and this + * layer silently draws nothing while every other layer carries on. That shipped + * once, and the console error was the only symptom. + */ +uniform float uPixelRatio; attribute vec4 color; attribute float aSize; varying vec4 vColor;