!" "!#$!"%!&% ' ( )) * ) )+( ( ))+ ))(, ) ( - +,./ )) ) ) $( -( 1), , ) ( -)) ') 5 ' +) 67 4 ) ' 8, ( ) ( 9 :! ; $) ) ; 5<4,4$6 ( =) >

Size: px
Start display at page:

Download "!" "!#$!"%!&% ' ( )) * ) )+( ( ))+ ))(, ) ( - +,./ )) ) ) $( -( 1), , ) ( -)) ') 5 ' +) 67 4 ) ' 8, ( ) ( 9 :! ; $) ) ; 5<4,4$6 ( =) >"

Transcription

1

2 !" "!#$!"%!&% ' ( )) * ) )+( ( ))+ ))(, ) ( - +,./ )) ) ) ( ))) 0 $( -( 1),2, ) ( -)) ') 5 ' +) 67 4 ) ' 8, ( ) ( 9 :! ; $) ) ; 5<4,4$6 ( =) > " + ) &)) >( ))( -*( /( *( 1 =?/+) *( : == ) + /))( ) $,+' ( ) ' ( )) )-() ) " %4 ) $ ( - ) )) / 1),5 2??2) )( -)6)1)$@@1)$A/,. 5 ) ==3)+( )) "+ 2??7 >,.' 3?? B6)) )),. ) )-=%)) ) > ) ( $@@ $( -( 1),, 0,C C >?,. 5"+ 2??76C

3 . ) ( )) ( 0,C C >?,. 5"+ 2??76C ) + ) ( ( )) )- ) ),))( ) ))( ( )) ) " )) 5+ )( ))+ C1), C, ), ) 6))( 1), ( )5!"#( )) )( ))) ) ) )+ *( C! *( 4 *1),/,)#') *(/$%& ) 0 $'(') ) *+++ )) 0,-'$!'. /012#'+, 0 $'3&') ) *++324,-'$!'. /012#'32'567,

4 ( ) )) )( )) ( ( ( )+) +- ( ( )( ) D /) ' +) %/) ) ( * ) (, ) ( -))+- ) ( - ( ) )) &)) ' ) ( ) +( )+ ) )) ( ) ( ) E ( ))+ ) ))+- (, ), ) 0 //initialisation functions CALLBACK IsDeviceAcceptable CALLBACK ModifyDeviceSettings CALLBACK OnCreateDevice CALLBACK OnResetDevice //updating the scene each frame CALLBACK OnFrameMove //rendering the scene to the viewport each frame 8

5 CALLBACK OnFrameRender //windows message loop CALLBACK MsgProc //interface events CALLBACK KeyboardProc CALLBACK OnGUIEvent //cleaning up memory and shutting down safely CALLBACK OnLostDevice CALLBACK OnDestroyDevice )( D 0 )5)6 <) E FE! $) 5)6 * +)( -+ ) D /)/ ) /- )( (( G / ) )( '4-) ) ) )( ) )(/( ( )+ +) ) - 4 ') 5 ' +) 6 ') ) '+ + ') ) (,./ ( ' ))) +) + )' ' +) /( )- ) ) ' H, ), ) ( )+)+) ) ) ) )( & ) )+) g_model. struct model LPD3DXMESH ; pmesh; //pointer to mesh object pmaterialsbuf;//ptr to buffer class, holds materials list LPD3DXBUFFER LPDIRECT3DTEXTURE9 *ptextures; //ptr to list of textures DWORD NumMaterials; //num materials stored struct model g_model; *) ( ))+)/) ) ) +) ) ))) // Light's direction in world space D3DXVECTOR3 g_lightdir = D3DXVECTOR3(-1.0f,0.0f,-0.5f); // Light's diffuse color D3DXVECTOR4 g_lightdiffuse = D3DXVECTOR4(1.0f,1.0f,1.0f,0.0f);

6 I( )) ( + +) + ) )- ) + E D3DXVECTOR3 ))+/ ) ) )D)) /( ) ( ))( /+/ ))/ / /1,))( OnCreateDevice ') ) //Load A Mesh Using The DXUtil Library// V(hr = D3DXLoadMeshFromX(L"Dwarf.x", D3DXMESH_MANAGED, pd3ddevice, NULL, &g_model.pmaterialsbuf, NULL, &g_model.nummaterials, &g_model.pmesh)); "Dwarf.x" ( )) )( ' ) / -) ( - ) ) 0 $0C E) C >?,.5"+ 2??76C, ) C C( V() )H ++)) -( ( D3DXLoadMeshFromX ))+"+)) ') )) + D / 44 + ( ))( *( -( ( ) L"Dwarf.x" ( )+ / + )+ / ) * ( ) +) 0 g_model.pmesh g_model.pmaterialsbuf g_model.nummaterials H+)) /( ' ()) ')) ' 4 ) ' $( OnCreateDevice ) ) // Get the array of materials out of the returned buffer, allocate a // texture array, and load the textures D3DXMATERIAL *pmaterials = (D3DXMATERIAL*)g_model.pMaterialsBuf->GetBufferPointer(); g_model.ptextures = new LPDIRECT3DTEXTURE9[g_model.NumMaterials]; for( UINT i = 0; i < g_model.nummaterials; i++ ) if( FAILED(D3DXCreateTextureFromFileA( pd3ddevice, pmaterials[i].ptexturefilename, &g_model.ptextures[i]))) 7

7 g_model.ptextures[i] = NULL; //normalize the light vector D3DXVec3Normalize(&g_LightDir,&g_LightDir); * ( ) ( )) ' + ') g_model.ptextures[i] 5 ( 6 ' / ' + ) / <( + // + B - &( ))+ +-, ( ) ( 9 ( OnFrameRender ( ) ( 0 $) ( ) +! *)/1 (/ ) ( )) mworldviewprojection 4+) g_peffect, ) '! // Clear the render target and the zbuffer V( pd3ddevice->clear(0, NULL, D3DCLEAR_TARGET D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0, 45, 50, 170),1.0f, 0)); // Render the scene if( SUCCEEDED( pd3ddevice->beginscene() ) ) // Get the projection & view matrix from the camera class mworld = *g_camera.getworldmatrix(); mproj = *g_camera.getprojmatrix(); mview = *g_camera.getviewmatrix(); mworldviewprojection = mworld * mview * mproj; // Update the effect's variables. Instead of using strings, it would // be more efficient to cache a handle to the parameter by calling // ID3DXEffect::GetParameterByName V( g_peffect->setmatrix( "g_mworldviewprojection", &mworldviewprojection ) ); V( g_peffect->setmatrix( "g_mworld", &mworld ) ); V( g_peffect->setfloat( "g_ftime", ( float )ftime ) ); V( g_peffect->setfloatarray("g_lightdir", g_lightdir, sizeof(d3dxvector3))); "

8 V( g_peffect->setfloatarray("g_lightdiffuse", g_lightdiffuse, sizeof(d3dxvector4)));! $( OnFrameRender ) ))( ( ))) 5))= 6/ + ( )F ' D3DXMATERIAL *pmaterials = (D3DXMATERIAL *)g_model.pmaterialsbuf->getbufferpointer(); UINT cpasses; V( g_peffect->begin( &cpasses, 0 ) ); for( UINT p = 0; p < cpasses; ++p ) V( g_peffect->beginpass( p ) ); // set and draw each of the materials in the mesh for( UINT i = 0; i < g_model.nummaterials; i++ ) V( g_peffect->setvector("g_materialambientcolor", (D3DXVECTOR4*)&pMaterials[i].MatD3D.Ambient)); V( g_peffect->setvector("g_materialdiffusecolor", (D3DXVECTOR4*)&pMaterials[i].MatD3D.Diffuse)); V( g_peffect->settexture("g_meshtexture", g_model.ptextures[i] ); V( g_peffect->commitchanges() ); g_model.pmesh->drawsubset( i ); V( g_peffect->endpass() ); V( g_peffect->end() ); V( pd3ddevice->endscene() ); $) ) E))( ) ) & ( ) ( ))+ / ) ) & OnDestroyDevice. //release each texture if(g_model.ptextures) for( UINT i = 0; i < g_model.nummaterials; i++ ) SAFE_RELEASE(g_model.pTextures[i]); SAFE_DELETE(g_model.pTextures); //release materials buffer and the mesh SAFE_RELEASE( g_model.pmaterialsbuf); SAFE_RELEASE( g_model.pmesh ); 6

9 I )( + 5<4,4$6 ( =), )- + ' ) ) ' /( ( ) ) ' ) g_peffect) "SimpleSample.fx"/) ( ID3DXEffect* g_peffect; " (, ), ) ' RenderSceneVS RenderScenePS1 ' ))- / ))+ ( ) ( '/))))/ ' ' ) - / ' / )) ' ) ( )&)' ) )) ' )( )) B( ( "SimpleSample.fx" E ' ) / ' ( ))( ( )) ) // Transform the position from object space to homogeneous projection space vpos.y += sin(g_ftime + vpos.x * 5.0) * 0.1f; Output.Position = mul(vpos, g_mworldviewprojection); & ' ) ' ) (!%B )( + +) / +) + Output.RGBColor.rgb = Output.RGBColor.brg; + + ) 2? VertexShader = compile vs_2_0 RenderSceneVS(); PixelShader = compile ps_2_0 RenderScenePS(); *( )( ( ) )J*-( JB +) )

The Effects Framework. October 31, Composed of the following components:

The Effects Framework. October 31, Composed of the following components: Game Programming The Effects Framework October 31, 2005 Rendering Effect Composed of the following components: one ore more rendering passes a list of device states a vertex and/or pixel shader Effect

More information

Shaders Part II. Traditional Rendering Pipeline

Shaders Part II. Traditional Rendering Pipeline Shaders Part II Doron Nussbaum Doron Nussbaum COMP 3501 - Shaders Part II 1 Traditional Rendering Pipeline Traditional pipeline (older graphics cards) restricts developer to texture and the 3-term lighting

More information

DirectX Programming #4. Kang, Seongtae Computer Graphics, 2009 Spring

DirectX Programming #4. Kang, Seongtae Computer Graphics, 2009 Spring DirectX Programming #4 Kang, Seongtae Computer Graphics, 2009 Spring Programmable Shader For recent hardwares, vertex and pixel processing stage of the graphics pipeline is programmable Programmable Vertex

More information

Meshes Part II. June 13, 2005

Meshes Part II. June 13, 2005 Game Programming Meshes Part II June 13, 2005 Objectives To learn how to load the data of an XFile into an ID3DXMesh object To gain an understanding of the benefits of using progressive meshes and how

More information

Meshes. 9 th Week, To gain an understanding of the internal data organization of an ID3DXMesh object

Meshes. 9 th Week, To gain an understanding of the internal data organization of an ID3DXMesh object Meshes 9 th Week, 2009 Objectives To gain an understanding of the internal data organization of an ID3DXMesh object To find out how to create, optimize, i and render an ID3DXMesh object To learn how to

More information

Meshes. Meshes what are they? How to use them? Progressive Meshes? Doron Nussbaum COMP Meshes 1. Doron Nussbaum COMP Meshes 2

Meshes. Meshes what are they? How to use them? Progressive Meshes? Doron Nussbaum COMP Meshes 1. Doron Nussbaum COMP Meshes 2 Meshes Doron Nussbaum COMP 3501 - Meshes 1 Meshes what are they? How to use them? Progressive Meshes? Doron Nussbaum COMP 3501 - Meshes 2 Meshes Doron Nussbaum COMP 3501 - Meshes 3 What is a mesh? A collection

More information

Font. Overview. ID3DXFont. ID3DXFont. ID3DXFont 인터페이스를이용해텍스트를렌더링하는방법

Font. Overview. ID3DXFont. ID3DXFont. ID3DXFont 인터페이스를이용해텍스트를렌더링하는방법 Overview Font 인터페이스를이용해텍스트를렌더링하는방법 클래스를이용해텍스트를렌더링하는방법 초당렌더링되는프레임수 (fps) 를계산하는방법 D3DXCreateText 함수를이용해 3D 텍스트를만들고렌더링하는방법 305890 2009년봄학기 5/6/2009 박경신 글꼴출력방법 내부적으로 GDI를이용. 복잡한글꼴과포맷을지원함. GDI가아닌Direct3D를이용.

More information

Lab 3 Shadow Mapping. Giuseppe Maggiore

Lab 3 Shadow Mapping. Giuseppe Maggiore Lab 3 Shadow Giuseppe Maggiore Adding Shadows to the Scene First we need to declare a very useful helper object that will allow us to draw textures to the screen without creating a quad vertex buffer //

More information

DirectX Programming #1. Hyunna Lee Computer Graphics, 2010 Spring

DirectX Programming #1. Hyunna Lee Computer Graphics, 2010 Spring DirectX Programming #1 Hyunna Lee Computer Graphics, 2010 Spring Contents } Installation and Settings } Introduction to Direct3D 9 Graphics } Initializing Direct3D } Rendering Vertices } The D3D coordinate

More information

DirectX Programming #1. Kang, Seong-tae Computer Graphics, 2007 Fall

DirectX Programming #1. Kang, Seong-tae Computer Graphics, 2007 Fall DirectX Programming #1 Kang, Seong-tae Computer Graphics, 2007 Fall Contents Installation and Settings Introduction to Direct3D 9 Graphics Initializing Direct3D Rendering Vertices The D3D coordinate system

More information

D3DX Helper Objects. Chapter Overview Matrix Stacks. For a man to help another is to be a god. Pliny the Elder, Natural History, II, 77

D3DX Helper Objects. Chapter Overview Matrix Stacks. For a man to help another is to be a god. Pliny the Elder, Natural History, II, 77 Chapter 17 D3DX Helper Objects For a man to help another is to be a god. Pliny the Elder, Natural History, II, 77 17.1 Overview In addition to the objects provided by D3DX as concrete classes, D3DX provides

More information

Lab 1 Sample Code. Giuseppe Maggiore

Lab 1 Sample Code. Giuseppe Maggiore Lab 1 Sample Code Giuseppe Maggiore Preliminaries using Vertex = VertexPositionColor; First we define a shortcut for the type VertexPositionColor. This way we could change the type of Vertices used without

More information

3D Programming. 3D Graphics Fundamentals Creating Your Own 3D Models with Anim8or Working with 3D Model Files...285

3D Programming. 3D Graphics Fundamentals Creating Your Own 3D Models with Anim8or Working with 3D Model Files...285 11BegGameDev.qxd 9/20/04 5:20 PM Page 209 PART III 3D Programming Chapter 11 3D Graphics Fundamentals...................................211 Chapter 12 Creating Your Own 3D Models with Anim8or....................239

More information

Using Tasking to Scale Game Engine Systems

Using Tasking to Scale Game Engine Systems Using Tasking to Scale Game Engine Systems Yannis Minadakis March 2011 Intel Corporation 2 Introduction Desktop gaming systems with 6 cores and 12 hardware threads have been on the market for some time

More information

Programming With D3DX. Anuj Gosalia Development Lead DirectX Graphics Microsoft Corporation

Programming With D3DX. Anuj Gosalia Development Lead DirectX Graphics Microsoft Corporation Programming With D3DX Anuj Gosalia Development Lead DirectX Graphics Microsoft Corporation Talk Overview D3DX 8.0 Overview Mesh functions Skinning using D3DX Effect Framework Preview of what s coming in

More information

Shaders (some slides taken from David M. course)

Shaders (some slides taken from David M. course) Shaders (some slides taken from David M. course) Doron Nussbaum Doron Nussbaum COMP 3501 - Shaders 1 Traditional Rendering Pipeline Traditional pipeline (older graphics cards) restricts developer to texture

More information

Using D3D10 Now. Kevin Myers NVIDIA

Using D3D10 Now. Kevin Myers NVIDIA Using D3D10 Now Kevin Myers NVIDIA D3D10 Is Ready Hardware is available OS is shipping SDKs and tools are here Adoption has already begun Where few Devs have gone before Worked with several over last year

