Jump to content
  • Advertisement

Archived

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

LucasMeijer

NxH^16 approxamation in pixel shader

This topic is 5725 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!