hugoattal / DarkerNodes

Modern theme for the Unreal editor
50 stars 2 forks source link

Issue with shaders compilation for Buttons / Some Editor Buttons are invisible (max/min/Close...) #158

Open LaurentOngaro opened 3 years ago

LaurentOngaro commented 3 years ago

Hi, When I activate Darker Nodes, the Minimize/Maximize/Close buttons of the editor are present (I can click on them) but invisible (probably missing textures).

missingButtons

My system is: Manjaro Linux Up to date with Gnome 40.4 desktop. Unreal Engine 4.25 compiled from sources

I see the some "compile shader" errors in the startup console of the engine. This is a part of that log:

`[2021.10.01-14.09.21:701][ 0]LogShaderCompilers: Warning: Failed to compile Material /DarkerNodes/Materials/Button.Button for platform SF_VULKAN_SM5, Default Material will be used in game. [2021.10.01-14.09.21:701][ 0]LogShaderCompilers: Display: Can't map virtual shader source path "/DarkerNodes/Button.usf". Directory mappings are: /Engine -> /mnt/R/UnrealEngine/4.25/Engine/Shaders /Plugin/FX/Niagara -> /mnt/R/UnrealEngine/4.25/Engine/Plugins/FX/Niagara/Shaders [2021.10.01-14.09.21:701][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/Button.usf"

include "/DarkerNodes/Button.usf"

from /Engine/Private/TranslucentShadowDepthShaders.usf: 8:    #include "/Engine/Generated/Material.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: 1 err0r in preprocessor. [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/Button.usf"

include "/DarkerNodes/Button.usf"

from /Engine/Private/BasePassPixelShader.usf: 28:    #include "/Engine/Generated/Material.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/Button.usf"

include "/DarkerNodes/Button.usf"

from /Engine/Private/BasePassVertexCommon.ush: 15:    #include "/Engine/Generated/Material.ush"
from /Engine/Private/BasePassVertexShader.usf: 7:    #include "BasePassVertexCommon.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/Button.usf"

include "/DarkerNodes/Button.usf"

from /Engine/Private/SlateShaderCommon.ush: 4:    #include "/Engine/Generated/Material.ush"
from /Engine/Private/SlateVertexShader.usf: 5:    #include "SlateShaderCommon.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/Button.usf"

include "/DarkerNodes/Button.usf"

from /Engine/Private/SlateShaderCommon.ush: 4:    #include "/Engine/Generated/Material.ush"
from /Engine/Private/SlateElementPixelShader.usf: 6:    #include "SlateShaderCommon.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Warning: Failed to compile Material /DarkerNodes/Materials/ButtonCut.ButtonCut for platform SF_VULKAN_SM5, Default Material will be used in game. [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: Can't map virtual shader source path "/DarkerNodes/ButtonCut.usf". Directory mappings are: /Engine -> /mnt/R/UnrealEngine/4.25/Engine/Shaders /Plugin/FX/Niagara -> /mnt/R/UnrealEngine/4.25/Engine/Plugins/FX/Niagara/Shaders [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/ButtonCut.usf"

include "/DarkerNodes/ButtonCut.usf"

from /Engine/Private/TranslucentShadowDepthShaders.usf: 8:    #include "/Engine/Generated/Material.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: 1 err0r in preprocessor. [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/ButtonCut.usf"

include "/DarkerNodes/ButtonCut.usf"

from /Engine/Private/SlateShaderCommon.ush: 4:    #include "/Engine/Generated/Material.ush"
from /Engine/Private/SlateElementPixelShader.usf: 6:    #include "SlateShaderCommon.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/ButtonCut.usf"

include "/DarkerNodes/ButtonCut.usf"

from /Engine/Private/BasePassVertexCommon.ush: 15:    #include "/Engine/Generated/Material.ush"
from /Engine/Private/BasePassVertexShader.usf: 7:    #include "BasePassVertexCommon.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/ButtonCut.usf"

include "/DarkerNodes/ButtonCut.usf"

from /Engine/Private/BasePassPixelShader.usf: 28:    #include "/Engine/Generated/Material.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /Engine/Generated/Material.ush(1853): error: Can't open include file "/DarkerNodes/ButtonCut.usf"

include "/DarkerNodes/ButtonCut.usf"

from /Engine/Private/SlateShaderCommon.ush: 4:    #include "/Engine/Generated/Material.ush"
from /Engine/Private/SlateVertexShader.usf: 5:    #include "SlateShaderCommon.ush"

[2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /DarkerNodes/lib/Shapes.usf(12): error: syntax error, unexpected STATIC [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Warning: Failed to compile Material /DarkerNodes/Materials/Box.Box for platform SF_VULKAN_SM5, Default Material will be used in game. [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /DarkerNodes/lib/Shapes.usf(12): error: syntax error, unexpected STATIC [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Warning: Failed to compile Material /DarkerNodes/Materials/HeaderBox.HeaderBox for platform SF_VULKAN_SM5, Default Material will be used in game. [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /DarkerNodes/lib/Shapes.usf(12): error: syntax error, unexpected STATIC [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Warning: Failed to compile Material /DarkerNodes/Materials/Panel.Panel for platform SF_VULKAN_SM5, Default Material will be used in game. [2021.10.01-14.09.21:702][ 0]LogShaderCompilers: Display: /DarkerNodes/lib/Shapes.usf(12): error: syntax error, unexpected STATIC [2021.10.01-14.09.21:703][ 0]LogShaderCompilers: Warning: Failed to compile Material /DarkerNodes/Materials/CenterUVs.CenterUVs for platform SF_VULKAN_SM5, Default Material will be used in game. [2021.10.01-14.09.21:703][ 0]LogShaderCompilers: Display: /DarkerNodes/CenterUVs.usf(7): error: syntax error, unexpected STATIC `

LaurentOngaro commented 3 years ago

It seems that the loading error in Buttons.usf is due to build errors in Shapes.usf. the #12 line static float IsInRectangle(float2 Location, float2 Start, float2 End) in Shapes.usf throws the following error: error: syntax error, unexpected STATIC

LaurentOngaro commented 3 years ago

This issue does not occur when using UE 4.27 built on the same system. So for me, it's a good solution: I'll upgrade the engine version I use IMO, the code you use in your struct is not compliant with the linux toolchain required for UE 4.25, but it's OK for the 4.27 toolchain.

hugoattal commented 3 years ago

Wow, sorry for that, that's really weird... If you're ok to update to UE 4.27, it's perfect! If you need to stay on UE 4.25, I'll create a custom shader code for Linux user (as it works as expected on Windows). Keep me posted on!

LaurentOngaro commented 3 years ago

If you could find a solution for UE 4.25 it could be great, because some other plugins I use are not compatible with 4.27 till now . I think the issue is due to differences in the C++ versions (and theirs features) allowed in both versions, on linux only because the toolchain used evolves with the engine version. I can easily compile new plugin code on linux if needed. I've created a bach script for that. You can find it on my public gitlab