More information

CS 297 REPORT. Optimal Meeting Point in a Game Framework

CS 297 REPORT. Optimal Meeting Point in a Game Framework CS 297 REPORT Optimal Meeting Point in a Game Framework Nithin Reddy Spring 2006 Advised by Professor Chris Pollett Department of Computer Science San Jose State University ABSTRACT This report is a detailed

More information

The Application Stage. The Game Loop, Resource Management and Renderer Design

The Application Stage. The Game Loop, Resource Management and Renderer Design 1 The Application Stage The Game Loop, Resource Management and Renderer Design Application Stage Responsibilities 2 Set up the rendering pipeline Resource Management 3D meshes Textures etc. Prepare data

More information

D3DX Mesh Objects. Chapter Overview

D3DX Mesh Objects. Chapter Overview Chapter 19 D3DX Mesh Objects net, n.: Anything reticulated or decussated at equal distances, with interstices between the intersections Samuel Johnson: Dictionary, 1755 19.1 Overview A surface modelled

More information

Technical Report. Mesh Instancing

Technical Report. Mesh Instancing Technical Report Mesh Instancing Abstract What is Mesh Instancing? Before we talk about instancing, let s briefly talk about the way that most D3D applications work. In order to draw a polygonal object

More information

Shader Programming CgFX, OpenGL 2.0. Michael Haller 2003

Shader Programming CgFX, OpenGL 2.0. Michael Haller 2003 Shader Programming CgFX, OpenGL 2.0 Michael Haller 2003 Outline What is CgFX? CgFX runtime Production pipeline with CgFX CgFX Tools set OpenGL 2.0 What is CgFX? CgFX (C for Graphics Effekt File) Supports

More information

Low-Overhead Rendering with Direct3D. Evan Hart Principal Engineer - NVIDIA

Low-Overhead Rendering with Direct3D. Evan Hart Principal Engineer - NVIDIA Low-Overhead Rendering with Direct3D Evan Hart Principal Engineer - NVIDIA Ground Rules No DX9 Need to move fast Big topic in 30 minutes Assuming experienced audience Everything is a tradeoff These are

More information

Multi-Threaded Shadow Volumes on Mainstream Graphics Hardware

Multi-Threaded Shadow Volumes on Mainstream Graphics Hardware White Paper Intel Software Solutions Group David Bookout Satheesh G. Subramanian Multi-Threaded Shadow Volumes on Mainstream Graphics Hardware This white paper describes techniques to generate shadows

More information

Shaders in Eve Online Páll Ragnar Pálsson

Shaders in Eve Online Páll Ragnar Pálsson Shaders in Eve Online Páll Ragnar Pálsson EVE Online Eve Online Trinity First released 2003 Proprietary graphics engine DirectX 9 (DX11 on its way) Shader Model 3 (4 & 5 in development) HLSL Turning this

More information

Controlling the GPU from the CPU: The 3D API

Controlling the GPU from the CPU: The 3D API Controlling the GPU from the CPU: The 3D API Cyril Zeller Overview Software architecture Double buffering Basic skeleton of a graphics application Initialization Rendering loop Specific topics: DirectX

More information

Porting 32-bit Applications to the Itanium Architecture - Lab 3: Managing Data Size

Porting 32-bit Applications to the Itanium Architecture - Lab 3: Managing Data Size Porting 32-bit Applications to the Itanium Architecture - Lab 3: Managing Data Size Introduction Overview Migrating your application from 32-bit to 64-bit will impact your data size in a number of ways.

More information

Understanding XNA Framework Performance. Shawn Hargreaves Software Development Engineer XNA Community Game Platform Microsoft

Understanding XNA Framework Performance. Shawn Hargreaves Software Development Engineer XNA Community Game Platform Microsoft Understanding XNA Framework Performance Shawn Hargreaves Software Development Engineer XNA Community Game Platform Microsoft Contents Graphics Offload to the GPU Understand Xbox 360 system calls SpriteBatch,

More information

Beginning Direct3D Game Programming: 6. First Steps to Animation. Division of Digital Contents, DongSeo University.

Beginning Direct3D Game Programming: 6. First Steps to Animation. Division of Digital Contents, DongSeo University. Beginning Direct3D Game Programming: 6. First Steps to Animation jintaeks@gmail.com Division of Digital Contents, DongSeo University. April 2016 Understanding Transformations At the head of the pipeline,

More information

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog RSX Best Practices Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog RSX Best Practices About libgcm Using the SPUs with the RSX Brief overview of GCM Replay December 7 th, 2004

More information

Viewport 2.0 API Porting Guide for Locators

Viewport 2.0 API Porting Guide for Locators Viewport 2.0 API Porting Guide for Locators Introduction This document analyzes the choices for porting plug-in locators (MPxLocatorNode) to Viewport 2.0 mostly based on the following factors. Portability:

More information

Heap Arrays and Linked Lists. Steven R. Bagley

Heap Arrays and Linked Lists. Steven R. Bagley Heap Arrays and Linked Lists Steven R. Bagley Recap Data is stored in variables Can be accessed by the variable name Or in an array, accessed by name and index Variables and arrays have a type Create our

More information

TentamensKod: (Ifylles av student) Tentamensdatum: Tid: 10:00 12:00. Hjälpmedel: Inga hjälpmedel

TentamensKod: (Ifylles av student) Tentamensdatum: Tid: 10:00 12:00. Hjälpmedel: Inga hjälpmedel Computer Graphics Provmoment: Ladokkod: Tentamen ges för: Teoretisk tentamen 21DG2B Systemarkitektprogrammet 7,5 högskolepoäng TentamensKod: (Ifylles av student) Tentamensdatum: 2017-05-29 Tid: 10:00 12:00

More information

Evolution of GPUs Chris Seitz

Evolution of GPUs Chris Seitz Evolution of GPUs Chris Seitz Overview Concepts: Real-time rendering Hardware graphics pipeline Evolution of the PC hardware graphics pipeline: 1995-1998: Texture mapping and z-buffer 1998: Multitexturing

More information

DirectX 12. Why DirectX? Limited platforms Windows 10 XBox One. Large, connected API Direct3D DirectXMath XInput XAudio2

DirectX 12. Why DirectX? Limited platforms Windows 10 XBox One. Large, connected API Direct3D DirectXMath XInput XAudio2 DirectX 12 Why DirectX? Limited platforms Windows 10 XBox One Large, connected API Direct3D DirectXMath XInput XAudio2 Good for games on Microsoft platforms 1 Setting Up for DX12 Development Be on Windows

More information

Why DirectX? Limited platforms. Large, connected API. Good for games on Microsoft platforms. Windows 10 XBox One. Direct3D DirectXMath XInput XAudio2

Why DirectX? Limited platforms. Large, connected API. Good for games on Microsoft platforms. Windows 10 XBox One. Direct3D DirectXMath XInput XAudio2 DirectX 12 Why DirectX? Limited platforms Windows 10 XBox One Large, connected API Direct3D DirectXMath XInput XAudio2 Good for games on Microsoft platforms Setting Up for DX12 Development Be on Windows

More information

Sébastien Dominé, NVIDIA. CgFX

Sébastien Dominé, NVIDIA. CgFX Sébastien Dominé, NVIDIA CgFX Overview What is CgFX? CgFX runtime Production pipeline with CgFX CgFX Tools set Demo What is CgFX? Supports Microsoft.fx files Cg plus: Multi-pass Hardware fallbacks (techniques)

More information

Direct Input. Gail Carmichael comp3501-fall2012.blogspot.com

Direct Input. Gail Carmichael comp3501-fall2012.blogspot.com Direct Input Gail Carmichael comp3501-fall2012.blogspot.com COM Design Component Object Model Declare object pointer Call function to instantiate objects Interface Hierarchy IDirectInput8 IDirectInputDevice8

More information

Kang, Seong-tae Computer Graphics, 2007 Spring. Texture mapping Texture mapping on Direct3D. CGLab

Kang, Seong-tae Computer Graphics, 2007 Spring. Texture mapping Texture mapping on Direct3D. CGLab DirectX Programming #4 Kang, Seong-tae Computer Graphics, 2007 Spring Contents Texture mapping Texture mapping on Direct3D Texture Mapping Kang, Seong-tae Computer Graphics, 2007 Spring Texture In real

More information

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination 3D Polygon Rendering What steps are necessary to utilize spatial coherence while drawing

More information

Katen Shah Luis Gimenez Arzhange Safdarzadeh. December Intel Corporation

Katen Shah Luis Gimenez Arzhange Safdarzadeh. December Intel Corporation DIRECTX CONSTANTS OPTIMIZATIONS FOR INTEL INTEGRATED GRAPHICS Katen Shah Luis Gimenez Arzhange Safdarzadeh December 2008 Intel Corporation INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL

More information

Skinned Instancing. Bryan Dudash

Skinned Instancing. Bryan Dudash Skinned Instancing Bryan Dudash bdudash@nvidia.com 14 February 2007 Document Change History Version Date Responsible Reason for Change 1.0 2/14/07 Bryan Dudash Initial release 2.0 7/26/07 Bryan Dudash

More information

CS 4620 Program 3: Pipeline

CS 4620 Program 3: Pipeline CS 4620 Program 3: Pipeline out: Wednesday 14 October 2009 due: Friday 30 October 2009 1 Introduction In this assignment, you will implement several types of shading in a simple software graphics pipeline.

More information

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th 1. a. Show that the following sequences commute: i. A rotation and a uniform scaling ii. Two rotations about the same axis iii. Two

More information

OpenGL and Direct3D are on a par and rather similar. Please notice the following differences:

OpenGL and Direct3D are on a par and rather similar. Please notice the following differences: 1 Copyright by V. Miszalok, last update: 20-11-2005 OpenGL Libraries and DirectX Namespaces OpenGL & Direct3D Pipeline HEL and HAL Direct3D Device OpenGL (= Open Graphics Language) is a software interface

More information

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008. CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions The Midterm Exam was given in class on Thursday, October 23, 2008. 1. [4 pts] Drawing Where? Your instructor says that objects should always be

More information

Graphics and Interaction Rendering pipeline & object modelling

Graphics and Interaction Rendering pipeline & object modelling 433-324 Graphics and Interaction Rendering pipeline & object modelling Department of Computer Science and Software Engineering The Lecture outline Introduction to Modelling Polygonal geometry The rendering

More information

WebGL: Hands On. DevCon5 NYC Kenneth Russell Software Engineer, Google, Inc. Chair, WebGL Working Group

