Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
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
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 853 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
First time shader application #74473
05/16/06 22:41
05/16/06 22:41
Joined: Feb 2006
Posts: 371
New England
Rad_Daddy Offline OP
Senior Member
Rad_Daddy  Offline OP
Senior Member

Joined: Feb 2006
Posts: 371
New England
Ok, I am attempting to apply a water shader to a model I have made. This model is not designed for a water shader... its actually my terrain. I am simply using it so I can learn how to apply shaders.

The shader I am using is the Simple Water shader found on the old wiki, seen here...

Simple Water

The c-script code I am using to apply the shader is as follows...

Code:
 
var video_mode = 7;

var video_depth = 32;

string new_wmb = <new.wmb>;

material watershader
{
effect = <toon.fx>;
}

action shaderaction
{
my.material = watershader;
}

function main()
{
level_load (new_wmb);
wait(1);
}



nothing fancy, just enought to load the level, and apply the shader. However, when I load the level, I recieve the following error...



Could anyone help me out as far as fixing this problem? Thank you in advance.

Edit: My effect, toon.fx, is in fact my water shader. I first tried to apply the toon shader, but realised I wouldnt even be using it. After that, I was lazy and didnt feel like changing the code, so I saved the water shader as toon.fx. Sorry if that messes anyone up.

Last edited by Rad_Daddy; 05/16/06 22:44.

"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon www.deckscapedesign.com
Re: First time shader application [Re: Rad_Daddy] #74474
05/17/06 00:15
05/17/06 00:15
Joined: Feb 2006
Posts: 371
New England
Rad_Daddy Offline OP
Senior Member
Rad_Daddy  Offline OP
Senior Member

Joined: Feb 2006
Posts: 371
New England
I have made a small breakthrough. As I have been reading up on HLSL a little, I realised that the ~ symbol dosent seem to have any meening in HLSL, or so it seems (if im wrong, please correct me). So, I removed all the ~'s from the code, and got the level to run without error. However, my model is rendered completely black. I have no clue why this is, so if anyone has a clue, please tell me the error of my ways . Thank you.


"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon www.deckscapedesign.com
Re: First time shader application [Re: Rad_Daddy] #74475
05/17/06 19:27
05/17/06 19:27
Joined: Feb 2006
Posts: 371
New England
Rad_Daddy Offline OP
Senior Member
Rad_Daddy  Offline OP
Senior Member

Joined: Feb 2006
Posts: 371
New England
Another small breakthrough... not sure if it really means anything, but might as well update...

I have made a new model, with two textures. The ones mentioned in the code (mtlSkin1 and mtlSkin2). Not sure as to the format of these skins, so I tried .bmp, .tga, and .pcx. These are both just 2 different solid shades of blue. Anyways, I attempted to apply the .fx file through MED, without and coding. When I run the level, my modle is now invisible... So far, the only two effects I have been able to achieve are solid black, and invisible.

However, for a split second, my model loads as normal, with normal skinns and no effects. Then, within a fraction of a second, it disapears. This leads me to believe that the effect is taking place, but the coding of the .fx file is wrong. Any suggestions?


"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon www.deckscapedesign.com
Re: First time shader application [Re: Rad_Daddy] #74476
05/20/06 20:50
05/20/06 20:50
Joined: Feb 2006
Posts: 371
New England
Rad_Daddy Offline OP
Senior Member
Rad_Daddy  Offline OP
Senior Member

Joined: Feb 2006
Posts: 371
New England
Ok, well its been a few days. Hevent really made any progress... If no1 knows what the issue is, I think I will have to go out and buy the ShaderX series, so I can have a better understanding of how shaders work. For the time being, it would be nice to have this one working, but you do what you gata do, I guess.


"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon www.deckscapedesign.com
Re: First time shader application [Re: Rad_Daddy] #74477
05/21/06 12:33
05/21/06 12:33
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
I think people around here can't really help you because the code you use has never been converted to work with 3DGS afaik...
The old wiki unfortunately has some shaders that appear to just have been taken out of a program like ATI's Render Monkey without having ever been converted. Probably you could check out the new wiki for shaders that should work with 3DGS.

Other than that, I'd really like to help you, but I don't have any deeper knowledge about shaders... Sorry.


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: First time shader application [Re: Thomas_Nitschke] #74478
05/21/06 14:37
05/21/06 14:37
Joined: Feb 2006
Posts: 371
New England
Rad_Daddy Offline OP
Senior Member
Rad_Daddy  Offline OP
Senior Member

Joined: Feb 2006
Posts: 371
New England
ok well thanks, The_matrix. For now, I think I am going to lay off shaders, and focus more on the other aspecs. But when the time comes, I will go out and buy a few good books on the subject. Thanks again.


"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon www.deckscapedesign.com

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