Before you answer... I know....'It depends'. On many things. But as I browse through materials in UDK, I notice that a lot of them have many instructions... It seems like many of them average between 50-90. I'm transitioning out of UI into VFX and am really looking for some general guidelines for building materials for VFX and the specifics around that. Anyone have any good rule of thumb(s) or guidelines? I do realize that these are per project, but I'm looking for an assessment that might come from a graphics engineer/TD?
Thanks Polycount!!!
Replies
Also not all instructions are equal. An add is different than a square root.
So its hard to say. However there are hard limits.
512 (I think) for SM3 (Direct x 7-9)
4096 for SM4 DX 10+
I just made up a shader with about 1200 instructions... needless to say its for research more than anything else.
So you can easily hit 150-200 and not worry, especially if you actually need it.
I just have to point out, that you said "greater than 100" :P
For smooth LoD transitions you would need to enable " Screen Door Fade" which also adds a bunch of instructions. In case you use DX11 all materials will have significantly higher instruction counts as well.
That said, this was my personal & unofficial guideline I used while doing VFX on MK & Injustice:
6-11 Instructions - Ultra Cheap
12-20 Instructions - Cheap
20-35 Instructions - Mid
36-65 Instructions - Expensive
66-90 Instructions - Very Expensive
91+ Instructions - Crazy
When working in realtime VFX, it's also important to note that fillrate/overdraw is critical to performance and can be just as important to performance. They have an interesting explanation over on UDN:
Balancing performance as a VFX artist can get tricky, as there are many factors that balance the equation.
You could make a choice between having a lot of simple particles, or having a few more complicated ones.