SlideShare una empresa de Scribd logo
1 de 33
Daniel Freeman
AIR Evolution




• ActionScript “Next”
• StageText, StageVideo, Stage3D
• Native Extensions
• ActionScript Workers
Ubiquitous

Stage3D      Stage3D       Stage3D      Stage3D




Open GL      DirectX     Open GL ES    SwiftShader


Mac        Windows        Mobile      No GPU


 Support for older hardware (Intel GMA) soon
Programmable
  vertices                     indices




                               Triangle              Viewport
Vertex Shader
                              Assembly               Clipping
                transformed               triangle
                  vertices                stream




                              Fragment                Frame
 Rasteriser
                               Shader                 Buffer
                 fragment                  pixel
                  stream                  stream


                              textures
winding / backface culling
depth buffering
2d

                                           -1




                            2d   -1                      +1




              z=
                   1
 z=
      0                                    +1




                                                -1




                                      -1                  +1




                                                +1



  World                                      Stage
Coordinates                                Coordinates
Versatile
                    Interpolated
                     Registers
     VertexShader                  FragmentShader
                    v0-v7

  Vertex                       Fragment
shader runs                   shader runs
 once per                      once per
  vertex                       fragment
Low Level
 mov ft3, v1
 sub ft0.xy, v0.xy, fc4.xx
 sub ft0.z, fc4.x, v2.x
 abs ft1.xy, ft0.xy
 sub ft1.xy, ft1.xy, ft0.zz

 mul ft2.xy, ft1.xy, ft1.xy
 add ft2.x, ft2.x, ft2.y
 sqt ft2.x, ft2.x

 add ft2.z, fc4.w, v2.x
 sub ft2.z, ft2.z, ft2.x
 pow ft3.w, ft2.z, fc4.z

 sat ft3.w, ft3.w
 mov oc, ft3
Registers
va0-va7      Attribute Registers
vc0-vc127    Constant Registers
fc0-fc127    Constant Registers
fs0-fs7      Sampler Registers
v0-v7        Varying Registers
op           Output Point
oc           Output Colour
Registers
                        vt0-vt7
 va0-va7
              VertexShader        op
vc0-vc127
              v0-v7   (Interpolated)

  fs0-fs7             ft0-ft7
             FragmentShader       oc
fc0-fc127
Example 1 : Solid Colour




                     GreenSquare1
protected static const VERTICES:Vector.<Number> =
	   	   	
	   	   	 Vector.<Number> ([
	   	   	 	 //	 X,	 	 Y,	 	 Z
	   	   	 	 -0.5,	 -0.5,	 0.0,
	   	   	 	 0.5,	 -0.5,	 0.0,
	   	   	 	 0.5,	 0.5,	 0.0,
	   	   	 	 -0.5,	 0.5,	 0.0,
	   	   	 ]);
	   	
	   	   protected static const N:int = 3;
	   	
	   	   protected static const INDICES:Vector.<uint> = Vector.<uint> ([ 0, 1, 2,	 0, 2, 3 ]);




                 (-0.5, -0.5, 0)
                             0     1 (0.5, -0.5, 0)    0         1    0




               (-0.5, 0.5, 0) 3    2                             2    3          2
                                   (0.5, 0.5, 0)
_context3D.setProgramConstantsFromVector(
     Context3DProgramType.FRAGMENT, 0,         // fc0
     Vector.<Number>([ 1.0, 0.0, 0.0, 1.0])	   // = Red
);




    vertex shader


    mov op, va0                  output point



   fragment shader


    mov oc, fc0                  output colour
Example 2 : Gradient Fill




                      GreenSquare3
protected static const VERTICES:Vector.<Number> =
	   	   	
	   	   	 Vector.<Number> ([
	   	   	 //	 X,	 	 Y,	 	 Z,	 	 r,	 g,	 b
	   	   	 	 -0.5,	 -0.5,	 0.0,	 0,	 1,	 0,
	   	   	 	 0.5,	 -0.5,	 0.0,	 1,	 0,	 0,
	   	   	 	 0.5,	 0.5,	 0.0,	 1,	 1,	 1,
	   	   	 	 -0.5,	 0.5,	 0.0,	 0,	 0,	 1,
	   	   	 ]);
	   	
	   	   protected static const N:int = 6;
	   	
	   	   protected static const INDICES:Vector.<uint> = Vector.<uint> ([ 0, 1, 2,	 0, 2, 3 ]);




                 (-0.5, -0.5, 0)
                             0     1 (0.5, -0.5, 0)    0         1    0




               (-0.5, 0.5, 0) 3    2                             2    3          2
                                   (0.5, 0.5, 0)
