PDA

View Full Version : normal interpolation in rasterization



thinks
04-07-2005, 12:45 PM
Is there any way to control the normals assigned to fragments? AFAIK they are linearly interpolated, which in many situations is enough, but I would like smooth interpolation? Is this possible?

Are there any known work-arounds for this problem? (I mean the problem of have normal values at vertices and interpolating these normals smoothly in rasterization)

/ T

Korval
04-07-2005, 01:46 PM
AFAIK they are linearly interpolated, which in many situations is enough, but I would like smooth interpolation? Is this possible?By "smooth", do you mean interpolation as though they were normals rather than a 3-vector of floats? The correct way to handle this is to renormalize normals after interpolation. This should produce the same normal as if you have interpolated the normal spherically across the triangle.

thinks
04-08-2005, 12:07 AM
Thanks! Thats kind of what I meant, my question may have been a little unclear...