|
|
#1 | |
|
Registered User
Join Date: Oct 2002
Posts: 17
|
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 ![]() |
|
|
|
|
|
|
#2 | |
|
a+d(L.N)+s(N.H)^n
Join Date: Apr 2003
Location: Blue Circle
Posts: 69
|
You have to put the number into a constant register first:
const0 = (.5, .5, .5, .5); product = tex0 * const0; |
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Oct 2002
Posts: 17
|
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 |
|
|
|
|
|
#4 | |
|
a+d(L.N)+s(N.H)^n
Join Date: Apr 2003
Location: Blue Circle
Posts: 69
|
Works for me:
Code:
const0 = (.6, .6, .6, 1.0); //actually 1.2
{
rgb {
result = tex0 * const0;
scale_by_two();
}
}
|
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Oct 2002
Posts: 17
|
![]() 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. |
|
|
|
![]() |
| Thread Tools | |
|
|