Interpolated
                        Registers
        VertexShader                  FragmentShader
                       v0-v7




vertex shader

mov op, va0               output point
mov v0, va1               interpolate colour


fragment shader


mov oc, va1               output colour
Example 3 : Rotation




                   GreenSquare4
_transform.appendRotation( 2.0, Vector3D.Z_AXIS );
_context3D.setProgramConstantsFromMatrix(
    Context3DProgramType.VERTEX, 0,   //vc0
    _transform, true
);



vertex shader


m44 op, va0, vc0               transform



fragment shader


mov oc, fc0                    output colour
Example 4 : Gradient Cube




                 Flash3DExperiment5
protected   static const VERTICES:Vector.<Number> =
	 	 	
	 	 	       Vector.<Number> ([
	 	 	       //	 X,	 	 Y,	 	 Z,	 	     r,	 g,	 b
	 	 	       	 -0.5,	 -0.5,	 0.5,	     0,	 1,	 0,
	 	 	       	 0.5,	 -0.5,	 0.5,	      1,	 0,	 0,
	 	 	       	 0.5,	 0.5,	 0.5,	       1,	 1,	 1,
	 	 	       	 -0.5,	 0.5,	 0.5,	      0,	 0,	 1,
	 	 	       	
	 	 	       	 -0.5,	 -0.5,	 -0.5,	    0,	 1,	 0,
	 	 	       	 0.5,	 -0.5,	 -0.5,	     1,	 0,	 0,
	 	 	       	 0.5,	 0.5,	 -0.5,	      1,	 1,	 1,
	 	 	       	 -0.5,	 0.5,	 -0.5,	     0,	 0,	 1,
	 	 	       ]);
	 	
protected   static const N:int = 6;
	 	
protected   static const INDICES:Vector.<uint> = Vector.<uint> (

                    [ 0, 1, 2,	   0, 2, 3,         4, 6, 5,	   4, 7, 6,
	   	   	   	   	     0, 4, 5,     0, 5, 1,         1, 5, 6,    1, 6, 2,
	   	                 2, 6, 7,     2, 7, 3,         3, 7, 4,    3, 4, 0
                    ]);
_projectionMatrix.perspectiveFieldOfViewLH(
     45.0*Math.PI/180,
     stage.stageWidth/stage.stageHeight,
     0.1,1000.0
     );



    vertex shader

     m44 op, va0, vc0               transform
     mov v0, va1                    interpolate


    fragment shader


     mov oc, v0                     output colour
Example 5 : Texture Cube




                 Flash3DExperiment3
