SlideShare une entreprise Scribd logo
1  sur  16
TEXTURING
2014DEFINITION
 Texture – A bitmap buffer in memory, usually containing color data
 Textures are used for showing better realism in scenes
GFX2014 Advanced Graphics Workshop, Bangalore
TEXTURES FOR REALISM
3
2014TEXTURING 3D OBJECTS
 Mapping from a bitmap to a 3D object involves matching the texture coordinates
to the object surface
 Texture coordinates are calculated along with the vertex coordinates
 3D tools output Texture coordinates along with vertex information, for the scene
Approach of data transfers
2014
CORRECT APPROACH OF DATA
TRANSFERS
1. Generate Object (ex, glGenBuffers, glGenTextures)
2. Bind Object to an ID “xyz” (glBindBuffer(xyz), ..)
3. Transfer data to Object (glBufferData, glTexImage2D)
4. Unbind (glBindBuffer(0))
  After this point, the data remains bound to “xyz” and is managed by GPU.
 Can be accessed later by referencing “xyz”
  Applies to VBOs, Textures, …
 Note the implicit “no atomicity” – needs locking
 Pixel Buffer Objects and performance
subTexImage2D
2014HOW TO UPDATE REGIONS ?
 It is possible to update selected regions of already uploaded textures
 Using glTexSubImage2D
 In embedded systems, not used widely
 Performance implications of read-back path
 Remember the client-server paradigm
6
Texture formats
2014TEXTURING BASICS
 Texture Formats available
 RGB* formats, Luminance only formats
 Relevance of YUV
 Texture Filtering
 Maps texture coordinates to object coordinates – think of wrapping cloth over object
 Mipmaps
 Local optimisation – use pre-determined “reduced” size images, if object is far away
from viewer – as compared to filtering full image
 Objective is to reduce bandwidth, not necessarily higher quality
 Application can generate and pass through TexImage2D() for multiple levels
 GPU can generate using GenerateMipMap()
 Occupies more memory
Uv mapping
2014TEXTURING 2D OBJECTS
 Mapping from a bitmap to a rectangle is
straightforward
 0:1 range maps to 0:1 of object size
 TexParameter determines filtering mode
 TexParameter determines REPEAT
 TexCoordinates determine if texture extends to
full size of object or not
S,T = {0:1}
Upscaled
Texcoords {0:10}
+ REPEAT
texture
object
Non-image textures
2014NON-IMAGE TEXTURES
 Textures need not be image data
 Textures can be used to pass per-pixel “attributes” to the fragment shaders
 Bump-maps and similar techniques for passing normal information
 light-maps for lighting information
 ….
9
compression
2014TEXTURE COMPRESSION TYPES
 GLES spec supports RGBA textures, Luminance …
 To reduce memory bandwidth, compression used
 Texture Compression major types
 PVRTC, ETC1, Others
 Android primarily supports ETC1
 iOS supports PVRTC (and no other)
 Extension support queryable using GL API queries
 How to store this information in an uniform manner ?
 Texture file formats
 PVRTC (using Textool converter from IMG) commonly used
 KTX file format
KTX
2014KHRONOS KTX FILE FORMAT
 To render a texture, steps to be used today:
 Application needs apriori knowledge of texture type, format, storage type, mipmap
levels, and filename or the buffer data itself
 Then load into server using TexImage2D()
 Proprietary formats exist to separate this application+texture dependency –
 ex, PVRT from IMG
 ETC from Ericsson
 KTX file format from Khronos is a standard way to store texture information, and
the texture itself
 See next slide for structure of the file
 http://www.khronos.org/opengles/sdk/tools/KTX/
2014KTX FORMAT …
Passing coords
2014TEXTURE COORDINATES TO GPU
 Texture coordinates are passed to GPU as “Attributes” along with the vertices
 Gen-bind-bufferdata, then bindAttrib
 Quiz:
 When does the binding actually come into effect ?
WebGL/Textures
2014NOTE ON WEBGL AND TEXTURES
 Because of the way file loads work on browsers (asynchronous), texture loading
