I could need some clarification about the uniform binding relativePosition. It is in the whitelist and documented as bindable to entities and would be a very convenient way to check the distance to the player without invoking additional JS. When bound to an entity I get (v1.76.1 and r5153)
16:30:47.562 [shader.uniform.bind.failed]: Shader could not bind uniform "showIt" to -[ShipEntity relativePosition] (target does not respond to selector).
16:30:47.562 [shader.uniform.set]: Set up uniform <OOShaderUniform 0x67bebf8>{0: (nil) showIt = INVALID;}