System and method for efficiently determining a fog blend value in processing graphical images
First Claim
1. A method for determining a fog value for a pixel in a computer system having a memory, the fog value based upon an exponential fog function, the method comprising the steps of:
- receiving a first value representing an inverse of a depth component of the pixel, said first value having a first portion and a second portion;
generating a floating point signal of said second portion having the steps of;
identifying a second value equal to the number of binary zeros preceding the first binary one in the second portion;
repeatedly shifting a most significant bit of said second portion a first number of times to generate a shifted value, said first number of times one greater than said second value;
performing a complement operation on said shifted value to generate a complement value;
concatenating said second value and a portion of said complement value to generate said floating point signal;
setting said floating point signal to zero if all bits in said first portion are not equal to a third value; and
setting said floating point signal equal to a value comprised of all binary ones if a first number of most significant bits in said second portion are all equal to a fourth value; and
determining the fog value using said floating point signal.
4 Assignments
0 Petitions
Accused Products
Abstract
A system for generating blend values for three-dimensional graphic rendering includes a first register, a second register, third register, an index creation unit, a blend value generation unit and a blending unit. The first register receives and stores color pixel data, and the second register receives and stores a depth perspective component; and the third register receives and stores fog color data. The output of the second register is coupled to the index creation unit which uses the received depth perspective component to generate a two-part index. The two-part index is output by the index creation unit to produce a blend value. The first portion of the index is used to address a table in the blend generation unit, and the second portion of the index is used to produce an increment value added to output of the table resulting in the creation of a blend value. The blend value, the color pixel data and the fog color data are then blended by the blending unit and output by the system. The invention also includes a method for generating a blend value and producing a blended color output. The method includes the steps of: producing an index having a first portion and a second portion from a distance value; determining a base value using the first portion of the index, determining a delta between the base value and the next entry in the table using the first portion of the index, determining a blend increment using the delta and the second portion of the index; and producing a blend value by adding the base value to the blend increment; and blending the blend value with input pixel data.
-
Citations
12 Claims
-
1. A method for determining a fog value for a pixel in a computer system having a memory, the fog value based upon an exponential fog function, the method comprising the steps of:
-
receiving a first value representing an inverse of a depth component of the pixel, said first value having a first portion and a second portion; generating a floating point signal of said second portion having the steps of; identifying a second value equal to the number of binary zeros preceding the first binary one in the second portion; repeatedly shifting a most significant bit of said second portion a first number of times to generate a shifted value, said first number of times one greater than said second value; performing a complement operation on said shifted value to generate a complement value; concatenating said second value and a portion of said complement value to generate said floating point signal; setting said floating point signal to zero if all bits in said first portion are not equal to a third value; and setting said floating point signal equal to a value comprised of all binary ones if a first number of most significant bits in said second portion are all equal to a fourth value; and determining the fog value using said floating point signal. - View Dependent Claims (2, 3, 4)
-
-
5. A system for generating a fog value from a depth component, said fog value representing an estimate of an exponential fog function, the system comprising:
-
an floating point generation unit having; a first register for storing an inverse of said depth component having a first, second, and third portion; a first one encoder, disposed to receive signals representing the second portion of said first register, to determine an index that is equal number of bits having a value of a binary zero preceding the first bit having a value of binary one; a shift register, disposed to receive signals representing the second and third portion of said first register, to perform a shift operation on the bits in the second and third portion of said register until said first bit having a value of binary one is shifted out of the register, to generate a shifted value; a complement unit, disposed to receive signals from said shift register, for performing a binary complement operation on a portion of bits in said shifted value to generate a complement value; a concatenation register for concatenating said index and said complement value to generate a floating point signal; a first clamp, disposed to receive signals from said first register, to set said floating point signal equal to all binary ones if all of the bits in said second portion have a first value; a second clamp, disposed to receive signals from said first register, to set said point signal equal to all binary zeros if all of the bits in said first portion do not have a first value; a fog generation unit, disposed to receive said floating point signal, for generating a fog value based upon said floating point signal. - View Dependent Claims (6, 7, 8)
-
-
9. A computer based system for determining a fog value for a pixel, having a memory, the fog value based upon an exponential fog function, the system comprising:
-
first receiving means for receiving a first signal having a first value representing an inverse of a depth component of the pixel, said first value having a first portion and a second portion; first generation means, disposed to receive said first signal, for generating a floating point signal of said second portion, said first generation means including; identifying means, disposed to receive said first signal, for identifying a second value equal to the number of binary zeros preceding the first binary one in the second portion; shifting means, coupled to said identifying means, for repeatedly shifting a most significant bit of said second portion a first number of times to generate a shifted value, said first number of times one greater than said second value; complement means, disposed to receive said shifted value, for performing a complement operation on said shifted value to generate a complement value; concatenating means, disposed to receive said complement value, for concatenating said second value and a portion of said complement value to generate said floating point signal; first clamp means, coupled to said first signal, for setting said floating point signal to zero if all bits in said first portion are not equal to a third value; and second claim means, coupled to said first signal, for setting said floating point signal equal to a value comprised of all binary ones if a first number of most significant bits in said second portion are all equal to a fourth value; and fog value generation means, disposed to receive said floating point signal, for determining the fog value using said floating point signal. - View Dependent Claims (10, 11, 12)
-
Specification