Introduction to OpenGL ES 3.0 Eisaku Ohbuchi Digital Media Professionals Inc. 2012 Digital Media Professionals Inc. All rights reserved. 12/Sep/2012 Page 1
Agenda DMP overview (quick!) OpenGL ES 3.0 update 2012 Digital Media Professionals Inc. All rights reserved. Page 2
DMP SMAPH-S Now Supports OpenGL ES 3.0 DMP is the leading graphics IP core provider for computer vision, image processing and mobile gaming applications Nintendo3DS and Nintendo3DS XL 5 out of TOP7 Global Camera OEMs are licensing DMP Graphics IP for: - High quality 3D graphics rendering - Fast 2D-vector graphics rendering for UIs - Camera image texture streaming - Camera image processing DMP SMAPH-S and PICA200 Graphics IP Family is used for these devices and use cases OpenGL ES 1.1, ES 2.0 and NOW ES 3.0 ES 3.0 enables NG visually intensive apps in mobile gaming and imaging apps SMAPH-S provides clear PPA-leadership (Power-Performance-Area) Digital Media Professionals Inc. CONFIDENTIAL 2012 Digital Media Professionals Inc. All rights reserved. Page 3
Photo realistic 3D graphics IP core (OpenGL ES 1.1 + DMP Maestro extensions) PICA200 DMP graphics/computing IP lineup Standard 3D graphics/computing IP core PICA200Lite (OpenGL ES 1.1 ) SMAPH-S (OpenGL ES 3.0 ) OpenVG1.1 vector graphics IP core SMAPH-F Digital Media Professionals Inc. CONFIDENTIAL Standard VG/3D graphics IP core SMAPH-H (OpenGL ES 1.1, OpenVG1.1 ) SMAPH-H2 (OpenGL ES 3.0, OpenVG1.1 ) 2012 Digital Media Professionals Inc. All rights reserved. Page 4
Khronos update in SIGGRAPH 2012 and OpenGL ES 3.0 2012 Digital Media Professionals Inc. All rights reserved. Page 5
Khronos News at SIGGRAPH 2012 OpenGL ES 3.0 specification released - Major functionality and portability update to the leading API for mobile graphics OpenGL 4.3 released and immediately available - Significant upgrade including compute shaders Texture compression common technology for OpenGL and OpenGL ES - Technology pipeline of ETC2 in core and ASTC as extension CLU Utility Open Source Project for OpenCL - Reduce time to first OpenCL program from two days to less than one hour COLLADA Community Momentum and is now an ISO Standard! - Open source OpenCOLLADA importer/exporter and conformance test suite New vision acceleration and sensor fusion working groups - OpenVL and StreamInput to process camera and sensor inputs Copyright Khronos Group 2012 Page 6
Khronos Connects Software to Silicon Khronos APIs define processor acceleration capabilities - Graphics, video, audio, compute, vision and sensor processing APIs developed today define the functionality of platforms and devices tomorrow Copyright Khronos Group 2012 Page 7
APIs BY the Industry FOR the Industry Khronos standards have strong industry momentum - 100s of man years invested by industry leading experts - Shipping on billions of devices and multiple operating systems Khronos is OPEN for any company to join and participate - Standards are truly open one company, one vote - Solid legal and Intellectual Property framework for industry cooperation - Khronos membership fees to cover expenses Khronos APIs define core device acceleration functionality - Low-level Foundation functionality needed on every platform - Rigorous conformance tests for cross-vendor consistency They are FREE - Members agree to not request royalties Silicon Software Copyright Khronos Group 2012 Page 8
Apple Over 100 members any company worldwide is welcome to join Board of Promoters Copyright Khronos Group 2012 Page 9
Announcing OpenGL ES 3.0 Copyright Khronos Group 2012 Page 10
Looking Back SIGGRAPH 2002 - OpenGL ES Working Group formed SIGGRAPH 2003 - OpenGL ES 1.0 specification released SIGGRAPH 2004 - OpenGL ES 1.1 specification released GDC 2007 - OpenGL ES 2.0 specification released Copyright Khronos Group 2012 Page 11
Looking Back continued 2007/8 - OpenGL ES 1.x platforms launch 2009/10 - OpenGL ES 2.0 platforms launch 2011: High-end 3D content comes to mobile Copyright Khronos Group 2012 Page 12
OpenGL 20 th Birthday - Then and Now Ideas in Motion - SGI Rage -id Software 1992 Reality Engine 8 Geometry Engines 4 Raster Manager boards 2012 Mobile NVIDIA Tegra 3 Nexus 7 Android Tablet 2012 PC NVIDIA GeForce GTX 680 Kepler GK104 Triangles / sec (millions) 1 103 (x103) 1800 (x1800) Pixel Fragments / sec (millions) 240 1040 (x4.3) 14,400 (x60) GigaFLOPS 0.64 15.6 (x25) 3090 (x4830) 1.5KW <5W Copyright Khronos Group 2012 Page 13
OpenGL ES Deployment in Mobile Use of 3D APIs in Mobile Devices Source: Jon Peddie Research On PC DirectX is used for most apps. On mobile the situation is reversed OpenGL ES is the 3D API used in Android, ios and almost every other mobile and embedded OS other than Windows Copyright Khronos Group 2012 Page 14
OpenGL ES 3.0 Goals Provide the functionality needed by modern applications - Feature set based on OpenGL 3.3 / 4.x - Reduces need for extensions Make life better for the programmer - Tighter requirements for supported features - Reduce implementation variability Don t damage OpenGL ES 2.0 ecosystem momentum - Backward compatible with OpenGL ES 2.0 Better looking, faster performing games and apps! Copyright Khronos Group 2012 Page 15
Making Life Better for the Programmer Enhanced Shading Language: GLSL ES 3.0 - Syntax and features updated for better compatibility with desktop OpenGL - Full support for 32-bit integers and floats in shader programs - Most OpenGL ES 2.0 limitations removed Predictable features and behavior - Rich set of explicitly sized texture and renderbuffer formats - Each format s capabilities are specified - no more guessing! - Well-specified error behavior Copyright Khronos Group 2012 Page 16
Shader Centric (OpenGL ES Centric) view Functional superset of Language Version 2.00 Shader processors - Vertex and Fragment Shaders - Floating Point (IEEE 32 bit) - Integer (32 bit signed and unsigned) Uniform Buffer Objects - 12 Vertex + 12 Fragment binding points, 16KB Transform Feedback Buffers Multiple Draw Buffers Texture Samplers - sampler3d, sampler2darray, sampler2dshadow, samplercubeshadow - integer and unsigned integer samplers Appenix A: Limitations is GONE Copyright Khronos Group 2012 Page 17
Shader Centric (OpenGL Centric) view Subset of OpenGL 3.3 - No geometry shaders Some cherry picks from OpenGL 4.x OpenGL ES 2.0 features - Example precision qualifiers Copyright Khronos Group 2012 Page 18
"porting" #version 100 // implicit precision mediump float; varying vec4 color; #version 300 es // required precision mediump float; in vec4 color; layout(location = 0) out vec4 data; void main() { gl_fragcolor = color; } void main() { data = color; } Copyright Khronos Group 2012 Page 19
Half a day conservation effort #version 300 es precision highp float; sampler2d floatmap;// lowp sampler3d cubemap; // error #version 300 es precision highp float; precision highp sampler2d floatmap; precision lowp sampler3d cubemap; Copyright Khronos Group 2012 Page 20
Extensive New Texture Functionality All implementations support 32 textures (16V + 16F) Full non-power-of-two texture support Extensive set of required sized internal formats Support for 1- and 2-channel textures (R, RG) Standard support for 3D textures and texture arrays Depth textures with shadow compares Copyright Khronos Group 2012 Page 21
New Ways to Draw Things Primitive Restart - Draw multiple triangle strips with one command Instanced Rendering - Draw multiple copies of an object with one command Transform Feedback - Capture transformed geometry in a buffer Copyright Khronos Group 2012 Page 22
New Rendering Features Standard MRT support with at least 4 render targets - Deferred rendering Multi-sampled Framebuffer Objects - Anti-aliased rendering to textures Occlusion queries - Did drawing this object produce any visible pixels? - If not, you can skip drawing it in the next frame Copyright Khronos Group 2012 Page 23
OpenGL and OpenGL ES Collaboration Introducing the KHR extension tag - Jointly designed and approved by both OpenGL and OpenGL ES groups - Khronos working to converge the APIs where it makes sense KHR_debug - Combined functionality of four ARB debug extensions - Issues reported via callback functions or logs - Labels and markers to relate messages to objects / events ARB_robustness_isolation - If application causes GPU reset, no other application will be affected Copyright Khronos Group 2012 Page 24
Texture Compression is Key Effective texture compression saves precious resources - Reduced network bandwidth to download games and apps - Smaller apps in memory - Less GPU memory bandwidth to access textures Developers need the same texture compression EVERYWHERE - Otherwise portable apps such as WebGL need multiple copies of same texture - #1 problem for cross-platform developers - Developers requesting 1-2bit per pixel compression WITH alpha Khronos pipeline of standardized texture compression technologies - ETC2/EAC is mandated NOW for OpenGL ES 3.0 and OpenGL 4.3 - ASTC shipping as extension today for industry feedback before core integration Copyright Khronos Group 2012 Page 25
ETC2 / EAC Texture Compression Adopted into core in both OpenGL and OpenGL ES - Available on mobile AND desktop ETC2 for RGB - 4bpp, 3-channel - Linear or srgb color encoding EAC for R or RG - 4-bpp, 1-channel - 8-bpp, 2-channel Combine them for RGBA - 8-bpp, 4-channel Improved quality - Thanks, Ericsson! original S3TC ETC2 Copyright Khronos Group 2012 Page 26
Khronos ASTC Texture Compression Adaptive Scalable Texture Compression (ASTC) - Quality significantly exceeds S3TC or PVRTC at same bit rate Industry-leading orthogonal compression rate and format flexibility - 1 to 4 color components: R / RG / RGB / RGBA - Choice of bit rate: from 8 bpp to <1 bpp in fine steps ASTC is royalty-free and so is available to be universally adopted - Shipping as extension today for industry feedback - Original 24bpp ASTC Compression 8bpp 3.56bpp 2bpp Copyright Khronos Group 2012 Page 27
ASTC Vs. PVRTC LDR extension shipping today - HDR version in development Block Size Bits Per Pixel Comp. Ratio ORIGINAL IMAGE 4x4 8.00 4:1 5x4 6.40 5:1 5x5 5.12 6.25:1 6x5 4.27 7.5:1 6x6 3.56 9:1 8x5 3.20 10:1 8x6 2.67 12:1 COMPRESSED WITH PVRTC 2BPP 10x5 2.56 12.5:1 10x6 2.13 15:1 8x8 2.00 16:1 10x8 1.60 20:1 10x10 1.28 25:1 12x10 1.07 30:1 12x12 0.89 36:1 COMPRESSED WITH ASTC 2BPP Copyright Khronos Group 2012 Page 28
Putting it all together Self-shadowing using depth textures with shadow sampling Multi-layered track texture using 2D texture arrays HDR using RGB10_A2 render-to-texture and tone mapping ETC2 / EAC texture compression used throughout Content: ARM Timbuktu 2 tech demo Copyright Khronos Group 2012 Page 29
Kishonti GLBenchmark 3.0 Occlusion query used to determine light visibility Instanced drawing used for vehicles and particles Deferred rendering using multiple render targets (MRT) and depth textures Kishonti GLBenchmark 3.0 preliminary Copyright Khronos Group 2012 Page 30
And in other news Introducing the KHR extension tag - For extensions designed and approved by both OpenGL and OpenGL ES WGs - Ratified by Khronos Promoters KHR_debug - Combined functionality of four ARB debug extensions - Issues reported via callback functions or logs - Labels and markers to relate messages to objects / events KHR_compressed_texture_astc_ldr - Adaptive Scalable Texture Compression (ASTC) LDR modes - 1 to 4 color components: R / RG / RGB / RGBA - Orthogonal choice of bit rate, from 8 bpp to <1 bpp in fine steps - Quality exceeding S3TC or PVRTC at same bit rate Copyright Khronos Group 2012 Page 31