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/0622:0007/14/0622:00
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/0623:2007/14/0623:20
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.
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/0600: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/0601:2807/15/0601:28