Just a quick question if there is a way to use keywords to define different shader programms.
Currently messing around with Tessellation and i would like to keep the amount of shaders i use as low as possible.
This is an example of what i’m talking about:
#ifdef _TESSELLATION
#pragma hull MyHullProgram
#pragma domain MyDomainProgram
#pragma vertex TessCellVertexProgram
#pragma fragment TessCellFragmentProgramm
#else
#pragma vertex CellVertexProgram
#pragma fragment CellFragmentProgramm
#endif
It could also be that the defines work and the problem is, that i’m defining the hull and domain passes in one of the if’s, so it get’s called anyway, if so please let me know.
Thanks in advance!