1 Effect File?
Is it possible to put all one's shaders into 1 effect file? If so, is there an example anywhere I can see? Right now I have a whole bunch of state specific global variables and I keep each technique in a different effect file but managing all this is starting to get heavy.
Your effects can be placed in 1 file...
You will have different methods that will be different vertex shaders and pixel shaders and then different techniques that will be used for different, well techniques...
And so on, this is just a prototype of the idea.
I hope this helps.
Take care.
You will have different methods that will be different vertex shaders and pixel shaders and then different techniques that will be used for different, well techniques...
void DiffuseVS(){};void DiffusePS(){};technique Diffuse{ pass p0 { vertexshader = compile vs_1_1 DiffuseVS(); pixelshader = compile ps_1_1 DiffusePS(); }}void ShadowVS(){};void ShadowPS(){};technique Diffuse{ pass p0 { vertexshader = compile vs_2_1 ShadowVS(); pixelshader = compile ps_2_1 ShadowPS(); }}
And so on, this is just a prototype of the idea.
I hope this helps.
Take care.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement