SlideShare une entreprise Scribd logo
1  sur  56
CS 354 Programmable Shading Mark Kilgard University of Texas March 1, 2012
Today’s material ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
My Office Hours ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Last time, this time ,[object Object],[object Object],[object Object],[object Object],[object Object]
Daily Quiz ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],a)   inverse modelview matrix b)   projection matrix c)   inverse projection matrix d)   inverse transpose modelview matrix e)   identity matrix f)   inverse inverse modelview matrix
Lighting, Texturing, Shading ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Key Trend in OpenGL Evolution ,[object Object],[object Object],[object Object],Fixed-function Programmable Simple Configurability Complex Configurability Shaders! High-level languages
Programming Shaders  inside  GPU ,[object Object],[object Object],[object Object],Geometry Program 3D Application or Game OpenGL API GPU Front End Vertex Assembly Vertex Shader Clipping, Setup, and Rasterization Fragment Shader Texture Fetch Raster Operations Framebuffer Access Memory Interface CPU – GPU Boundary OpenGL 3.3 Attribute Fetch Primitive Assembly Parameter Buffer Read programmable fixed-function Legend
Example Simple GLSL Shaders ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],void main(void) { gl_FrontColor  =  gl_Color ; gl_Position  =  ftransform (); } void main(void) { gl_FragColor  =  gl_Color ; } Shaders are way more  interesting than these minimal examples
Examples of Complex Shaders
Low-level Assembly vs. High-level Shading Language Low-level OpenGL Assembly ADDR R0.xyz,eyePosition.xyzx,-f[TEX0].xyzx; DP3R R0.w, R0.xyzx, R0.xyzx; RSQR R0.w, R0.w; MULR R0.xyz, R0.w, R0.xyzx; ADDR R1.xyz,lightPosition.xyzx,-f[TEX0].xyzx; DP3R R0.w, R1.xyzx, R1.xyzx; RSQR R0.w, R0.w; MADR R0.xyz, R0.w, R1.xyzx, R0.xyzx; MULR R1.xyz, R0.w, R1.xyzx; DP3R R0.w, R1.xyzx, f[TEX1].xyzx; MAXR R0.w, R0.w, {0}.x; SLER H0.x, R0.w, {0}.x; DP3R R1.x, R0.xyzx, R0.xyzx; RSQR R1.x, R1.x; MULR R0.xyz, R1.x, R0.xyzx; DP3R R0.x, R0.xyzx, f[TEX1].xyzx; MAXR R0.x, R0.x, {0}.x; POWR R0.x, R0.x, shininess.x; MOVXC HC.x, H0.x; MOVR R0.x(GT.x), {0}.x; MOVR R1.xyz, lightColor.xyzx; MULR R1.xyz, Kd.xyzx, R1.xyzx; MOVR R2.xyz, globalAmbient.xyzx; MOVR R3.xyz, Ke.xyzx; MADR R3.xyz, Ka.xyzx, R2.xyzx, R3.xyzx; MADR R3.xyz, R1.xyzx, R0.w, R3.xyzx; MOVR R1.xyz, lightColor.xyzx; MULR R1.xyz, Ks.xyzx, R1.xyzx; MADR R3.xyz, R1.xyzx, R0.x, R3.xyzx; MOVR o[COLR].xyz, R3.xyzx; MOVR o[COLR].w, {1}.x; High-level Cg float3  L =  normalize (lightPosition–position.xyz); float3  H =  normalize (L +   normalize (eyePosition – position.xyz)); color.xyz = Ke + (Ka * globalAmbient) + Kd * lightColor *  max ( dot (L, N), 0) + Ks * lightColor *  pow ( max ( dot (H, N), 0),   shininess); color.w = 1;
Building Up Shaders   ) + ( ( ) = Diffuse Gloss Specular Decal Result
Shade Trees ,[object Object],[object Object]
Graphical Shader Tree Editing ,[object Object],[object Object]
Link Shader Operations Graphically
Pioneering Shading Language ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
RenderMan Example ,[object Object],surface  Simpleshader4( float  Ka = 1.0, Kd = 1.0, Ks = 0.5, roughness = 0.1;                      color  specularcolor = 1, surfacecolor = color(0.5, 0.5, 0.5);) {    normal  Nf =  faceforward ( normalize (N), I);    vector  V = - normalize (I);    Ci = surfacecolor * (Ka* ambient () + Kd* diffuse (Nf)) + Ks*specularcolor* specular (Nf, V, roughness); Oi = Os; Ci *= Oi; }
Shading Language Evolution C (AT&T, 1970’s) C++ (AT&T, 1983) Java (Sun, 1994) RenderMan (Pixar, 1988) PixelFlow  Shading Language (UNC, 1998) Real-Time  Shading Language (Stanford, 2001) Cg / HLSL (NVIDIA/Microsoft, 2002) IRIS GL (SGI, 1982) OpenGL (ARB, 1992) Direct3D (Microsoft, 1995) Reality Lab (RenderMorphics, 1994) General-purpose languages Graphics Application Program Interfaces Shading Languages GLSL (3DLabs/ATI/NVIDIA, 2003) GLSL ES2 (Khronos, 2003)
OpenGL Shading Language ,[object Object],[object Object],[object Object],[object Object],[object Object]
A Note about Versions and Extensions in OpenGL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GLSL Language Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Vertex Shader Inputs & Outputs
Fragment Shader Ins & Outs
OpenGL Fragment Program Flowchart More Instructions? Read Interpolants and/or  Registers Map Input values:  Swizzle, Negate, etc. Perform Instruction Math / Operation Write Output Register with Masking Begin Fragment Fetch & Decode Next Instruction Temporary Registers initialized to 0,0,0,0 Output Depth & Color Registers initialized to 0,0,0,1 Initialize Parameters Emit Output Registers as Transformed Vertex End Fragment Fragment Program Instruction Loop Fragment Program Instruction Memory Texture Fetch Instruction? yes no no Compute Texture Address & Level-of-detail & Fetch Texels Filter Texels yes Texture Images Primitive Interpolants
API Process for Creating GLSL Programs ,[object Object],[object Object],glCreateShader glShaderSource glCompileShader glCreateProgram glAttachShader glAttachShader glLinkProgram glUseProgram glCreateShader glShaderSource glCompileShader Vertex Shader Fragment Shader Program
GLSL Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Vector Data Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Vector Details ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix Data Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Samplers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Type Qualifiers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Other Details ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Consider a Light Map Shader ,[object Object],x = Images from:  http://zanir.wz.cz/?p=56&lang=en  Precomputed light Surface color “ lit” surface
Light Map with Fixed Function OpenGL API ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Light Map with Fixed Function OpenGL API ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tell fixed function we are  using texture mapping Tell fixed function how to combine textures ,[object Object]
Light Map Shader Example in GLSL ,[object Object],#version  330 uniform sampler2D  lightMap; uniform sampler2D  surfaceMap; in vec2  fs_TxCoord; out vec3  out_Color; void   main ( void )  { float  intensity =  texture2D (lightMap, fs_TxCoord).r; vec3  color =  texture2D (surfaceMap, fs_TxCoord).rgb; out_Color = intensity * color; }
Light Map Shader Example in GLSL ,[object Object],#version  330 uniform sampler2D  lightMap; uniform sampler2D  surfaceMap; in vec2  fs_TxCoord; out vec3  out_Color; void   main ( void )  { float  intensity =  texture2D (lightMap, fs_TxCoord).r; vec3  color =  texture2D (surfaceMap, fs_TxCoord).rgb; out_Color = intensity * color; } GLSL version 3.3 Textures (input) Per-fragment input shader output one channel intensity three channel color modulate
Switching the Application to use GLSL Shaders GLuint  lightMap; GLuint  surfaceMap; glActiveTexture ( GL_TEXTURE0 ); glEnable ( GL_TEXTURE_2D ); glBindTexture ( GL_TEXTURE_2D , lightMap); glTexEnvi ( GL_TEXTURE_ENV ,  GL_TEXTURE_ENV_MODE ,  GL_MODULATE ); glActiveTexture ( GL_TEXTURE1 ); glEnable ( GL_TEXTURE_2D ); glBindTexture ( GL_TEXTURE_2D , surfaceMap);  glTexEnvf ( GL_TEXTURE_ENV ,  GL_TEXTURE_ENV_MODE ,  GL_MODULATE ); glDrawArrays (...); ,[object Object],[object Object]
Switching the Application to use GLSL Shaders GLuint  lightMap; GLuint  surfaceMap; GLuint  program; glActiveTexture ( GL_TEXTURE0 ); glBindTexture ( GL_TEXTURE_2D , lightMap); glActiveTexture ( GL_TEXTURE1 ); glBindTexture ( GL_TEXTURE_2D , surfaceMap);  glUseProgram (program); glDrawArray (...); ,[object Object]
Careful:  What’s not shown ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Geometry Shaders Vertex Color gl_FrontColorIn[gl_VerticesIn]; gl_BackColorIn[gl_VerticesIn]; gl_FrontSecondaryColorIn[gl_VerticesIn]; gl_BackSecondaryColorIn[gl_VerticesIn]; gl_FogFragCoordIn[gl_VerticesIn]; Geometry processor Color gl_FrontColor; gl_BackColor; gl_FrontSecondaryColor; gl_BackSecondaryColor; gl_FogFragCoord; Vertex Coord. gl_TexCoordIn[gl_VerticesIn][]; gl_PositionIn[gl_VerticesIn]; Resterization Info. gl_PointSizeIn[gl_VerticesIn]; gl_ClipVertexIn[gl_VerticesIn]; Coord. gl_Position gl_TexCoord[]; Number of Vertices gl_VerticesIn
Silhouette Rendering ,[object Object],silhouette edge detection geometry shader Complete mesh Silhouette edges Useful for non-photorealistic rendering Mimics artistic sketching
More Geometry Shader Examples Shimmering point sprites Generate fins for lines Generate shells for fur rendering
Geometry shader setup with and without per-vertex normals Setup without per-vertex normals, relying on normalized gradients only; faceted look Setup with per-vertex normals; smoother lighting appearance
OpenGL 3.0 View of Hardware Primitive Program 3D Application or Game OpenGL API GPU Front End Vertex Assembly Vertex Program Clipping, Setup, and Rasterization Fragment Program Texture Fetch Raster Operations Framebuffer Access Memory Interface CPU – GPU Boundary Attribute Fetch Primitive Assembly Parameter Buffer Read
OpenGL Pipeline Programmable Domains can be Unified Primitive Program ,[object Object],[object Object],GPU Front End Vertex Assembly Vertex Program , Clipping, Setup, and Rasterization Fragment Program Texture Fetch Raster Operations Framebuffer Access Memory Interface Attribute Fetch Primitive Assembly Parameter Buffer Read Can be unified hardware!
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],OpenGL 4.0 Programmable Features: Double-Precision Numeric
Double Precision in OpenGL Shaders Double-precision magnified 970,000x Single-precision magnified 970,000x Mandelbrot set interactively visualized
Mix of Double- and Single-Precision fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32
Mandelbrot Shaders Compared #version 400 compatibility in vec2 position; out vec4 color; uniform float max_iterations; uniform sampler1D lut; uniform  mat2x3  matrix; float  mandel(vec2  c) { vec2  z =  vec2(0.0 ); float iterations = 0.0; while(iterations < max_iterations)  { vec2  z2 = z*z; if (z2.x + z2.y > 4.0) break; z =  vec2(z2.x  - z2.y, 2.0 * z.x * z.y) + c; iterations++; } return iterations; } void main() { vec2  pos =  vec2(dot(matrix[0 ], vec3(position,1 )), dot(matrix[1], vec3(position,1 ))); float iterations = mandel(pos); // False-color pixel based on iteration // count in look-up table float s = iterations / max_iterations; color = texture(lut, s); } #version 400 compatibility in vec2 position; out vec4 color; uniform float max_iterations; uniform sampler1D lut; uniform  dmat2x3  matrix; float  mandel(dvec2  c) { dvec2  z =  dvec2(0.0 ); float iterations = 0.0; while(iterations < max_iterations)  { dvec2  z2 = z*z; if (z2.x + z2.y > 4.0) break; z =  dvec2(z2.x  - z2.y, 2.0 * z.x * z.y) + c; iterations++; } return iterations; } void main() { dvec2  pos =  dvec2(dot(matrix[0 ], dvec3(position,1 )), dot(matrix[1], dvec3(position,1 ))); float iterations = mandel(pos); // False-color pixel based on iteration // count in look-up table float s = iterations / max_iterations; color = texture(lut, s); } Double-precision dmat2x3 dvec2 dvec3 ,[object Object],[object Object],[object Object],[object Object]
Programmable Tessellation Data Flow vertex shader clipping, setup, & rasterization fragment shader assembled primitive fragments index to vertex attribute puller indices primitive topology & in-band vertex attributes vertex attributes vertex shader geometry shader clipping, setup, & rasterization fragment shader OpenGL 4.0 added tessellation shaders assembled primitive fragments index to vertex attribute puller indices primitive topology & in-band vertex attributes vertex attributes tessellation control (hull) shader tessellation evaluation (domain) shader tessellation generator level-of-detail parameters patch control points & parameters fine primitive topology  (u, v) coordinates primitive stream control points control point (vertex) shader vertex attributes rectangular & triangluar patch OpenGL 3.2 programmable fixed-function Legend geometry shader primitive stream
Surfaces are Determined by Their Control Points Moving control points displaces the evaluated surfaces
Utah Teapot: Bi-cubic Patch Mesh
Ed Catmull’s Gumbo
Take Away Information ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Next Lecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing StuffMark Kilgard
 
