SlideShare uma empresa Scribd logo
1 de 33
Order-Independent
  transparency

   Daosheng Mu
Outline
• Introduction
• Methodology
• Conclusion
Introduction
• Translucent objects
  render by blending with
  the background
• Opaque objects just
  cover the background
• Translucent objects must be rendered
  from far to near
• It’s very complex and complicated to
  render pixels from far to near
  – Object-center sorting is common
  – Object sorting doesn’t guarantee pixel sorting
• C0: foreground RGB color
• A0: alpha representing foreground’s
  translucency
• D0: background RGB color
• FinalColor = A0 * C0 + (1 – A0) * D0
  – as A0 varies between 0 and 1, FinalColor
    varies between D0 and C0
Methodology
• Numerical approach Sort-Independent
    Alpha Blending, GDC 2007, Houman Meshkin
•   Interactive Order-Independent Transparency, NVIDIA OpenGL Applications
    Engineering 2004 , Cass Everitt
Numerical approach
• Cn: RGB from nth layer
• An: Alpha from nth layer
• D0: background
• D1 = A0*C0 + (1 -          A0)*D0
• D2 = A1*C1 + (1 -          A1)*D1
• D3 = A2*C2 + (1 -          A2)*D2
• D4 = A3*C3 + (1 -          A3)*D3
• D4 = A3*C3
    + A2*C2*(1 - A3)
    + A1*C1*(1 - A3)*(1 - A2)
    + A0*C0*(1 - A3)*(1 - A2)*(1 -
  A1)
    + D0*(1 - A3)*(1 - A2)*(1 -
  A1)*(1 - A0)
• D4 = D0
•    + A0*C0 + A1*C1 + A2*C2 + A3*C3
•    - A0*D0 - A1*D0 - A2*D0 - A3*D0
•    - A0*A1*A2*D0 - A0*A1*A3*D0 - A0*A2*A3*D0 -
  A1*A2*A3*D0                           order independent part
•    + A0*A1*A2*A3*D0
•    - A0*A3*C0 - A0*A2*C0 - A0*A1*C0
•    - A1*A3*C1 - A1*A2*C1 - A2*A3*C2
•    + A0*A3*D0 + A0*A2*D0 + A0*A1*D0     order dependent part
•    + A1*A3*D0 + A1*A2*D0 + A2*A3*D0
•    + A0*A1*A2*C0 + A0*A1*A3*C0 + A0*A2*A3*C0 +
  A1*A2*A3*C1
•    - A0*A1*A2*A3*C0

• Independent: selfColor*selfAlpha, Alpha*backColor
• Dependent: selfColor*otherAlpha + PartialAlpha*backColor
• Ignore the order dependent part
  – all alphas = 0
     • error = 0
  – all alphas = 0.25
     • error = 0.375*D0 - 0.14453125*C0 - 0.109375*C1 -
       0.0625*C2
  – all alphas = 0.5
     • error = 1.5*D0 - 0.4375*C0 - 0.375*C1 - 0.25*C2
  – all alphas = 0.75
     • error = 3.375*D0 - 0.73828125*C0 - 0.703125*C1 -
       0.5625*C2
  – all alphas = 1
     • error = 6*D0 - C0 - C1 - C2
• A smaller part of the formula works much
  better in practice
  – = D0
  – + A0*C0 + A1*C1 + A2*C2 + A3*C3
  – - A0*D0 - A1*D0 - A2*D0 - A3*D0
• This is much simpler and requires only 2
  passes and a single render target
  – 1 less pass and 2 less render targets
•   Let’s analyze the simpler formula in some easy scenarios
    – all alphas = 0
        • errorsimple = 0
        • errorprev = 0
    – all alphas = 0.25
        • errorsimple = 0.31640625*D0 - 0.14453125*C0 - 0.109375*C1 - 0.0625*C2
        • errorprev = 0.375*D0 - 0.14453125*C0 - 0.109375*C1 - 0.0625*C2
    – all alphas = 0.5
        • errorsimple = 1.0625*D0 - 0.4375*C0 - 0.375*C1 - 0.25*C2
        • errorprev = 1.5*D0 - 0.4375*C0 - 0.375*C1 - 0.25*C2
    – all alphas = 0.75
        • errorsimple = 2.00390625*D0 - 0.73828125*C0 - 0.703125*C1 - 0.5625*C2
        • errorprev = 3.375*D0 - 0.73828125*C0 - 0.703125*C1 - 0.5625*C2
    – all alphas = 1
        • errorsimple = 3*D0 - C0 - C1 - C2
        • errorprev = 6*D0 - C0 - C1 - C2
