View Full Version : GeForceFX RFL instruction
01-14-2004, 07:03 AM
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?
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.
01-14-2004, 01:30 PM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif ), so I wanted to know if I should compile my ferlect calls to RFL...
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.