PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Graphics Programming

Hi there,
I would like to calculate something like this:

N = Normal (unit vector)
H = Halfway vector (unit vector)
L = Light vector (unit vector)
V = viewer vector (unit vector)
N.H = cos(a)
N.V = cos(b)
N.L = cos(c)

Code:
G = min(1, 2 (N.H)(N.V), 2 (N.H) (N.L) )
(V.H) (V.H)


G is a scalar value.

How can I do this ?
Any help would be appreciated,
- Wolf
sorry wrong forum. Wolf
Moved to dev forum.
so you have a formula.
where's the problem to calculate it?

DANIEL