Claims
- 1. A method for performing multi-sampling for anti-aliasing, comprising:
using a sample grid of a non-power-of-two dimension per pixel to sample a polygon; distributing a plurality of sub-samples within said sample gird.
- 2. The method of claim 1 further comprises:
creating a bounding box less than or equal to the size of said sample grid.
- 3. The method of claim 2 wherein said sub-samples are distributed within said bounding box.
- 4. The method of claim 3 wherein said bounding box guarantees that, if said polygon crosses the boundary of said bounding box, said polygon covers at least one said subsample.
- 5. The method of claim 4 further comprising:
checking whether said polygon crosses the boundary of said bounding box; getting previous pixel information from a frame buffer if said polygon crosses the boundary of said bounding box; recording said information in said frame buffer.
- 6. The method of claim 1 wherein said non-power-of-two sample grid is of size 12×12, or multiple thereof.
- 7. The method of claim 1 wherein said non-power-of-two sample grid uses a non-power-of-two number of sub-samples.
- 8. The method of claim 1 wherein said non-power-of-two sample grid uses 1 sub-sample.
- 9. The method of claim 1 wherein said non-power-of-two sample grid uses 2 sub-samples.
- 10. The method of claim 1 wherein said non-power-of-two sample grid uses 4 sub-samples.
- 11. The method of claim 1 wherein said non-power-of-two sample grid uses 6 sub-samples.
- 12. The method of claim 1 further comprising:
using a scan conversion process to determine if a pixel is covered by said polygon.
- 13. The method of claim 12 wherein said step of using scan conversion further comprises:
calculating a upper and a lower bounds of said polygon; and calculating a left and a right bounds of said polygon.
- 14. The method of claim 13 wherein said calculating the upper and lower bounds of said polygon further comprises:
dividing a minimum and a maximum y intercept values of said polygon by the dimension of one side of said sample grid.
- 15. The method of claim 13 wherein said calculating the left and right bounds of said polygon further comprises:
dividing a minimum and a maximum x intercept values of said polygon by the dimension of one side of said sample grid.
- 16. The method of claims 14 wherein said dividing a minimum and a maximum y intercept values is achieved using a divide-by-three algorithm.
- 17. The method of claim 15 wherein said dividing a minimum and a maximum x intercept values is achieved using a divide-by-three algorithm.
- 18. The method of claim 1 wherein said distributing ensures that no two sub-samples are in the same column or same row within said sample gird.
- 19. A graphics sampling apparatus in a graphics processor, comprising:
a sampling means for creating a sample grid of a non-power-of-two dimension per pixel to sample a polygon; a distributing means for distributing a plurality of sub-samples within said sample gird.
- 20. The graphics sampling apparatus of claim 19 wherein said sample grid further comprises a bounding box less than or equal to the size of said sample grid.
- 21. The graphics sampling apparatus of claim 20 wherein said sub-samples are distributed within said bounding box.
- 22. The graphics sampling apparatus of claim 21 wherein said bounding box guarantees that, if said polygon crosses the boundary of said bounding box, said polygon covers at least one said subsample.
- 23. The graphics sampling apparatus of claim 22 further comprising:
a checking means for checking whether said polygon crosses the boundary of said bounding box; a retrieving means for getting previous pixel information from a frame buffer if said polygon crosses the boundary of said bounding box; a recording means for recording said information in said frame buffer.
- 24. The graphics sampling apparatus of claim 19 wherein said non-power-of-two sample grid is of size 12×12, or multiple thereof.
- 25. The graphics sampling apparatus of claim 19 wherein said non-power-of-two sample grid uses a non-power-of-two number of sub-samples.
- 26. The graphics sampling apparatus of claim 19 wherein said non-power-of-two sample grid uses 1 sub-sample.
- 27. The graphics sampling apparatus of claim 19 wherein said non-power-of-two sample grid uses 2 sub-samples.
- 28. The graphics sampling apparatus of claim 19 wherein said non-power-of-two sample grid uses 4 sub-samples.
- 29. The graphics sampling apparatus of claim 19 wherein said non-power-of-two sample grid uses 6 sub-samples.
- 30. The graphics sampling apparatus of claim 19 further comprising:
a scan conversion means to determine if a pixel is covered by said polygon.
- 31. The graphics sampling apparatus of claim 30 wherein said scan conversion means further comprises:
a first calculating means for calculating a upper and a lower bounds of said polygon; and a second calculating means for calculating a left and a right bounds of said polygon.
- 32. The graphics sampling apparatus of claim 31 wherein said first calculating means further comprises:
a dividing means for dividing a minimum and a maximum y intercept values of said polygon by the dimension of one side of said sample grid.
- 33. The graphics sampling apparatus of claim 31 wherein said second calculating means further comprises:
a dividing means for dividing a minimum and a maximum x intercept values of said polygon by the dimension of one side of said sample grid.
- 34. The graphics sampling apparatus of claim 32 wherein said dividing means divides said minimum and said maximum y intercept values by using a divide-by-three algorithm.
- 35. The graphics sampling apparatus of claim 33 wherein said dividing means divides said minimum and said maximum x intercept values by using a divide-by-three algorithm.
- 36. The graphics sampling apparatus of claim 19 wherein said distributing means ensures that no two sub-samples are in the same column or same row within said sample gird.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] The present application claims the benefit of priority from pending U.S. Provisional Patent Application No. 60/447, 861, entitled Method for Sampling On A Non-Power-of-Two Pixel Grid, filed on Feb. 13, 2003, which is herein incorporated by reference in its entirety.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60447861 |
Feb 2003 |
US |