PDA

View Full Version : Simple ARBfp1.0 question (with SGE)



laniik
03-29-2004, 09:56 AM
Hi, Im trying to compare two numbers with SGE, but I cant seem to get it to work.

i have:

PARAM three = {3.0,3.0,3.0,3.0};
TEMP index;
#...
#index contains values 1,2,3,4,5,6,7 or 8;

SGE temp1,index,three;

index is *never* greater than three;

if i output the colors, three.x outputs as fully on (255.0), while index shows up only as 1 through 8.

is there some normalization and/or clamping thing im missing? thanks!

roffe
03-30-2004, 12:39 PM
If you are using a 32bit fixed-point frame buffer your values will be clamped[0.0-1.0].

Are you using glReadPixels with GL_UNSIGNED_BYTE to read back the framebuffer?