View Full Version : Interpolation functions

11-14-2012, 04:10 PM
A question more or less just of curiosity: Is it possible to use another interpolation function instead of linear interpolation for particular varying vertex attributes?

Alfonse Reinheart
11-14-2012, 04:33 PM
You can't vary vertex attributes. Vertex attributes are what you pass into vertex shaders. They don't get interpolated. Only vertex shader outputs get interpolated.

As for interpolating outputs, no, you can only pick between perspective-correct interpolation, window-space linear interpolation, and no interpolation. You could try to code up something yourself, but those are what the system provides.

11-14-2012, 06:03 PM
I guess with coding-up something you mean in a fragment program? That is something I would like to avoid in this particular case:
It was just a thought I came across when observing kind of unexpected and undesired visual results when rendering a cube whose corner vertices were defined with smoothed normal-vectors.