Hi all, recently I've tried to implement macro support for my effect system. It is working using the d3deffect class. We have some count of *.fx files for each type of entity( atmospherics.fx, water.fx, meshes.fx etc), so if some #ifdef #endif brunching is happened for the some particular technique, we need to recompile all effect (many techniques)/
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
Macro support implementation in FX(hlsl)
No replies to this topic