Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development...
Transcript of Tom Olson - Khronos Group© Copyright Khronos Group, 2007 - Page glFX glFX API Development...
© Copyright Khronos Group, 2007 - Page
Tom OlsonTexas Instruments, Inc.
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© Copyright Khronos Group, 2007 - Page glFX
glFX API
Collada FX Loader
COLLADA FX
RenderingEngine
DCC Tool
© 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
© 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
© 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
© Copyright Khronos Group, 2007 - Page glFX
Feel free to join us! • Membership information at http://www.khronos.org
glFX
© Copyright Khronos Group, 2007 - Page glFX