WebGL: Hands On. DevCon5 NYC Kenneth Russell Software Engineer, Google, Inc. Chair, WebGL Working Group WebGL: Hands On DevCon5 NYC 2011 Kenneth Russell Software Engineer, Google, Inc. Chair, WebGL Working Group Today's Agenda Introduce WebGL and its programming model. Show code for a complete example. Demonstrate

More information

Introductory Seminar

Introductory Seminar EDAF80 Introduction to Computer Graphics Introductory Seminar OpenGL & C++ Michael Doggett 2017 C++ slides by Carl Johan Gribel, 2010-13 Today Lab info OpenGL C(++)rash course Labs overview 5 mandatory

More information

Chapter 2 (Dynamic variable (i.e. pointer), Static variable)

Chapter 2 (Dynamic variable (i.e. pointer), Static variable) Chapter 2 (Dynamic variable (i.e. pointer), Static variable) August_04 A2. Identify and explain the error in the program below. [4] #include int *pptr; void fun1() { int num; num=25; pptr= &num;

More information

REFERENCES, POINTERS AND STRUCTS

REFERENCES, POINTERS AND STRUCTS REFERENCES, POINTERS AND STRUCTS Problem Solving with Computers-I https://ucsb-cs16-sp17.github.io/ Pointer assignment 2 int *p1, *p2, x; p1 = &x; p2 = p1; Q: Which of the following pointer diagrams best

More information

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE UGRAD.CS.UBC.C A/~CS314 Mikhail Bessmeltsev 1 WHAT IS RENDERING? Generating image from a 3D scene 2 WHAT IS RENDERING? Generating image

More information

IWKS 3400 LAB 11 1 JK Bennett

IWKS 3400 LAB 11 1 JK Bennett IWKS 3400 LAB 11 1 JK Bennett This lab dives a little bit deeper into HLSL effects, particularly as they relate to lighting and shading. We will begin by reviewing some basic 3D principles, and then move

More information

Programming Graphics Hardware

Programming Graphics Hardware Tutorial 5 Programming Graphics Hardware Randy Fernando, Mark Harris, Matthias Wloka, Cyril Zeller Overview of the Tutorial: Morning 8:30 9:30 10:15 10:45 Introduction to the Hardware Graphics Pipeline

More information

DirectX 11 First Elements

DirectX 11 First Elements DirectX 11 First Elements 0. Project changes changed Dx11Base.h void Update( float dt ); void Render( ); to virtual void Update( float dt ) = 0; virtual void Render( ) = 0; new App3D.h #ifndef _APP_3D_H_

More information

OUTLINE. Learn the basic design of a graphics system Introduce pipeline architecture Examine software components for a graphics system

OUTLINE. Learn the basic design of a graphics system Introduce pipeline architecture Examine software components for a graphics system GRAPHICS PIPELINE 1 OUTLINE Learn the basic design of a graphics system Introduce pipeline architecture Examine software components for a graphics system 2 IMAGE FORMATION REVISITED Can we mimic the synthetic

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

Blending. To blend (combine) the pixels. To render semi-transparent objects. Currently Rasterizing. Previous on the Back Buffer.

Blending. To blend (combine) the pixels. To render semi-transparent objects. Currently Rasterizing. Previous on the Back Buffer. Blending 4 th Week, 2009 Blending To blend (combine) the pixels To render semi-transparent objects Source Pixel p ij Currently Rasterizing Destination Pixel b ij Previous on the Back Buffer Opaque Teapot

More information

Converts geometric primitives into images Is split into several independent stages Those are usually executed concurrently

Converts geometric primitives into images Is split into several independent stages Those are usually executed concurrently Rendering Pipeline Rendering Pipeline Converts geometric primitives into images Is split into several independent stages Those are usually executed concurrently Pipeline 18.10.2013 Steiner- Wallner- Podaras

More information

EL2310 Scientific Programming

EL2310 Scientific Programming Lecture 12: Memory, Files and Bitoperations (pronobis@kth.se) Overview Overview Lecture 12: Memory, Files and Bit operations Wrap Up Main function; reading and writing Bitwise Operations Wrap Up Lecture

More information

Computer Graphics 10 - Shadows

Computer Graphics 10 - Shadows Computer Graphics 10 - Shadows Tom Thorne Slides courtesy of Taku Komura www.inf.ed.ac.uk/teaching/courses/cg Overview Shadows Overview Projective shadows Shadow textures Shadow volume Shadow map Soft

More information

Homework #3 CS2255 Fall 2012

Homework #3 CS2255 Fall 2012 Homework #3 CS2255 Fall 2012 MULTIPLE CHOICE 1. The, also known as the address operator, returns the memory address of a variable. a. asterisk ( * ) b. ampersand ( & ) c. percent sign (%) d. exclamation

More information

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Project 2 due Friday, October 12

More information

C++ ARRAYS POINTERS POINTER ARITHMETIC. Problem Solving with Computers-I

C++ ARRAYS POINTERS POINTER ARITHMETIC. Problem Solving with Computers-I C++ ARRAYS POINTERS POINTER ARITHMETIC Problem Solving with Computers-I General model of memory Sequence of adjacent cells Each cell has 1-byte stored in it Each cell has an address (memory location) Memory

More information

In Java we have the keyword null, which is the value of an uninitialized reference type

