infer half vector length in BRDF

Posted by cician on Game Development See other posts from Game Development or by cician
Published on 2013-11-01T15:44:10Z Indexed on 2013/11/01 16:23 UTC
Read the original article Hit count: 229

Filed under:
|
|

it's my first question on stack.
Is it possible to infer length of the half angle vector for specular lighting from N·L and N·V without the whole view and light vectors?
I may be completely off-track, but I have this gut feeling it's possible... Why? I'm working on a skin shader and I'm already doing one texture lookup with N·L+N·E and one texture lookup for specular with N·H+N·V. The latter one can be transformed into N·L+N·E lookup if only I had the half vector length. Doing so could simplify the shader a bit and move some operations into the pre-computed lookup texture. It would make a huge difference since I'm trying to squeeze as much functionality as possible to a single pass mobile version so instruction count matters.

Thanks.

© Game Development or respective owner

Related posts about shaders

Related posts about trigonometry