In some cases (particularly in color transformations), every pixel in the new image B corresponds exactly to a pixel in image A. The most common transformations are image resizing, sharpening, color changes, and blurring. The transformation operation from source A to target B is the image filter. The goal of image filtering is simple: given an input image A, we want to create a new image B. 24.1.1 Filter Kernels: Image-to-Image Conversions We can use this speed to gain a variety of useful elements for filtering, such as filter kernels and gamma-correction lookups. In GPU shading languages, texture operators such as tex2D() are typically among the fastest operators, because unlike CPU shaders, GPU shaders don't manage the surrounding graphics state or disk system. This is opposite to the situation in a GPU. In languages such as the RenderMan shading language, texture() is typically one of the most expensive operators. GPU shading programs are different from CPU shading programs in one key aspect: generally, the CPU is faster at math operations than texturing. When hardware filtering is unavailable, or when we need the utmost in image quality, we can use pixel-shading code to perform any arbitrary filter. Other filtering methods are available, and they are needed for some kinds of imaging applications. Modern graphics hardware can deliver mipmapped texture access at very high speeds, but only by using a linear filtering method. In some applications, quality filtering is crucial. Hybrid filtering approaches, which use hardware texture units alongside analytical shading, can offer an optimal middle path. Understanding this transformation is key to drawing antialiased images. The same considerations used for filtering images apply also to 3D rendering, especially when models are textured: we are transforming 3D data (and potentially texture information) into a new 2D image. Understanding the quality and speed trade-offs between hardware and procedural filtering is crucial for these applications. For many applications, building your own image-filtering method provides greater quality and flexibility. GPU hardware can provide fast, filtered access to textures, but not for every texel format, and only with a few restrictive types of texture filtering. The CD content, including demos and content, is available on the web and for download. You can purchase a beautifully printed version of this book, and others in the series, at a 30% discount courtesy of InformIT and Addison-Wesley. GPU Gems GPU Gems is now available, right here, online.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |