View Full Version : Fastest way to compute a power of 5
10-06-2003, 09:24 AM
For fresnel reflection, you need to compute a power of 5 in a fragment program, what is the fastest way ?
(I read in an nvidia paper that the LIT function could compute powers.)
10-06-2003, 09:25 AM
What fragment extension? If it's NV/ARB_fragment_program then just use the POW instruction.
10-06-2003, 09:29 AM
i would go for a lookup texture, one sample op and you're done
10-06-2003, 09:36 AM
NitroGL, thanks. Tellaman, no room for a texture.
10-06-2003, 11:09 AM
You can also fudge a pretty good fresnel reflection a lot of different ways. You can just use the 1 - (I dot N). Or you can square that term to make it a little nicer. The best way, though, is to use that term to do a texture lookup like Tellaman said.
Hey SeskaPeel, are we going to get to see this cool app when you're done with it?
10-08-2003, 04:11 AM
Mogumbo oh well it's not finished at this point, but there should be some screenshots available within 2 months.
There's a nice list of features, but as long as everything works in separated scenes, that's not really viewable.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.