may not happen before the actual draw
 Expect black screen for a very short-while till the Texture image loads from the
website
 On native applications, due to the synchronous nature of loading the texture this
issue will not be present
Programming
PROGRAMMING WITH TEXTURES
 bindTexture
 pixelStorei (webGL only)
 UNPACK_FLIP_Y_WEBGL
 texImage2D
 texParameteri
 TEXTURE_MAG_FILTER
 TEXTURE_MIN_FILTER
 Note: WebGL “null” binding instead of
“0”
 Point Textures
 Rectangular Texture
2014LAB L2 - TEXTURING

Contenu connexe

Tendances

NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Mark Kilgard
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsPrabindh Sundareson
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsMark Kilgard
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 IntroductionMark Kilgard
 
GFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usageGFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usagePrabindh Sundareson
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing StuffMark Kilgard
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsHolger Gruen
 
vkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APIvkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APITristan Lorach
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
FlameWorks GTC 2014
FlameWorks GTC 2014FlameWorks GTC 2014
FlameWorks GTC 2014Simon Green
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012Mark Kilgard
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardwarestefan_b
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering Mark Kilgard
 
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsGFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsPrabindh Sundareson
 
Computer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLComputer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLSharath Raj
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012Mark Kilgard
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectanglesMark Kilgard
 

Tendances (20)

OpenGL 4 for 2010
OpenGL 4 for 2010OpenGL 4 for 2010
OpenGL 4 for 2010
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI Platforms
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
GFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usageGFX part 8 - Three.js introduction and usage
GFX part 8 - Three.js introduction and usage
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked Lists
 
vkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APIvkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan API
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
FlameWorks GTC 2014
FlameWorks GTC 2014FlameWorks GTC 2014
FlameWorks GTC 2014
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering
 
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsGFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
 
Computer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLComputer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGL
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
 

En vedette

John Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual RealityJohn Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual RealityPrabindh Sundareson
 
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ESGFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ESPrabindh Sundareson
 
GFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGLGFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGLPrabindh Sundareson
 
GFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ESGFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ESPrabindh Sundareson
 
Technology, Innovation - A Perspective
Technology, Innovation - A PerspectiveTechnology, Innovation - A Perspective
Technology, Innovation - A PerspectivePrabindh Sundareson
 
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESGFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESPrabindh Sundareson
 
IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)Prabindh Sundareson
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading LanguageJungsoo Nam
 

En vedette (9)

Open Shading Language (OSL)
Open Shading Language (OSL)Open Shading Language (OSL)
Open Shading Language (OSL)
 
John Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual RealityJohn Carmack talk at SMU, April 2014 - Virtual Reality
John Carmack talk at SMU, April 2014 - Virtual Reality
 
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ESGFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
 
GFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGLGFX Part 3 - Vertices and interactions in OpenGL
GFX Part 3 - Vertices and interactions in OpenGL
 
GFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ESGFX Part 5 - Introduction to Object Transformations in OpenGL ES
GFX Part 5 - Introduction to Object Transformations in OpenGL ES
 
Technology, Innovation - A Perspective
Technology, Innovation - A PerspectiveTechnology, Innovation - A Perspective
Technology, Innovation - A Perspective
 
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESGFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
 
IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)IEEE - Consumer Electronics Trends Opportunities (2015)
IEEE - Consumer Electronics Trends Opportunities (2015)
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
 

Similaire à GFX Part 4 - Introduction to Texturing in OpenGL ES

CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture MappingMark Kilgard
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_openglManas Nayak
 
View-Dependent Texture Atlases (EG 2010)
View-Dependent Texture Atlases (EG 2010)View-Dependent Texture Atlases (EG 2010)
View-Dependent Texture Atlases (EG 2010)Matthias Trapp
 
ShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objectsShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objectsRonny Burkersroda
 
