0 registered members (),
1,250
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
help, couldn't understand whats going on!
#27672
05/21/04 16:00
05/21/04 16:00
|
Joined: Sep 2003
Posts: 21
cool
OP
Newbie
|
OP
Newbie
Joined: Sep 2003
Posts: 21
|
what does these things mean?
Could anyone please explain what is happening here?
COLOROP[0] = dotproduct3;
COLORARG1[0] = texture;
COLORARG2[0] = diffuse;
COLOROP[1] = modulate;
COLORARG1[1] = texture;
COLORARG2[1] = current;
In MSDN2001 there is no explanation
Is there a documentation available on these?
Last edited by cool; 05/21/04 16:02.
|
|
|
Re: help, couldn't understand whats going on!
[Re: cool]
#27673
05/21/04 23:09
05/21/04 23:09
|
Joined: Oct 2000
Posts: 1,543 Germany
Alexander Esslinger
Senior Developer
|
Senior Developer
Joined: Oct 2000
Posts: 1,543
Germany
|
This forum is for shaders, not for fixed function effects. Anyway: If the effect does not use a vertex shader, it doesn't make much sens. The code calculates the dot-product between the value stored in the diffuse-lighting channel (normally the diffuse lightin ![](/ubbthreads/images/graemlins/grin.gif) ) and the first texture (the normal map). It than multiplies the result with the base texture.
|
|
|
Re: help, couldn't understand whats going on!
[Re: cool]
#27675
05/22/04 05:41
05/22/04 05:41
|
Joined: Dec 2003
Posts: 1,097 Maryland, USA
Steempipe
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,097
Maryland, USA
|
Quote:
what does these things mean? Could anyone please explain what is happening here?
COLOROP[0] = dotproduct3; COLORARG1[0] = texture; COLORARG2[0] = diffuse; COLOROP[1] = modulate; COLORARG1[1] = texture; COLORARG2[1] = current;
In MSDN2001 there is no explanation
Is there a documentation available on these?
The ColorOp is the operation that is being applied to the texture in the given stage. This gets it's arguments from ColorArg1 & ColorArg2.
For your example:
Stage [0] is: ColorArg1[0] is saying to use the texture color from this stage ColorArg2[0] is saying to use the diffuse color from the vertex components Colorop[0] is going to apply the Dot3 bumpmapping operation using ColorArg1 & 2.
Stage [1] is: ColorArg1[1] is saying to use the texture color from this stage ColorArg2[1] is saying to use current texture which is the result of the previous stage. ColorOp[1] is going to modulate (modulate does a multiply) between ColorArg1 & 2.
Like it's said, the Dx SDK or MSDN site is the best bet for learning these.
|
|
|
Re: help, couldn't understand whats going on!
[Re: Steempipe]
#27677
05/22/04 06:27
05/22/04 06:27
|
Joined: Oct 2000
Posts: 1,543 Germany
Alexander Esslinger
Senior Developer
|
Senior Developer
Joined: Oct 2000
Posts: 1,543
Germany
|
Well, then it is quite right, but since the forum is titled with "Shaders", I thought it would be for shaders! Conitec should rename it to "Effects" then.
You could also interpret it like "vertex and pixel shaders in material effects", though ![](/ubbthreads/images/graemlins/tongue.gif) .
|
|
|
|