• Simpler formula actually has less error
• Little error with relatively low alpha values
  – good approximation
• Completely inaccurate with higher alpha
  values
Sorted, alpha = 0.25
Approx, alpha = 0.25
Sorted, alpha = 0.5
Approx, alpha = 0.5
• Implement the order independent part and
  just ignore the order dependent part
• D4 = D0
     + A0*C0 + A1*C1 + A2*C2 + A3*C3
     - A0*D0 - A1*D0 - A2*D0 - A3*D0
     - A0*A1*A2*D0 - A0*A1*A3*D0 -
  A0*A2*A3*D0 - A1*A2*A3*D0
     + A0*A1*A2*A3*D0
• Use multiple render targets to compute
  multiple parts of the equation
  simultaneously
1 pass
               st



• Use additive blending
  – SrcAlphaBlend = 1
  – DstAlphaBlend = 1
  – FinalRGBA = SrcRGBA + DstRGBA
• render target #1, nth layer
  – RGB = An * Cn
  – Alpha = An
• render target #2, nth layer
  – RGB = 1 / An
  – Alpha = An
1 pass results
                st


• After n translucent layers have been
  blended we get:
  – render target #1:
     • RGB1 = A0 * C0 + A1 * C1 + … + An * Cn
     • Alpha1 = A0 + A1 + … + An
  – render target #2:
     • RGB2 = 1 / A0 + 1 / A1 + … + 1 / An
     • Alpha2 = A0 + A1 + … + An
2 pass
                   nd


• Use multiplicative blending
  – SrcAlphaBlend = 0
  – DstAlphaBlend = SrcRGBA
  – FinalRGBA = SrcRGBA * DstRGBA
• render target #3, nth layer
  – RGB = Cn
  – Alpha = An
2 pass results
               nd


• After n translucent layers have been
  blended we get:
  – render target #3:
     • RGB3 = C0 * C1 * … * Cn
     • Alpha3 = A0 * A1 * … * An
• This pass isn’t really necessary for the
  better and simpler formula
  – just for completeness
Results
• We now have the following
   – background
       • D0
   – render target #1:
       • RGB1 = A0 * C0 + A1 * C1 + … + An * Cn
       • Alpha1 = A0 + A1 + … + An
   – render target #2:
       • RGB2 = 1 / A0 + 1 / A1 + … + 1 / An
       • Alpha2 = A0 + A1 + … + An
   – render target #3:
       • RGB3 = C0 * C1 * … * Cn
       • Alpha3 = A0 * A1 * … * An
Final pass

•   Blend results in a pixel shader
•   RGB1 - D0 * Alpha1
     – = A0*C0 + A1*C1 + A2*C2 + A3*C3
     – - D0 * (A0 + A1 + A2 + A3)
•   D0 * Alpha3
     – = D0 * (A0*A1*A2*A3)
•   D0 * RGB2 * Alpha3
     – = D0 * (1/A0 + 1/A1 + 1/A2 + 1/A3) * (A0*A1*A2*A3)
     – = D0 * (A1*A2*A3 + A0*A2*A3 + A0*A1*A3 + A0*A1*A2)
•   Sum results with background color (D0) and we get:
     –   =   D0
     –   +   A0*C0 + A1*C1 + A2*C2 + A3*C3
     –   -   D0 * (A0 + A1 + A2 + A3)
     –   +   D0 * (A0*A1*A2*A3)
     –   -   D0 * (A1*A2*A3 + A0*A2*A3 + A0*A1*A3 + A0*A1*A2)
•   That’s the whole sort independent part of the blend formula
• This technique is best suited for particles
  – too many to sort
  – slight inaccuracy in their color shouldn’t
    matter too much
