How to check shader performance

Hello.

We had this problem from long time, but did not found good way to do so.

We tried to place 100000 cubes with instances of material with our shader to test how it handles, but its not giving us any real data to measure speed of shader. FPS jumping so much and its impossible to see any differences.

We would like to fine tune and optimize our shaders but there is no way to compare speed between both.

With classic shaders back in a day, you could read how many math calcuation is shader making and it gives you some idea how much steps shader need to take before giving results. It was some way to know if optimization was success if you had smaller math steps than before optimization.

Do you have any good ways to check shaders peformance?

How do you run measure the performance? Just by looking at FPS?
Did you use profiler?

Of course we are using profiler but mostly for whole game not one shader.

I wanted to ask if anyone have good way of checking shader cost / performance.

Use your custom shader, use a basic shader, compare the difference. If there is little difference, then it could be the graphical settings ie. AA, Texture Resolution, or could be related to code, use of batching, instancing. Main performance issues come from CPU to GPU bottlenecks.

I think you got me wrong.

I want to measure shader cost of computation to be able to compare it between version.

So I can fine tune optimize my shader graphs and measure if it gives me some benefits.