Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: GeForceFX RFL instruction

  1. #1
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,932

    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?

  2. #2
    Advanced Member Frequent Contributor cass's Avatar
    Join Date
    Feb 2000
    Location
    Austin, TX, USA
    Posts
    913

    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
    Cass Everitt -- cass@xyzw.us

  3. #3
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,932

    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
  •