• Not so good for very general case, with all
  ranges of alpha values
• For general case, works best with highly
  translucent objects
  – i.e. low alpha values
Interactive Order-Independent Transparency
Interactive Order-Independent Transparency
• Depth peeling for order independent
  transparency possible
• Standard depth testing gives us the
  nearest fragment without imposing any
  ordering restrictions
• with n passes over a scene, we can get n
  layers deeper into the scene
• Depths vary within each layer, and the
  number of samples is decreasing.
• Peeling process at the fragment level
• The process of depth peeling is actually a
  straightforward multi-pass algorithm
• Two depth tests per fragment

Mais conteúdo relacionado

Mais procurados

Properties of addition web
Properties of addition   webProperties of addition   web
Properties of addition webbweldon
 
Numbersystemcont
NumbersystemcontNumbersystemcont
NumbersystemcontSajib
 
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Hsien-Hsin Sean Lee, Ph.D.
 
digital logic design Chapter 2 boolean_algebra_&_logic_gates
digital logic design Chapter 2 boolean_algebra_&_logic_gatesdigital logic design Chapter 2 boolean_algebra_&_logic_gates
digital logic design Chapter 2 boolean_algebra_&_logic_gatesImran Waris
 
PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)Fizaril Amzari Omar
 
Combinational circuits r011
Combinational circuits   r011Combinational circuits   r011
Combinational circuits r011arunachalamr16
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE Tamim Tanvir
 
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Hsien-Hsin Sean Lee, Ph.D.
 
B sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesB sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesRai University
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notesKurenai Ryu
 

Mais procurados (20)

Properties of addition web
Properties of addition   webProperties of addition   web
Properties of addition web
 
Numbersystemcont
NumbersystemcontNumbersystemcont
Numbersystemcont
 
Parallel adders
Parallel addersParallel adders
Parallel adders
 
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
Lec11 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- De...
 
digital logic design Chapter 2 boolean_algebra_&_logic_gates
digital logic design Chapter 2 boolean_algebra_&_logic_gatesdigital logic design Chapter 2 boolean_algebra_&_logic_gates
digital logic design Chapter 2 boolean_algebra_&_logic_gates
 
Logic circuit2017
Logic circuit2017Logic circuit2017
Logic circuit2017
 
Multiplexer
MultiplexerMultiplexer
Multiplexer
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
 
PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018
 
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
 
Combinational circuits r011
Combinational circuits   r011Combinational circuits   r011
Combinational circuits r011
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE
 
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
 
Digital design chap 2
Digital design    chap 2Digital design    chap 2
Digital design chap 2
 
B sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesB sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gates
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
3. multiplexer
3. multiplexer3. multiplexer
3. multiplexer
 
Datapath subsystem multiplication
Datapath subsystem multiplicationDatapath subsystem multiplication
Datapath subsystem multiplication
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 

Destaque

Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparencyacbess
 
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...종빈 오
 
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...MYO AUNG Myanmar
 
Introduzione al Semantic Web
Introduzione al Semantic WebIntroduzione al Semantic Web
Introduzione al Semantic WebGiacomo Fiumara
 
Michael Jackson's Moonwalker: The Official Remake - SEGA GENESIS Rendition
Michael Jackson's Moonwalker: The Official Remake - SEGA GENESIS RenditionMichael Jackson's Moonwalker: The Official Remake - SEGA GENESIS Rendition
Michael Jackson's Moonwalker: The Official Remake - SEGA GENESIS RenditionJames Johnson
 
Microsoft Dynamics Name
Microsoft Dynamics NameMicrosoft Dynamics Name
Microsoft Dynamics Nameerickessels
 
Pertemuan 13
Pertemuan 13Pertemuan 13
Pertemuan 13Privianda
 
Final ppt silkscreening
Final ppt silkscreeningFinal ppt silkscreening
Final ppt silkscreeningJhoward10
 
Noray Contabilidad - v17.00
Noray Contabilidad - v17.00Noray Contabilidad - v17.00
Noray Contabilidad - v17.00Noray
 
