Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development...

15
© Copyright Khronos Group, 2007 - Page Tom Olson Texas Instruments, Inc.

Transcript of Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development...

Page 1: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page

Tom OlsonTexas Instruments, Inc.

Page 2: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Announcing glFX™!• A new Khronos Working Group• Ratified by Khronos Promoters on March 1st 2007

glFX™

Khronos working groups have been

discussing the need for a shared FX API for

over a year

Page 3: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Effects and Effects Frameworks• What they are• Why glFX is needed

The glFX Working Group• Deliverables• Plan• Schedule

Call for Participation

Page 4: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Conceptual definition: An Effect isa portable, abstract way of defining or changing the appearance of an object or scene

Examples• Materials: e.g. BRDFs• Surface pseudo-geometry: bump maps, EMBM, parallax mapping, fur• Global effects: lens flare, depth of field, HDR blooming• Lighting effects: shadows, caustics

Effects are a key structuring device in modern rendering engines

Page 5: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

An Effect isA set of resources,A set of control parameters, and A set of computational steps or passes

…that define or modulate the appearance of an object or scene

Page 6: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Need ways to work with effects that satisfies the needs of• Artists and Designers• Programmers

Effects Frameworks meet this need

Artists

Programmers

Designers

EffectsFramework

Programmers use IDEs to create shaders and

pass structure, and apply effects at runtime

in the engine

Designers work with engine tools to

control application of global effects

Artists use DCC tools to create texture and geometry resources, and apply effects to models and scenes

Page 7: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Runtime API• Create and apply effects• …in DCC tools, as part of the development cycle• …in application code, to use effects at execution time

Encoding schemes• Map between effects and sequences of tokens; e.g., a file format• Allow persistent storage and interchange between DCC tools• Deliver effects to the application

Data Model• Defines the space of effects that can be created• E.g., an attribute grammar or schema

Page 8: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Engine-specific frameworks• For specific games or game engines• Not available for general use

Microsoft .FX• For HLSL with DirectX

CgFX• For Cg with DirectX or OpenGL

No open, widely supported framework supports GLSL or GLSL ES• Limits DCC tool support• Developers have to create ad hoc solutions

Hence, glFX: An effects framework for OpenGL and OpenGL ES

Page 9: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Data Model: Collada FX• Defined by Collada Working Group• Widely adopted for DCC tool interchange

Encodings• Collada FX file format for persistence, interchange• Delivery formats will be engine-specific• The glFX working group may provide examples

API• The glFX API will be defined by the working group

Page 10: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

glFX API

Collada FX Loader

COLLADA FX

RenderingEngine

DCC Tool

Page 11: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

glFX API

Development

Deployment

DCC Tools

Creates hardware friendly Scene Binary - creating indexed geometry, tri-strips, compressed textures, etc.

DCC ToolsDCC Tools

COLLADA FXconditioner

Create the FX content. Combines effects into a library. Filter out duplicate shaders. Multiple offline compilers for multiple hardware profiles. Etc.

Custom FX Loader

COLLADA FX

Custom Content Binary

Custom FX Binary

Efficient FX binary file - reference designs for content portability.

Traverses optimized scene data, uses the FX Runtime API to manage most OpenGL ES 2.0 rendering calls.

Maps information directly from the FX binary to sets up the rendering pipeline. May also perform final compilation of HW agnostic information.

Offline COLLADAConditioner

RenderingEngine

Game

Page 12: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

The glFX API• Support procedural creation and use of effects by both applications and tools• Will be fully compatible with the Collada FX data model• Will integrate seamlessly with OpenGL and OpenGL ES

Conformance Test Suite• Verify correctness of glFX implementations

Supporting Materials• Documentation• Example programs• …possibly including an open source Collada FX player

Page 13: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Start with CgFX 1.5 • Thanks NVidia!

Cut down to core features• Thanks Sony CE!

Draft for discussion at SIGGRAPH 2007• Under Khronos reviewer’s agreement

Spec freeze by end of 2007

Page 14: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX

Feel free to join us! • Membership information at http://www.khronos.org

glFX

Page 15: Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development Deployment DCC Tools Creates hardware friendly Scene Binary - creating indexed geometry,

© Copyright Khronos Group, 2007 - Page glFX