@Kartoffel: Looking forward to it! Let me know when you are finished and i might add it to the official build laugh

@Ch40zzC0d3r:
You have 3 options (there might be more):

1.)
Simply open up the shader's .fx you have been using before and overwrite it with a Shade-C objectshader. Have a look at the "example/fx/" folder for some example shaders. You'll see that it's VERY easy to set up your own shader.
Once you are done, make sure to set the material flag to ENABLE_RENDER and material event to sc_materials_event

2.)
Create a new material, assign a Shade-C objectshader to it. Also make sure to set material flags to ENABLE_RENDER and event to sc_materials_event. After you are done, have a look at d3d_automaterial in the manual. With d3d_automaterial = 4; you only have to assign a material to one dummy levelmesh (e.g. a small cube) which has the texture applied you want the material applied on. All other levelmeshes with the same texture will now have the material applied automatically. If you want to change the material again, simply change your dummy levelmesh.

3.)
As MasterQ32 suggested:
Code:
effect_load(mtl_shaded, "shadercode.fx");
mtl_shaded.flags = ENABLE_RENDER;
mtl_shaded.event = sc_materials_event;



Of course you can also do that with models/entities
Code:
effect_load(mtl_model, "shadercode.fx");
mtl_model.flags = ENABLE_RENDER;
mtl_model.event = sc_materials_event;




If i were you, i'd use method 3 to set a standard material and then go with method 2 to set specific materials if you need them.

If you have custom shaders in your game (e.g. trees/grass with wind animation in the vertexshader) have a look at example 05 on how to write and use custom shaders.




I really have to start working on the documentation, or at least a FAQ.


Last edited by BoH_Havoc; 09/25/12 16:36.

Shade-C EVO Lite-C Shader Framework