Fastest way to compute a power of 5

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

Thanks,
SeskaPeel.

What fragment extension? If it’s NV/ARB_fragment_program then just use the POW instruction.

i would go for a lookup texture, one sample op and you’re done

NitroGL, thanks. Tellaman, no room for a texture.

SeskaPeel.

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?

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.