mago3D: Let's integrate BIM and 3D GIS on top of FOSS4G
mago3D: Let's integrate BIM and 3D GIS on top of FOSS4Gmago3D: Let's integrate BIM and 3D GIS on top of FOSS4G
mago3D: Let's integrate BIM and 3D GIS on top of FOSS4GSANGHEE SHIN
 
Opengl texturing
Opengl texturingOpengl texturing
Opengl texturingSardar Alam
 
Dynamic Mapping of Raster Data (IV 2009)
Dynamic Mapping of Raster Data (IV 2009)Dynamic Mapping of Raster Data (IV 2009)
Dynamic Mapping of Raster Data (IV 2009)Matthias Trapp
 
Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)Matthias Trapp
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APITomi Aarnio
 
Patchwork3 D Datasheet January 2009
Patchwork3 D Datasheet January 2009Patchwork3 D Datasheet January 2009
Patchwork3 D Datasheet January 2009CAM3DRT
 
Mirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMeetupDataScienceRoma
 
Algorithms and tools for point cloud generation
Algorithms and tools for point cloud generationAlgorithms and tools for point cloud generation
Algorithms and tools for point cloud generationRadhe Syam
 
Application of 3d max for 3d development and rendering and its merits
Application of 3d max for 3d development and rendering and its merits Application of 3d max for 3d development and rendering and its merits
Application of 3d max for 3d development and rendering and its merits Bismi S
 
The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014Jarosław Pleskot
 
HANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVM
HANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVMHANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVM
HANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVMsipij
 
Handwritten Digit Recognition System based on CNN and SVM
Handwritten Digit Recognition System based on CNN and SVMHandwritten Digit Recognition System based on CNN and SVM
Handwritten Digit Recognition System based on CNN and SVMsipij
 

Similaire à GFX Part 4 - Introduction to Texturing in OpenGL ES (20)

CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_opengl
 
Texture Mapping
Texture Mapping Texture Mapping
Texture Mapping
 
View-Dependent Texture Atlases (EG 2010)
View-Dependent Texture Atlases (EG 2010)View-Dependent Texture Atlases (EG 2010)
View-Dependent Texture Atlases (EG 2010)
 
ShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objectsShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objects
 
mago3D: Let's integrate BIM and 3D GIS on top of FOSS4G
mago3D: Let's integrate BIM and 3D GIS on top of FOSS4Gmago3D: Let's integrate BIM and 3D GIS on top of FOSS4G
mago3D: Let's integrate BIM and 3D GIS on top of FOSS4G
 
Opengl texturing
Opengl texturingOpengl texturing
Opengl texturing
 
Dynamic Mapping of Raster Data (IV 2009)
Dynamic Mapping of Raster Data (IV 2009)Dynamic Mapping of Raster Data (IV 2009)
Dynamic Mapping of Raster Data (IV 2009)
 
Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)Rendering of Complex 3D Treemaps (GRAPP 2013)
Rendering of Complex 3D Treemaps (GRAPP 2013)
 
A0280105
A0280105A0280105
A0280105
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
Patchwork3 D Datasheet January 2009
Patchwork3 D Datasheet January 2009Patchwork3 D Datasheet January 2009
Patchwork3 D Datasheet January 2009
 
Mirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image Processing
 
OpenGL L05-Texturing
OpenGL L05-TexturingOpenGL L05-Texturing
OpenGL L05-Texturing
 
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
 
Algorithms and tools for point cloud generation
Algorithms and tools for point cloud generationAlgorithms and tools for point cloud generation
Algorithms and tools for point cloud generation
 
Application of 3d max for 3d development and rendering and its merits
Application of 3d max for 3d development and rendering and its merits Application of 3d max for 3d development and rendering and its merits
Application of 3d max for 3d development and rendering and its merits
 
The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014
 
HANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVM
HANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVMHANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVM
HANDWRITTEN DIGIT RECOGNITION SYSTEM BASED ON CNN AND SVM
 
