r/webgl • u/SecretaryLeft1950 • 22h ago
what got my webgl2 air traffic control game running ok on a mid range phone
been building a 3d atc game in three.js that has to run in a phone browser, my test phone is a galaxy a55. few things that actually mattered
phones get their own tier. render at about 1 css pixel internally, fxaa, one shadow cascade, 30 fps cap, then a single cas sharpen pass on the way out. looks way better than native dpr and stuttering
adaptive quality drops effects first and resolution last. if frame times go bad it sheds stuff like clouds before it touches render scale, and the scale moves in a few fixed steps so it doesnt jitter around every second
trees, buildings, taxiway joints and jet bridges are all instanced meshes and the airport lights are one point cloud. draw calls were the real killer on mobile before that
shaders compile behind the loading screen with KHR_parallel_shader_compile where it exists. before that the first time a new plane type came into view the whole thing hitched
on desktop theres nothing temporal in the default path, no taa, so a still camera is actually still. matters more than i thought for atc since you stare at the same view for ages
if anyone wants to poke at it on their phone https://approach-world-atc.app and theres a ?q=mobile param to force the phone tier on pc
curious what other people do for mobile shadows, one cascade still feels heavy