Cylindrical wrapping using shader hardware
First Claim
1. A method of processing graphics information comprising:
- receiving information regarding a plurality of primitives defining an object;
receiving information regarding a texture;
receiving an instruction to cylindrically wrap the object with the texture;
executing the instruction to cylindrically wrap the object with the texture using a geometry shader program running on shader hardware; and
storing the results in a memory,wherein executing the instruction to cylindrically wrap the object with the texture using a geometry shader program running on shader hardware comprises;
selecting a first vertex from a plurality of vertices for a primitive in the plurality of primitives as a reference; and
for a second vertex of the primitive, for each coordinate of the second vertex;
determining whether a coordinate of the second vertex is more than a threshold distance away from a corresponding coordinate of the first vertex; and
if it is, thenmodifying the coordinate of the second vertex;
elsenot modifying the coordinate of the second vertex, andwherein modifying the coordinate comprises;
if a value of the coordinate of the second vertex is less than a value of the corresponding coordinate of the first vertex;
thenadding a length of the texture in the direction of the coordinate;
elsesubtracting a length of the texture in the direction of the coordinate.
2 Assignments
0 Petitions
Accused Products
Abstract
Circuits, methods, and apparatus that perform cylindrical wrapping in software without the need for a dedicated hardware circuit. One example performs cylindrical wrapping in software running on shader hardware. In one specific example, the shader hardware is a unified shader that alternately processes geometry, vertex, and fragment information. This unified shader is formed using a number of single-instruction, multiple-data units. Another example provides a method of performing a cylindrical wrap that ensures that a correct texture portion is used for a triangle that is divided by a “seam” of the wrap. To achieve this, primitive vertices are sorted such that results are vertex order invariant. One vertex is selected as a reference. For the other vertices, a difference is found for each coordinate and a corresponding coordinate of the reference vertex. If the coordinates are near, no change is made. If the coordinates are distant, the coordinate is adjusted.
-
Citations
18 Claims
-
1. A method of processing graphics information comprising:
-
receiving information regarding a plurality of primitives defining an object; receiving information regarding a texture; receiving an instruction to cylindrically wrap the object with the texture; executing the instruction to cylindrically wrap the object with the texture using a geometry shader program running on shader hardware; and storing the results in a memory, wherein executing the instruction to cylindrically wrap the object with the texture using a geometry shader program running on shader hardware comprises; selecting a first vertex from a plurality of vertices for a primitive in the plurality of primitives as a reference; and for a second vertex of the primitive, for each coordinate of the second vertex; determining whether a coordinate of the second vertex is more than a threshold distance away from a corresponding coordinate of the first vertex; and
if it is, thenmodifying the coordinate of the second vertex;
elsenot modifying the coordinate of the second vertex, and wherein modifying the coordinate comprises; if a value of the coordinate of the second vertex is less than a value of the corresponding coordinate of the first vertex;
thenadding a length of the texture in the direction of the coordinate;
elsesubtracting a length of the texture in the direction of the coordinate. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. An integrated circuit comprising:
-
a front end to receive a plurality of primitives defining an object, information regarding a texture, and an instruction to cylindrically wrap the object using the texture; shader hardware to run a geometry shader program to execute the instruction to cylindrically wrap the object using the texture; and a memory to store results generated by the shader hardware, wherein executing the instruction to cylindrically wrap the object with the texture comprises; selecting a first vertex from a plurality of vertices for a primitive of the object as a reference; and for a second vertex of the primitive, for each coordinate of the second vertex; determining whether a coordinate of the second vertex is more than a threshold distance away from a corresponding coordinate of the first vertex; and
if it is, thenmodifying the coordinate of the second vertex;
elsenot modifying the coordinate of the second vertex, and wherein modifying the coordinate comprises; if a value of the coordinate of the second vertex is less than a value of the corresponding coordinate of the first vertex;
thenadding a length of the texture in the direction of the coordinate;
elsesubtracting a length of the texture in the direction of the coordinate. - View Dependent Claims (11, 12, 13)
-
-
14. A method of processing graphics information comprising:
-
on an integrated circuit; receiving information for a texture, the texture having a first length in a first dimension; receiving information regarding an object including a primitive, the primitive comprising a plurality of vertices including a first vertex and a second vertex; selecting a first vertex of the primitive as a reference; for a second vertex of the primitive, for each coordinate of the second vertex; determining whether a coordinate of the second vertex is more than a threshold distance away from a corresponding coordinate of the first vertex; and
if it is, thenmodifying the coordinate of the second vertex;
elsenot modifying the coordinate of the second vertex wherein modifying the coordinate comprises; if a value of the coordinate of the second vertex is less than a value of the corresponding coordinate of the first vertex;
thenadding a length of the texture in the direction of the coordinate;
elsesubtracting a length of the texture in the direction of the coordinate. - View Dependent Claims (15, 16, 17, 18)
-
Specification