In Java we have the keyword null, which is the value of an uninitialized reference type + More on Pointers + Null pointers In Java we have the keyword null, which is the value of an uninitialized reference type In C we sometimes use NULL, but its just a macro for the integer 0 Pointers are

More information

Shaders. Slide credit to Prof. Zwicker

Shaders. Slide credit to Prof. Zwicker Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?

More information

Introduction. This project will focus primarily on processes.

Introduction. This project will focus primarily on processes. Project 2 Processes Introduction This project will focus primarily on processes. In this project, you will become familiar with: 1. Locks for kernel-level data structures; concurrency. 2. Implementing

More information

CS 4620 Midterm, March 21, 2017

CS 4620 Midterm, March 21, 2017 CS 460 Midterm, March 1, 017 This 90-minute exam has 4 questions worth a total of 100 points. Use the back of the pages if you need more space. Academic Integrity is expected of all students of Cornell

More information

Instruction for IVR interface

Instruction for IVR interface This document is aimed at helping users to use IVR interface developing applications that will be able to run and display on integrated computer. Instruction for IVR interface IDEALENS 2016.11.1 CONTENTS

More information

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express Level: Intermediate Area: Graphics Programming Summary This document is an introduction to the series of samples,

More information

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Shadow Buffer Theory Observation:

More information

Blending Equation Blend Factors & Mode Transparency Creating an Alpha Channel Using DX Tex Tool Render Semi-Transparent Objects.

Blending Equation Blend Factors & Mode Transparency Creating an Alpha Channel Using DX Tex Tool Render Semi-Transparent Objects. Overview Blending Blend Factors & Mode Transparency Creating an Alpha Channel Using DX Tex Tool Render Semi-Transparent Objects 305890 Spring 2014 5/27/2014 Kyoung Shin Park Blending Allows us to blend

More information

DH2323 DGI13 Lab 3 Rasterization

DH2323 DGI13 Lab 3 Rasterization DH2323 DGI13 Lab 3 Rasterization Raytracing is the simplest way of computing a 2D image of a 3D scene. It can be used to simulate all kinds of phenomena, much more than we implemented in the second lab.

More information

GPU Memory Model. Adapted from:

GPU Memory Model. Adapted from: GPU Memory Model Adapted from: Aaron Lefohn University of California, Davis With updates from slides by Suresh Venkatasubramanian, University of Pennsylvania Updates performed by Gary J. Katz, University

More information

Chapter 24. A DirectX 5 Update

Chapter 24. A DirectX 5 Update Chapter 24 I A DirectX 5 Update Why Read This Chapter? Time waits for no person. While we were putting our book together, Microsoft was working on the next generation of DirectX DirectX foundation 5. In

More information

Picking (In WebGL) Picking idea

Picking (In WebGL) Picking idea 9. Picking IN THIS CHAPTER Selecting objects in a WebGL scene using the mouse Creating and using offscreen framebuffers What renderbuffers are and how they are used by framebuffers Reading pixels from

More information

Geometry Shader - Silhouette edge rendering

