Avoid Texture Aliasing and Mipmapping
来源:互联网 发布:企业淘宝开店流程 编辑:程序博客网 时间:2024/05/19 11:49
In ray tracing, if the objects with textures are far from the camera, the spatial sampling frequency would be relatively low, i.e. each pixel of the viewing plane would have to cover multiple texels (texel is the pixel of texture images). As such, it would lead to a kind of aliasing called moir´e pattern. The following is an exampling of the moire pattern (on the surface of floor and buildings):
The problem of aliasing can be addressed by sampling and filtering techniques. The signal frequency of texture depends upon how closely spaced its texels are on the screen. Due to the Nyquist limit, we need to make sure that the texture's signal frequency is no greater than half the sample frequency. For example, say an image is composed of alternating black and white lines, a texel apart. The wavelength is then two texels wide (from black line to black line), so the frequency is 1/2. To properly display this texture on a screen, the frequency must then be at least 2*1/2, i.e. at least one pixel per texel. So, for textures in general, there should be at most one texel per pixel to avoid aliasing.
To achieve this goal, either the pixel's sampling frequency has to increase or the texture frequency has to decrease. The anti-aliasing methods give ways to increase the pixel sampling rate. However, these give only a limited increase in sampling frequency. To more fully address this problem, various texture minification algorithms have been developed.
Mipmapping
The most popular method of anti-aliasing for textures is called mipmapping. It is implemented in some form on even the most modest graphics accelerators now produced. When the mipmapping minimization filter is used, the original texture is augmented with a set of ssmaller versions of the texture before the actual rendering takes place. The texture (level zero) is downsampled to a quater of the origianl data, with each new texel value often computed as the average of four neighbor texels in the original texture. The new, level-one texture is sometimes called a subtexture of the original texture. The reduction is performed recursively until one or both of the dimensions of the texture equals one texel. The set of images as a whole is often called a mipmap chain.
Two important elements in forming high-quality mipmaps are good filtering and gamma correction. The common way to form a mipmap level is to take each 2*2 set of texels and average them to get the mip texel value.
- Avoid Texture Aliasing and Mipmapping
- Mipmapping and the Blit Command Encoder
- Mipmapping and NPOT textures inside a pixel shader
- What is aliasing and what causes it?
- Procedural modeling and texture
- Texture and Surface
- Texture tiling and swizzling
- Animation and texture mapping
- Texture definition and its types
- UE4 Texture Support and Settings
- DXT and ETC Compression Texture
- Anti-aliasing and Continuity with Trapezoidal Shadow Maps
- UV Texture Coordinates and Texture Mapping - OpenGL / DirectX
- Vista Rootkit - Bypass Activation and Avoid DRM
- Texture
- texture
- FBO - Render to Texture and Blending
- Understanding and Using OpenGL Texture Objects
- C++ 三维数组的理解与动态分配
- Boost.Interprocess使用指南(1)
- 记事本
- Python list 增加/插入元素的说明
- linux中likely与unlikely
- Avoid Texture Aliasing and Mipmapping
- hdu 2544 最短路(最短路径)(flody、dij、dij+priority queue、bellman、spfa)
- Java_1
- 从程序员到CTO的Java技术路线图
- hdu 1561 The more, The Better(树形背包)
- netcat获得反向shell
- 《卡特教练》观后感
- css3做了一个卷轴样式的菜单
- SQL触发器实例讲解