|
Re: script language documentation
[Re: MB]
#29383
06/22/04 16:18
06/22/04 16:18
|
Joined: Jan 2002
Posts: 692 berlin
MB
OP
User
|
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]
#29386
06/22/04 18:21
06/22/04 18:21
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
Senior Expert
|
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
OP
User
|
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
Senior Expert
|
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
OP
User
|
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.
|
|
|
|