NxH^16 approxamation in pixel shader

Started by
0 comments, last by LucasMeijer 21 years, 5 months ago
Hi, I''m messing around with the shaders provided with the rendermonkey beta. In the bumpmapping effects group, there is an effect which calculates the specular component (NxH^k where k[0,64]) using an approximation. (instead of grabbing it from a lookup texture), by making this assumption: [NxH^2 -.75]*4 = NxH^16 I can''t seem to figure out where this approximation comes from. Is it a truncated taylor series of NxH^16 ? Any ideas would be appriciated. Thanks, Lucas
Advertisement
I think its just a case of plotting graphs of formulae until you find one which looks like D^16 and is possibe in the pixel shader.

http://users.ox.ac.uk/~univ1234

This topic is closed to new replies.

Advertisement