You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Low-roughness reflections alias near the poles of an equirect environment #457
The radiance cube's mirror band reads the source equirect with a single base-level tap per cube texel (SampleSourceRadianceLod(n, 0.0) in shaders/flutter_scene_prefilter_radiance_cube.frag). Toward the poles, one cube texel covers many equirect columns, so the tap picks one of them instead of averaging them. The same fan at the poles that #185 fixed in the skybox gets baked into the cube, and mirror-like materials reflect it.
The skybox fix doesn't reach this path because it only changed where the visible sky reads the equirect (SampleEquirectByFootprint in shaders/texture.glsl). The prefilter can use the same idea. It can compute each cube texel's footprint from the projection and pass it as an explicit gradient, or it can supersample the texel. The low-roughness bands get their mip level from an average texel solid angle, which ignores the 1/cos(latitude) stretch, so they probably undersample near the poles too.
The band atlas layout (native GLES, Adreno Android) reads the source the same way in shaders/flutter_scene_prefilter_env.frag, and the atlas is itself an equirect, so the fan at its poles also appears when reflections read it.
To reproduce, load a high-resolution HDR with detail near the zenith and look at a reflection of the sky overhead on a smooth metallic sphere (roughness near 0).
Activity