Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-20-03, 09:49 AM   #1
TriangleMan
Registered User
 
Join Date: Oct 2002
Posts: 17
Default General Combiners

Sorry this is a bit off-topic, but I couldn't find an appropriate forum.

In a general combiner, you can say something like:
product = tex0 * tex1; \n

Is there a way to multiply by a constant?
IE
product = tex0 * 0.5;

When I try this, it says that it get's unknown tokens.

Thanks,

TM
TriangleMan is offline   Reply With Quote
Old 05-20-03, 11:25 AM   #2
Bert
a+d(L.N)+s(N.H)^n
 
Bert's Avatar
 
Join Date: Apr 2003
Location: Blue Circle
Posts: 69
Default

You have to put the number into a constant register first:

const0 = (.5, .5, .5, .5);
product = tex0 * const0;
Bert is offline   Reply With Quote
Old 05-20-03, 11:51 AM   #3
TriangleMan
Registered User
 
Join Date: Oct 2002
Posts: 17
Cool



Thanks, but I outsmarted myself. I shoudl have asked for what I really wanted.

If I do that, it works just fine. If I try to use a constant ABOVE 1.0, then it only uses the fractional portion, so

const0 = (1.2, 1.2, 1.2, 1.0)

results in my multiply being .2, .2, .2, 1.0.

Do you know any way around this? We've tried multiplying by the fraction, and scale_by_two(), but can't seem to get the syntax right.

Thanks,

Chris
TriangleMan is offline   Reply With Quote
Old 05-20-03, 11:58 AM   #4
Bert
a+d(L.N)+s(N.H)^n
 
Bert's Avatar
 
Join Date: Apr 2003
Location: Blue Circle
Posts: 69
Default

Works for me:
Code:
const0 = (.6, .6, .6, 1.0); //actually 1.2
{
    rgb {
        result = tex0 * const0;
        scale_by_two();
    }
}
Bert is offline   Reply With Quote
Old 05-20-03, 01:29 PM   #5
TriangleMan
Registered User
 
Join Date: Oct 2002
Posts: 17
Default



I love these extended smilies....

Thanks,
I had implemented the scale_by_two() wrong.
I had done spare0 = scale_by_two();

I used your example and it worked!.

Thank you,

TM.
TriangleMan is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:06 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.