yoklainterview sim

Game Development Gfx Textures Sampling Compression Interview Questions

75 verified Game Development Gfx Textures Sampling Compression interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Gfx Textures Sampling CompressionDifficulty 1
When a texture is rendered much smaller on screen than its source resolution (minification), high-frequency detail can shimmer or produce moiré patterns frame to frame. Which technique exists specifically to prevent this by pre-filtering the texture at multiple resolutions?
  • aSupersampling
  • bMipmapping
  • cAnisotropic filtering
  • dAtlas packing
Explanation:Mipmapping precomputes a chain of progressively half-sized, pre-filtered copies of a texture. During minification the GPU samples from an appropriately small level instead of the full-resolution image, so high-frequency detail is already averaged down and cannot alias into shimmering.
Gfx Textures Sampling CompressionDifficulty 2
A texture gets a full mip chain down to 1x1 on top of its base level. Roughly how much extra memory does the full chain add compared to the base level alone?
  • aAbout 100%
  • bAbout 50%
  • cAbout 33%
  • dAbout 10%
Explanation:Each mip level holds 1/4 the texels of the one above it, so total memory is base (1 + 1/4 + 1/16 + ...) = base 4/3. The tail beyond the base level is therefore about one-third of the base size, roughly 33% extra.
Gfx Textures Sampling CompressionDifficulty 2
Which quantity does the GPU primarily use to decide which mip level to sample for a given fragment?
  • aHow fast UV coordinates change per screen pixel
  • bThe world-space distance from the camera to the surface
  • cThe size in bytes of the texture file on disk
  • dThe number of instructions in the fragment shader
Explanation:The mip level (LOD) is derived from how quickly the UV coordinates change across neighboring screen pixels: a fast rate of change means the texture is minified, so a smaller mip is chosen; a slow rate means it is closer to native size, so a larger mip is chosen. World-space distance correlates with this but is not what the hardware actually measures.
Gfx Textures Sampling CompressionDifficulty 2
A distant, densely detailed floor texture shimmers and sparkles noticeably as the camera moves, even though nearby surfaces with the same texture look fine. What is the most likely cause?
  • aThe texture's wrap mode is set to clamp-to-edge instead of repeat
  • bThe texture uses a block-compressed format instead of an uncompressed one
  • cThe base mip level resolution is too high
  • dNo mip chain exists, or the sampler ignores it for minification
Explanation:Shimmering/sparkling at a distance, where the same texture looks correct up close, is the textbook symptom of minification aliasing: without a mip chain (or a sampler that ignores it), the GPU is forced to point- or bilinear-sample the full-resolution texture even when it covers far fewer screen pixels than texels, so high-frequency detail aliases frame to frame.
Gfx Textures Sampling CompressionDifficulty 2
// pseudo host-side sampler setup
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
// GL_TEXTURE_MAG_FILTER is left at its GL default

What filter is actually applied when this texture is magnified (viewed closer than its native resolution)?
  • aGL_LINEAR_MIPMAP_LINEAR, same as the minification filter
  • bWhichever mip level is nearest is picked and sampled with GL_NEAREST
  • cGL_LINEAR, the default magnification filter
  • dNo filtering is applied; raw texels are shown
Explanation:GL_TEXTURE_MIN_FILTER and GL_TEXTURE_MAG_FILTER are independent state, and mipmap modes only exist on the minification side. The code only sets the min filter, so magnification falls back to its own default, GL_LINEAR.
Gfx Textures Sampling CompressionDifficulty 3
A floor texture viewed at a steep grazing angle looks noticeably blurrier than it should, even though the mipmap chain and trilinear filtering are both correctly set up. Which feature is designed specifically to fix this?
  • aAnisotropic filtering
  • bA higher base texture resolution
  • cBlock compression with a smaller footprint
  • dA tighter near clip plane
Explanation:Standard mip selection assumes the minification rate is the same in every direction, but a steeply angled surface is minified far more in one screen direction than the other; picking a single isotropic mip level then over-blurs the less-minified direction. Anisotropic filtering samples multiple times along the elongated footprint to keep that direction sharp.

Test yourself against the 2850-question Game Development bank.

Start interview