Graphics Reference
In-Depth Information
for the texture. All of the other modes require that a complete
mipmap chain exists for the texture.
The MipMap2D example in Figure 9-4 shows the difference between a
polygon drawn with GL_NEAREST versus GL_LINEAR_MIPMAP_LINEAR
filtering.
Figure 9-4
MipMap2D: Nearest Versus Trilinear Filtering
It is worth mentioning some performance implications for the texture
filtering mode that you choose. If minification occurs and performance
is a concern, using a mipmap filtering mode is usually the best choice
on most hardware. You tend to get very poor texture cache utilization
without mipmaps because fetches happen at sparse locations throughout
a map. However, the higher the filtering mode you use, the greater the
performance cost in the hardware. For example, on most hardware,
doing bilinear filtering is less costly than doing trilinear filtering. You
should choose a mode that gives you the quality desired without unduly
negatively impacting performance. On some hardware, you might get
high-quality filtering virtually for free, particularly if the cost of the texture
filtering is not your bottleneck. This is something that needs to be tuned for
the application and hardware on which you plan to run your application.
Seamless Cubemap Filtering
One change with respect to filtering that is new to OpenGL ES 3.0 relates
to how cubemaps are filtered. In OpenGL ES 2.0, when a linear filter
kernel fell on the edge of a cubemap border, the filtering would happen
on only a single cubemap face. This would result in artifacts at the borders
between cubemap faces. In OpenGL ES 3.0, cubemap filtering is now
seamless —if the filter kernel spans more than one cubemap face, the
kernel will fetch samples from all of the faces it covers. Seamless filtering
results in smoother filtering along cubemap face borders. In OpenGL
ES 3.0, there is nothing you need to do to enable seamless cubemap
filtering; all linear filter kernels will use it automatically.
 
Search WWH ::




Custom Search