Recompiler: preserve the texture footprint for cubemap samples with explicit gradients #767

Open
opened 2026-11-26 04:31:51 +00:00 by github-bot · 0 comments
Owner

@⁠AkshatPal2007 on GitHub · 2026-11-24 04:52 UTC · original

The MIMG cube path in emit.rs reduces two face-space gradients to one LOD and calls SampleLevel. An anisotropic sampler loses the direction of the footprint. HANDOFF.md records image_sample_d(_cl) on cubemaps in a retail shader survey.

On 64b3f35, a synthetic IMAGE_SAMPLE_D kernel sampled a white column on a 32×32 face with an 8×1 texel footprint and a 16× anisotropic sampler. The cube returned 1.0, while the equivalent 2D-array slice returned 0.125 on the same RTX 4070 Laptop GPU (Windows 11, DXC 1.8.2502). Both views had one mip.

I’m working on projecting the two gradients into direction space for native TextureCubeArray.SampleGrad, including minimum LOD, and comparing both sampling paths in a GPU test. Retail visual impact has not been measured.

AI use: Codex (gpt-6.2-astra) investigated the emitter, wrote and ran the synthetic reproduction, and drafted this issue.

**@⁠AkshatPal2007** on GitHub · 2026-11-24 04:52 UTC · [original](https://github.com/xcl-dev/xcl/issues/767) The MIMG cube path in `emit.rs` reduces two face-space gradients to one LOD and calls `SampleLevel`. An anisotropic sampler loses the direction of the footprint. `HANDOFF.md` records `image_sample_d(_cl)` on cubemaps in a retail shader survey. On `64b3f35`, a synthetic `IMAGE_SAMPLE_D` kernel sampled a white column on a 32×32 face with an 8×1 texel footprint and a 16× anisotropic sampler. The cube returned **1.0**, while the equivalent 2D-array slice returned **0.125** on the same RTX 4070 Laptop GPU (Windows 11, DXC 1.8.2502). Both views had one mip. I’m working on projecting the two gradients into direction space for native `TextureCubeArray.SampleGrad`, including minimum LOD, and comparing both sampling paths in a GPU test. Retail visual impact has not been measured. AI use: Codex (gpt-6.2-astra) investigated the emitter, wrote and ran the synthetic reproduction, and drafted this issue.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:51 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.