PDA

View Full Version : Random Graphics Thoughts



V-man
01-28-2005, 06:29 AM
On this page (Carmack .plan, December 31st, 2004)

http://www.armadilloaerospace.com/n.x/johnc/Recent%20Updates

In the Random Graphics Thoughts section



If you are basically just looking for plane information, as you would for modifying things with texture magnification or stretching shadow buffer filter kernels, the derivatives work out pretty well. However, if you are looking at a derived value, like a normal read from a texture, the results are almost useless because of the way they are calculated. In an ideal world, all of the samples to be differenced would be calculated at once, then the derivatives calculated from there, but the hardware only calculates 2x2 blocks at a time. Each of the four pixels in the block is given the same derivative, and there is no influence from neighboring pixels. This gives derivative information that is basically half the resolution of the screen and sort of point sampled. You can often see this effect with bump mapped environment mapping into a mip-mapped cube map, where the texture LOD changes discretely along the 2x2 blocks. Explicitly coloring based on the derivatives of a normal map really shows how nasty the calculated value is.
Can someone explain the above?

- If you are basically just looking for plane information. >>>WHAT? WHY?
- as you would for modifying things with texture magnification or stretching shadow buffer filter kernels >>>WHAT? WHY? Modifying things?

dorbie
01-28-2005, 09:55 AM
The derivative discussion is on texture coordinate derivatives w.r.t. MIP lod calculation in a programmable environment.

He then talks about problems with MIP map filtering of normal maps which is why he rasied the point in the first place.