Resume _ Nguyen Thi Thao Uyen 2017
Resume _ Nguyen Thi Thao Uyen 2017Resume _ Nguyen Thi Thao Uyen 2017
Resume _ Nguyen Thi Thao Uyen 2017uyen nguyen
 
#ojokRuwet Solusi Adi Soeprijanto for ITS
#ojokRuwet Solusi Adi Soeprijanto for ITS#ojokRuwet Solusi Adi Soeprijanto for ITS
#ojokRuwet Solusi Adi Soeprijanto for ITSSolusi Adi 4ITS
 
Stainless steel male connectors r
Stainless steel male connectors rStainless steel male connectors r
Stainless steel male connectors rconexcoppe
 
Technology coordinator perfomance appraisal 2
Technology coordinator perfomance appraisal 2Technology coordinator perfomance appraisal 2
Technology coordinator perfomance appraisal 2tonychoper2504
 

Destaque (18)

Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparency
 
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
 
3 juliol
 3 juliol 3 juliol
3 juliol
 
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
 
Introduzione al Semantic Web
Introduzione al Semantic WebIntroduzione al Semantic Web
Introduzione al Semantic Web
 
B.arab
B.arab B.arab
B.arab
 
Michael Jackson's Moonwalker: The Official Remake - SEGA GENESIS Rendition
Michael Jackson's Moonwalker: The Official Remake - SEGA GENESIS RenditionMichael Jackson's Moonwalker: The Official Remake - SEGA GENESIS Rendition
Michael Jackson's Moonwalker: The Official Remake - SEGA GENESIS Rendition
 
Microsoft Dynamics Name
Microsoft Dynamics NameMicrosoft Dynamics Name
Microsoft Dynamics Name
 
Pertemuan 13
Pertemuan 13Pertemuan 13
Pertemuan 13
 
Una startup sana
Una startup sanaUna startup sana
Una startup sana
 
Final ppt silkscreening
Final ppt silkscreeningFinal ppt silkscreening
Final ppt silkscreening
 
Noray Contabilidad - v17.00
Noray Contabilidad - v17.00Noray Contabilidad - v17.00
Noray Contabilidad - v17.00
 
Cifromail
CifromailCifromail
Cifromail
 
Resume _ Nguyen Thi Thao Uyen 2017
Resume _ Nguyen Thi Thao Uyen 2017Resume _ Nguyen Thi Thao Uyen 2017
Resume _ Nguyen Thi Thao Uyen 2017
 
#ojokRuwet Solusi Adi Soeprijanto for ITS
#ojokRuwet Solusi Adi Soeprijanto for ITS#ojokRuwet Solusi Adi Soeprijanto for ITS
#ojokRuwet Solusi Adi Soeprijanto for ITS
 
Stainless steel male connectors r
Stainless steel male connectors rStainless steel male connectors r
Stainless steel male connectors r
 
Technology coordinator perfomance appraisal 2
Technology coordinator perfomance appraisal 2Technology coordinator perfomance appraisal 2
Technology coordinator perfomance appraisal 2
 
Abstracted Deed
Abstracted DeedAbstracted Deed
Abstracted Deed
 

Semelhante a Order independent transparency

Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptxDigital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptxSanjaiPrasad
 
Mathematics introduction and formulas
Mathematics introduction and formulasMathematics introduction and formulas
Mathematics introduction and formulasvaishali chaturvedi
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsKaviya452563
 
combinational-circuit presenmtation .ppt
combinational-circuit presenmtation .pptcombinational-circuit presenmtation .ppt
combinational-circuit presenmtation .pptFilibertoMoralesGarc
 
combinational-circuit.ppt
combinational-circuit.pptcombinational-circuit.ppt
combinational-circuit.pptShivamRathod34
 
combinational circuits dispositivos .ppt
combinational circuits dispositivos .pptcombinational circuits dispositivos .ppt
combinational circuits dispositivos .pptFilibertoMoralesGarc
 
An overwiew of cdma
An overwiew of cdmaAn overwiew of cdma
An overwiew of cdmasaimun1992
 
Lcdf4 chap 03_p2
Lcdf4 chap 03_p2Lcdf4 chap 03_p2
Lcdf4 chap 03_p2ozgur_can
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisAnindita Kundu
 
