Advanced image synthesis - Romain Vergne

maTexture.image = new Image();. maTexture.image.onload = function () {. handleLoadedTexture(maTexture). } maTexture.image.src = "checkerboard.jpg";. } ...
2MB taille 2 téléchargements 350 vues
Romain Vergne – 2014/2015

 1: Project vertices to 2D  2: Rasterize triangle  3: Compute per-pixel color  4: Test visibility

 Project vertices to 2D  Rasterize triangle  Compute per-pixel color

Remember we use homogeneous coordinates

 Test visibility

modelviewMatrix world to eye coordinates projectionMatrix eye to viewport coordinates Can be concatenated

Remapping Viewport to screen coordinates

 Project vertices to 2D  Rasterize triangle  Compute per-pixel color  Test visibility

 For each pixel  Test 3 edge equations  If all pass, draw

 Project vertices to 2D  Rasterize triangle  Compute per-pixel color  Test visibility

a’, b’, c’ are the projected homogeneous coordinates

 Project vertices to 2D  Rasterize triangle  Compute per-pixel color  Test visibility

 Store minimum distance to

camera for each pixel in z-buffer  If new_z