当前位置:网站首页>尝试使用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解决方案配置窗口宽度》中找到了方法:
工具>自定义
命令>工具栏中选“标准”
选择“解决方案配置”
点击“修改所选内容”
修改宽度,之后点确定。
边栏推荐
- Recently, the popular social e-commerce marketing model, blind box e-commerce, how beautiful every second is accurately drained
- Upper computer development (code debugging of firmware download software)
- Subtotal of constraintlayout
- 【sketchup 2021】草图大师的图像输出与渲染之样式说明【边线设置、平面设置、背景设置、水印设置、建模设置、天空背景创建天空、利用水印背景创建天空(重要)】
- 【转】FPGA面试题
- Computer network interview questions
- package-lock. json
- 10 Honest Facts I Want To Share With All Junior Developers
- In kotlin?,!,?:,:, - & gt;、== Brief description of symbols
- Differences between SQL and NoSQL of mongodb series
猜你喜欢
MySQL系列之分库分表学习笔记
Detailed Mr Atlas of hip joint (Reprinted)
如何使用望友DFM軟件進行冷板分析
Network planning common interview knowledge (I)
Tidb index optimization
Why is the blind box e-commerce mode so popular?
智能文娱稳步发展,景联文科技提供数据采集标注服务
Brief introduction to basic usage of echart
Ffmpeg compressed video.
Yolov5 analysis | parameters and performance indicators
随机推荐
Why is the blind box e-commerce mode so popular?
Machine learning notes - supervised learning memo list
Unable to find method 'org gradle. api. artifacts. result. ComponentSelectionReason. getDesc
DataGridView data export to excel (in case of small amount of data)
上位机开发(固件下载软件之编码调试)
景联文科技提供一站式智能家居数据采集标注解决方案
【RS-422与RS-485】RS-422与RS-485串行接口标准
JS method of extracting numbers from strings
Application of DS18B20 temperature sensor based on FPGA
2022-06-12:在N*N的正方形棋盘中,有N*N个棋子,那么每个格子正好可以拥有一个棋子。 但是现在有些棋子聚集到一个格子上了,比如: 2 0 3 0 1 0 3 0 0 如上的二维数组代表,一
New Taishan crowdfunding business diversion fission growth model in 2022
Gold jewelry enterprise operation mode, beautiful tiantians business solution
How to quickly support the team leader to attract new fission users in the business marketing mode of group rebate?
Jinglianwen technology provides a one-stop smart home data acquisition and labeling solution
想进行快速钢网设计,还能保证钢网质量? 来看这里
Tidb implementation plan -- III
That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
基于FPGA的ds18b20温度传感器使用
Comprehensive overview of ijkplayer contour features for ijkplayer code walk through
【sketchup 2021】草图大师的图像输出与渲染之样式说明【边线设置、平面设置、背景设置、水印设置、建模设置、天空背景创建天空、利用水印背景创建天空(重要)】