23

차세대 그래픽 개발 환경.NET & DirectX 강성재 [email protected] Community Specialist Microsoft Corporation

Embed Size (px)

Citation preview

Page 1: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation
Page 2: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

차세대 그래픽 개발 환차세대 그래픽 개발 환경 경 .NET & DirectX.NET & DirectX

강성재강성재[email protected] SpecialistCommunity Specialist

Microsoft CorporationMicrosoft Corporation

Page 3: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

AgendaAgenda

DirectX 9.0 DirectX 9.0 살펴보기살펴보기 .NET.NET 과 과 DirectX 9 Managed DirectX 9 Managed

ProgrammingProgramming

Page 4: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

DirectX 9.0 DirectX 9.0 살펴보기살펴보기 Foundation LayerFoundation Layer

DirectGraphicsDirectGraphics DirectInputDirectInput DirectSoundDirectSound DirectPlayDirectPlay DirectMusicDirectMusic

Media LayerMedia Layer DirectShowDirectShow

Page 5: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

Windows Graphics StackWindows Graphics Stack

D3D Rendering

DXG Infrastructure

D3DX

Application

Driver

Hardware

Gameplay

Shader Compiler, shader mgt routines

Software emulation, hw transport

Execution

Command translation, buffering

Resource Mgt, OS

Page 6: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

DirectXDirectX®® High Level High LevelShader Language (HLSL)Shader Language (HLSL) Design BaselineDesign Baseline PreprocessorPreprocessor TypesTypes VariablesVariables User FunctionsUser Functions Some Intrinsic functionsSome Intrinsic functions

Page 7: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

Design BaselineDesign Baseline

‘‘C’ -like syntaxC’ -like syntax A standard languageA standard language

like C++ or C#™ or HTMLlike C++ or C#™ or HTML in Visual Studio® .NETin Visual Studio® .NET

Page 8: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

PreprocessorPreprocessor

#define#define #elif#elif #else#else #endif#endif #error#error

Preprocessor present in all file Preprocessor present in all file formatsformats ASM, HLSL, EffectASM, HLSL, Effect

Page 9: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

TypesTypes

Basic typesBasic types floatfloat intint boolbool doubledouble halfhalf

Structs and arrays supportedStructs and arrays supported

Page 10: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

VariablesVariables

Local / globalLocal / global StaticStatic ConstConst

Page 11: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

User FunctionsUser Functions

Standard ‘C’-like functionsStandard ‘C’-like functions Output type and input parametersOutput type and input parameters Parameters are passed by copy Parameters are passed by copy

in/copy out mechanismin/copy out mechanism in/out declarationin/out declaration

Inlined internallyInlined internally NO recursionNO recursion

Page 12: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

Some Intrinsic functionsSome Intrinsic functionssqrt value sqrt(value a) Square root exp2 value exp2(value a) Base 2 Exp log2 value log2(value a) Base 2 Log min value min(value a, value b) Maximum max value max(value a, value b) Minimum abs value abs(value a, value b) Absolute value length float length(value a) Vector length dot float dot(value a) Dot product mul value mul(value a, value b) Matrix multiplication any float any(value a) Logical OR of all input

components all float all(value a) Logical AND of all input

components

Page 13: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

DirectX 8 Vertex DeclarationDirectX 8 Vertex Declaration

v0 skip v1

Strm0Strm0 Strm1Strm1

Declaration

Vertex layout

vs 1.1mov r0, v0…

Shader program

Shader handleShader handle

Page 14: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

pos norm diff

Strm0Strm0 Strm1Strm1

pos norm diff

Strm0Strm0

Declaration

Vertex layout

vs 1.1

dcl_position v0

dcl_diffuse v1

mov r0, v0

Shader program(Shader handle)

New Vertex DeclarationNew Vertex Declaration

vs 1.1

dcl_position v0

dcl_diffuse v1

mov r0, v0

Page 15: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

.NET.NET 과 과 DirectX 9 Managed DirectX 9 Managed ProgrammingProgramming What is Managed DirectX?What is Managed DirectX? Managed DirectX NamespaceManaged DirectX Namespace

Page 16: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

What is Managed DirectX?What is Managed DirectX? A thin wrapping of DirectX to provide A thin wrapping of DirectX to provide

support to CLS Compliant Languages (i.e. support to CLS Compliant Languages (i.e. C#)C#)

Eliminates using COM interop or the DXVB Eliminates using COM interop or the DXVB librarylibrary Removes performance cost of COM interopRemoves performance cost of COM interop Using the DXVB library was unsupportedUsing the DXVB library was unsupported

Page 17: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

What is Managed DirectX?What is Managed DirectX? Features supported in Managed DirectXFeatures supported in Managed DirectX

GraphicsGraphics Feature parity with Direct3D, D3DXFeature parity with Direct3D, D3DX DirectDrawDirectDraw®® (DirectX 7 level interfaces) (DirectX 7 level interfaces)

AudioAudio Feature parity with DirectSoundFeature parity with DirectSound®®

InputInput Feature parity with DirectInputFeature parity with DirectInput®®

NetworkingNetworking Feature parity with DirectPlayFeature parity with DirectPlay®®

VideoVideo Simple audio/video playback functionalitySimple audio/video playback functionality

DiagnosticsDiagnostics Easily access data provided by DxDiagEasily access data provided by DxDiag

Page 18: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

What is Managed DirectX?What is Managed DirectX? Principle NamespacesPrinciple Namespaces

Microsoft.DirectXMicrosoft.DirectX Microsoft.DirectX.Direct3DMicrosoft.DirectX.Direct3D Microsoft.DirectX.DirectPlayMicrosoft.DirectX.DirectPlay Microsoft.DirectX.DirectDrawMicrosoft.DirectX.DirectDraw Microsoft.DirectX.DirectSoundMicrosoft.DirectX.DirectSound Microsoft.DirectX.DirectMusicMicrosoft.DirectX.DirectMusic Microsoft.DirectX.DirectInputMicrosoft.DirectX.DirectInput Microsoft.DirectX.AudioVideoPlaybackMicrosoft.DirectX.AudioVideoPlayback Microsoft.DirectX.DiagnosticsMicrosoft.DirectX.Diagnostics

Page 19: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

demodemo

Page 20: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

Design DX10Design DX10

차세대 하드웨어 적용차세대 하드웨어 적용 새로운새로운 Shader modelsShader models

Refactoring APIs Refactoring APIs 와 와 DDIsDDIs 관리형 관리형 GPU GPU 와 와 CPUCPU

Page 21: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

5-Year Plan5-Year Plan 2002 DX92002 DX9 2003 DX9.12003 DX9.1 2004 DX9+, DX10 in Longhorn2004 DX9+, DX10 in Longhorn

New shader modelsNew shader models Introduce GPU managementIntroduce GPU management

2005 2005 안정된 안정된 DX10DX10 Begin technology transfers toBegin technology transfers to

VStudio team (compilers, tools)VStudio team (compilers, tools) Core OS team (GPU management)Core OS team (GPU management)

2006 Blackcomb2006 Blackcomb

Page 22: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

Q & AQ & A

??

Page 23: 차세대 그래픽 개발 환경.NET & DirectX 강성재 sungjaek@microsoft.com Community Specialist Microsoft Corporation

© 2002 Microsoft Corporation. All rights reserved.© 2002 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.