Macro support implementation in FX(hlsl),
Members - Reputation: 101
Posted 16 May 2012 - 01:00 PM
Now what I wanna do:
1) split each effect to many ones, such a single technique equals one effect, (<name_of_effect>_<name_of_tech>.fx)
2) put common functions separately to the outer *.fxh file, will be included to the each of pointed above effects
so if we need to recompile something, we are doing it at "technique" level, not all effect
Is it right, may be someone has implemented this alghoritm, are you?
Now second, the next common used idea - do not use effect files and d3deffect functionality at all.
pro - we can work at shader level
cons - not easy to implement, we need deal with many registers, and set it manually (some people assigns registers explicitly)
Now the second question - what method are the best? What approach do you using in your projects? Thanks