Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, degenerate_762, ozgur), 1,311 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Is there a way to apply a shader to all entities ? #81480
07/14/06 21:50
07/14/06 21:50
Joined: Aug 2005
Posts: 218
Z
ZZZgames Offline OP
Member
ZZZgames  Offline OP
Member
Z

Joined: Aug 2005
Posts: 218
Hey.
Is there a way to apply a shader to all entities that are displayed by the camera without having to attach the material manually to every entity?
And to map blocks?


Its a pleasure to play around with A6. zzzgames.ifrance.com : go try & buy Streetkicker
Re: Is there a way to apply a shader to all entiti [Re: ZZZgames] #81481
07/14/06 22:00
07/14/06 22:00
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
jepp, d3d_automaterial (-->manual).

Re: Is there a way to apply a shader to all entiti [Re: broozar] #81482
07/14/06 22:43
07/14/06 22:43
Joined: Aug 2005
Posts: 218
Z
ZZZgames Offline OP
Member
ZZZgames  Offline OP
Member
Z

Joined: Aug 2005
Posts: 218
Thanks DaBroozar ...
I achieved to apply the shader to one model file ....
According to the manual ,you have to name the shader as the model file or texture you want to apply the shader on ...
But does that mean i'd have to write 1 material per file i want to apply the shader on??
I wonder if i can write a list like"
material monster1_mdl,monster2_mdl,monster3_mdl,monster4_mdl
no??


Its a pleasure to play around with A6. zzzgames.ifrance.com : go try & buy Streetkicker
Re: Is there a way to apply a shader to all entiti [Re: ZZZgames] #81483
07/14/06 23:20
07/14/06 23:20
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
example for geometry:

material nameOfTheWadTexture{
yourDefs;
}

starter shader_load{
d3d_automaterial=1;//lvl geo
effect_load(nameOfTheWadTexture,"yourFxFileWithTheShader.fx"); //apply fx file
nameOfTheWadTexture.effect=nameOfTheWadTexture2.effect=nameOfTheWadTexture3.effect [andSoForth];//same effect for all mats you define
wait(5);
}

PS: there is an entity.material pointer as well, so if you just want to apply one <c-script>-material to some ents (and not an fx-based material as posted above), you could just use ent1.material=ent2.material with the appropriate pointers.

Re: Is there a way to apply a shader to all entiti [Re: broozar] #81484
07/14/06 23:57
07/14/06 23:57
Joined: Aug 2005
Posts: 218
Z
ZZZgames Offline OP
Member
ZZZgames  Offline OP
Member
Z

Joined: Aug 2005
Posts: 218
ok i got it .
Now i use something like that :

material model1name_mdl
{
effect="my_effect.fx";
}
material model2name_mdl
{
effect="my_effect.fx";
}
material modelXname_mdl
{
effect="my_effect.fx";
}
etc..etc..

Thats the fastest way i found for the moment.
Thanks for your answers.


Its a pleasure to play around with A6. zzzgames.ifrance.com : go try & buy Streetkicker
Re: Is there a way to apply a shader to all entiti [Re: ZZZgames] #81485
07/15/06 00:15
07/15/06 00:15
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
Crazy

Check the manual for ent_next. You can use the example with a little modification to achieve your goal.


Follow me on twitter
Re: Is there a way to apply a shader to all entiti [Re: mk_1] #81486
07/15/06 00:29
07/15/06 00:29
Joined: Aug 2005
Posts: 218
Z
ZZZgames Offline OP
Member
ZZZgames  Offline OP
Member
Z

Joined: Aug 2005
Posts: 218
I have checked the manual .Cool !
This is an useful command..I havenot tryed it yet but it seems that it will work fine .
Thanks

Unfortunately the shader i use decreases a lot the framerate ...On my computer it goes down from 35 FPS to 20 FPS when i apply the shader to most of models.
I dont know how to fix that ...Perhaps i shouldnot use a shader.

Last edited by ZZZgames; 07/15/06 00:34.

Its a pleasure to play around with A6. zzzgames.ifrance.com : go try & buy Streetkicker
Re: Is there a way to apply a shader to all entiti [Re: ZZZgames] #81487
07/15/06 01:28
07/15/06 01:28
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
Perhaps you should optimize your shader.
What shader are you talking about anyways?


Follow me on twitter
Re: Is there a way to apply a shader to all entiti [Re: mk_1] #81488
07/15/06 10:54
07/15/06 10:54
Joined: Aug 2005
Posts: 218
Z
ZZZgames Offline OP
Member
ZZZgames  Offline OP
Member
Z

Joined: Aug 2005
Posts: 218
I tryed the shader of the wiki " New Toon Shader".
Since i have no knowledge in shader coding,i have no clue how to optimize it ..


Its a pleasure to play around with A6. zzzgames.ifrance.com : go try & buy Streetkicker
Re: Is there a way to apply a shader to all entiti [Re: ZZZgames] #81489
07/15/06 13:57
07/15/06 13:57
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
nothin'
Use low poly models. The less vertices you have the fast the model is rendered.


Follow me on twitter
Page 1 of 2 1 2

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