opengl l05-texturing
DESCRIPTION
OpenGL L05-TexturingTRANSCRIPT
![Page 1: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/1.jpg)
Mohammad Shaker
mohammadshaker.com
@ZGTRShaker
2014
OpenGL Graphics
L05-Texturing
![Page 2: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/2.jpg)
Texturing
![Page 3: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/3.jpg)
that appears in a video game needs to be textured; this includes everything from plants
to people. If things aren’t textured well, your game just won’t look right.
![Page 4: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/4.jpg)
OpenGL Architecture
DisplayList
PolynomialEvaluator
Per VertexOperations &
PrimitiveAssembly
RasterizationPer Fragment
OperationsFrameBuffer
TextureMemory
CPU
PixelOperations
![Page 5: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/5.jpg)
OpenGL Architecture
DisplayList
PolynomialEvaluator
Per VertexOperations &
PrimitiveAssembly
RasterizationPer Fragment
OperationsFrameBuffer
TextureMemory
CPU
PixelOperations
![Page 6: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/6.jpg)
How to use a Texture?
• How to use a Texture?
1. Load the texture
2. Map it into a polygon
3. Draw the polygon
![Page 7: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/7.jpg)
How to use a Texture?
• How to use a Texture?
1. Load the texture
2. Map it into a polygon
3. Draw the polygon
• How to use a Texture? (OpenGL)1. Specify textures in texture objects
2. Set texture filter
3. Set texture function
4. Set texture wrap mode
5. Set optional perspective correction hint
6. Bind texture object
7. Enable texturing
8. Supply texture coordinates for vertex
• How OpenGL store images?– One image per texture object
– May be shared by several graphics contexts
![Page 8: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/8.jpg)
Textures Coordinates
![Page 9: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/9.jpg)
Textures Coordinates
![Page 10: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/10.jpg)
Texture Mapping
s
t
x
y
z
image
geometry
screen
![Page 11: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/11.jpg)
Textures Coordinates
![Page 12: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/12.jpg)
Textures Coordinates
![Page 13: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/13.jpg)
Textures Coordinates
s
t
1, 10, 1
0, 0 1, 0
(s, t) = (0.2, 0.8)
(0.4, 0.2)
(0.8, 0.4)
A
B C
a
b
c
Texture Space Object Space
![Page 14: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/14.jpg)
Textures Coordinates
![Page 15: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/15.jpg)
Texturing Functions
![Page 16: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/16.jpg)
Texturing Functions
• Generate texture names
glGenTextures(n, *texIds);
• Create texture objects with texture data and state
glBindTexture(target, id);
• Bind textures before using
glBindTexture(target, id);
• Define a texture image from an array of texels in CPU memory
glTexImage2D(target, level, components, w, h, border, format, type,
*texels);
• Texel colors are processed by pixel pipeline
– pixel scales, biases and lookups can be done
![Page 17: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/17.jpg)
Filter Modes
• Filter modes control how pixels are minified or magnified. Generally a color is
computed using the nearest texel or by a linear average of several texels.
• The filter type, above is one of GL_TEXTURE_MIN_FILTER or GL_TEXTURE_MAG_FILTER.
• The mode is one of GL_NEAREST, GL_LINEAR, or special modes for mipmapping.
Mipmapping modes are used for minification only, and have values of:
– GL_NEAREST_MIPMAP_NEAREST
– GL_NEAREST_MIPMAP_LINEAR
– GL_LINEAR_MIPMAP_NEAREST
– GL_LINEAR_MIPMAP_LINEAR
![Page 18: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/18.jpg)
Filter Modes
• Example: glTexParameteri(target, type, mode);
Texture Polygon
Magnification Minification
PolygonTexture
![Page 19: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/19.jpg)
Wrapping Mode
• Wrap mode determines what should happen if a texture coordinate lies outside of the [0,1] range.
• If the GL_REPEAT wrap mode is used, for texture coordinate values less than zero or greater than
one, the integer is ignored and only the fractional value is used.
• If the GL_CLAMP wrap mode is used, the texture value at the extreme (either 0 or 1) is used.
• Example:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT)
textureGL_REPEATwrapping
GL_CLAMPwrapping
s
t
![Page 20: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/20.jpg)
Texture Parameters
Read more: https://open.gl/textures
![Page 21: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/21.jpg)
Body Color When Textured
• glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
– resultColor = Body Color + Texture Color [By default]
• glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
– resultColor = Texture Color
• glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);
– resultColor = Texture Color + Blending
• GLfloat fColor[4] = { 0.0f, 0.0f, 0.0f, 1f };
• glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, fColor);
![Page 22: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/22.jpg)
TexturingSomething to pay attention for
![Page 23: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/23.jpg)
Something to pay attention for
• The image must be 24 bit (RGB)
• The image extension should be .bmp
• The image dimensions must be a power of 2 (2, 4, 8, 16, 32, 64, ..etc.)
– If dimensions of image are not power of 2 then scale:
• gluScaleImage(format, w_in, h_in, type_in, *data_in, w_out, h_out, type_out, *data_out);
*_in is for source image
*_out is for destination image
• White color should be assigned before drawing a textured object by setting:
glColor3f(1,1,1);
• You should call: glBindTexture(GL_TEXTURE_2D, textureID) between glBegin() and
glEnd()
![Page 24: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/24.jpg)
Texturing Example
![Page 25: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/25.jpg)
Texturing Example
• #include "texture.h”
• int imageTexId;
• InitGL()
– imageTexId = LoadTexture("images//tile.bmp");
• DrawGLScene()
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, imageTexId);
glScalef(5,5,1);
glBegin(GL_QUADS);
glTexCoord2f(1,0) ; glVertex3f(1,-1,1);
glTexCoord2f(1,1) ; glVertex3f(1,1,1);
glTexCoord2f(0,1) ; glVertex3f(-1,1,1);
glTexCoord2f(0,0) ; glVertex3f(-1,-1,1);
glEnd();
glDisable(GL_TEXTURE_2D);
![Page 26: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/26.jpg)
Texturing Example
• #include "texture.h”
• int imageTexId;
• InitGL()
– imageTexId = LoadTexture("images//tile.bmp");
• DrawGLScene()
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, imageTexId);
glScalef(5,5,1);
glBegin(GL_QUADS);
glTexCoord2f(1,0) ; glVertex3f(1,-1,1);
glTexCoord2f(1,1) ; glVertex3f(1,1,1);
glTexCoord2f(0,1) ; glVertex3f(-1,1,1);
glTexCoord2f(0,0) ; glVertex3f(-1,-1,1);
glEnd();
glDisable(GL_TEXTURE_2D);
![Page 27: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/27.jpg)
Texturing Example
• #include "texture.h”
• int imageTexId;
• InitGL()
– imageTexId = LoadTexture("images//tile.bmp");
• DrawGLScene()
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, imageTexId);
glScalef(5,5,1);
glBegin(GL_QUADS);
glTexCoord2f(1,0) ; glVertex3f(1,-1,1);
glTexCoord2f(1,1) ; glVertex3f(1,1,1);
glTexCoord2f(0,1) ; glVertex3f(-1,1,1);
glTexCoord2f(0,0) ; glVertex3f(-1,-1,1);
glEnd();
glDisable(GL_TEXTURE_2D);
![Page 28: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/28.jpg)
Texturing Example
• #include "texture.h”
• int imageTexId;
• InitGL()
– imageTexId = LoadTexture("images//tile.bmp");
• DrawGLScene()
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, imageTexId);
glScalef(5,5,1);
glBegin(GL_QUADS);
glTexCoord2f(1,0) ; glVertex3f(1,-1,1);
glTexCoord2f(1,1) ; glVertex3f(1,1,1);
glTexCoord2f(0,1) ; glVertex3f(-1,1,1);
glTexCoord2f(0,0) ; glVertex3f(-1,-1,1);
glEnd();
glDisable(GL_TEXTURE_2D);
![Page 29: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/29.jpg)
gluQuadricTexture
![Page 30: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/30.jpg)
gluQuadricTexture
+
![Page 31: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/31.jpg)
gluQuadricTexture
+ =
![Page 32: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/32.jpg)
gluQuadricTexture
![Page 33: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/33.jpg)
Blending
![Page 34: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/34.jpg)
Blending
• You can blend objects using:
– glBlendFunc(GLenum sfactor, GLenum dfactor);
• sfactor: is the source blend factor
• dfactor: is the destination blend factor
• Transparency is implemented using:
– “GL_SRC_ALPHA” for the source
– “GL_ONE_MINUS_SRC_ALPHA” for the destination
![Page 35: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/35.jpg)
Blending
• You can blend objects using:
– glBlendFunc(GLenum sfactor, GLenum dfactor);
• sfactor: is the source blend factor
• dfactor: is the destination blend factor
• Transparency is implemented using:
– “GL_SRC_ALPHA” for the source
– “GL_ONE_MINUS_SRC_ALPHA” for the destination
![Page 36: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/36.jpg)
OpenGL Architecture
DisplayList
PolynomialEvaluator
Per VertexOperations &
PrimitiveAssembly
RasterizationPer Fragment
OperationsFrameBuffer
TextureMemory
CPU
PixelOperations
![Page 37: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/37.jpg)
OpenGL Architecture
DisplayList
PolynomialEvaluator
Per VertexOperations &
PrimitiveAssembly
RasterizationPer Fragment
OperationsFrameBuffer
TextureMemory
CPU
PixelOperations
![Page 38: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/38.jpg)
Blending
• Combine pixels with what’s in already in the framebuffer
glBlendFunc(src, dst )
FramebufferPixel (dst)
BlendingEquation
Fragment(src)
BlendedPixel
pfr CdstCsrcC
![Page 39: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/39.jpg)
Transparency with .tga (32 bit)
![Page 40: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/40.jpg)
Transparency with .tga
+ =
![Page 41: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/41.jpg)
Transparency with .tga
+ =
One .tga File
![Page 42: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/42.jpg)
Add Transparency with .tga
• #include "tgaLoader.h”
• TGAImage grassImage;
• InitGL ()
– glEnable(GL_TEXTURE_2D);
– grassImage = LoadTGA(“images//grass.tga");
• DrawGLScene ()
glBindTexture(GL_TEXTURE_2D , grassImage.texID);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA);
glBegin(GL_QUADS);
glTexCoord2f(1,0); glVertex3f(5,-5,0);
glTexCoord2f(1,1); glVertex3f(5,5,0);
glTexCoord2f(0,1); glVertex3f(-5,5,0);
glTexCoord2f(0,0); glVertex3f(-5,-5,0);
glEnd();
glDisable(GL_BLEND);
![Page 43: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/43.jpg)
Add Transparency with .tga
• #include "tgaLoader.h”
• TGAImage grassImage;
• InitGL ()
– glEnable(GL_TEXTURE_2D);
– grassImage = LoadTGA(“images//grass.tga");
• DrawGLScene ()
glBindTexture(GL_TEXTURE_2D , grassImage.texID);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA);
glBegin(GL_QUADS);
glTexCoord2f(1,0); glVertex3f(5,-5,0);
glTexCoord2f(1,1); glVertex3f(5,5,0);
glTexCoord2f(0,1); glVertex3f(-5,5,0);
glTexCoord2f(0,0); glVertex3f(-5,-5,0);
glEnd();
glDisable(GL_BLEND);
![Page 44: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/44.jpg)
Add Transparency with .tga
• #include "tgaLoader.h”
• TGAImage grassImage;
• InitGL ()
– glEnable(GL_TEXTURE_2D);
– grassImage = LoadTGA(“images//grass.tga");
• DrawGLScene ()
glBindTexture(GL_TEXTURE_2D , grassImage.texID);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA);
glBegin(GL_QUADS);
glTexCoord2f(1,0); glVertex3f(5,-5,0);
glTexCoord2f(1,1); glVertex3f(5,5,0);
glTexCoord2f(0,1); glVertex3f(-5,5,0);
glTexCoord2f(0,0); glVertex3f(-5,-5,0);
glEnd();
glDisable(GL_BLEND);
![Page 45: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/45.jpg)
Add Transparency with .tga
![Page 46: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/46.jpg)
Transparency with .tga (32 bit)Something to pay attention for, again
![Page 47: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/47.jpg)
Something to pay attention for, again
• The image must be 24 bit (RGB)
• The image extension should be .bmp
• The image dimensions must be a power of 2 (2, 4, 8, 16, 32, 64, ..etc.) or scale.
• White color should be assigned before drawing a textured object by setting:
glColor3f(1,1,1);
• You should call: glBindTexture(GL_TEXTURE_2D, textureID) between
glBegin() and glEnd()
• Additional stuff when you use transparency with .tga
– The image must be 32 bit (RGB)
– The image extension should be .tga
– In InitGL(), You must load .tga files LAST
– In DrawGLScene(), you must draw the transparent objects LAST
![Page 48: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/48.jpg)
Texture Tilling
![Page 49: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/49.jpg)
Texture TillingTiling is a very simple effect that creates a repeating pattern of
an image on the surface of a primitive object
![Page 50: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/50.jpg)
Texture Tilling
Using a small image to cover a large surface makes tiling a useful way to increase the performance of your textures and decrease the size of your image files.
![Page 51: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/51.jpg)
Texture Tilling, How toSimply set the texture coordinates larger than 1
as many time as you want the texture to be tilled
![Page 52: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/52.jpg)
Billboarding
![Page 53: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/53.jpg)
Billboarding
![Page 54: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/54.jpg)
Mipmapping
![Page 55: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/55.jpg)
Mipmappingmultum in parvo (mip): many things in a small place
![Page 56: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/56.jpg)
Mipmapped Textures
• Mipmap allows for prefiltered texture maps of decreasing resolutions
• Lessens interpolation errors for smaller textured objects
• Declare mipmap level during texture definition
glTexImage*D(GL_TEXTURE_*D, level, …)
• GLU mipmap builder routines
gluBuild*DMipmaps()
![Page 57: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/57.jpg)
2D Texture and 3D Texture?http://gamedev.stackexchange.com/questions/9668/what-are-3d-textures
![Page 58: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/58.jpg)
2D Texture and 3D Texture
• All we have used so far are 2D textures mapped on a 3D coordinates.
• So what’s a 3D texture?!
– 3D texture (or sometimes called “Volume textures”) works like regular 2D texture but it is truly
3D. 2D textures has UV coordinates, 3D has UVW coordinates
![Page 59: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/59.jpg)
Textures Coordinates
• Texture coordinates are named s, t, r, and q
![Page 60: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/60.jpg)
2D Texture and 3D Texture
• 3D textures are used in:
– Textures mapped into a model vertices
– volumetric effects in games (fire, smoke, light rays, realistic fog)
– caching light for realtime global illumination (CryEngine for example)
– scientific (MRI, CT scans are saved into volumes)
![Page 61: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/61.jpg)
2D Texture and 3D Texture
• Watch Nvidia smoke box in a XFX 9600gt
– https://www.youtube.com/watch?v=9AS4xV-CK14
![Page 62: OpenGL L05-Texturing](https://reader034.vdocuments.net/reader034/viewer/2022050804/54b4daa64a795957648b4595/html5/thumbnails/62.jpg)
2D Texture and 3D Texture
• Watch Global illumination in CryEngine 3 Tech Trailer (HD)
– https://www.youtube.com/watch?v=Pq39Xb7OdH8