Handwritten Digit Recognition System based on CNN and SVM
Handwritten Digit Recognition System based on CNN and SVMHandwritten Digit Recognition System based on CNN and SVM
Handwritten Digit Recognition System based on CNN and SVM
 

Plus de Prabindh Sundareson

Synthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in RoboticsSynthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in RoboticsPrabindh Sundareson
 
Machine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM InstituteMachine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM InstitutePrabindh Sundareson
 
ICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program OutlineICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program OutlinePrabindh Sundareson
 
Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017Prabindh Sundareson
 
GFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU ProgrammingGFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU ProgrammingPrabindh Sundareson
 
Gfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manualGfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manualPrabindh Sundareson
 
ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0Prabindh Sundareson
 
Yocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335xYocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335xPrabindh Sundareson
 
ARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniquesARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniquesPrabindh Sundareson
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoPrabindh Sundareson
 
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xMoksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xPrabindh Sundareson
 

Plus de Prabindh Sundareson (20)

Synthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in RoboticsSynthetic Data and Graphics Techniques in Robotics
Synthetic Data and Graphics Techniques in Robotics
 
Work and Life
Work and Life Work and Life
Work and Life
 
GPU Algorithms and trends 2018
GPU Algorithms and trends 2018GPU Algorithms and trends 2018
GPU Algorithms and trends 2018
 
Machine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM InstituteMachine learning in the Indian Context - IEEE talk at SRM Institute
Machine learning in the Indian Context - IEEE talk at SRM Institute
 
Students Hackathon - 2017
Students Hackathon - 2017Students Hackathon - 2017
Students Hackathon - 2017
 
ICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program OutlineICCE Asia 2017 - Program Outline
ICCE Asia 2017 - Program Outline
 
Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017Call for Papers - ICCE Asia 2017
Call for Papers - ICCE Asia 2017
 
GFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU ProgrammingGFX Part 2 - Introduction to GPU Programming
GFX Part 2 - Introduction to GPU Programming
 
GFX2014 OpenGL ES Quiz
GFX2014 OpenGL ES QuizGFX2014 OpenGL ES Quiz
GFX2014 OpenGL ES Quiz
 
Gfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manualGfx2014 Graphics Workshop - Lab manual
Gfx2014 Graphics Workshop - Lab manual
 
Render to Texture with Three.js
Render to Texture with Three.jsRender to Texture with Three.js
Render to Texture with Three.js
 
ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0ANGLE on Windows for OpenGLES2.0
ANGLE on Windows for OpenGLES2.0
 
Yocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335xYocto usage for Graphics SDK on AM335x
Yocto usage for Graphics SDK on AM335x
 
Gfx2013 lab manual
Gfx2013 lab manualGfx2013 lab manual
Gfx2013 lab manual
 
ARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniquesARM Linux Embedded memory protection techniques
ARM Linux Embedded memory protection techniques
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with Yocto
 
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335xMoksha - HTML5/CSS with Qt5+Snowshoe on AM335x
Moksha - HTML5/CSS with Qt5+Snowshoe on AM335x
 
Qt5.0.0 eglfs abort issue
Qt5.0.0 eglfs abort issueQt5.0.0 eglfs abort issue
Qt5.0.0 eglfs abort issue
 
Cache profiling on ARM Linux
Cache profiling on ARM LinuxCache profiling on ARM Linux
Cache profiling on ARM Linux
 
Qt5 beta1 on ti platforms
Qt5 beta1 on ti platformsQt5 beta1 on ti platforms
Qt5 beta1 on ti platforms
 

Dernier

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Dernier (20)

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