CS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingMark Kilgard
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding ColorMark Kilgard
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture MappingMark Kilgard
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam ReviewMark Kilgard
 
CS 354 Interaction
CS 354 InteractionCS 354 Interaction
CS 354 InteractionMark Kilgard
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationMark Kilgard
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration StructuresMark Kilgard
 
An Introduction to NV_path_rendering
An Introduction to NV_path_renderingAn Introduction to NV_path_rendering
An Introduction to NV_path_renderingMark Kilgard
 
CS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene GraphsCS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene GraphsMark Kilgard
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel UpdatingMark Kilgard
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityMark Kilgard
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingMark Kilgard
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Mark Kilgard
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading LanguageJungsoo Nam
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012Mark Kilgard
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012Mark Kilgard
 
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
 

Tendances (20)

CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
 
CS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasing
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding Color
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam Review
 
CS 354 Interaction
CS 354 InteractionCS 354 Interaction
CS 354 Interaction
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and Representation
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
 
An Introduction to NV_path_rendering
An Introduction to NV_path_renderingAn Introduction to NV_path_rendering
An Introduction to NV_path_rendering
 
CS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene GraphsCS 354 Shadows (cont'd) and Scene Graphs
CS 354 Shadows (cont'd) and Scene Graphs
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and Culling
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
 
CS 354 Shadows
CS 354 ShadowsCS 354 Shadows
CS 354 Shadows
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering
 

En vedette

Shading for Computer Topics in Burapha University
Shading for Computer Topics in Burapha UniversityShading for Computer Topics in Burapha University
Shading for Computer Topics in Burapha UniversityMao Sararith
 
Shade Measurement Overview
Shade Measurement OverviewShade Measurement Overview
Shade Measurement Overviewphoberg
 
Photovoltaic Systems: System Design Tools
Photovoltaic Systems: System Design ToolsPhotovoltaic Systems: System Design Tools
Photovoltaic Systems: System Design ToolsGavin Harper
 
7. Shading devices
7. Shading devices7. Shading devices
7. Shading devicesRohit Kumar
 

En vedette (8)

Shading for Computer Topics in Burapha University
Shading for Computer Topics in Burapha UniversityShading for Computer Topics in Burapha University
Shading for Computer Topics in Burapha University
 
Sun Shade Calculator for Lahore
Sun Shade Calculator for LahoreSun Shade Calculator for Lahore
Sun Shade Calculator for Lahore
 
Shade Measurement Overview
Shade Measurement OverviewShade Measurement Overview
Shade Measurement Overview
 
Game Balancing & Its Automation
Game Balancing & Its AutomationGame Balancing & Its Automation
Game Balancing & Its Automation
 
Intro to Shader
Intro to ShaderIntro to Shader
Intro to Shader
 
Photovoltaic Systems: System Design Tools
Photovoltaic Systems: System Design ToolsPhotovoltaic Systems: System Design Tools
Photovoltaic Systems: System Design Tools
 
Ecotect Presentaion
Ecotect PresentaionEcotect Presentaion
Ecotect Presentaion
 
7. Shading devices
7. Shading devices7. Shading devices
7. Shading devices
 

Similaire à CS 354 Programmable Shading

Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glchangehee lee
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Droidcon Berlin
 
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko3D
 
Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Prabindh Sundareson
 
Hardware Shaders
Hardware ShadersHardware Shaders
Hardware Shadersgueste52f1b
 
Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Vitaly Baum
 
Sig13 ce future_gfx
Sig13 ce future_gfxSig13 ce future_gfx
Sig13 ce future_gfxCass Everitt
 
Shader Programming With Unity
Shader Programming With UnityShader Programming With Unity
Shader Programming With UnityMindstorm Studios
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I💻 Anton Gerdelan
 
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 Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...ICS
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMark Kilgard
 

Similaire à CS 354 Programmable Shading (20)

Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_gl
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shaders
 
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
 
Android native gl
Android native glAndroid native gl
Android native gl
 
Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011
 
OpenGL 4 for 2010
OpenGL 4 for 2010OpenGL 4 for 2010
OpenGL 4 for 2010
 
NvFX GTC 2013
NvFX GTC 2013NvFX GTC 2013
NvFX GTC 2013
 
Hardware Shaders
Hardware ShadersHardware Shaders
Hardware Shaders
 
Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)
 
Sig13 ce future_gfx
Sig13 ce future_gfxSig13 ce future_gfx
Sig13 ce future_gfx
 
What is OpenGL ?
What is OpenGL ?What is OpenGL ?
What is OpenGL ?
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shaders
 
Shader Programming With Unity
Shader Programming With UnityShader Programming With Unity
Shader Programming With Unity
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I
 
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 Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
Opengl basics
Opengl basicsOpengl basics
Opengl basics
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
 
How to Use OpenGL/ES on Native Activity
How to Use OpenGL/ES on Native ActivityHow to Use OpenGL/ES on Native Activity
How to Use OpenGL/ES on Native Activity
 

Plus de Mark Kilgard

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...Mark Kilgard
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsMark Kilgard
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017Mark Kilgard
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017Mark Kilgard
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsMark Kilgard
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectanglesMark Kilgard
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineMark Kilgard
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsMark Kilgard
 
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
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondMark Kilgard
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...Mark Kilgard
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardMark Kilgard
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingMark Kilgard
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsMark Kilgard
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global IlluminationMark Kilgard
 

Plus de Mark Kilgard (20)

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School Students
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUs
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional Improvements
 
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
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforward
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path Rendering
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global Illumination
 
CS 354 Typography
CS 354 TypographyCS 354 Typography
CS 354 Typography
 

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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
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
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
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
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 

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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
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
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
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...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 

CS 354 Programmable Shading

  • 1. CS 354 Programmable Shading Mark Kilgard University of Texas March 1, 2012
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 11. Low-level Assembly vs. High-level Shading Language Low-level OpenGL Assembly ADDR R0.xyz,eyePosition.xyzx,-f[TEX0].xyzx; DP3R R0.w, R0.xyzx, R0.xyzx; RSQR R0.w, R0.w; MULR R0.xyz, R0.w, R0.xyzx; ADDR R1.xyz,lightPosition.xyzx,-f[TEX0].xyzx; DP3R R0.w, R1.xyzx, R1.xyzx; RSQR R0.w, R0.w; MADR R0.xyz, R0.w, R1.xyzx, R0.xyzx; MULR R1.xyz, R0.w, R1.xyzx; DP3R R0.w, R1.xyzx, f[TEX1].xyzx; MAXR R0.w, R0.w, {0}.x; SLER H0.x, R0.w, {0}.x; DP3R R1.x, R0.xyzx, R0.xyzx; RSQR R1.x, R1.x; MULR R0.xyz, R1.x, R0.xyzx; DP3R R0.x, R0.xyzx, f[TEX1].xyzx; MAXR R0.x, R0.x, {0}.x; POWR R0.x, R0.x, shininess.x; MOVXC HC.x, H0.x; MOVR R0.x(GT.x), {0}.x; MOVR R1.xyz, lightColor.xyzx; MULR R1.xyz, Kd.xyzx, R1.xyzx; MOVR R2.xyz, globalAmbient.xyzx; MOVR R3.xyz, Ke.xyzx; MADR R3.xyz, Ka.xyzx, R2.xyzx, R3.xyzx; MADR R3.xyz, R1.xyzx, R0.w, R3.xyzx; MOVR R1.xyz, lightColor.xyzx; MULR R1.xyz, Ks.xyzx, R1.xyzx; MADR R3.xyz, R1.xyzx, R0.x, R3.xyzx; MOVR o[COLR].xyz, R3.xyzx; MOVR o[COLR].w, {1}.x; High-level Cg float3 L = normalize (lightPosition–position.xyz); float3 H = normalize (L + normalize (eyePosition – position.xyz)); color.xyz = Ke + (Ka * globalAmbient) + Kd * lightColor * max ( dot (L, N), 0) + Ks * lightColor * pow ( max ( dot (H, N), 0), shininess); color.w = 1;
  • 12. Building Up Shaders   ) + ( ( ) = Diffuse Gloss Specular Decal Result
  • 13.
  • 14.
  • 15. Link Shader Operations Graphically
  • 16.
  • 17.
  • 18. Shading Language Evolution C (AT&T, 1970’s) C++ (AT&T, 1983) Java (Sun, 1994) RenderMan (Pixar, 1988) PixelFlow Shading Language (UNC, 1998) Real-Time Shading Language (Stanford, 2001) Cg / HLSL (NVIDIA/Microsoft, 2002) IRIS GL (SGI, 1982) OpenGL (ARB, 1992) Direct3D (Microsoft, 1995) Reality Lab (RenderMorphics, 1994) General-purpose languages Graphics Application Program Interfaces Shading Languages GLSL (3DLabs/ATI/NVIDIA, 2003) GLSL ES2 (Khronos, 2003)
  • 19.
  • 20.
  • 21.
  • 22. Vertex Shader Inputs & Outputs
  • 24. OpenGL Fragment Program Flowchart More Instructions? Read Interpolants and/or Registers Map Input values: Swizzle, Negate, etc. Perform Instruction Math / Operation Write Output Register with Masking Begin Fragment Fetch & Decode Next Instruction Temporary Registers initialized to 0,0,0,0 Output Depth & Color Registers initialized to 0,0,0,1 Initialize Parameters Emit Output Registers as Transformed Vertex End Fragment Fragment Program Instruction Loop Fragment Program Instruction Memory Texture Fetch Instruction? yes no no Compute Texture Address & Level-of-detail & Fetch Texels Filter Texels yes Texture Images Primitive Interpolants
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Geometry Shaders Vertex Color gl_FrontColorIn[gl_VerticesIn]; gl_BackColorIn[gl_VerticesIn]; gl_FrontSecondaryColorIn[gl_VerticesIn]; gl_BackSecondaryColorIn[gl_VerticesIn]; gl_FogFragCoordIn[gl_VerticesIn]; Geometry processor Color gl_FrontColor; gl_BackColor; gl_FrontSecondaryColor; gl_BackSecondaryColor; gl_FogFragCoord; Vertex Coord. gl_TexCoordIn[gl_VerticesIn][]; gl_PositionIn[gl_VerticesIn]; Resterization Info. gl_PointSizeIn[gl_VerticesIn]; gl_ClipVertexIn[gl_VerticesIn]; Coord. gl_Position gl_TexCoord[]; Number of Vertices gl_VerticesIn
  • 42.
  • 43. More Geometry Shader Examples Shimmering point sprites Generate fins for lines Generate shells for fur rendering
  • 44. Geometry shader setup with and without per-vertex normals Setup without per-vertex normals, relying on normalized gradients only; faceted look Setup with per-vertex normals; smoother lighting appearance
  • 45. OpenGL 3.0 View of Hardware Primitive Program 3D Application or Game OpenGL API GPU Front End Vertex Assembly Vertex Program Clipping, Setup, and Rasterization Fragment Program Texture Fetch Raster Operations Framebuffer Access Memory Interface CPU – GPU Boundary Attribute Fetch Primitive Assembly Parameter Buffer Read
  • 46.
  • 47.
  • 48. Double Precision in OpenGL Shaders Double-precision magnified 970,000x Single-precision magnified 970,000x Mandelbrot set interactively visualized
  • 49. Mix of Double- and Single-Precision fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32 fp32
  • 50.
  • 51. Programmable Tessellation Data Flow vertex shader clipping, setup, & rasterization fragment shader assembled primitive fragments index to vertex attribute puller indices primitive topology & in-band vertex attributes vertex attributes vertex shader geometry shader clipping, setup, & rasterization fragment shader OpenGL 4.0 added tessellation shaders assembled primitive fragments index to vertex attribute puller indices primitive topology & in-band vertex attributes vertex attributes tessellation control (hull) shader tessellation evaluation (domain) shader tessellation generator level-of-detail parameters patch control points & parameters fine primitive topology (u, v) coordinates primitive stream control points control point (vertex) shader vertex attributes rectangular & triangluar patch OpenGL 3.2 programmable fixed-function Legend geometry shader primitive stream
  • 52. Surfaces are Determined by Their Control Points Moving control points displaces the evaluated surfaces
  • 53. Utah Teapot: Bi-cubic Patch Mesh
  • 55.
  • 56.