Allar
11-15-2009, 12:14 AM
Is it possible for us to write and use our own shaders like the ones used in the Engines\Shaders directory?
I would like to write a shader that will be applied to all the current objects in the scene. I've experimented with PostProcessEffects using a MaterialEffect, but MaterialEffects only apply to the current scene texture apparently. Can I access object vertices and such through a materialeffect?
I have tried experimenting with the .usf shaders and tried creating my own, but I'm not even sure if its compiling or even how to apply a .usf shader.
It appears that when you create a material, you are actually creating a .usf shader based on MaterialTemplate as the HLSL code is visible, so I know we have some functionality there...
Basically, all I need is a way to create a material that will be applied to all rendered objects; either through unrealed or through an hlsl shader.
Is this possible/does anyone have any information regarding this? I would be very appreciative.
I would like to write a shader that will be applied to all the current objects in the scene. I've experimented with PostProcessEffects using a MaterialEffect, but MaterialEffects only apply to the current scene texture apparently. Can I access object vertices and such through a materialeffect?
I have tried experimenting with the .usf shaders and tried creating my own, but I'm not even sure if its compiling or even how to apply a .usf shader.
It appears that when you create a material, you are actually creating a .usf shader based on MaterialTemplate as the HLSL code is visible, so I know we have some functionality there...
Basically, all I need is a way to create a material that will be applied to all rendered objects; either through unrealed or through an hlsl shader.
Is this possible/does anyone have any information regarding this? I would be very appreciative.