Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by 7th_zorro. 04/16/24 13:19
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, alibaba, rki), 425 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Nothing happens!? #63691
02/12/06 12:59
02/12/06 12:59
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline OP
Serious User
Claus_N  Offline OP
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Hi,

Just started to learn HLSL... I tried this code on the cbabe.mdl, but nothing happens...
Why?

my_shader1.fx
Code:
float4x4 matWorldViewProj;
struct VS_OUTPUT
{
float4 Pos : POSITION;
};
VS_OUTPUT vs_main(float4 inPos: POSITION)
{
VS_OUTPUT Out = (VS_OUTPUT) 0;
Out.Pos = mul(inPos,matWorldViewProj);
return(Out);
}
float4 ps_main() : COLOR
{
float4 Col = float4(1,1,0,1);
return(Col);
}
technique tech1
{
pass pass0
{
VertexShader = compile vs_2_0 vs_main();
PixelShader = compile ps_2_0 ps_main();
}
}



Level c-script code
Code:
// level.wdl
var video_mode = 7;
var video_depth = 32;
var video_screen = 2;

function main()
{
freeze_mode = 1;

level_load("level.wmb");

wait(3);

freeze_mode = 0;

while(1)
{
camera.pan -= mouse_force.x * 15 * time;
camera.tilt += mouse_force.y * 15 * time;
camera.tilt = clamp(camera.tilt,-80,80);
wait(1);
}
}

material my_shader1
{
effect = "my_shader1.fx";
}

action shader_ent1
{
my.material = my_shader1;
}



Re: Nothing happens!? [Re: Claus_N] #63692
02/12/06 13:28
02/12/06 13:28
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
It should work, but it will color cBabe one solid color. Any errors??

Re: Nothing happens!? [Re: Steempipe] #63693
02/12/06 14:28
02/12/06 14:28
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline OP
Serious User
Claus_N  Offline OP
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Nope, no errors.. :/

EDIT: That's how she just looks :/


Last edited by Claus_N; 02/12/06 14:31.
Re: Nothing happens!? [Re: Claus_N] #63694
02/12/06 15:54
02/12/06 15:54
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
I think you may need to make sure you have the fx file in the right directory.. A6 cant load fx files unless they are your game ROOT directory.. this is annoying.

If this doesnt work still, try using the effect_load command instead of doing like you do: effect="blahblah.fx"

that might work, although i had never seen it done that way, I dont know.


Sphere Engine--the premier A6 graphics plugin.
Re: Nothing happens!? [Re: Matt_Aufderheide] #63695
02/12/06 19:01
02/12/06 19:01
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline OP
Serious User
Claus_N  Offline OP
Serious User

Joined: May 2004
Posts: 1,510
Denmark
The .fx file is in the same directory as all the other files in that "game project". I've also tried to put the shader code directly into the effect = "blablabla", instead of putting it in a .fx file..

I'll try the effect_load..

Re: Nothing happens!? [Re: Claus_N] #63696
02/14/06 19:24
02/14/06 19:24
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline OP
Serious User
Claus_N  Offline OP
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Well, I've got both good and bad news..

Good: I published the level, and tried it on my mother's computer; it worked!
Bad: Then it must be MY computer there's something wrong with

I'm using a GeForce Ti 4200, and the newest driver from NVidia

But... Almost the same shader works fine in RenderMonkey...
But since I reinstalled my computer two weeks ago, I haven't used RenderMonkey...
I'll try this shader in RenderMonkey, and if it won't work there too...............

I'll post here again, if I can't get it working

EDIT:
RENDERMONKEY I LOVE YOU!!!
My hardware only supports vs1.1 and ps1.3 :S

Last edited by Claus_N; 02/14/06 19:58.

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