Shader如何Debug

Visual Studio

(自称使用vs多年,但其实1/10功能都没用到)

真Unity3d_分享Shader调试debug抓帧capture和gpu调试大全

 

Unity自带Frame Debugger

(有惊喜,能连真机,但能看到的参数,其实都比较鸡肋)

  1. Viewing shader property values
  2. Render target display options
  3. Remote Frame Debugger
  4. Look Look Draw Call

真Unity3d_分享Shader调试debug抓帧capture和gpu调试大全

 

乐乐姐的拾色器

(这图我输出的是UV,也就是u>2,而v(0,1);这个好像和我们直观理解不一样)

 

真Unity3d_分享Shader调试debug抓帧capture和gpu调试大全

Frame Debugger之外的工具

Alternative frame debugging techniques

You could also use external tools to debug rendering. Editor integration exists for easily launching RenderDoc to inspect the Scene or Game view in the Editor.
您还可以使用外部工具来调试渲染。编辑器集成是为了方便地启动RenderDoc来检查编辑器中的场景或游戏视图。

You can also build a standalone player and run it through any of the following:
你也可以建立一个独立的播放器和运行它通过以下任何一个:

  • Visual Studio graphics debugger
  • Intel GPA
  • RenderDoc
  • NVIDIA NSight
  • AMD GPU PerfStudio
  • Xcode GPU Frame Capture
  • GPU Driver Instruments

When you’ve done this, capture a frame of rendering, then step through the draw calls and other rendering events to see what’s going on. This is a very powerful approach, because these tools can provide you with a lot of information to really drill down.
完成此操作后,捕获一个渲染帧,然后逐步遍历DC和其他渲染事件,以查看发生了什么。这是一种非常强大的方法,因为这些工具可以为您提供大量信息以进行深入研究。

(新)Android GPU Inspector

https://gpuinspector.dev

真Unity3d_分享Shader调试debug抓帧capture和gpu调试大全

 

ANDROID测试效能的常用指标

https://www.cnblogs.com/penghong2014/p/4882169.html

真Unity3d_分享Shader调试debug抓帧capture和gpu调试大全

 

(新)GAPID

 

https://developer.aliyun.com/article/724623

GAPIDGoogle下的一个开源库,可用于记录发送给GPUAPI调用及渲染状态检查,目前主要用于Android端,对OpenGL ESVulkan的支持最完善,使用此工具可以协助定位排查端上OpenGL ES的渲染效果、渲染状态及错误、渲染绑定的shader等资源,同时可以即时修改渲染每步中的变量值并查看新的渲染效果。

真Unity3d_分享Shader调试debug抓帧capture和gpu调试大全

 

相关文章:

  • 2021-10-05
  • 2022-01-07
  • 2021-11-30
  • 2021-11-22
  • 2022-01-17
  • 2022-01-11
猜你喜欢
  • 2021-08-28
  • 2021-04-01
  • 2021-08-07
  • 2021-06-27
  • 2021-12-29
相关资源
相似解决方案