Advertisement
Advertisement

More Related Content

Advertisement
Advertisement

CS 354 Texture Mapping

  1. CS 354 Texture Mapping Mark Kilgard University of Texas February 23, 2012
  2. Textured Polygonal Models + Result Key-frame model geometry Decal skin
  3. Multiple Textures for Involved Shading Key-frame model geometry Decal skin texture Bump skin texture Gloss skin texture +
  4. Shadow Mapping Explained Planar distance from light Depth map projected onto scene ≤ = less than True “un-shadowed” region shown green equals
  5. Texture in the Context of the OpenGL Graphics Pipeline vertex processing rasterization & fragment coloring texture raster operations framebuffer pixel unpack pixel pack vertex puller client memory pixel transfer glReadPixels / glCopyPixels / glCopyTex{Sub}Image glDrawPixels glBitmap glCopyPixels glTex{Sub}Image glCopyTex{Sub}Image glDrawElements glDrawArrays selection / feedback / transform feedback glVertex* glColor* glTexCoord* etc. blending depth testing stencil testing accumulation storage access operations Image (Pixel) Processing Geometry (Vertex) Processing
  6. Simple Texture Mapping glBegin ( GL_TRIANGLES ); glTexCoord2f (0, 0); glVertex2f (-0.8, 0.8); glTexCoord2f (1, 0); glVertex2f (0.8, 0.8); glTexCoord2f (0.5, 1); glVertex2f (0.0, -0.8); glEnd (); + glTexCoord2f like glColor4f but sets “current” texture coordinate instead of color glMultiTexCoord2f takes texture unit parameter so glMultiTexCoord2f ( GL_TEXTURE0 , s,t) same as glTexCoord2f (s,t) ST = (0,0) ST = (1,1)
  7. Texture Coordinates Assigned at Each Vertex XYZ = (0,-0.8) ST = (0.5,1) XYZ = (0.8,0.8) ST = (1,0) XYZ = (-0.8,0.8) ST = (0,0)
  8. Anatomy of a Texture Fetch Filtered texel vector Texel Selection Texel Combination Texel offsets Texel data Texture images Combination parameters Texture parameters
  9. Environment Mapping via Texture Cube Maps Access texture by surface reflection vector
  10. More Cube Mapping
  11. Dynamic Cube Map Textures Rendered scene Dynamically created cube map image Image credit: “Guts” GeForce 2 GTS demo, Thant Thessman
  12. Mipmap Texture Filtering E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 point sampling mipmapped point sampling mipmapped linear filtering linear filtering
  13. Medium-Level Dissection of a Texture Fetch Convert texel coords to texel offsets integer / fixed-point texel combination texel offsets texel data texture images combination parameters interpolated texture coords vector texture parameters Convert texture coords to texel coords filtered texel vector texel coords floor / frac integer coords & fractional weights floating-point scaling and combination integer / fixed-point texel intermediates
Advertisement