Method and apparatus for rendering a computer generated image
First Claim
1. A method for rendering a computer generated image using a stencil buffer, comprising:
- receiving an arbitrary closed polygonal contour, the contour having N vertices;
dividing the arbitrary closed polygonal contour into primitives, each primitive being a polygon having at least 3 and at most P vertices where 2<
P<
N; and
using a stencil buffer to render the primitives to produce a computer generated image;
wherein dividing comprises;
i) selecting a vertex of the arbitrary closed polygonal contour as a first index vertex and setting the source contour as the arbitrary closed polygonal contour;
ii) outputting a primitive of Q vertices using the index vertex and (Q−
1) contiguous vertices of the source contour;
iii) forming a reduced source contour by removing from the source contour the (Q−
2) vertices between the index vertex and the end vertex of the outputted primitive;
iv) setting the end vertex of the outputted primitive as the index vertex;
v) repeating steps (ii) to (iv) until all vertices of the source contour have been included in at least one of the generated primitives;
vi) selecting a vertex of the reduced source contour as an index vertex and setting the source contour as the reduced source contour;
vii) repeating steps (ii) to (v) until either the reduced source contour is outputted as a primitive or until the reduced source contour has trivially zero area.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for rendering a computer generated image using a stencil buffer is described. The method divides an arbitrary closed polygonal contour into first and higher level primitives, where first level primitives correspond to contiguous vertices in the arbitrary closed polygonal contour and higher level primitives correspond to the end vertices of consecutive primitives of the immediately preceding primitive level. The method reduces the level of overdraw when rendering the arbitrary polygonal contour using a stencil buffer compared to other image space methods. A method of producing the primitives in an interleaved order, with second and higher level primitives being produced before the final first level primitives of the contour, is described which improves cache hit rate by reusing more vertices between primitives as they are produced.
-
Citations
12 Claims
-
1. A method for rendering a computer generated image using a stencil buffer, comprising:
-
receiving an arbitrary closed polygonal contour, the contour having N vertices; dividing the arbitrary closed polygonal contour into primitives, each primitive being a polygon having at least 3 and at most P vertices where 2<
P<
N; andusing a stencil buffer to render the primitives to produce a computer generated image;
wherein dividing comprises;i) selecting a vertex of the arbitrary closed polygonal contour as a first index vertex and setting the source contour as the arbitrary closed polygonal contour; ii) outputting a primitive of Q vertices using the index vertex and (Q−
1) contiguous vertices of the source contour;iii) forming a reduced source contour by removing from the source contour the (Q−
2) vertices between the index vertex and the end vertex of the outputted primitive;iv) setting the end vertex of the outputted primitive as the index vertex; v) repeating steps (ii) to (iv) until all vertices of the source contour have been included in at least one of the generated primitives; vi) selecting a vertex of the reduced source contour as an index vertex and setting the source contour as the reduced source contour; vii) repeating steps (ii) to (v) until either the reduced source contour is outputted as a primitive or until the reduced source contour has trivially zero area. - View Dependent Claims (6, 7, 8, 9, 10, 11)
-
-
2. A method for rendering a computer generated image using a stencil buffer, comprising:
-
receiving an arbitrary closed polygonal contour, the contour having N vertices; dividing the arbitrary closed polygonal contour into primitives, each primitive being a polygon having at least 3 and at most P vertices where 2<
P<
N; andusing a stencil buffer to render the primitives to produce a computer generated image;
wherein dividing comprises;(i) storing data representative of a partial contour from the closed polygonal contour; (ii) outputting a first level primitive using the stored data, the first level primitive corresponding to contiguous vertices of the closed polygonal contour; (iii) updating the stored data; (iv) whilst the stored data represents higher level primitives outputting a higher level primitive using the stored data, an (i+1)th higher level primitive corresponding to the end vertices of consecutive ith level primitives, and updating the stored data; (v) whilst the stored data represents a further first level primitive outputting the further first level primitive and updating the stored data; (vi) repeating steps (i) to (v) until the closed polygonal contour has been divided into primitives or the remaining partial contour has substantially zero area. - View Dependent Claims (3, 4, 5)
-
-
12. Apparatus for rendering a computer generated image comprising:
-
an input for receiving an arbitrary closed polygonal contour; means for dividing the arbitrary closed polygonal contour into primitives, each primitive being a polygon having at least 3 and up to P vertices, and outputting the primitives; a stencil buffer, coupled to the means for dividing the arbitrary closed polygonal contour, for rendering the primitives to produce a computer generated image;
whereinthe means for dividing the arbitrary closed polygonal contour into primitives comprises; vertex stack means comprising first and second portions, the first portion containing P stack entries, the vertex stack means configured to allow pushing and popping of stack data between the first and second portions; primitive output means, coupled to the first portion of the vertex stack means and to state machine means, for outputting primitives from the data on the first portion of the vertex stack means; state machine means, coupled to the vertex stack means, configured to manage the data on the first and second portions of the vertex stack means to provide interleaving of primitive levels in the output of the primitive output means.
-
Specification