Top Banner
CEDEC 2006 State of the Art Cross Platform Shader Development Philippe Rollin
34

State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Nov 08, 2018

Download

Documents

Dung Tien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

CEDEC 2006

State of the Art Cross Platform Shader

Development

Philippe Rollin

Page 2: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Agenda

FX Composer 2.0 OverviewCross-Platform Shader AuthoringProduction Pipeline IntegrationConclusionQ&A

Page 3: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

FX Composer 2.0What and Who?

What is it for?Shader Authoring IDEDebugging and ProfilingScene IntegrationAsset Management

Who is it for?Graphics ProgrammersTechnical DirectorsTechnical ArtistsArtists

Page 4: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Your Requirements

Handling of complex renderingHighly customizable layout managementPowerful user interfaceShader performance profilingPlug-in based architectureScriptable

Page 5: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Flexible Render

Many API & shading language combinationsSurface and fullscreenshaders

Page 6: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Improved User Interface

Customized user layoutsShow or hide panelsVC2005 docking styleSave/Load layouts

Page 7: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Improved User Interface

Page 8: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Typical FX Composer LayoutProperties

PreviewInfo, Scripting, ErrorsTextures

CodingManagement

Page 9: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

DEMO:Shader Authoring

Loading ProjectCompilingErrors and Tasks

Page 10: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Project Explorer

Manage multiple documents

Documents contain one or more assets

Assets are effects, materials, meshes, and other scene elements

Organize you assetsMove, copy, delete, renameDrag and dropOne or many documentsEffect Libraries

COLLADA

Page 11: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Open asset exchange format (.dae)

Governed by the Khronos GroupIncludes numerous ISVs and IHVsMature DCC plugins for extensive support

Supported by FX Composer 2Import & ExportSupports effects and materialsFacilitates asset exchange with DCC appsOther file formats supported

Page 12: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Library View

Organize across documentsSort assets by typeVisualize Assets

ScenesEffect

Authoring

Page 13: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Effect Authoring

View effect structureTechniquesPassesParameters

Authoring using toolbars and context menus

Add childrenRemove childrenAdvanced options

Page 14: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

CgFX & COLLADA FX Cg

CgFXHand codedLess user interface assistance

COLLADA FX for Cg authoringMost user friendly experienceFully editable via user interfaceCan migrate your CgFX assetsLess hand coding

Zero XMLCg, GLSL only when writing the GPU shader code

Page 15: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

DEMO:Material Authoring

Creating materialsAssigning effectsTweaking material parameters

Page 16: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

DEMO:Scene Integration

Light creationScene traversalBind light to materialRealtime manipulation

Page 17: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Shader Performance Simulation

Page 18: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Production Pipeline Integration

Scene binding expressionsAutomation via scriptingPlug-in based architectureSource control integrationProduction Pipeline Samples

Page 19: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Scene binding expressions

float4 LightPos : Position<

string Object = "PointLight";string Space = "Object";

> = {-10.0f, 10.0f, -10.0f, 0.0f};

Semantic

Annotations

Page 20: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Custom Semantics and Annotations

1 :<RemappedSemantic name="myWorldView">2 : <MatrixMultiply description="World * View">3 : <input type="internalsemantic" value="world"/>4 : <input type="internalsemantic" value="view"/>5 : </MatrixMultiply>6 :</RemappedSemantic>

Hook parameter to scene and system dataExpressions via xml configuration fileExtensive Library of Operators

dot & cross products, mux, demux, matrix ops, ...Custom operators

Built from XML using operatorsVia plug-in

Page 21: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Automation Via Scripting

Automatic assignment of Materials to geometryShader parameters to scene objects (nearest lights, cameras, etc...)A model’s accessories to attachment points

Common-tasks toolbar (ala Maya/MEL)

Page 22: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Automation Via Scripting

#Python scripting

# Convert any Possible Profile to COLLADA FXdef ConvertToCOLLADA():

effects = FXRuntime.Instance.Library.FindLibraryItems(FXEffect)for effect in effects:

for profile in effect.Profiles:if profile.CanConvertToColladaFX() == True:

profile.ConvertToColladaFX()

# Create an effectdef bindMMM():

CmdGroupBegin.Do("script: assign cgfx files to MMM ")

SelectRenderPort("OpenGL")ForceRedraw()

CmdGroupEnd.Do()

# get the cgfx files to assign to MMM

files = FXEffectUtils.GetEffectFiles()for pathname in files:

...

Page 23: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

DEMO:Scripting

Automatic assignmentEtc.

Page 24: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Custom Plug-ins

Importers ExportersSemantic expression operatorsRendering devicesProcedural geometry generation (fins, hair, etc...)Custom authoring environment

…etc…

Page 25: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Custom Plug-ins: Sky is the limit

Page 26: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Source Control Integration

Seamless integration into source control softwareDocuments and assets reflect file-based state

Page 27: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

ConsolePCMAC

Pipelines: FXC2 centric

FX Composer 2.0

COLLADA Scene with FX

COLLADADCC

Geometry

Conditioners and Compilers

GameBinary

Effects

GameBinary

GameBinary

Page 28: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Pipelines: DCC centric

FXComposer

2.0

DCCApplication

Conditioner

SceneEffectLibrary

Console

GameBinary

Page 29: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Pipelines: Handheld

FX Composer 2.0 ESRemoteRender

Data Conditionerand Compiler

Host PC Target Handheld

DCC ToolsXSI, Max Maya

GameEngine

COLLADA

Page 30: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Pipelines: Engine

FX Composer 2.0

Game Importer

CgFX

GameBinary

D3D FX

COLLADA FX

Rendering Game Adapter Game Engine

GameBinary

Page 31: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

FX Composer 2.0 Alpha 5

Alpha5 release ETA end of summer ’06Document and asset managementCOLLADA FX authoringShader parameter scene bindingCustom semantic and annotation supportPython scriptingShader performanceAvailable to Sony PS3 developers and limited partners

Beta release ETA end of fall ’06Open to public

Page 32: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Conclusion

Next-generation of shader IDE is on its wayProduction-ready with powerful featuresNVIDIA is closely working with Khronos and others to deliver a professional-grade authoring tool

Page 33: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006

Q&A

Send us emails for early alpha and beta releases

[email protected]

ThanksPhilippe Rollin ([email protected])

Page 34: State of the Art Cross Platform Shader Development - Nvidiadeveloper.download.nvidia.com/presentations/2006/cedec/2006-cedec... · CEDEC 2006 State of the Art Cross Platform Shader

Copyright © NVIDIA Corporation 2004 CEDEC 2006