Docs/perf/2026-12-01-quest-shading.md

No black shading on a Quest (2026-12-01)

Bug report #23 (staging, x 34.5 z 6.8, the sky by day): several clouds had a thin black line along their lower edge on a Quest. The same day the dungeons' rock had pure black panels round the view's middle (fixed in afa27dbf/4ef6519b by turning its specular term off). Both are the specular term (the sun's and lights' highlight, Godot's Schlick-GGX), which the Quests' Adreno GPU (Quest 2: Adreno 650, Quest 3: Adreno 740; Godot 4.7's mobile renderer) draws pure black on some pixels: at a sphere's silhouette, or where a surface faces the eyes. Checked on the Quest 3 at the report's place: with the specular back (--quality-set specular=true) the black dashes are there under the clouds; without it, none.

Before: the specular on, black dashes under the cloud After: no specular, no black

The fix

QualityProfile.Specular (Config/quality.json): true on the PC, false on quest2 and quest3. Where it is false:

  • SpecularQuality.Watch (client, from Main): every lit BaseMaterial3D of a node entering the scene (its MaterialOverride, its surface overrides, its mesh's own materials, a MultiMesh's or particles' mesh) gets SpecularMode = Disabled; a mesh is looked at once (shared meshes).
  • Materials the code puts on a node already in the scene: through SpecularQuality.Apply / Lit (Palette.Flat, the blasters' metal and glow, the wings' board, trim and glow, the loot items).
  • Custom lit shaders: Client.Core.ShaderModes.ForDevice adds specular_disabled to their render_mode (the terrain's clipped ground, the opening story's ground, the worn blasters' metal).

On the PC nothing changes (the setting is true: no code path differs), so its pictures are the same as before.

The audit: every material and shader

What Material Specular before Now on a Quest
Sky clouds (SkyAndClouds), login balcony's clouds StandardMaterial3D, roughness 1, Lambert + emission on (black line under them) off
Terrain near ground StandardMaterial3D, vertex colours (sRGB), roughness 1 on off
Terrain far rings, clipped ground (Terrain.ClippedGroundShader) shader, roughness 1 on off (ShaderModes)
Props: trees, rocks, cones, crystals' glow (PropMeshes) StandardMaterial3D, roughness 1 on off
Buildings, plaza, fountain, raid hall, gate, arena (Blender .glb) glTF, roughness 0.85, metallic 0 on off
Safe zone posts, platforms, flight tower rim, beacons (Palette.Flat and others) StandardMaterial3D on off
Blasters (body, trim: metallic 0.35, roughness 0.55; cells, glow), worn metal shader StandardMaterial3D / shader on off
Wings (board 0.6, trim metallic 0.7 roughness 0.35, glow) StandardMaterial3D on off
Loot items in their orb (roughness 0.55) StandardMaterial3D on off
Opening story's ground and creatures shader / StandardMaterial3D on off
Characters, armour, NPCs, ghost, goblins, mobs (near and far), pets, training dummies, flight tower shaders and materials with specular_disabled already off off
Dungeon rock StandardMaterial3D already off (4ef6519b) off
Lava, auras, dungeon gate's plasma, portals, light cylinders, respawn beam, rarity markers, shots, sparkles, updrafts, UI kit (panels, shapes, rings, glyphs, text) unshaded none none
World water, fountain water shaders with specular_schlick_ggx (the sun's glint, on purpose) on kept: no black seen on either headset (the lake, the fountain)

Colours (sRGB or linear): the terrain's shader converts its sRGB vertex colours itself; the props, mobs, goblins and loot use VertexColorIsSrgb; the Blender models' vertex colours are linear as glTF says (read as such); every colour uniform of the custom shaders is source_color except the auras' tint (unshaded: drawn the same on both). The dungeon rock and the updrafts read their code-made vertex colours as linear: the same on the PC and a Quest (the mobile renderer converts alike), tuned on pictures, left as they are. Nothing there differs between a PC and a Quest.

Other mobile pitfalls looked at: no material uses refraction, screen textures, SSR or reflection probes (the world's and the dungeons' environments have ReflectedLightSource off; the splash's and the icons' a plain colour background); no HDR-only effect but the dungeons' glow, off on the Quests already.

Not changed: thin dark dashes along some seams of the caves' rock (a crack between two quads, not shading) and the grey translucent dashes of distant race marks in the sky.

Checked on the headsets (staging, the APK of fix/quest-black-shading)

The sky with clouds (34.5, 6.8), the town by the fountain, the forest (-320, 1080), the lake of crystals (-350, -925), a dungeon of each theme (caves: range 10-20, lava: range 80-150), on the Quest 2 and the Quest 3, with the headset's --screenshot (the eyes' camera, the same GPU): no black line or panel on a lit surface. The PC (Radeon, the same place): unchanged, as the code says (its profile keeps the specular). The pictures: BuildOutput/quest-shots/ on chopper.