Shadeup icon indicating copy to clipboard operation
Shadeup copied to clipboard

Cannot compile compute shader with material graph on 5.1 on macOS

Open TheEnbyWitch opened this issue 2 years ago • 3 comments

Hello! I tried creating a compute shader with material graph and the compiler is complaining about "MeshDrawCommands.h" not existing, even though it's there in "Runtime/Renderer/Private"

[1/3] Compile Module.ShadeupShaders.cpp
In file included from /Users/vivi/Development/[REDACTED]/Plugins/Dev/ShadeupTest/Intermediate/Build/Mac/x86_64/UnrealEditor/Development/ShadeupShaders/Module.ShadeupShaders.cpp:3:
In file included from /Users/vivi/Development/[REDACTED]/Plugins/Dev/ShadeupTest/Intermediate/Build/Mac/x86_64/UnrealEditor/Inc/ShadeupShaders/UHT/MaskShader.gen.cpp:8:
In file included from /Users/vivi/Development/[REDACTED]/Plugins/Dev/ShadeupTest/Source/ShadeupShaders/Public/MaskShader/MaskShader.h:7:
In file included from Runtime/Renderer/Private/ScenePrivate.h:33:
In file included from Runtime/Renderer/Private/LightSceneInfo.h:15:
In file included from Runtime/Renderer/Private/SceneRendering.h:29:
In file included from Runtime/Renderer/Private/SkyAtmosphereRendering.h:15:
0>/Users/Shared/Epic Games/UE_5.1/Engine/Source/Runtime/Renderer/Private/VirtualShadowMaps/VirtualShadowMapArray.h:7:10: Error  : 'MeshDrawCommands.h' file not found
#include "MeshDrawCommands.h"
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.

TheEnbyWitch avatar Feb 15 '23 22:02 TheEnbyWitch

UPDATE: Adding

		PublicIncludePaths.AddRange(new string[] 
		{
			"Runtime/Renderer/Private"
		});

to my .Build.cs seems to have worked, which is probably not the best solution but at least it compiled.

TheEnbyWitch avatar Feb 15 '23 22:02 TheEnbyWitch

Thanks for the report and follow-up solution!

That include path you added should already be in both the CLI tool and the online example ZIPs.

I'm curious, did you use the shadeup CLI command or example ZIP from the website to create this shader? If you used the CLI, did you create a new module using it or use an existing one?

AskingQuestions avatar Feb 16 '23 15:02 AskingQuestions

Hey @AskingQuestions, I used the CLI and created a new module.

TheEnbyWitch avatar Feb 20 '23 14:02 TheEnbyWitch