Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,655 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
script language documentation #29381
06/22/04 04:58
06/22/04 04:58
Joined: Jan 2002
Posts: 692
berlin
MB Offline OP
User
MB  Offline OP
User

Joined: Jan 2002
Posts: 692
berlin
I had a faint look at the meterial object (which is interpreted text and sent to the renderstate object in DirectX) - and I am wondering where I can find a documentation for that.

Obviously mot of the text command refer to DirectX command (like FillMode etc) - but checking sonmething like BlendMode caused an error.

So onse again: where can I find a documentation of the commands?

Re: script language documentation [Re: MB] #29382
06/22/04 15:29
06/22/04 15:29
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
because it is called BlendOp

Re: script language documentation [Re: MB] #29383
06/22/04 16:18
06/22/04 16:18
Joined: Jan 2002
Posts: 692
berlin
MB Offline OP
User
MB  Offline OP
User

Joined: Jan 2002
Posts: 692
berlin
My question has mainly answered itself by an older thread, where I found that the Gamestudio interface follows the Direct specifications - outlined in the EffectFile descriptions (which you will find in the DirectX manual).

Nevertheless - there is a follow up question.
Gamestudio reported syntax errors - although the code fulfilled DirectX szandards (or was copy pasted).
For example: Trying to define a VertexShader constant would not work.

Does the interface fully support the Graphic effects? Are there restrictions? Which?

Last edited by MB; 06/22/04 16:37.
Re: script language documentation [Re: MB] #29384
06/22/04 17:18
06/22/04 17:18
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
VertexShaderConstant[x]=<matrix or vector>; or ...={float,float,float,float};

this has to be placed into the pass. the matrices or vectors have to be declared just after effect="
...

and def cX,float,float,float,float only works with pixelshaders and has to be set between ps.X.X and the tex.. instructions


to see differences you may have a look for example at my bubbleshader and the fx-file that gets exported from rendermonkey.

Re: script language documentation [Re: ello] #29385
06/22/04 18:12
06/22/04 18:12
Joined: Jan 2002
Posts: 692
berlin
MB Offline OP
User
MB  Offline OP
User

Joined: Jan 2002
Posts: 692
berlin
thanks for the information, Ello,

I will have a look at your bubbleshader example (code is often self-telling).
nevertheless your answer puzzles me a little bit.
This means that the efect is not transmitted to the program and executed as is, but that there is a different layer which interprets the command using it's own, "DirectX inspired" syntax.

I would love to find out what this "interpetation" looks like.

In a way this touches the material objekt in general.
I see that jcl has outsourced the material properties. But how do they interact with the shader defs? I noticed (but this is more fancy than proven) that the shader seems to override the properties.

Re: script language documentation [Re: MB] #29386
06/22/04 18:21
06/22/04 18:21
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
you can pass for example colors by using vecDiffuse, vecAmbient, vecSpecular and vecEmissive
if i got your question right.

however i think that what u do in a shader is generally what will get rendered. for example if u write a fixed color value using def c0,1,0,0,1 and mov r0,c1 you will get a plane red no shading no nothing else, doesnt matter what else is done in the material settings. of course if u use AlphaBlendEnable and BlendOp you can manipulate the way this plane red is mixed into the scene

the difference to other fx-files is that 3dgs uses not all features i think, and the engine structure is built in a own way, so that the fx-files will have to look so, too

Re: script language documentation [Re: ello] #29387
06/22/04 18:37
06/22/04 18:37
Joined: Jan 2002
Posts: 692
berlin
MB Offline OP
User
MB  Offline OP
User

Joined: Jan 2002
Posts: 692
berlin
thanks for the info. This would mean that the material setting would produce the constants - and that, inside the shade operations, I could refer to them. Assume I would set something to the diffuse color values, it would take what I set in the material definition. Right?

Since I see that you are really intrigued with shader development, a more personal questionwhy: DirectX allows the read-in of *.fx files. So theroetically itr would be possible to let DirectX do all this.
It's a while ago that I implemented an x.file (the teapot sample from DirectX) and brought it into the render pipeline. So this would be an option, wouldn't it?

Last edited by MB; 06/22/04 18:38.
Re: script language documentation [Re: MB] #29388
06/22/04 19:04
06/22/04 19:04
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
In Antwort auf:

thanks for the info. This would mean that the material setting would produce the constants - and that, inside the shade operations, I could refer to them. Assume I would set something to the diffuse color values, it would take what I set in the material definition. Right?




right.

In Antwort auf:

Since I see that you are really intrigued with shader development, a more personal questionwhy: DirectX allows the read-in of *.fx files. So theroetically itr would be possible to let DirectX do all this.
It's a while ago that I implemented an x.file (the teapot sample from DirectX) and brought it into the render pipeline. So this would be an option, wouldn't it?




i think its already done like this if u use effect_load.
x-file? what has this to do with the rest? i dont think loading x-files directly is possible

Re: script language documentation [Re: ello] #29389
06/22/04 22:31
06/22/04 22:31
Joined: Jan 2002
Posts: 692
berlin
MB Offline OP
User
MB  Offline OP
User

Joined: Jan 2002
Posts: 692
berlin
a) I did not know that effect_load function. Sounds promising.

b) Tried to find the code of your bubble shader, but just found an *.exe file.

c) The loading of x files is possible if you catch them from inside a dll (actually it's genuine DirectX format). The second step would be to integrate it into Game4studio's render process. Jcl has designed three ports for that - before the Gamestudio rendering, inside and after it (forget the names, sounds like render_world or so). So there's no problem doing this ((I secceeded doing that a while ago).

What this has to with the rest? I just thought a way using all the DirectX features instead of a diminushed version. But if the load_effect function works as the name insinuates, it does not make too much sense.

Last edited by MB; 06/22/04 22:34.
Re: script language documentation [Re: MB] #29390
06/22/04 23:03
06/22/04 23:03
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
yep, i dont know those higher level languages and thus dont know about dll-programming, sadly.

u can rightclick onto the exe and extract the files.


Moderated by  Blink, Hummel, Superku 

Gamestudio download | 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