1 registered members (AndrewAMD),
609
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Help a noob out
#39299
01/16/05 11:16
01/16/05 11:16
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
OP
Developer
|
OP
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
hello,
I was wondering how to call a shader to a certain model (like, mat_model = shader). But the only problem is that the shader is in a different script and is a '.fx' file, not '.wdl'.
Thanks in advanced,
Braxton
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
Re: Help a noob out
[Re: Matt_Aufderheide]
#39301
01/16/05 12:36
01/16/05 12:36
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
OP
Developer
|
OP
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
I am not following you... the script that holds the shader is all in the '.fx' file.
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
Re: Help a noob out
[Re: Braxton]
#39302
01/16/05 13:01
01/16/05 13:01
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
an A6 material is broken into 2 parts, the material definition and the effect string. You can include the effect string in the material definition, or put it into an .fx file. If you have an .fx file then you need to have a material definition in script. Just do exactly as i have shown and it will work.
remember the effect string is direct3d code, not c-script. C-script has no idea what is in the effect string at all.. it just needs to know where it is and what material it is applied to. In practice, you can define a bunch of seperate materials in script and then have them all use the same .fx file for the shader. That way you can have many different material properties and not have to write a bunch of seperate .fx files or material scripts.
Last edited by Matt_Aufderheide; 01/16/05 13:05.
|
|
|
Re: Help a noob out
[Re: Matt_Aufderheide]
#39303
01/16/05 13:11
01/16/05 13:11
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
OP
Developer
|
OP
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
so what do i put int he material mat_test part???
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
Re: Help a noob out
[Re: Matt_Aufderheide]
#39305
01/16/05 13:20
01/16/05 13:20
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
OP
Developer
|
OP
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
so i could do:
mat_test { my.flare == off; }
then call it and it will do the shader???
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
Re: Help a noob out
[Re: Matt_Aufderheide]
#39307
01/20/05 09:59
01/20/05 09:59
|
Joined: Nov 2004
Posts: 832 United States, Utah
Braxton
OP
Developer
|
OP
Developer
Joined: Nov 2004
Posts: 832
United States, Utah
|
do you know of any tutorials or places where i can learn. I love scripting and want to learn how to make shaders, particles, and really neat stuff with C-Script.
Please help me out, Braxton
"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves"
- As A Man Thinketh
|
|
|
|