Jump to content

  • Log In with Google      Sign In   
  • Create Account


Macro support implementation in FX(hlsl)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 mr. lurky   Members   -  Reputation: 101

Like
0Likes
Like

Posted 16 May 2012 - 01:00 PM

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

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS