Download presentation
Presentation is loading. Please wait.
Published byLiliana Rich Modified over 8 years ago
1
UNC Pixel Planes designed by Prof. Henry Fuchs et al
3
Pixel Planes Henry Fuchs’ Idea: build processing into the frame buffer, a processor per pixel. –UNC designs are called enhanced memories, not SIMD processors Enabler was linear expression tree…
8
Representation of a triangle Oriented Triangles, three vertices A, B, C A triangle is defined by Lines AB, BC, and CA For example, let A = (0, 0), B=(10, 0), C = (2, 5) Line AB = (0,0) + (10, 0)*t Let X = 10t, Y = 0, so Line AB => Y =0; Line BC = (10, 0) + (-8, 5)*t = (10-8t, 5t) Let X = 10 -8t, Y = 5t, so, line BC => -5X-8Y + 50=0 Similarly Line CA = (2, 5) + (-2, -5)*t So, Line CA => 5X - 2Y = 0 Distance from point (U,V) to Line CA is ?
9
Point to line distance (2D) AX + BY +C = 0 ----line K Point (U, V) What is the distance from (U,V ) to line K? Answer: (AU + BV +C)/M M = sqrt (A*A + B*B)
10
Distance with a sign: for a point within a triangle, all minus, or all positive signs for its distance, assuming each line with a normal vector.
11
Shading with fast evaluation of AX + BY + C = 0 Flat shading: constant color, A = B = 0, C = Color Gouraud shading (smooth shading): color interpolation, for example, Triangle with three vertices (x1, y1), (x2, y2), (x3, y3), each with red components R1, R2, R3 color is represented as (Red, Green, Blue) Assuming a plane (in 3D) with vertices (x1, y1, R1), (X2, Y2, R2), and (X3, y3, R3)
12
Gouraud shading Vector equation of the plane is (x,y) = s (x2-x1, y2 – y1) + t(x3-x1, y3-y1) + (x1, y1) solved for (s, t), then s = A1x + B1y +C1, t = A2x + B2y +C2 So, given point (x,y) in this plane, what is its color? Answer: color = Ax + By +C, where A = A1 (R2-R1)+ A2 (R3-R1) B = B1(R2-R1) + B2 (R3-R1) C = C1(R2-R1) + C2(R3-R1) + R1 So, we then broadcast A, B, C into this Pixel-Planes, and the red components for each pixel is done!
13
How is the color calculated? Since, (x,y) = s (x2-x1, y2 – y1) + t(x3-x1, y3-y1) + (x1, y1) Therefore, (x,y, R) = s (x2-x1, y2 – y1, R2-R1) + t(x3-x1, y3- y1, R3-R1) + (x1, y1, R1) or, color R = s (R2-R1) + t (R3-R1) + R1
19
Implementation
20
Shading
21
Hardware design
22
Pixel-Planes Communications & Multimedia Lab22
23
Bit operation Binary representation: for easy hardware architecture/realization Right most significant bit, and shift left at each clock! Eg.: 011 equals 6 in Decimal 01100 equals 6 0101 equals 10 01111000 equals 30 in Decimal (all zeros at the right ends: redundant, for pipeline operations) Communications & Multimedia Lab23
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.