From: Jon Watte <jwatte@gm...>  20091104 18:06:53

Nathaniel Hoffman wrote: > lowly cosine power  it's not completely physically meaningless. If you > are using BlinnPhong (N dot H, which is much to be preferred over > original Phong  R dot L), then using a cosine power is equivalent to > Except you already have the reflection vector for your environment mapping, so why not reuse it? As far as I can tell, cos(halfvector dot) behaves the same as cos(0.5 + reflectionvector dot), so you can make them equivalent by just adjusting the dot product value you put into the power function. Why do you think that the half vector is preferable? When it comes to approximating the power function for a specular highlight, you can go with a texture lookup  0 .. 1 on one axis, and 0 .. 200 on the other, for example. Or you can do the cheapest of the cheap: float cheap_pow(float x, float n) { x = saturate(1  (1  x ) * (n * 0.333)); return x * x; } Not very accurate, but very cheap, and still creates a softish diffuse highlight shape, which tends to be slightly narrower towards the edges. It also gets worse below power 5 or so. Sincerely, jw  Revenge is the most pointless and damaging of human desires. 