Archived

This topic is now archived and is closed to further replies.

LucasMeijer

NxH^16 approxamation in pixel shader

Recommended Posts

LucasMeijer    122
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

Share this post


Link to post
Share on other sites
bakery2k1    712
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

Share this post


Link to post
Share on other sites