Skip to content

frontface

vector  frontface(vector N, vector I)

This form (which doesn’t take a reference vector) is only available in the shading contexts, where the Ng variable is used.

vector  frontface(vector N, vector I, vector Nref)

If dot(I, Nref) is less than zero, N will be negated.