combinational-circuit.pptx it tis creative study of digital electronics for ...
combinational-circuit.pptx it tis creative study of  digital electronics for ...combinational-circuit.pptx it tis creative study of  digital electronics for ...
combinational-circuit.pptx it tis creative study of digital electronics for ...RishabhSingh308993
 
CVMU digital electronics ppt for students to learn from
CVMU digital electronics ppt for students to learn fromCVMU digital electronics ppt for students to learn from
CVMU digital electronics ppt for students to learn frombffs814
 

Semelhante a Order independent transparency (20)

Representation image
Representation imageRepresentation image
Representation image
 
Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptxDigital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptx
 
Mathematics introduction and formulas
Mathematics introduction and formulasMathematics introduction and formulas
Mathematics introduction and formulas
 
Computing on Encrypted Data
Computing on Encrypted DataComputing on Encrypted Data
Computing on Encrypted Data
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Cryptography
CryptographyCryptography
Cryptography
 
combinational-circuit presenmtation .ppt
combinational-circuit presenmtation .pptcombinational-circuit presenmtation .ppt
combinational-circuit presenmtation .ppt
 
combinational-circuit.ppt
combinational-circuit.pptcombinational-circuit.ppt
combinational-circuit.ppt
 
combinational circuits dispositivos .ppt
combinational circuits dispositivos .pptcombinational circuits dispositivos .ppt
combinational circuits dispositivos .ppt
 
An overwiew of cdma
An overwiew of cdmaAn overwiew of cdma
An overwiew of cdma
 
2.ppt
2.ppt2.ppt
2.ppt
 
An overwiew of cdma
An overwiew of cdmaAn overwiew of cdma
An overwiew of cdma
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
Lcdf4 chap 03_p2
Lcdf4 chap 03_p2Lcdf4 chap 03_p2
Lcdf4 chap 03_p2
 
Class10
Class10Class10
Class10
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysis
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
combinational-circuit.pptx it tis creative study of digital electronics for ...
combinational-circuit.pptx it tis creative study of  digital electronics for ...combinational-circuit.pptx it tis creative study of  digital electronics for ...
combinational-circuit.pptx it tis creative study of digital electronics for ...
 
CVMU digital electronics ppt for students to learn from
CVMU digital electronics ppt for students to learn fromCVMU digital electronics ppt for students to learn from
CVMU digital electronics ppt for students to learn from
 

Mais de Daosheng Mu

A frame beginner lesson
A frame beginner lessonA frame beginner lesson
A frame beginner lessonDaosheng Mu
 
Introduction to A-Frame
Introduction to A-FrameIntroduction to A-Frame
Introduction to A-FrameDaosheng Mu
 
Introduction to WebGL and WebVR
Introduction to WebGL and WebVRIntroduction to WebGL and WebVR
Introduction to WebGL and WebVRDaosheng Mu
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Daosheng Mu
 
Introduce to 3d rendering engine
Introduce to 3d rendering engineIntroduce to 3d rendering engine
Introduce to 3d rendering engineDaosheng Mu
 
Design your 3d game engine
Design your 3d game engineDesign your 3d game engine
Design your 3d game engineDaosheng Mu
 

Mais de Daosheng Mu (9)

Webrender 1.0
Webrender 1.0Webrender 1.0
Webrender 1.0
 
Maze VR
Maze VRMaze VR
Maze VR
 
A frame beginner lesson
A frame beginner lessonA frame beginner lesson
A frame beginner lesson
 
Introduction to A-Frame
Introduction to A-FrameIntroduction to A-Frame
Introduction to A-Frame
 
Introduction to WebGL and WebVR
Introduction to WebGL and WebVRIntroduction to WebGL and WebVR
Introduction to WebGL and WebVR
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
 
Introduce to 3d rendering engine
Introduce to 3d rendering engineIntroduce to 3d rendering engine
Introduce to 3d rendering engine
 
Direct3D to WPF
Direct3D to WPFDirect3D to WPF
Direct3D to WPF
 
