[feature request] average and/or center interpolation qualifier

In addition to flat and smooth qualifier. I wish that we would allowed to define flat but average value between 3 vertex as pixel input (instead of provoking vertex)

The first use case I think of is flat shader. Instead of recalculating the same normal value for each pixel. It would be great if we could have just average normal at the interpolation and then copied to every pixel. We could send both averaged and interpolated normal to make a half flat face efficiently

Is it possible?

Why would you bother computing a faceted normal from vertex normals? You can compute the geometric vertex normal directly by using the dFdx and dFdy functions on the vertex position, then taking the cross-product of the two. You don’t need to have per-vertex normals at all.

“Averaging” any per-vertex output value doesn’t really make any sense.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.