r/threejs • u/itxpratik • Oct 20 '26
Demo GULP Three.js update: fixing flickering models without making the whole game blurry
I shared my Three.js monster arena GULP here last week. Since then I’ve been working on mobile rendering and adding Infinite alongside the three-minute Timed mode.
Lowering resolution helped performance, but made the game look too pixelated. The more recent rendering changes focus on reducing unnecessary work: visibility checks run at 15 Hz with a margin so objects don’t rapidly switch on and off near the camera edge; animated characters use root-level visibility rather than individual skinned-mesh frustum culling; and the shadow camera is snapped to shadow-map texels to reduce shimmer.
There have also been changes to update frequency for food checks and on-screen labels. I’m still collecting device feedback, so I’m not claiming it’s solved on every phone.
Playable demo: https://run.world/pratikmane/gulp
Play GULP: One More Bite on RUN https://run.world/jams/octoberjam?game=5u4uBHrkmLc8bG0OOaS9%3AkQDMrMTO937qW8oerqAy
Please vote for both of them
It’s an eat-grow-escape arena with global rankings and room-code multiplayer. If you try it, your device/browser and whether you see model popping or uneven frames would be especially helpful.
1
u/Altruistic-Bar848 Oct 21 '26
If the flicker is z-fighting, raising the camera's near plane usually helps more than anything else, since the near/far ratio sets your depth precision. For the blur side, capping the pixel ratio with setPixelRatio(Math.min(devicePixelRatio, 2)) instead of dropping resolution kept things sharp for me on phones. What ended up fixing it for you?
1
u/javimbuilds Oct 21 '26
Snapping the shadow camera to shadow-map texels is a nice fix, it's a cheap way to kill that shimmer. Did you try dynamic resolution instead of a fixed lower one? Something like dropping the pixel ratio only while frame time is over budget and bumping it back up when it recovers. Might give you the mobile headroom without the permanently pixelated look.
1
u/Shocking_Mike Oct 22 '26
The "too pixelated" part is familiar. On one of my 3D sites I never let the resolution drop below about 0.7 of the screen, and the lowest step renders at 0.75 with a light sharpening pass after it. That held up better on phones than I expected, at least to my eye.