Questions tagged [mipmap]

18 questions
16
votes
1 answer

How are mipmap levels computed in Metal?

My question is specifically in regards to Metal, since I don't know if the answer would change for another API. What I believe I understand so far is this: A mipmapped texture has precomputed "levels of detail", where lower levels of detail are…
lcmylin
  • 413
  • 3
  • 6
8
votes
2 answers

Help me grasp Anisotropic Filtering (AF)

Lately I've been reading about texture filtering, namely Nearest-neighbor filtering, Bilinear filtering, Trilinear filtering, Anisotropic filtering, MIP maps, RIP Maps and so on. From a high-level perspective I think I can understand these…
6
votes
1 answer

Is it possible to directly generate mipmap levels of perlin noise?

Say I'm generating some texture using perlin noise (or simplex noise, or any similar noise). Then I generate mipmaps to obtain minified versions of that texture... My question is if it is possible to directly (and quickly) calculate lower LOD…
zduny
  • 377
  • 2
  • 6
5
votes
1 answer

Kaiser windowed sinc filter for mip mapping

These older but informative article talks about how a Kaiser windowed sinc filter is a good way to generate mips. The Inner Product - Mipmapping - Part 1 | Jonathan Blow The Inner Product - Mipmapping - Part 2 | Jonathan Blow Unfortunately, the…
Alan Wolfe
  • 7,711
  • 3
  • 29
  • 72
5
votes
0 answers

Cascaded shadow maps. Seams between cascades

I implemented cascaded shadow maps, where shadow maps for each cascade is rendered to one canvas: The light projections for each cascade are calculated from the bounding spheres of camera sub-frustums: The code for calculation visibility value: for…
Zheden
  • 151
  • 5
5
votes
1 answer

OpenGL: read texture mipmap level 0 and render to same texture mipmap level 1

I am trying to generate mipmaps, which are based on depthbuffer values. To generate the next mipmap level, I am trying to read in the 4 pixels of the upper mipmap level per pixel. Unlike the usual mipmap generation. I am checking the depth values,…
Thomas
  • 631
  • 1
  • 3
  • 11
4
votes
2 answers

MipMaps for Signed Distance Field

Is there some algorithm that keeps details when creating mipMaps for SDF? For example group of 4 pixels when only one is above threshold will lose this pixel with bilinear and creating mipMaps with 'max' of those values will add noise. When purpose…
Derag
  • 596
  • 2
  • 11
2
votes
1 answer

2D array texture with different filtering setting per texture?

Currently I have textures which need GL_NEAREST and some other need GL_LINEAR in the same texture2dArray. In the shader I perform a manual GL_NEAREST lookup via textureFetch(). To avoid this my question is, is it possible to set the value of…
MrRabbit
  • 55
  • 3
2
votes
1 answer

Mipmap sampler in Metal compute kernel (not vertex or fragment shader)

I have a source texture (480x480) that was created with mipmapped set to true (error checking removed to simply this post), and a dest texture (100x100): // source texture var textureDescriptor = MTLTextureDescriptor.texture2DDescriptor(pixelFormat:…
Labeno
  • 31
  • 3
2
votes
1 answer

Calculating maximum number of mipmap levels for OpenGL automatic mipmap storage generation

Using glTexStorage2D(GL_TEXTURE_2D, num_mipmaps, GL_RGBA8, width, height); followed by glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_BGR, GL_UNSIGNED_BYTE, data); glGenerateMipmap(GL_TEXTURE_2D); we can ask OpenGL to generate storage…
Simon
  • 173
  • 2
  • 7
1
vote
0 answers

Generating Mip Maps For A Cube Map

Let's say I have a cube map that has a resolution of 256x256 for each face and I want to generate mip maps for it using a box filter. It's tempting to just mip each face individually, cutting the resolution of each face in half for each mip, by…
Alan Wolfe
  • 7,711
  • 3
  • 29
  • 72
1
vote
0 answers

Rounding rules for mip level with point sampling

In shaders, when using SampleLevel intrinsic, if we pass 0.5 in the mip level parameter, and the sampler is a point sampler, what mip level is selected ? According to this blog:…
v.oddou
  • 623
  • 4
  • 9
1
vote
1 answer

Why does mipmapping separate out the RGB channels?

I'm trying to understand mipmapping. It makes sense that you would have many pictures of your textures at different resolutions, and use the closest ones in size to what you need in order to avoid moiré patterns--that's logical. But a lot of the…
Adam Smith
  • 117
  • 5
0
votes
1 answer

What is mipmapping?

I know OpenGL likes the texel resolution of textures be some power of 2 in each direction because of mipmapping. (They say that this is not a totally stringent condition, but it is preferred) Can someone explain what is mipmapping and what is it…
user9778
  • 191
  • 3
  • 7
0
votes
0 answers

Opengl binding different mipmap levels of same texture2darray for use in compute shader. How to handle variable nr of levels?

So I want to make a compute shader that uses a coarse-to-fine approach. As I have learned about open gl mipmap levels it seems they could be very useful. However the only binding method which I have found and used (so far) for individual mipmap…
1
2