Hey guys. I was just curious about something:
I've been doing some shaders with custom code recently. And from what I hear you probably wouldn't want to trust UDKs material editors instruction counter to see how much your custom nodes "weigh". So I was just curious, how else do I track shader performance?
I had a kind soul from polycount help me do it before, but he seems unavailable right now and I'd just like to be able to do this by myself.
I heared him mention "shader profiling" if it would be of any use.
It's for my
"Procedural" Materials. I redid most of the custom code and would like to test how efficient it is.
Thanks a lot in advance and looking forward to your help.
Cheers!
Replies
I think I saw this in a 3dmotive video. The instructor would use the A instead of B in the picture below. Even though the material editor displays the same number of instructions, my brother told me that the multiply node is the way to go, as the instructor does, the reason being the power node works with a recursive function.
So, I'm also wondering how I can measure the performance of my materials/particles.
Thanks in advance
On the other hand, using the Mul node is only a viable solution for about 3 or 4 more times before it starts becoming junk code.
I honestly wish there was a way to profile UDK's material without the Instruction counter or Complexity viewport that gave out hard numbers, but so far there isn't.
I checked it out and I think what the material editor does here is that it uses one less instruction when the result of the power node is 1 by definition(Exp = 0 or base = 1). I hadn't noticed this before, thanks for reminding it actually is sensitive to the input Ace-Angel.
Edit: I am pretty slow when typing
The problem with profiling is that it's very platform dependent. There are some things which work fine on one kind of video hardware that will slow down another.
The only true way to profile something is with profiling tools from the manufacturer of the hardware. So while the instruction count is only a guide it's also the only reliable performance hit across multiple platforms.
Hmm, would it be possible to profile the code (in case of the PC) via the DX Toolkit?
I wish there was a program that could run side-by-side with UDK and would measure FPS and other performance issues through calculations based on the hardware you're running, Xbox 360, PS3, etc. I'm not too experienced with managing draw calls, material instructions, and everything else we have to consider when doing a level.
There are tools for both the XBOX(PIX) and the PS3(GPAD) that do this. At least as far as gpu profiling goes. I don't know if you can get access to them without being a registered developer.
I'm not sure about PC because I don't have to worry about PC performance as much.
Hmm, I'll have to take a look at those. Thanks! I don't have to worry about performance, but it's nice to be able to build portfolio/class levels around real life industry standards.
http://developer.nvidia.com/content/nvidia-perfhud
Thanks for that link! It doesn't seem to be up-to-date though. They mention DX9 at the top, but DX10 is mentioned for screen captures in 6.70 feature list. The most recent update supports Fermi GPUs too, which I think came out a few years ago? I Googled around for "real time performance monitors in game engines", but I didn't really find anything. Nothing close to this at least.