Geometry Shader - Silhouette edge rendering Geometry Shader - Silhouette edge rendering Introduction This paper will describe the process of making an outline shader, using the Geometry Shader. The shader is designed for DirectX10 applications (and

More information

Lecture 5 Vertex and Fragment Shaders-1. CITS3003 Graphics & Animation

Lecture 5 Vertex and Fragment Shaders-1. CITS3003 Graphics & Animation Lecture 5 Vertex and Fragment Shaders-1 CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives The rendering pipeline and the shaders Data

More information

DECLARATIVE AR IN THE WEB WITH XML3D & XFLOW. By Felix Klein

DECLARATIVE AR IN THE WEB WITH XML3D & XFLOW. By Felix Klein DECLARATIVE AR IN THE WEB WITH XML3D & XFLOW By Felix Klein 1 THE WEB IS READY FOR AR Fast JavaScript WebGL, WebCL getusermedia, WebRTC Geolocation, Orientation, Motion > Any Problem? WEBGL: POWERFUL AND

More information

CS Exam 1 Review Problems Fall 2017

CS Exam 1 Review Problems Fall 2017 CS 45500 Exam 1 Review Problems Fall 2017 1. What is a FrameBuffer data structure? What does it contain? What does it represent? How is it used in a graphics rendering pipeline? 2. What is a Scene data

More information

Dynamic Memory Allocation

Dynamic Memory Allocation Dynamic Memory Allocation Lecture 15 COP 3014 Fall 2017 November 6, 2017 Allocating memory There are two ways that memory gets allocated for data storage: 1. Compile Time (or static) Allocation Memory

More information

Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics. Sean Ellis Consultant Graphics Engineer ARM, Maidenhead

Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics. Sean Ellis Consultant Graphics Engineer ARM, Maidenhead Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics Sean Ellis Consultant Graphics Engineer ARM, Maidenhead Introduction M3G 1.x Recap ARM M3G Integration M3G 2.0 Update

More information

cout << "How many numbers would you like to type? "; cin >> memsize; p = new int[memsize];

cout << How many numbers would you like to type? ; cin >> memsize; p = new int[memsize]; 1 C++ Dynamic Allocation Memory needs were determined before program execution by defining the variables needed. Sometime memory needs of a program can only be determined during runtime, or the memory

More information

Computer Graphics I Lecture 11

Computer Graphics I Lecture 11 15-462 Computer Graphics I Lecture 11 Midterm Review Assignment 3 Movie Midterm Review Midterm Preview February 26, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/

More information

CSE 167: Introduction to Computer Graphics Lecture #7: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #7: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #7: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 Announcements Project 2 due Friday 4/22 at 2pm Midterm #1 on

More information

Advanced Lighting Techniques Due: Monday November 2 at 10pm

Advanced Lighting Techniques Due: Monday November 2 at 10pm CMSC 23700 Autumn 2015 Introduction to Computer Graphics Project 3 October 20, 2015 Advanced Lighting Techniques Due: Monday November 2 at 10pm 1 Introduction This assignment is the third and final part

More information

Working with Metal Overview

Working with Metal Overview Graphics and Games #WWDC14 Working with Metal Overview Session 603 Jeremy Sandmel GPU Software 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Optimisation. CS7GV3 Real-time Rendering

Optimisation. CS7GV3 Real-time Rendering Optimisation CS7GV3 Real-time Rendering Introduction Talk about lower-level optimization Higher-level optimization is better algorithms Example: not using a spatial data structure vs. using one After that

More information

OPENGL RENDERING PIPELINE

OPENGL RENDERING PIPELINE CPSC 314 03 SHADERS, OPENGL, & JS UGRAD.CS.UBC.CA/~CS314 Textbook: Appendix A* (helpful, but different version of OpenGL) Alla Sheffer Sep 2016 OPENGL RENDERING PIPELINE 1 OPENGL RENDERING PIPELINE Javascript

More information

Chapter 17: Linked Lists

Chapter 17: Linked Lists Chapter 17: Linked Lists 17.1 Introduction to the Linked List ADT Introduction to the Linked List ADT Linked list: set of data structures (nodes) that contain references to other data structures list head

More information

C Pointers. ENGG1002 Computer Programming and Applica;ons Dr. Hayden Kwok Hay So Week 2. GeGng Hold of Memory. Sta;c: When we define a variable

C Pointers. ENGG1002 Computer Programming and Applica;ons Dr. Hayden Kwok Hay So Week 2. GeGng Hold of Memory. Sta;c: When we define a variable C Pointers ENGG1002 Computer Programming and Applica;ons Dr. Hayden Kwok Hay So Week 2 GeGng Hold of Memory Sta;c: When we define a variable int gvar; 136 132 128 12 120 116 112 108 10 100 0 27 3 2 10

More information

Porting Roblox to Vulkan. Arseny

Porting Roblox to Vulkan. Arseny Porting Roblox to Vulkan Arseny Kapoulkine @zeuxcg 1 What is Roblox? Online multiplayer game creation platform All content is user generated Windows, macos, ios, Android, Xbox One 50M+ MAU, 1.5M+ CCU 2

More information

Designing a Modern GPU Interface

Designing a Modern GPU Interface Designing a Modern GPU Interface Brooke Hodgman ( @BrookeHodgman) http://tiny.cc/gpuinterface How to make a wrapper for D3D9/11/12, GL2/3/4, GL ES2/3, Metal, Mantle, Vulkan, GNM & GCM without going (completely)

More information

Direct3D API Issues: Instancing and Floating-point Specials. Cem Cebenoyan NVIDIA Corporation

Direct3D API Issues: Instancing and Floating-point Specials. Cem Cebenoyan NVIDIA Corporation Direct3D API Issues: Instancing and Floating-point Specials Cem Cebenoyan NVIDIA Corporation Agenda Really two mini-talks today Instancing API Usage Performance / pitfalls Floating-point specials DirectX

More information

Tema 6: Dynamic memory

Tema 6: Dynamic memory Tema 6: Programming 2 and vectors defined with 2013-2014 and Index and vectors defined with and 1 2 3 and vectors defined with and and vectors defined with and Size is constant and known a-priori when

More information

Intel RealSense SDK 2014

Intel RealSense SDK 2014 Capturing Raw Streams Tutorial Using Unity* Software Intel RealSense SDK 2014 With the Intel RealSense SDK, you have access to robust, natural human-computer interaction (HCI) algorithms such as face tracking,

More information

Francesco Nidito. Programmazione Avanzata AA 2007/08

Francesco Nidito. Programmazione Avanzata AA 2007/08 Francesco Nidito in the Programmazione Avanzata AA 2007/08 Outline 1 2 3 in the in the 4 Reference: Micheal L. Scott, Programming Languages Pragmatics, Chapter 7 What is a type? in the What is a type?

More information

Programming for Real-Time Tessellation on GPU

Programming for Real-Time Tessellation on GPU Programming for Real-Time Tessellation on GPU Natalya Tatarchuk Joshua Barczak AMD, Inc. Bill Bilodeau (a) An untessellated character (b) Character rendered with GPU tessellation (c) An untessellated character

More information

CS Computer Graphics: Introduction to Ray Tracing

CS Computer Graphics: Introduction to Ray Tracing CS 543 - Computer Graphics: Introduction to Ray Tracing by Robert W. Lindeman gogo@wpi.edu (with help from Peter Lohrmann ;-) View Volume View volume similar to gluperspective Angle Aspect Near? Far? But

More information

CS Computer Graphics: Introduction to Ray Tracing

CS Computer Graphics: Introduction to Ray Tracing CS 543 - Computer Graphics: Introduction to Ray Tracing by Robert W. Lindeman gogo@wpi.edu (with help from Peter Lohrmann ;-) View Volume View volume similar to gluperspective Angle Aspect Near? Far? But

More information