UE4通过打开DumpShader开关查看ShaderError的引用路径

效果示例

打开此开关后,Cook过程中,将会看到例如以下报错:

LogShaderCompilers: Error: Errors compiling global shader FInstanceXXCS :

LogShaderCompilers: Error: /Engine/Private/Mobile/XXData.ush(31): warning: The macro is redefined

#define PRIMITIVE_SCENE_DATA_X 29

from /Engine/Private/SceneData.ush: 536: #include "Mobile/XData.ush"

from /Engine/Private/VertexFactoryCommon.ush: 4: #include "SceneData.ush"

from /Engine/Private/XQuery.usf: 7: #include "../VertexFactoryCommon.ush"

previously macro "PRIMITIVE_SCENE_DATA_STRIDE" defined as: #define PRIMITIVE_SCENE_DATA_STRIDE 66 /* /Engine/Shared/SceneDefinitions.h:80 */

LogOutputDevice: Warning:

其中 Engine/Private/XQuery.usf 的路径全称是:

EngineSource/Engine/Shaders/Private/XQuery.usf

开关的打开方式

Engine/Config/ConsoleVariables.ini 中,将

;r.DumpShaderDebugInfo=1 改为

r.DumpShaderDebugInfo=1

也就是反注释。

相关推荐
FlyingMindIndex04 天前
UE_ContrlRig
ue5·ue4
HELLOMILI4 天前
[UnrealEngine] 虚幻引擎UE5下载及安装(UE4、UE5)
游戏·ue5·游戏引擎·ue4·虚幻·软件需求
小江村儿的文杰5 天前
UE4报错 Unable to instantiate UnrealEd module for non-editor targets
ue4
pop_opo_6 天前
Unreal Engine 4.27 + AirSim 无人机仿真环境搭建:澳大利亚农村场景更换教程
ue4·无人机
小江村儿的文杰24 天前
UE4 UAT 的六大流程 build cook stage pacakge archive deploy 与UAT的参数
ue4
小江村儿的文杰24 天前
UE4 Rider调试时添加自定义命令行参数
ue4
小江村儿的文杰25 天前
UE4 Mac构建编译报错 no template named “is_void_v” in namespace “std”
macos·ue4
小江村儿的文杰25 天前
理解UE4中C++17的...符号及enable_if_t的用法及SFINAE思想
数据结构·c++·ue4
小江村儿的文杰1 个月前
UE4 Mac构建编译报错 no member named “disjunction” in namespace “std”
ue4