PDA

View Full Version : temporaries and env parameters in ARB_fp?



def
05-25-2004, 03:48 AM
I have a working ARB_fp shader using alot of temporary variables. When I exchange the folowing
PARAM factor = { 0.003, 0.003, 0.0, 0.0};
with
PARAM factor = program.env[0];
I get the error:
"error: too many temporaries".

With the working shader I get the following counts:
31 of 32 temporaries used
All other counts are ok. ( 50 of 1024 ALU, etc. )

Is there something I don't know about ProgramEnvParameters?

Using GeForceFX5900 (5.6.7.2 driver)

Thx for any help.

def

jeremyz
05-25-2004, 06:42 AM
By any chance does it work if you use
PARAM factor = program.local[n];
?

def
05-25-2004, 07:11 AM
A good idea, but no, same error.

I think I found a way to reduce the number of temporaries, because some of the variables stay fixed so they can be uploaded as parameters...

My general experience with hardware shading languages is, the more you get near the limits strange stuff starts to happen. :eek:
(bad drivers)