-
Senior Member
OpenGL Pro
GeForceFX RFL instruction
There is this RFL in NV_fragment_program instruction, which computes the reflection vector. But Cg never seems to use it. I thought that reflect() should compile direct to RFL. It is a "bad" instruction?
-
Senior Member
OpenGL Pro
Re: GeForceFX RFL instruction
Hi Zengar,
There's a subtle (but important) distinction between reflect() and RFL. Essentially, reflect() expects the normal (axis of reflection) to be normalized, while RFL does not. So RFL is somewhat more expensive.
reflect(i, normalize(n)) is effectively the same as RFL. The compiler doesn't generate that code directly, however such sequences could be optimized to do that by the driver.
Thanks -
Cass
-
Senior Member
OpenGL Pro
Re: GeForceFX RFL instruction
It's funny... As I added RLF into my fragment program, it started running faster.
About 20%(simple emnironment mapping). But if it should be slower...
I'm experimenting with own HLSL compiler(just for fun
), so I wanted to know if I should compile my ferlect calls to RFL...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules