- Home /
Profiling shaders (rough shader complexity estimation)
Hello there, is there a way to profile shaderlab's shaders? I'm not looking for anything specific or accurate, I would like to have a generic idea of the complexity of a shader. What I would like to achieve is something similar to the shader complexity in the unreal engine. Here is a link: https://docs.unrealengine.com/latest/INT/Engine/UI/LevelEditor/Viewports/ViewModes/index.html#shadercomplexity
Do you have any suggestions to get a similar result? Thank you!
$$anonymous$$aybe using the unity profiler could be useful or if you know any external tool to profile shaderlab shaders? Thank you!
Answer by Chris_Dlala · Jun 09, 2014 at 09:14 PM
Hi, would instruction count be a good measurement of complexity? Here is a link to show how to get that info. Maybe you could also set up a scene with just one object/example of your shader in it and use the profiler to analyse that. I suppose you could also use PIX to profile. We're not at that stage at the moment, so this is a just a quick suggestion as to what we would try first =P Hope that helps =)
No problem. Could you mark this as your selected answer? =D
Answer by tanoshimi · May 02, 2017 at 08:58 AM
The industry-standard tool for debugging shaders and graphic issues is RenderDoc. It does take a little time to learn, but it's powerful, free and integrates into Unity natively - instructions here: https://docs.unity3d.com/Manual/RenderDocIntegration.html
edit: Just found this helpful article to get you started: http://www.gamasutra.com/blogs/RubenTorres/20160722/277707/When_Unitys_Frame_Debugger_is_not_enough_RenderDoc.php
Your answer
![](https://koobas.hobune.stream/wayback/20220613150952im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to use AlphaTest with a CGPROGRAM 1 Answer
How do I keep an object lit when a light moves past it? 0 Answers
Local position in vertex shader? 1 Answer
Quad vertex color shader 0 Answers
shader unlit transparent + tint settings 0 Answers