Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,250 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
help, couldn't understand whats going on! #27672
05/21/04 16:00
05/21/04 16:00
Joined: Sep 2003
Posts: 21
cool Offline OP
Newbie
cool  Offline 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
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

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 ) 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: Alexander Esslinger] #27674
05/22/04 05:24
05/22/04 05:24
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
Quote:

This forum is for shaders, not for fixed function effects.




Under the forum title are these words:

Material effects, vertex and pixel shaders

Since FFP effects fall under material effects, it most certainly *does* belong here.


Never argue with an idiot. They drag you down to their level then beat you with experience
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 Offline
Serious User
Steempipe  Offline
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] #27676
05/22/04 05:50
05/22/04 05:50
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Alexander's explaination is quite right... I just thought it important that understanding that "current" does not mean the current assigned texture to the particular stage.

Goto the "Wiki"... "shaders"... and hit the link to the DX8 effect file states.

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
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

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 .

Re: help, couldn't understand whats going on! [Re: Alexander Esslinger] #27678
05/24/04 14:16
05/24/04 14:16
Joined: Sep 2003
Posts: 21
cool Offline OP
Newbie
cool  Offline OP
Newbie

Joined: Sep 2003
Posts: 21
Hi

I have taken that piece of code from the following link.

http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Number=381010&page=0&view=collapsed&sb=5&o=&fpart=1#Post383483381010

Anybody please tell me, if it is not part of shaders, why is it given there?
I am totally new to shaders. I dont know directX either. If anybody explain how to do effects like bump mapping and multitexturing with shaders, it would be a great help to me.

thanking you


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1