Status – Week 231 Victor Moya. Summary Primitive Assembly Primitive Assembly Clipping triangle rejection. Clipping triangle rejection. Rasterization.

Slides:



Advertisements
Similar presentations
Rezanje črt in poligonov. World window & viewport window viewport screen window world window.
Advertisements

I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 30, D Clipping 1/14 Clipping (pages , )
Objectives Define Clipping Various clipping methods. Line clipping methods.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
Status – Week 257 Victor Moya. Summary GPU interface. GPU interface. GPU state. GPU state. API/Driver State. API/Driver State. Driver/CPU Proxy. Driver/CPU.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Computer Graphics Lecture 8 Arbitrary Viewing II: More Projection, Clipping and Mathematics of 3D Viewing.
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
CS 551 / 645: Introductory Computer Graphics Clipping Lines and Polygons.
1 Clipping. 2 Transformation Sequence X Y Z X Y Z X Y Z X Y Z Object Coords. Eye Coords. Clip Coords. Normalized Device Coords. Screen Coords. Implementation:
Computer Graphics Viewing.
Status – Week 228 Victor Moya. Summary Hierarchical Z-Buffer. Hierarchical Z-Buffer.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Interpolation Clipping.
Informationsteknologi Thursday, November 22, 2007Computer Graphics - Class 111 Today’s class Clipping Parametric and point-normal form of lines Intersecting.
Implementation Dr. Amy Zhang. Reading 2  Hill, Chapters  Hill, Chapter 10.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
1 Shader Performance Analysis on a Modern GPU Architecture Victor Moya, Carlos González, Jordi Roca, Agustín Fernández Jordi Roca, Agustín Fernández Department.
Status – Week 243 Victor Moya. Summary Current status. Current status. Tests. Tests. XBox documentation. XBox documentation. Post Vertex Shader geometry.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Status – Week 242 Victor Moya. Summary Current status. Current status. Tests. Tests. XBox documentation. XBox documentation. Post Vertex Shader geometry.
Status – Week 277 Victor Moya.
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
Status – Week 226 Victor Moya. Summary Recursive descent. Recursive descent. Hierarchical Z Buffer. Hierarchical Z Buffer.
Status – Week 279 Victor Moya. Rasterization Setup triangles (calculate slope values). Setup triangles (calculate slope values). Fill triangle: Interpolate.
Status – Week 240 Victor Moya. Summary Post Geometry Pipeline. Post Geometry Pipeline. Rasterization. Rasterization. Triangle Setup. Triangle Setup. Triangle.
Status – Week 283 Victor Moya. 3D Graphics Pipeline Akeley & Hanrahan course. Akeley & Hanrahan course. Fixed vs Programmable. Fixed vs Programmable.
Status – Week 239 Victor Moya. Summary Primitive Assembly Primitive Assembly Clipping triangle rejection. Clipping triangle rejection. Rasterization.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Clipping.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Implementation I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Status – Week 260 Victor Moya. Summary shSim. shSim. GPU design. GPU design. Future Work. Future Work. Rumors and News. Rumors and News. Imagine. Imagine.
Now Playing: California Stars Billy Bragg & Wilco from Mermaid Avenue
© 2004 Tomas Akenine-Möller1 Shadow Generation Hardware Vision day at DTU 2004 Tomas Akenine-Möller Lund University.
Status – Week 227 Victor Moya. Summary How to lose a week. How to lose a week. Rasterization. Rasterization.
3D Rendering – A beginners guide Phil Carlisle – University of Bolton.
Graphics Pipeline Clipping CMSC 435/634. Graphics Pipeline Object-order approach to rendering Sequence of operations – Vertex processing – Transforms.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Hidden Surface Removal
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
Clipping Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by David Luebke)
CS 480/680 Computer Graphics Shading in OpenGL Dr. Frederick C Harris, Jr. Fall 2013.
CSE Real Time Rendering Week 9. Post Geometry Shaders Courtesy: E. Angel and D. Shreiner – Interactive Computer Graphics 6E © Addison-Wesley 2012.
Windows, Viewports, and Clipping
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Implementation of a Renderer Consider Programs are processd by the system line & polygon, outside the view volume Efficiently Understanding of the implementation.
1Computer Graphics Implementation 1 Lecture 15 John Shearer Culture Lab – space 2
Lecture 9 From Vertices to Fragments. Objectives Introduce basic implementation strategies Clipping Rasterization hidden-surface removal.
Computer Graphics Clipping.
Advanced D3D Programming Sim Dietrich
Computer Graphics CC416 Week 13 Clipping.
Transformations contd.
CS 551 / 645: Introductory Computer Graphics
Computer Graphics Shading in OpenGL
Concepts, Algorithms for line clipping
Clipping Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006
3D rezanje 3D Clipping view frustrum clipping planes clipped.
Graphics Processing Unit
Concepts, algorithms for clipping
Graphics Pipeline Clipping
Software Rasterization
WINDOWING AND CLIPPING
Lecture 13 Clipping & Scan Conversion
Joshua Barczak CMSC 435 UMBC
© University of Wisconsin, CS559 Fall 2004
3D rezanje 3D Clipping view frustrum clipping planes clipped.
Clipping University of British Columbia CPSC 314 Computer Graphics
COMPUTER GRAPHICS Clipping
Presentation transcript:

