1.10. 纹理 Texturing

简介: 1.10. 纹理 Texturing The area of texture mapping is one of the more complex areas of the OpenGL API.

1.10. 纹理 Texturing


The area of texture mapping is one of the more complex areas of the OpenGL API. It has been

extended more often than most of the other areas of OpenGL primarily because this was the

area of graphics for which hardware was the least mature when OpenGL was defined in the

early 1990s. The programmability added through the OpenGL Shading Language in OpenGL 2.0

makes this area much more straightforward, but the existing OpenGL APIs are still used to

create, modify, and define the behavior of textures. This section describes the texturing

functionality as it existed for OpenGL 1.5. Some significant changes have been made to this

model by OpenGL 2.0, particularly to the concept of texture units, and are described later in

this book.

OpenGL currently supports four basic types of texture maps: onedimensional, two-dimensional,

three-dimensional, and cube maps. (Only one- and two-dimensional textures were supported in

OpenGL 1.0.) A 1D TEXTURE is an array containing width pixel values, a 2D TEXTURE is an array

containing width x height pixel values, and a 3D TEXTURE is an array containing width x height x

depth pixel values. A CUBE MAP TEXTURE contains six two-dimensional textures: one for each major

axis direction (i.e., ±x, ±y, and ±z).

OpenGL has the notion of a TEXTURE UNIT. A texture unit corresponds to the underlying piece of

graphics hardware that performs the various texturing operations. With OpenGL 1.3, support

was added for multiple texture units. Each texture unit maintains the following state for

performing texturing operations:

目录
相关文章
|
6月前
|
存储 vr&ar 图形学
如何设置3D模型法线贴图?
如何设置3D模型法线贴图?
67 0
|
7月前
|
存储 编解码 算法
凹凸贴图和法线贴图的区别
凹凸贴图适用于一些简单的凹凸效果,而法线贴图则更适合提供更高精度和真实感的凹凸纹理效果
173 1
|
6月前
|
图形学 容器
材质、纹理、贴图的区别和关联
材质和纹理是相互配合使用的,材质定义了物体的属性,纹理贴图则通过提供具体的颜色和纹理信息来赋予模型真实感和细节效果。
119 0
|
9月前
使用纹理滤波器对图像进行纹理分割
说明如何根据纹理识别和分割区域。
42 0
|
4月前
|
计算机视觉
纹理特征
纹理特征
40 1
|
6月前
|
存储 数据可视化 开发者
位移贴图和法线贴图的区别
位移贴图和法线贴图在原理、使用范围、精度和复杂度、生成方式以及存储方式等方面存在差异,开发者可以根据具体需求选择适合的贴图技术。
116 0
|
10月前
【Three.js入门】纹理及其常用属性、透明纹理、环境遮挡贴图与强度
【Three.js入门】纹理及其常用属性、透明纹理、环境遮挡贴图与强度
294 0
|
10月前
【Three.js入门】标准网格材质、置换贴图、粗糙度贴图、金属贴图、法线贴图
【Three.js入门】标准网格材质、置换贴图、粗糙度贴图、金属贴图、法线贴图
286 0
|
前端开发 数据可视化
【视觉基础篇】13 # 如何给简单的图案添加纹理和复杂滤镜?
【视觉基础篇】13 # 如何给简单的图案添加纹理和复杂滤镜?
65 0
【视觉基础篇】13 # 如何给简单的图案添加纹理和复杂滤镜?