protected static const VERTICES:Vector.<Number> =
	    	   	
	    	   	 Vector.<Number> ([
	    	   	 //	 	
              X,	     Y,	 	 Z,	 	    u,	 v,

	 	 	       	      -1.0,	 -1.0,	 -1.0,	        0,	   0,
    	       	      1.0,   -1.0,	 -1.0,	        0,	   1,
	 	 	       	      1.0,	   1.0,  -1.0,	        1,	   1,
	 	 	       	      -1.0,	 1.0,	   -1.0,	       1,	   0,       etc...etc..


                                                                 u
                                                    0                       1
                                                          0            1


    VertexShader              FragmentShader
                                                v
                   Interpolated

                                                          3            2

                                                    1
_projectionMatrix.perspectiveFieldOfViewLH(
     45.0*Math.PI/180,
     stage.stageWidth/stage.stageHeight,
     0.1,1000.0
     );



    vertex shader

     m44 op, va0, vc0               transform
     mov v0, va1                    interpolate uv


    fragment shader

     tex ft0, v0, fs0 <2d,linear,nomip>
     mov oc, ft0         output fragment
Example 6 : Light Source




                Flash3DExperiment7a
                Flash3DExperiment8
protected static const VERTICES:Vector.<Number> =
	 	 	
	 	 	 Vector.<Number> ([
   	 	 	 //	 X,	 	 Y,	 	 Z,	 	 nX,	     	 nY,	 	 nZ

	   	   	   	   -1.0,	   -1.0,	   -1.0,	   0,	   	   0,	 	   -1.0,
	   	   	   	   1.0,	    -1.0,	   -1.0,	   0,	   	   0,	 	   -1.0,
	   	   	   	   1.0,	    1.0,	    -1.0,	   0,	   	   0,	 	   -1.0,
	   	   	   	   -1.0,	   1.0,	    -1.0,	   0,	   	   0,	 	   -1.0,    etc...etc...




                                                             normal
_context3D.setProgramConstantsFromVector(
             Context3DProgramType.FRAGMENT, 0, Vector.<Number>([ 0.5, 0.5, 0.5, 1.0 ]) );

	   	   _context3D.setProgramConstantsFromVector(
             Context3DProgramType.FRAGMENT, 1, Vector.<Number>([ X, Y, Z, 1.0 ]) );



           vertex shader

            m44 op, va0, vc0                          transform
            m44 v0, va1, vc0                          normal

           fragment shader

            nrm     ft0.xzy, v0                       normalise
            mov     ft0.w, fc0.w
            dp3     ft0, ft0, fc1                     dot product
            sat     ft0, ft0                          clamp
            mul     oc, ft0, fc0                      multiply colour
Example 7 : Phong Shader




                Flash3DExperimentA
normal




         interpolated
             normals
fc0 Half Angle Vector       fc1 Ambient Colour
      fc2 Diffuse Colour          fc3 Specular Colour

vertex shader

m44 op, va0, vc0                  transform
m44 v0, va1, vc4                  normal

fragment shader

nrm   ft0.xyz, v0                     normalise normal
mov   ft0.w, fc0.w                    set w to 1
dp3   ft0.x, ft0, fc0                 dot product
sat   ft0.x, ft0.x                    clamp
pow   ft1.x, ft0.x, fc3.w             dot product to power
mul   ft2.xyz, fc2.xyz, ft0.xxx       diffuse colour
add   ft2.xyz, fc1.xyz, ft2.xyz       add ambient colour
mul   ft3.xyz, fc3.xyz, ft1.xxx       specular colour
add   oc, ft2.xyz, ft3.xyz 	 	        combine and output
More Examples
Questions

Más contenido relacionado

La actualidad más candente

Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)anithabalaprabhu
 
Computational Linguistics week 5
Computational Linguistics  week 5Computational Linguistics  week 5
Computational Linguistics week 5Mark Chang
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10fungfung Chen
 
NTHU AI Reading Group: Improved Training of Wasserstein GANs
NTHU AI Reading Group: Improved Training of Wasserstein GANsNTHU AI Reading Group: Improved Training of Wasserstein GANs
NTHU AI Reading Group: Improved Training of Wasserstein GANsMark Chang
 
Graph convolutional networks in apache spark
Graph convolutional networks in apache sparkGraph convolutional networks in apache spark
Graph convolutional networks in apache sparkEmiliano Martinez Sanchez
 
Evaluation of X32 ABI for Virtualization and Cloud
Evaluation of X32 ABI for Virtualization and CloudEvaluation of X32 ABI for Virtualization and Cloud
Evaluation of X32 ABI for Virtualization and CloudThe Linux Foundation
 
OOP for Hardware Verification--Demystified!
OOP for Hardware Verification--Demystified! OOP for Hardware Verification--Demystified!
OOP for Hardware Verification--Demystified! DVClub
 
The Enchant.js Animation Engine in 5 Minutes
The Enchant.js Animation Engine in 5 MinutesThe Enchant.js Animation Engine in 5 Minutes
The Enchant.js Animation Engine in 5 MinutesBrandon McInnis
 
2015 02-18 xxx-literalconvertible
2015 02-18 xxx-literalconvertible2015 02-18 xxx-literalconvertible
2015 02-18 xxx-literalconvertibleTaketo Sano
 
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)Matthew Leingang
 
Analytic function 1
Analytic function 1Analytic function 1
Analytic function 1SaimaSadiq7
 
Lesson 27: Integration by Substitution (Section 041 slides)
Lesson 27: Integration by Substitution (Section 041 slides)Lesson 27: Integration by Substitution (Section 041 slides)
Lesson 27: Integration by Substitution (Section 041 slides)Matthew Leingang
 
Calculus of variation problems
Calculus of variation   problemsCalculus of variation   problems
Calculus of variation problemsSolo Hermelin
 

La actualidad más candente (19)

06 Arithmetic 1
06 Arithmetic 106 Arithmetic 1
06 Arithmetic 1
 
Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)
 
Quality Python Homework Help
Quality Python Homework HelpQuality Python Homework Help
Quality Python Homework Help
 
Computational Linguistics week 5
Computational Linguistics  week 5Computational Linguistics  week 5
Computational Linguistics week 5
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10
 
NTHU AI Reading Group: Improved Training of Wasserstein GANs
NTHU AI Reading Group: Improved Training of Wasserstein GANsNTHU AI Reading Group: Improved Training of Wasserstein GANs
NTHU AI Reading Group: Improved Training of Wasserstein GANs
 
Graph convolutional networks in apache spark
Graph convolutional networks in apache sparkGraph convolutional networks in apache spark
Graph convolutional networks in apache spark
 
Evaluation of X32 ABI for Virtualization and Cloud
Evaluation of X32 ABI for Virtualization and CloudEvaluation of X32 ABI for Virtualization and Cloud
Evaluation of X32 ABI for Virtualization and Cloud
 
10 simulation
10 simulation10 simulation
10 simulation
 
OOP for Hardware Verification--Demystified!
OOP for Hardware Verification--Demystified! OOP for Hardware Verification--Demystified!
OOP for Hardware Verification--Demystified!
 
Suppression enhancement
Suppression enhancementSuppression enhancement
Suppression enhancement
 
The Enchant.js Animation Engine in 5 Minutes
The Enchant.js Animation Engine in 5 MinutesThe Enchant.js Animation Engine in 5 Minutes
The Enchant.js Animation Engine in 5 Minutes
 
Notes
NotesNotes
Notes
 
program logbook 2
program logbook 2program logbook 2
program logbook 2
 
2015 02-18 xxx-literalconvertible
2015 02-18 xxx-literalconvertible2015 02-18 xxx-literalconvertible
2015 02-18 xxx-literalconvertible
 
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
 
Analytic function 1
Analytic function 1Analytic function 1
Analytic function 1
 
Lesson 27: Integration by Substitution (Section 041 slides)
Lesson 27: Integration by Substitution (Section 041 slides)Lesson 27: Integration by Substitution (Section 041 slides)
Lesson 27: Integration by Substitution (Section 041 slides)
 
Calculus of variation problems
Calculus of variation   problemsCalculus of variation   problems
Calculus of variation problems
 

Destacado

Excursiones visitas paris
Excursiones visitas parisExcursiones visitas paris
Excursiones visitas parisAliciaof
 
Consejos clave en Redacción Digital
Consejos clave en Redacción DigitalConsejos clave en Redacción Digital
Consejos clave en Redacción DigitalInterlat
 
Mango S.A.: Reinventando el sector de la moda
Mango S.A.: Reinventando el sector de la modaMango S.A.: Reinventando el sector de la moda
Mango S.A.: Reinventando el sector de la modaIQS Barcelona
 
High Point Presentation
High Point PresentationHigh Point Presentation
High Point PresentationSian_Teasdale
 
Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.
Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.
Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.Forum Velden
 
De mayor quiero ser (1)
De mayor quiero ser (1)De mayor quiero ser (1)
De mayor quiero ser (1)Anapazos17
 
People of the State of California vs. Academy of Art University
People of the State of California vs. Academy of Art UniversityPeople of the State of California vs. Academy of Art University
People of the State of California vs. Academy of Art UniversityCity Attorney of San Francisco
 
Cerfa 13905 modification_cessation
Cerfa 13905 modification_cessationCerfa 13905 modification_cessation
Cerfa 13905 modification_cessationmeilleurplacement
 
Peerless DRM and Enterprise Security-Enabled Removable Data Storage Cartridges
Peerless DRM and Enterprise Security-Enabled Removable Data Storage CartridgesPeerless DRM and Enterprise Security-Enabled Removable Data Storage Cartridges
Peerless DRM and Enterprise Security-Enabled Removable Data Storage CartridgesFred_C_Thomas
 
Perspectiva Fotográfica Artesanías
Perspectiva Fotográfica ArtesaníasPerspectiva Fotográfica Artesanías
Perspectiva Fotográfica ArtesaníasSebasKinte
 
79545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ1
79545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ179545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ1
79545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ1Kanittha Tinan
 
Game over: cómo y cuando cerrar tu startup
Game over: cómo y cuando cerrar tu startupGame over: cómo y cuando cerrar tu startup
Game over: cómo y cuando cerrar tu startupJosé Miguel Corrales
 
Guía de bienvenida La Nueva Medina 1
Guía de bienvenida La Nueva Medina 1Guía de bienvenida La Nueva Medina 1
Guía de bienvenida La Nueva Medina 1Isabel Muñoz Díaz
 
Codigo del comercio
Codigo del comercioCodigo del comercio
Codigo del comercioDavid Marin
 

Destacado (20)

Excursiones visitas paris
Excursiones visitas parisExcursiones visitas paris
Excursiones visitas paris
 
Conéctate contigo
Conéctate contigoConéctate contigo
Conéctate contigo
 
Consejos clave en Redacción Digital
Consejos clave en Redacción DigitalConsejos clave en Redacción Digital
Consejos clave en Redacción Digital
 
Mango S.A.: Reinventando el sector de la moda
Mango S.A.: Reinventando el sector de la modaMango S.A.: Reinventando el sector de la moda
Mango S.A.: Reinventando el sector de la moda
 
High Point Presentation
High Point PresentationHigh Point Presentation
High Point Presentation
 
Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.
Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.
Excellence in Innovation and R&D. Reasons to invest in Austria/Carinthia.
 
NYTECH "Measuring Your User Experience Design"
NYTECH "Measuring Your User Experience Design"NYTECH "Measuring Your User Experience Design"
NYTECH "Measuring Your User Experience Design"
 
De mayor quiero ser (1)
De mayor quiero ser (1)De mayor quiero ser (1)
De mayor quiero ser (1)
 
People of the State of California vs. Academy of Art University
People of the State of California vs. Academy of Art UniversityPeople of the State of California vs. Academy of Art University
People of the State of California vs. Academy of Art University
 
Cerfa 13905 modification_cessation
Cerfa 13905 modification_cessationCerfa 13905 modification_cessation
Cerfa 13905 modification_cessation
 
Peerless DRM and Enterprise Security-Enabled Removable Data Storage Cartridges
Peerless DRM and Enterprise Security-Enabled Removable Data Storage CartridgesPeerless DRM and Enterprise Security-Enabled Removable Data Storage Cartridges
Peerless DRM and Enterprise Security-Enabled Removable Data Storage Cartridges
 
Presentation to EDPP by Triangle Transit
Presentation to EDPP by Triangle TransitPresentation to EDPP by Triangle Transit
Presentation to EDPP by Triangle Transit
 
Plano Expomaq
Plano ExpomaqPlano Expomaq
Plano Expomaq
 
Fundamentos De Redes
Fundamentos De RedesFundamentos De Redes
Fundamentos De Redes
 
Perspectiva Fotográfica Artesanías
Perspectiva Fotográfica ArtesaníasPerspectiva Fotográfica Artesanías
Perspectiva Fotográfica Artesanías
 
79545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ1
79545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ179545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ1
79545140 เธ‚เน‰เธญเธชเธญเธš-เน‚เธ„เธงเธ•เธฒ-เธกเธŠ-55-เธงเธดเธ—เธขเนŒ1
 
SGI HPC DAY 2011 Kiev
SGI HPC DAY 2011 KievSGI HPC DAY 2011 Kiev
SGI HPC DAY 2011 Kiev
 
Game over: cómo y cuando cerrar tu startup
Game over: cómo y cuando cerrar tu startupGame over: cómo y cuando cerrar tu startup
Game over: cómo y cuando cerrar tu startup
 
Guía de bienvenida La Nueva Medina 1
Guía de bienvenida La Nueva Medina 1Guía de bienvenida La Nueva Medina 1
Guía de bienvenida La Nueva Medina 1
 
Codigo del comercio
Codigo del comercioCodigo del comercio
Codigo del comercio
 

Similar a Adobe AIR: Stage3D and AGAL

Constraint Programming in Haskell
Constraint Programming in HaskellConstraint Programming in Haskell
Constraint Programming in HaskellDavid Overton
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabkrishna_093
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
 
Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5Takao Wada
 
Adventures In Data Compilation
Adventures In Data CompilationAdventures In Data Compilation
Adventures In Data CompilationNaughty Dog
 
Distilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental DataDistilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental Dataswissnex San Francisco
 
Entendiendo redes convolucionales paso a paso
Entendiendo  redes convolucionales paso a pasoEntendiendo  redes convolucionales paso a paso
Entendiendo redes convolucionales paso a pasomoisesweb
 
Vector Codegen in the RISC-V Backend
Vector Codegen in the RISC-V BackendVector Codegen in the RISC-V Backend
Vector Codegen in the RISC-V BackendIgalia
 
Self Organinising neural networks
Self Organinising  neural networksSelf Organinising  neural networks
Self Organinising neural networksESCOM
 
Javascript engine performance
Javascript engine performanceJavascript engine performance
Javascript engine performanceDuoyi Wu
 
3D Math Primer: CocoaConf Atlanta
3D Math Primer: CocoaConf Atlanta3D Math Primer: CocoaConf Atlanta
3D Math Primer: CocoaConf AtlantaJanie Clayton
 
Lecture 4: Stochastic Hydrology (Site Characterization)
Lecture 4: Stochastic Hydrology (Site Characterization)Lecture 4: Stochastic Hydrology (Site Characterization)
Lecture 4: Stochastic Hydrology (Site Characterization)Amro Elfeki
 
A Proposition for Business Process Modeling
A Proposition for Business Process ModelingA Proposition for Business Process Modeling
A Proposition for Business Process ModelingAng Chen
 
Faster, More Effective Flowgraph-based Malware Classification
Faster, More Effective Flowgraph-based Malware ClassificationFaster, More Effective Flowgraph-based Malware Classification
Faster, More Effective Flowgraph-based Malware ClassificationSilvio Cesare
 
DEF CON 23 - Atlas - fun with symboliks
DEF CON 23 - Atlas - fun with symboliksDEF CON 23 - Atlas - fun with symboliks
DEF CON 23 - Atlas - fun with symboliksFelipe Prado
 
IGARSS2011.pdf
IGARSS2011.pdfIGARSS2011.pdf
IGARSS2011.pdfgrssieee
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Varun Ojha
 
Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko3D
 

Similar a Adobe AIR: Stage3D and AGAL (20)

Constraint Programming in Haskell
Constraint Programming in HaskellConstraint Programming in Haskell
Constraint Programming in Haskell
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5
 
Adventures In Data Compilation
Adventures In Data CompilationAdventures In Data Compilation
Adventures In Data Compilation
 
Distilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental DataDistilling Free-Form Natural Laws from Experimental Data
Distilling Free-Form Natural Laws from Experimental Data
 
Entendiendo redes convolucionales paso a paso
Entendiendo  redes convolucionales paso a pasoEntendiendo  redes convolucionales paso a paso
Entendiendo redes convolucionales paso a paso
 
Vector Codegen in the RISC-V Backend
Vector Codegen in the RISC-V BackendVector Codegen in the RISC-V Backend
Vector Codegen in the RISC-V Backend
 
Self Organinising neural networks
Self Organinising  neural networksSelf Organinising  neural networks
Self Organinising neural networks
 
Extreme dxt compression
Extreme dxt compressionExtreme dxt compression
Extreme dxt compression
 
Javascript engine performance
Javascript engine performanceJavascript engine performance
Javascript engine performance
 
SciQL, A Query Language for Science Applications
SciQL, A Query Language for Science ApplicationsSciQL, A Query Language for Science Applications
SciQL, A Query Language for Science Applications
 
3D Math Primer: CocoaConf Atlanta
3D Math Primer: CocoaConf Atlanta3D Math Primer: CocoaConf Atlanta
3D Math Primer: CocoaConf Atlanta
 
Lecture 4: Stochastic Hydrology (Site Characterization)
Lecture 4: Stochastic Hydrology (Site Characterization)Lecture 4: Stochastic Hydrology (Site Characterization)
Lecture 4: Stochastic Hydrology (Site Characterization)
 
A Proposition for Business Process Modeling
A Proposition for Business Process ModelingA Proposition for Business Process Modeling
A Proposition for Business Process Modeling
 
Faster, More Effective Flowgraph-based Malware Classification
Faster, More Effective Flowgraph-based Malware ClassificationFaster, More Effective Flowgraph-based Malware Classification
Faster, More Effective Flowgraph-based Malware Classification
 
DEF CON 23 - Atlas - fun with symboliks
DEF CON 23 - Atlas - fun with symboliksDEF CON 23 - Atlas - fun with symboliks
DEF CON 23 - Atlas - fun with symboliks
 
IGARSS2011.pdf
IGARSS2011.pdfIGARSS2011.pdf
IGARSS2011.pdf
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko stage3d workshop_20130525
Minko stage3d workshop_20130525
 

Último

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Adobe AIR: Stage3D and AGAL

  • 2. AIR Evolution • ActionScript “Next” • StageText, StageVideo, Stage3D • Native Extensions • ActionScript Workers
  • 3. Ubiquitous Stage3D Stage3D Stage3D Stage3D Open GL DirectX Open GL ES SwiftShader Mac Windows Mobile No GPU Support for older hardware (Intel GMA) soon
  • 4. Programmable vertices indices Triangle Viewport Vertex Shader Assembly Clipping transformed triangle vertices stream Fragment Frame Rasteriser Shader Buffer fragment pixel stream stream textures
  • 7. 2d -1 2d -1 +1 z= 1 z= 0 +1 -1 -1 +1 +1 World Stage Coordinates Coordinates
  • 8. Versatile Interpolated Registers VertexShader FragmentShader v0-v7 Vertex Fragment shader runs shader runs once per once per vertex fragment
  • 9. Low Level mov ft3, v1 sub ft0.xy, v0.xy, fc4.xx sub ft0.z, fc4.x, v2.x abs ft1.xy, ft0.xy sub ft1.xy, ft1.xy, ft0.zz mul ft2.xy, ft1.xy, ft1.xy add ft2.x, ft2.x, ft2.y sqt ft2.x, ft2.x add ft2.z, fc4.w, v2.x sub ft2.z, ft2.z, ft2.x pow ft3.w, ft2.z, fc4.z sat ft3.w, ft3.w mov oc, ft3
  • 10. Registers va0-va7 Attribute Registers vc0-vc127 Constant Registers fc0-fc127 Constant Registers fs0-fs7 Sampler Registers v0-v7 Varying Registers op Output Point oc Output Colour
  • 11. Registers vt0-vt7 va0-va7 VertexShader op vc0-vc127 v0-v7 (Interpolated) fs0-fs7 ft0-ft7 FragmentShader oc fc0-fc127
  • 12. Example 1 : Solid Colour GreenSquare1
  • 13. protected static const VERTICES:Vector.<Number> = Vector.<Number> ([ // X, Y, Z -0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.5, 0.5, 0.0, -0.5, 0.5, 0.0, ]); protected static const N:int = 3; protected static const INDICES:Vector.<uint> = Vector.<uint> ([ 0, 1, 2, 0, 2, 3 ]); (-0.5, -0.5, 0) 0 1 (0.5, -0.5, 0) 0 1 0 (-0.5, 0.5, 0) 3 2 2 3 2 (0.5, 0.5, 0)
  • 14. _context3D.setProgramConstantsFromVector( Context3DProgramType.FRAGMENT, 0, // fc0 Vector.<Number>([ 1.0, 0.0, 0.0, 1.0]) // = Red ); vertex shader mov op, va0 output point fragment shader mov oc, fc0 output colour
  • 15. Example 2 : Gradient Fill GreenSquare3
  • 16. protected static const VERTICES:Vector.<Number> = Vector.<Number> ([ // X, Y, Z, r, g, b -0.5, -0.5, 0.0, 0, 1, 0, 0.5, -0.5, 0.0, 1, 0, 0, 0.5, 0.5, 0.0, 1, 1, 1, -0.5, 0.5, 0.0, 0, 0, 1, ]); protected static const N:int = 6; protected static const INDICES:Vector.<uint> = Vector.<uint> ([ 0, 1, 2, 0, 2, 3 ]); (-0.5, -0.5, 0) 0 1 (0.5, -0.5, 0) 0 1 0 (-0.5, 0.5, 0) 3 2 2 3 2 (0.5, 0.5, 0)
  • 17. Interpolated Registers VertexShader FragmentShader v0-v7 vertex shader mov op, va0 output point mov v0, va1 interpolate colour fragment shader mov oc, va1 output colour
  • 18. Example 3 : Rotation GreenSquare4
  • 19. _transform.appendRotation( 2.0, Vector3D.Z_AXIS ); _context3D.setProgramConstantsFromMatrix( Context3DProgramType.VERTEX, 0, //vc0 _transform, true ); vertex shader m44 op, va0, vc0 transform fragment shader mov oc, fc0 output colour
  • 20. Example 4 : Gradient Cube Flash3DExperiment5
  • 21. protected static const VERTICES:Vector.<Number> = Vector.<Number> ([ // X, Y, Z, r, g, b -0.5, -0.5, 0.5, 0, 1, 0, 0.5, -0.5, 0.5, 1, 0, 0, 0.5, 0.5, 0.5, 1, 1, 1, -0.5, 0.5, 0.5, 0, 0, 1, -0.5, -0.5, -0.5, 0, 1, 0, 0.5, -0.5, -0.5, 1, 0, 0, 0.5, 0.5, -0.5, 1, 1, 1, -0.5, 0.5, -0.5, 0, 0, 1, ]); protected static const N:int = 6; protected static const INDICES:Vector.<uint> = Vector.<uint> ( [ 0, 1, 2, 0, 2, 3, 4, 6, 5, 4, 7, 6, 0, 4, 5, 0, 5, 1, 1, 5, 6, 1, 6, 2, 2, 6, 7, 2, 7, 3, 3, 7, 4, 3, 4, 0 ]);
  • 22. _projectionMatrix.perspectiveFieldOfViewLH( 45.0*Math.PI/180, stage.stageWidth/stage.stageHeight, 0.1,1000.0 ); vertex shader m44 op, va0, vc0 transform mov v0, va1 interpolate fragment shader mov oc, v0 output colour
  • 23. Example 5 : Texture Cube Flash3DExperiment3
  • 24. protected static const VERTICES:Vector.<Number> = Vector.<Number> ([ // X, Y, Z, u, v, -1.0, -1.0, -1.0, 0, 0, 1.0, -1.0, -1.0, 0, 1, 1.0, 1.0, -1.0, 1, 1, -1.0, 1.0, -1.0, 1, 0, etc...etc.. u 0 1 0 1 VertexShader FragmentShader v Interpolated 3 2 1
  • 25. _projectionMatrix.perspectiveFieldOfViewLH( 45.0*Math.PI/180, stage.stageWidth/stage.stageHeight, 0.1,1000.0 ); vertex shader m44 op, va0, vc0 transform mov v0, va1 interpolate uv fragment shader tex ft0, v0, fs0 <2d,linear,nomip> mov oc, ft0 output fragment
  • 26. Example 6 : Light Source Flash3DExperiment7a Flash3DExperiment8
  • 27. protected static const VERTICES:Vector.<Number> = Vector.<Number> ([ // X, Y, Z, nX, nY, nZ -1.0, -1.0, -1.0, 0, 0, -1.0, 1.0, -1.0, -1.0, 0, 0, -1.0, 1.0, 1.0, -1.0, 0, 0, -1.0, -1.0, 1.0, -1.0, 0, 0, -1.0, etc...etc... normal
  • 28. _context3D.setProgramConstantsFromVector( Context3DProgramType.FRAGMENT, 0, Vector.<Number>([ 0.5, 0.5, 0.5, 1.0 ]) ); _context3D.setProgramConstantsFromVector( Context3DProgramType.FRAGMENT, 1, Vector.<Number>([ X, Y, Z, 1.0 ]) ); vertex shader m44 op, va0, vc0 transform m44 v0, va1, vc0 normal fragment shader nrm ft0.xzy, v0 normalise mov ft0.w, fc0.w dp3 ft0, ft0, fc1 dot product sat ft0, ft0 clamp mul oc, ft0, fc0 multiply colour
  • 29. Example 7 : Phong Shader Flash3DExperimentA
  • 30. normal interpolated normals
  • 31. fc0 Half Angle Vector fc1 Ambient Colour fc2 Diffuse Colour fc3 Specular Colour vertex shader m44 op, va0, vc0 transform m44 v0, va1, vc4 normal fragment shader nrm ft0.xyz, v0 normalise normal mov ft0.w, fc0.w set w to 1 dp3 ft0.x, ft0, fc0 dot product sat ft0.x, ft0.x clamp pow ft1.x, ft0.x, fc3.w dot product to power mul ft2.xyz, fc2.xyz, ft0.xxx diffuse colour add ft2.xyz, fc1.xyz, ft2.xyz add ambient colour mul ft3.xyz, fc3.xyz, ft1.xxx specular colour add oc, ft2.xyz, ft3.xyz combine and output

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n