Status – Week 231 Victor Moya

Summary Primitive Assembly Primitive Assembly Clipping triangle rejection. Clipping triangle rejection. Rasterization. Rasterization. Triangle Setup. Triangle Setup. Early Z. Early Z. Current status. Current status.

Primitive Assembly Works as a LRU cache. Works as a LRU cache. Asks the Post T&L cache for missing vertex. Asks the Post T&L cache for missing vertex. Checks if some of the new vertex are already in the primitive assembly cache. Checks if some of the new vertex are already in the primitive assembly cache. Three vertex stored (2 for triangles, 3 for quads). Three vertex stored (2 for triangles, 3 for quads). Last vertex is always bypassed directly to Triangle Setup. Last vertex is always bypassed directly to Triangle Setup.

Clipping Check clipping per vertex. Check clipping per vertex. Use Cohen & Sutherland method. Use Cohen & Sutherland method. Reject full triangles. Reject full triangles. Do not generate new triangles. Do not generate new triangles.

Cohen & Sutherland Clipping Cohen & Sutherland: 6 bit outcode. Cohen & Sutherland: 6 bit outcode. if all three vertex have outcodes if all three vertex have outcodes the triangle is inside the fustrum volume. the triangle is inside the fustrum volume. if the logical and of the three vertex outcodes is 0 if the logical and of the three vertex outcodes is 0 the triangle intersects the fustrum volume. the triangle intersects the fustrum volume. if the logical and of the three vertex outcodes is not 0 if the logical and of the three vertex outcodes is not 0 the triangle is outside the fustrum volume. the triangle is outside the fustrum volume.

Sutherland & Cohen

Clipper Streamer Commit Clipper Primitive Assembly transformed vertices assembled triangles clipped triangles

Clipping Alternatives: Alternatives: Full clipping: Full clipping: Sutherland – Hodgeman: Sutherland – Hodgeman: –Clip the triangle against each clip plane in an iterative way. Other algorithms similar to previous. Other algorithms similar to previous. Generates new triangles. Generates new triangles. No clipping: No clipping: Guad band and scissoring for left, right, bottom and top clipping. Guad band and scissoring for left, right, bottom and top clipping. 2DH rasterization (Olano) for w < 0 clipping. 2DH rasterization (Olano) for w < 0 clipping. More hardware needed in rasterizer. More hardware needed in rasterizer. Possible fillrate lose. Possible fillrate lose.

Rasterization Clipper Triangle Setup TraversalInterpolation Rasterizer Emulator Setup(vattrib[3])nextFragment()Interpolate(fr)

Rasterization Traversal algorithm has been reimplemented: Traversal algorithm has been reimplemented: did not work for small thin triangles :P. did not work for small thin triangles :P. Adjoint matrix (setup matrix) and edge equation math moved all to 64-bit FP Adjoint matrix (setup matrix) and edge equation math moved all to 64-bit FP there was a precission problem. there was a precission problem. There is still some problem with edges with 0 and 1 slope (vertical and horizontal edges). There is still some problem with edges with 0 and 1 slope (vertical and horizontal edges). Added screen ‘scissoring’ to the traversal algorithm Added screen ‘scissoring’ to the traversal algorithm Add a bottom bound line traversal ending condition. Add a bottom bound line traversal ending condition.

Rasterization Current traversal algorithm: Current traversal algorithm: Select top most vertex. Select top most vertex. Divide by w (project) and map to viewport top most vertex. Divide by w (project) and map to viewport top most vertex. Start traversal moving left and checking right and down. Start traversal moving left and checking right and down. Move to left until outside of the triangle. Move to left until outside of the triangle. Move to right if right save available. Move to right if right save available. Move to right until outside of the triangle. Move to right until outside of the triangle. Move to down if down save available. Move to down if down save available. Repeat. Repeat.

Rasterization Traversal algorithm: Traversal algorithm: Ending condition: next pixel outside or below the bottom bound line. Ending condition: next pixel outside or below the bottom bound line. Special case for thin triangles: Special case for thin triangles: Cross from negative to positive through the ‘vertical’ edges. Cross from negative to positive through the ‘vertical’ edges. Keep going until the bottom bound line. Keep going until the bottom bound line.

Rasterization scanned generated inside generated outside

Rasterizer Problems: Problems: Algorithm needs start point. Algorithm needs start point. Unclipped triangles. Unclipped triangles. Top most vertex can be: Top most vertex can be: far outside of the fustrum volume far outside of the fustrum volume –Many cycles required to travel to inside. behind the eye: behind the eye: –triangle is inverted. Top most vertex must be projected and mapped to the viewport. Top most vertex must be projected and mapped to the viewport. Others? Others?

Rasterizer Alternatives: Alternatives: Implement projection (divide by w) and use a normal rasterization algorithm (no 2DH). Implement projection (divide by w) and use a normal rasterization algorithm (no 2DH). Use iterative hierarchical approaches (McCool): Use iterative hierarchical approaches (McCool): May spend many cycles until first fragment is generated. May spend many cycles until first fragment is generated. Find a way of creating a bounding box for the triangle without projection, clipping or viewport mapping? Find a way of creating a bounding box for the triangle without projection, clipping or viewport mapping?

Problems Current implementation must count number of passing triangles in each box to detect end of batch. Current implementation must count number of passing triangles in each box to detect end of batch. ‘Empty’ culled (either in primitive assembly, clipper or triangle setup) triangles must be passed down to FragmentFIFO. ‘Empty’ culled (either in primitive assembly, clipper or triangle setup) triangles must be passed down to FragmentFIFO. This produces wastes cycles traversal, interpolation and fragment FIFO. This produces wastes cycles traversal, interpolation and fragment FIFO. Other solutions? Other solutions?

Synchronization Ready signals vs Request signals. Ready signals vs Request signals. Ready/Busy signals needs at least a buffer (for the incoming data) with the size of the signal latency in the sender. Ready/Busy signals needs at least a buffer (for the incoming data) with the size of the signal latency in the sender. This buffer could remain empty most of the time. This buffer could remain empty most of the time. Request signals require a counter (displacement counter?) in the reciever. Request signals require a counter (displacement counter?) in the reciever. The counter could be updated more than once per cycle (mutiple requests, multiple request serviced). The counter could be updated more than once per cycle (mutiple requests, multiple request serviced).

Synchronization data data signal write ready signal write data signal read ready signal read cycle n + 2 ready data busy no buffer available so data is lost cycle n + 1cycle n

Synchronization Alternatives: Alternatives: Start latencies of the consumer box are fixed and/or known by the producer box. Start latencies of the consumer box are fixed and/or known by the producer box.

Next steps Add the clipper box for trivial reject/accept of triangles against the fustrum volume. Add the clipper box for trivial reject/accept of triangles against the fustrum volume. Add the configuration options and file that was discussed months ago (signals, latencies, etc). Add the configuration options and file that was discussed months ago (signals, latencies, etc). Add new boxes: early Z, pixel shader, texture units, etc. Add new boxes: early Z, pixel shader, texture units, etc. Implement a more decent Memory Controller. Implement a more decent Memory Controller.

Early Z Could be implemented before interpolation. Could be implemented before interpolation. Interpolate the triangle Z (z/w) first. Interpolate the triangle Z (z/w) first. Could save some calculations. Could save some calculations. Would save time? Would save time? Implement hierarchical Z: multilevel z buffer internal/external memory. Implement hierarchical Z: multilevel z buffer internal/external memory. Must be disabled if pixel shaders write z. Must be disabled if pixel shaders write z.

Pixel Shader Add new math instructions to Shader emulator. Add new math instructions to Shader emulator. Add texture instructions to the Shader emulator. Add texture instructions to the Shader emulator. Design a megathreaded shader (maybe up to 100s of fragments on fly). Design a megathreaded shader (maybe up to 100s of fragments on fly). Design communication with the texture unit. Design communication with the texture unit.

Texture Unit Design texture unit. Design texture unit. Create a texture emulator. Create a texture emulator. Texture storage in memory? Texture storage in memory? Texture compression? Texture compression? Texture cache? Texture cache? Filtering methods: Filtering methods: Bilinear. Bilinear. Trilinear. Trilinear. Anisotropic. Anisotropic.

Memory Controller GDDR3? GDDR3? Need to read the current memory specifications. Need to read the current memory specifications. Banks, access methods, bus widths... Banks, access methods, bus widths... Memory buses to the GPU units? Memory buses to the GPU units? Priority, policies? Priority, policies?