当前位置:网站首页>尝试使用RenderDoc查看UE的Shader代码
尝试使用RenderDoc查看UE的Shader代码
2022-06-13 06:52:00 【YakSue】
问题
在《学习使用RenderDoc查看着色器代码》我学习了如何使用RenderDoc查看shader代码。
在《在UE4中使用RenderDoc》中我学习了如何在UE4中使用RenderDoc。
不过有个问题是,如果我直接在UE中截帧尝试看shader代码,看到的是不具有可读性的汇编指令:
本篇的目标是尝试解决这个问题。
必要操作:r.Shaders.Optimize 和 r.Shaders.KeepDebugInfo
通过查阅《UE4中使用RenderDoc截帧 - 可可西 - 博客园》资料,发现这个问题相关的两个关键控制台变量是r.Shaders.Optimize和r.Shaders.KeepDebugInfo。
需要的值是:
r.Shaders.Optimize=0
r.Shaders.KeepDebugInfo=1
这两个控制台变量在编辑器运行时可以查询到,默认情况下的值刚好相反,而且不能在编辑器内修改。
要想修改,就要在\Engine\Config\ConsoleVariables.ini中修改。
默认情况下,这两个变量的赋值语句都被注释掉了,去掉他们的注释即可:
随后,再启动引擎编辑器,截帧,即可看到可读的shader代码了:
可能不是必要的步骤*:设置为Debug?
因为之前有听到说法是,需要将VS解决方案的配置(原始的这个窗口可能较短,变长的方法见【附录】)
从
改为
可我换了以后没看到对这个问题有帮助。最后发现只要设置了r.Shaders.Optimize和r.Shaders.KeepDebugInfo,那么就算在Development下也能看到可读的shader代码。
所以暂时认为Debug可能不是必要步骤。
不过,设置为Debug可能在其他方面有帮助,所以我暂时记录下遇到的问题。
换过去之后启动后遇到问题:
在 这里 看到了解决方法,即先找一个能进去的模式然后点 File > Cook Content for Windows
等待Cook完成:
随后再换成Debug启动,就看不到这个报错了。
附录:让解决方案配置窗口变长一些
在《修改VS2017解决方案配置窗口宽度》中找到了方法:
工具>自定义
命令>工具栏中选“标准”
选择“解决方案配置”
点击“修改所选内容”
修改宽度,之后点确定。
边栏推荐
- Use of smalidea
- Differences between SQL and NoSQL of mongodb series
- Jinglianwen Technology: current situation and solutions of data annotation industry
- Glide usage notes
- Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides
- JS case Xiaomi second kill countdown New Year Countdown
- YOLOv5解析 | 参数与性能指标
- 【转】FPGA面试题
- Upper computer development (code debugging of firmware download software)
- Why is the blind box e-commerce mode so popular?
猜你喜欢

16、 IO stream (II)
![[cloud native | kubernetes] kubernetes configuration](/img/cb/20595d34a9e203b83dd086cc27037d.png)
[cloud native | kubernetes] kubernetes configuration

As the new trend of blind box e-commerce, how can the platform use blind box play to drain at low cost?

YOLOv5解析 | 参数与性能指标

MySQL系列之分库分表学习笔记

Fe of mL: introduction to vintage curve /vintage analysis, calculation logic and detailed introduction to case application
![[SketchUp 2021] CAD file import and modeling in the sketch master (establish elevation model in the sketch master by using CAD drawings), and the sketch master exports 2D, 3D and elevation effects of](/img/de/d0620a43c47a06d815c21ecb41a117.png)
[SketchUp 2021] CAD file import and modeling in the sketch master (establish elevation model in the sketch master by using CAD drawings), and the sketch master exports 2D, 3D and elevation effects of

Computer network interview questions

髋关节MR详细图谱(转载)

Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides
随机推荐
The new business outlet of beautiful Tiantian second mode will be popular in the Internet e-commerce market
2022-06-12:在N*N的正方形棋盘中,有N*N个棋子,那么每个格子正好可以拥有一个棋子。 但是现在有些棋子聚集到一个格子上了,比如: 2 0 3 0 1 0 3 0 0 如上的二维数组代表,一
如何使用望友DFM软件进行冷板分析
Computer network interview questions
不间断管理设计
Eureka server multi node deployment
As the new trend of blind box e-commerce, how can the platform use blind box play to drain at low cost?
What is the new business model of Taishan crowdfunding in 2022?
景联文科技提供语音数据采集标注服务
Outil de formatage du temps - mode. JS (affichage en temps réel du temps Web)
十五、IO流(一)
Tidb implementation plan -- I
ML:机器学习模型的稳定性分析简介、常见的解决方法之详细攻略
Learning notes of MySQL series by database and table
That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
Is it safe to open an account online in Hangzhou?
Subtotal of constraintlayout
Jfinal uses freemaker to output map.
Vue3 route cache component status and set transition animation
Br backup test