GFX Part 4 - Introduction to Texturing in OpenGL ES

  • 2. 2014DEFINITION  Texture – A bitmap buffer in memory, usually containing color data  Textures are used for showing better realism in scenes GFX2014 Advanced Graphics Workshop, Bangalore
  • 4. 2014TEXTURING 3D OBJECTS  Mapping from a bitmap to a 3D object involves matching the texture coordinates to the object surface  Texture coordinates are calculated along with the vertex coordinates  3D tools output Texture coordinates along with vertex information, for the scene Approach of data transfers
  • 5. 2014 CORRECT APPROACH OF DATA TRANSFERS 1. Generate Object (ex, glGenBuffers, glGenTextures) 2. Bind Object to an ID “xyz” (glBindBuffer(xyz), ..) 3. Transfer data to Object (glBufferData, glTexImage2D) 4. Unbind (glBindBuffer(0))   After this point, the data remains bound to “xyz” and is managed by GPU.  Can be accessed later by referencing “xyz”   Applies to VBOs, Textures, …  Note the implicit “no atomicity” – needs locking  Pixel Buffer Objects and performance subTexImage2D
  • 6. 2014HOW TO UPDATE REGIONS ?  It is possible to update selected regions of already uploaded textures  Using glTexSubImage2D  In embedded systems, not used widely  Performance implications of read-back path  Remember the client-server paradigm 6 Texture formats
  • 7. 2014TEXTURING BASICS  Texture Formats available  RGB* formats, Luminance only formats  Relevance of YUV  Texture Filtering  Maps texture coordinates to object coordinates – think of wrapping cloth over object  Mipmaps  Local optimisation – use pre-determined “reduced” size images, if object is far away from viewer – as compared to filtering full image  Objective is to reduce bandwidth, not necessarily higher quality  Application can generate and pass through TexImage2D() for multiple levels  GPU can generate using GenerateMipMap()  Occupies more memory Uv mapping
  • 8. 2014TEXTURING 2D OBJECTS  Mapping from a bitmap to a rectangle is straightforward  0:1 range maps to 0:1 of object size  TexParameter determines filtering mode  TexParameter determines REPEAT  TexCoordinates determine if texture extends to full size of object or not S,T = {0:1} Upscaled Texcoords {0:10} + REPEAT texture object Non-image textures
  • 9. 2014NON-IMAGE TEXTURES  Textures need not be image data  Textures can be used to pass per-pixel “attributes” to the fragment shaders  Bump-maps and similar techniques for passing normal information  light-maps for lighting information  …. 9 compression
  • 10. 2014TEXTURE COMPRESSION TYPES  GLES spec supports RGBA textures, Luminance …  To reduce memory bandwidth, compression used  Texture Compression major types  PVRTC, ETC1, Others  Android primarily supports ETC1  iOS supports PVRTC (and no other)  Extension support queryable using GL API queries  How to store this information in an uniform manner ?  Texture file formats  PVRTC (using Textool converter from IMG) commonly used  KTX file format KTX
  • 11. 2014KHRONOS KTX FILE FORMAT  To render a texture, steps to be used today:  Application needs apriori knowledge of texture type, format, storage type, mipmap levels, and filename or the buffer data itself  Then load into server using TexImage2D()  Proprietary formats exist to separate this application+texture dependency –  ex, PVRT from IMG  ETC from Ericsson  KTX file format from Khronos is a standard way to store texture information, and the texture itself  See next slide for structure of the file  http://www.khronos.org/opengles/sdk/tools/KTX/
  • 13. 2014TEXTURE COORDINATES TO GPU  Texture coordinates are passed to GPU as “Attributes” along with the vertices  Gen-bind-bufferdata, then bindAttrib  Quiz:  When does the binding actually come into effect ? WebGL/Textures
  • 14. 2014NOTE ON WEBGL AND TEXTURES  Because of the way file loads work on browsers (asynchronous), texture loading may not happen before the actual draw  Expect black screen for a very short-while till the Texture image loads from the website  On native applications, due to the synchronous nature of loading the texture this issue will not be present Programming
  • 15. PROGRAMMING WITH TEXTURES  bindTexture  pixelStorei (webGL only)  UNPACK_FLIP_Y_WEBGL  texImage2D  texParameteri  TEXTURE_MAG_FILTER  TEXTURE_MIN_FILTER  Note: WebGL “null” binding instead of “0”  Point Textures  Rectangular Texture
  • 16. 2014LAB L2 - TEXTURING