devmania 2009 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
breezEngine PowerPoint Presentation
Download Presentation
breezEngine

Loading in 2 Seconds...

play fullscreen
1 / 37

breezEngine - PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on

Devmania 2009. breezEngine. Tobias Zirr. Architecture. Languages & Libraries. C++ HLSL / FX C++/CLI C# DirectX 9 Assimp PhysX TinyXml zLib libPNG .NET Framework 2.0. Modules & Responsibilites. Modules & Responsibilites. Prototype. More on that in a moment. Design Goals.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'breezEngine' - ilandere


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
languages libraries
Languages & Libraries
  • C++
  • HLSL / FX
  • C++/CLI
  • C#
  • DirectX 9
  • Assimp
  • PhysX
  • TinyXml
  • zLib
  • libPNG
  • .NET Framework 2.0
modules responsibilites1
Modules & Responsibilites

Prototype

More on that in a moment

design goals
Design Goals

breeze

  • Simple structure & intuitive interface
  • Minimal effortwhenincorporatingnewlydevelopedcomponents
    • Comprehensivecollectionofhighly flexible conceptsservingdevelopersas a frameworkProperties, Controllers, Synchronization, Animation, Entities, Entity Nodes, Effect Binders, Renderables, Lights, Scene Nodes, MeshBuilders…
material management
Material Management
  • Once upon a time…
    • typedefstructD3DMATERIAL9 { D3DCOLORVALUE Diffuse; D3DCOLORVALUEAmbient; D3DCOLORVALUESpecular;D3DCOLORVALUEEmissive;float Power;} D3DMATERIAL9, *LPD3DMATERIAL9;
  • Wheretoputnew material properties?
material management1
Material Management
  • Material propertymanagementoptions
    • Variousdistinctdatastructures per shader (group)
selective application of shaders
Selectiveapplicationofshaders

Pioneerproject

Specificshader

FFP

Specificshader

selective application of shaders1
Selectiveapplicationofshaders

Pioneerproject

Hard-codedspecialdatastructure

material management2
Material Management
  • Material propertymanagementoptions
    • Various distinct data structures per shader (group)
    • Enhanced „über“ datastructureselectivelyboundby multiple overlappingshaders (shadergroups)
ffp shader mix
FFP/Shader mix

Pioneerproject

Default datastructure

Additional texturedata

Additional

constantdata

material management3
Material Management
  • Material property management options
    • Various distinct data structures per shader (group)
    • Enhanced „über“ data structure selectively bound by multiple overlapping shaders (shader groups)
    • Dynamic datastructures
      • Nohard-codeddatawhatsoever
      • „Tweakables“ areloadedfromtherespectiveeffectfilesatruntime, resulting in totally individual datastructuresforeachshader
compatibility
Compatibility
  • In manyplaces, FFP compatibilityrequires multiple render paths
  • In a pure shaderenvironment, dynamicmaterialsofferbothmaximumflexibilityand optimal handlingatthe same time
  • With FFP legacydropped, therendering API turned out substantiallyslimmer
compatibility1
Compatibility
  • In manyplaces, FFP compatibilityrequires multiple render paths
  • In a pure shaderenvironment, dynamicmaterialsofferbothmaximumflexibilityand optimal handlingatthe same time
  • With FFP legacydropped, therendering API turned out substantiallyslimmer

if(shaderModel < 2)

throw „Go buy a newcomputer!“;

render tree
Render Tree

Constructedeveryframeanew!

the permutation problem
The Permutation Problem
  • Importantpivotalpoints
    • Transformation
      • Simple Rendering
      • Instanced Rendering
      • GPU-side Animation
    • Lighting
      • Multiple lightsin arbitrarylight type combinations
      • Shadows & projectedtextures (on / off)
    • Material
      • Albedo, normal und reflectiontextures
      • Manifoldvariationsof different lightingmodels
the permutation problem1
The Permutation Problem
  • Possibleapproaches
    • Über/Super shaders
      • StaticBranching
      • Pre-compilationof all referencedcombinations
    • Inferred (/ Deferred) Lighting
      • Optimal separationbetweentransformation, lightingand material makespre-compilationof multiple combinationssuperfluous
      • Usedby well-knowncompanies:„ The combination of deferred lighting and this technology [= ubershaders & material layers] allows CryENGINE® 3 to avoid the traditional shortcomings of UberShaders alone.”

– CryENGINE 3 Specifications, Crytek.com

    • Dynamic ShaderLinkage
      • DirectX 9 Fragment Compiler
      • DirectX 11 Interfaces
the permutation problem2
The Permutation Problem
  • A Super Shadercompromise
    • Material ashighestcriterionof order
    • Possiblecombinationsoflighttypesaredefinedasseparate passesandmarkedaccordinglybytheshaderdevelopertoenableEffect Binders tochoosetherightpassesatruntime
    • Transformation isperformedby a centralbaseclassthatknows all thetransformationtypesrequiredbyspecificentities, similartothe super shadertech-nology

Classesand Interfaces areavailable in HLSL since November 2008 (even in DirectX 9)

a super shader compromise
A Super ShaderCompromise
  • Benefitsofthecomprimise
    • Selectionofshaders intuitive, beingequivalentwithchoosing an object‘s material
    • Administration effortreducedfrom 3 to 2 pivotalpoints
    • Lean shaders due to elegant abstractionusingthenew HLSL languagefeatures
  • Caveatsofthecompromise
    • Complexityonlyreduced on thesurface, in effect all permutations still needtobepre-compiled
scene management1
Scene Management
  • Scene classesperformnothing but simple frustumculling
    • Noinformation on thestructureofthescene
  • Specializationrealized via implementationofthe Scene Nodeinterface
    • Landscapesusuallyalreadymaintainquadtreesbythemselves
    • Portal/sectorsystem in a separate Scene Node