Design your 3d game engine
Design your 3d game engineDesign your 3d game engine
Design your 3d game engine
 

Último

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Order independent transparency

  • 3. Introduction • Translucent objects render by blending with the background • Opaque objects just cover the background
  • 4. • Translucent objects must be rendered from far to near • It’s very complex and complicated to render pixels from far to near – Object-center sorting is common – Object sorting doesn’t guarantee pixel sorting
  • 5. • C0: foreground RGB color • A0: alpha representing foreground’s translucency • D0: background RGB color • FinalColor = A0 * C0 + (1 – A0) * D0 – as A0 varies between 0 and 1, FinalColor varies between D0 and C0
  • 6.
  • 7. Methodology • Numerical approach Sort-Independent Alpha Blending, GDC 2007, Houman Meshkin • Interactive Order-Independent Transparency, NVIDIA OpenGL Applications Engineering 2004 , Cass Everitt
  • 8. Numerical approach • Cn: RGB from nth layer • An: Alpha from nth layer • D0: background • D1 = A0*C0 + (1 - A0)*D0 • D2 = A1*C1 + (1 - A1)*D1 • D3 = A2*C2 + (1 - A2)*D2 • D4 = A3*C3 + (1 - A3)*D3
  • 9. • D4 = A3*C3 + A2*C2*(1 - A3) + A1*C1*(1 - A3)*(1 - A2) + A0*C0*(1 - A3)*(1 - A2)*(1 - A1) + D0*(1 - A3)*(1 - A2)*(1 - A1)*(1 - A0)
  • 10. • D4 = D0 • + A0*C0 + A1*C1 + A2*C2 + A3*C3 • - A0*D0 - A1*D0 - A2*D0 - A3*D0 • - A0*A1*A2*D0 - A0*A1*A3*D0 - A0*A2*A3*D0 - A1*A2*A3*D0  order independent part • + A0*A1*A2*A3*D0 • - A0*A3*C0 - A0*A2*C0 - A0*A1*C0 • - A1*A3*C1 - A1*A2*C1 - A2*A3*C2 • + A0*A3*D0 + A0*A2*D0 + A0*A1*D0  order dependent part • + A1*A3*D0 + A1*A2*D0 + A2*A3*D0 • + A0*A1*A2*C0 + A0*A1*A3*C0 + A0*A2*A3*C0 + A1*A2*A3*C1 • - A0*A1*A2*A3*C0 • Independent: selfColor*selfAlpha, Alpha*backColor • Dependent: selfColor*otherAlpha + PartialAlpha*backColor
  • 11. • Ignore the order dependent part – all alphas = 0 • error = 0 – all alphas = 0.25 • error = 0.375*D0 - 0.14453125*C0 - 0.109375*C1 - 0.0625*C2 – all alphas = 0.5 • error = 1.5*D0 - 0.4375*C0 - 0.375*C1 - 0.25*C2 – all alphas = 0.75 • error = 3.375*D0 - 0.73828125*C0 - 0.703125*C1 - 0.5625*C2 – all alphas = 1 • error = 6*D0 - C0 - C1 - C2
  • 12. • A smaller part of the formula works much better in practice – = D0 – + A0*C0 + A1*C1 + A2*C2 + A3*C3 – - A0*D0 - A1*D0 - A2*D0 - A3*D0 • This is much simpler and requires only 2 passes and a single render target – 1 less pass and 2 less render targets
  • 13. Let’s analyze the simpler formula in some easy scenarios – all alphas = 0 • errorsimple = 0 • errorprev = 0 – all alphas = 0.25 • errorsimple = 0.31640625*D0 - 0.14453125*C0 - 0.109375*C1 - 0.0625*C2 • errorprev = 0.375*D0 - 0.14453125*C0 - 0.109375*C1 - 0.0625*C2 – all alphas = 0.5 • errorsimple = 1.0625*D0 - 0.4375*C0 - 0.375*C1 - 0.25*C2 • errorprev = 1.5*D0 - 0.4375*C0 - 0.375*C1 - 0.25*C2 – all alphas = 0.75 • errorsimple = 2.00390625*D0 - 0.73828125*C0 - 0.703125*C1 - 0.5625*C2 • errorprev = 3.375*D0 - 0.73828125*C0 - 0.703125*C1 - 0.5625*C2 – all alphas = 1 • errorsimple = 3*D0 - C0 - C1 - C2 • errorprev = 6*D0 - C0 - C1 - C2
  • 14. • Simpler formula actually has less error • Little error with relatively low alpha values – good approximation • Completely inaccurate with higher alpha values
  • 19. • Implement the order independent part and just ignore the order dependent part • D4 = D0 + A0*C0 + A1*C1 + A2*C2 + A3*C3 - A0*D0 - A1*D0 - A2*D0 - A3*D0 - A0*A1*A2*D0 - A0*A1*A3*D0 - A0*A2*A3*D0 - A1*A2*A3*D0 + A0*A1*A2*A3*D0
  • 20. • Use multiple render targets to compute multiple parts of the equation simultaneously
  • 21. 1 pass st • Use additive blending – SrcAlphaBlend = 1 – DstAlphaBlend = 1 – FinalRGBA = SrcRGBA + DstRGBA • render target #1, nth layer – RGB = An * Cn – Alpha = An • render target #2, nth layer – RGB = 1 / An – Alpha = An
  • 22. 1 pass results st • After n translucent layers have been blended we get: – render target #1: • RGB1 = A0 * C0 + A1 * C1 + … + An * Cn • Alpha1 = A0 + A1 + … + An – render target #2: • RGB2 = 1 / A0 + 1 / A1 + … + 1 / An • Alpha2 = A0 + A1 + … + An
  • 23. 2 pass nd • Use multiplicative blending – SrcAlphaBlend = 0 – DstAlphaBlend = SrcRGBA – FinalRGBA = SrcRGBA * DstRGBA • render target #3, nth layer – RGB = Cn – Alpha = An
  • 24. 2 pass results nd • After n translucent layers have been blended we get: – render target #3: • RGB3 = C0 * C1 * … * Cn • Alpha3 = A0 * A1 * … * An • This pass isn’t really necessary for the better and simpler formula – just for completeness
  • 25. Results • We now have the following – background • D0 – render target #1: • RGB1 = A0 * C0 + A1 * C1 + … + An * Cn • Alpha1 = A0 + A1 + … + An – render target #2: • RGB2 = 1 / A0 + 1 / A1 + … + 1 / An • Alpha2 = A0 + A1 + … + An – render target #3: • RGB3 = C0 * C1 * … * Cn • Alpha3 = A0 * A1 * … * An
  • 26. Final pass • Blend results in a pixel shader • RGB1 - D0 * Alpha1 – = A0*C0 + A1*C1 + A2*C2 + A3*C3 – - D0 * (A0 + A1 + A2 + A3) • D0 * Alpha3 – = D0 * (A0*A1*A2*A3) • D0 * RGB2 * Alpha3 – = D0 * (1/A0 + 1/A1 + 1/A2 + 1/A3) * (A0*A1*A2*A3) – = D0 * (A1*A2*A3 + A0*A2*A3 + A0*A1*A3 + A0*A1*A2) • Sum results with background color (D0) and we get: – = D0 – + A0*C0 + A1*C1 + A2*C2 + A3*C3 – - D0 * (A0 + A1 + A2 + A3) – + D0 * (A0*A1*A2*A3) – - D0 * (A1*A2*A3 + A0*A2*A3 + A0*A1*A3 + A0*A1*A2) • That’s the whole sort independent part of the blend formula
  • 27. • This technique is best suited for particles – too many to sort – slight inaccuracy in their color shouldn’t matter too much • Not so good for very general case, with all ranges of alpha values • For general case, works best with highly translucent objects – i.e. low alpha values
  • 30. • Depth peeling for order independent transparency possible • Standard depth testing gives us the nearest fragment without imposing any ordering restrictions • with n passes over a scene, we can get n layers deeper into the scene
  • 31.
  • 32. • Depths vary within each layer, and the number of samples is decreasing. • Peeling process at the fragment level
  • 33. • The process of depth peeling is actually a straightforward multi-pass algorithm • Two depth tests per fragment