1 / 21

Status – Week 282

Status – Week 282. Victor Moya. 3D Graphics Pipeline. Geometry. Vertex operations: (1) Transform coordinates and normal Model => World. World => Eye. (2) Normalize the length of the normal. (3) Compute vertex lightning. (4) Transform texture coordinates.

redell
Download Presentation

Status – Week 282

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Status – Week 282 Victor Moya

  2. 3D Graphics Pipeline

  3. Geometry • Vertex operations: • (1) Transform coordinates and normal • Model => World. • World => Eye. • (2) Normalize the length of the normal. • (3) Compute vertex lightning. • (4) Transform texture coordinates. • (5) Transform coordinates to clip coordinates (projection). • (8) Divide coordinate by w. • (9) Apply affine viewport transform (x, y, z).

  4. Geometry • Primitive operations: • (6) Primitive assembly • (7) Clipping: • (10) Backface cull: eliminate back-facing triangles. • Primitive generation: new pipeline stage (ATI TruForm).

  5. Clipping • Clip geometry primitives with the view frustrum (6 planes). • Clip geometry primitives with the user clip planes. • Techniques used: • Guard-Band Clipping. • Homogenous rasterization avoids clipping in the geometry stage.

  6. Guard-Band Clipping

  7. Homogeneus coordinates • “Triangle Scan Conversion using 2D Homogeneus Coordinates”, Olano and Greer.

  8. Rasterization • Setup (per-triangle). • Sampling (triangle = {fragments}. • Interpolation (interpolate colors and coordinates).

  9. Rasterization • Converts primitives to fragments. • Primitive: point, line, polygon, … • Fragment: transient data structure short x, y; long depth; short r, g, b, a; • Fragment selection. • Parameter Assignment (color, depth ...).

  10. Programmable Pipeline

  11. Vertex Program

  12. Vertex Program

  13. NV_vertex_program2 • ARL (new support for four-component A0 and A1 instead of just A0.x) • ARR (similar to ARL, but rounds instead of truncating before storing the integer result in an address register) • BRA, CAL, RET (branching instructions) • COS, SIN (high-precision trigonometric functions) • FLR, FRC (floor and fraction of floating-point values) • EX2, LG2 (high-precision exponentiation and logarithm functions) • ARA (adds pairs of components of an address register; useful for looping and other operations) • SEQ, SFL, SGT, SLE, SNE, STR (“set on” instructions similar to SLT, SGE) • SSG (“set sign” operation; generates a vector holding –1.0 for negative operand components, 0 for zero-value components, and +1.0 for positive components)

  14. NV_vertex_program Overview • 1. Condition codes • 2. Branching & subroutines • 3. Even faster performance • 4. Nineteen new instructions • 5. New source modifiers • 6. Clip plane support • 7. More registers & instructions

  15. NV_vertex_program2 Resource Limits • 256 vertex program parameters • Up from 96 • 16 temporary registers • Up from 12 • Two 4-component address registers • Up from one single-component address register • 256 static instructions per program • Up from 128 • Given branching, 65536 dynamic instructions can execute before termination to avoid infinite loops

  16. NV_vertex_program2 Source Modifiers • Source operand absolute value • Example: MOV R0, |R1|; • In addition to source negation & swizzling • Example: MAD R0, -|R1|.yzwy, |R2|, -R3,w; • Swizzle, negate, & absolute value operations are “free” source modifiers

  17. NV_vertex_program2 Condition Codes (1) • Condition code state • 4-component register stores condition code values • Four possible values • LT –less than zero • EQ – equal to zero • GT –greater than zero • UN– unordered, for comparisons involving NaN • Most instructions optionally update condition code state • Indicated with “C” suffix: DP4C, MOVC, etc • “CC” pseudo-register used to just update condition codes

  18. NV_vertex_program2 Condition Codes (2) • Optional condition code based destination masking • Example: MOV R1.xy(NE.z), R0; • Copy R0components to R1’s X & Y components except when condition code’s Z component is EQ • Condition code rules: EQ, equal; GE, greater or equal; GT, greater than; LE, less or equal; LT, less than; NE, not equal; FL, false; and TR, true • Note that condition code masking rule can swizzle condition code components

  19. ATI R300. Vertex Shader.

  20. 3DLabs P10. Pipeline.

  21. Matrox Parhelia. Pipeline.

More Related